diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-02-21 14:27:59 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-21 20:44:29 +0000 |
commit | b45ea1fce52d93615470bab8b671cba5907fb01e (patch) | |
tree | 15153c437a253f73b3f5bb154a294ace77fe2c6d /xfa/fwl/cfwl_scrollbar.h | |
parent | 37a35df8c878d6e21a62ce0dfd2d480997d9e86c (diff) | |
download | pdfium-b45ea1fce52d93615470bab8b671cba5907fb01e.tar.xz |
Convert CFWL messages to use CFX_PointF
This Cl updates the various CFWL_Message classes to take CFX_PointF instead of
x,y values.
Change-Id: I5d9d01d68be64fc9e69c04574994c01286ad24e1
Reviewed-on: https://pdfium-review.googlesource.com/2811
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_scrollbar.h')
-rw-r--r-- | xfa/fwl/cfwl_scrollbar.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/xfa/fwl/cfwl_scrollbar.h b/xfa/fwl/cfwl_scrollbar.h index 62ce523646..6a67fa8687 100644 --- a/xfa/fwl/cfwl_scrollbar.h +++ b/xfa/fwl/cfwl_scrollbar.h @@ -84,35 +84,28 @@ class CFWL_ScrollBar : public CFWL_Widget { CFX_RectF CalcThumbButtonRect(const CFX_RectF& rtThumbRect); CFX_RectF CalcMinTrackRect(const CFX_RectF& rtMinRect); CFX_RectF CalcMaxTrackRect(const CFX_RectF& rtMaxRect); - FX_FLOAT GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy); + FX_FLOAT GetTrackPointPos(const CFX_PointF& point); bool SendEvent(); bool OnScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos); - void OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); - void OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); - void OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); + void OnLButtonDown(const CFX_PointF& point); + void OnLButtonUp(const CFX_PointF& point); + void OnMouseMove(const CFX_PointF& point); void OnMouseLeave(); - void OnMouseWheel(FX_FLOAT fx, - FX_FLOAT fy, - uint32_t dwFlags, - FX_FLOAT fDeltaX, - FX_FLOAT fDeltaY); + void OnMouseWheel(const CFX_PointF& delta); bool DoScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos); void DoMouseDown(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState, - FX_FLOAT fx, - FX_FLOAT fy); + const CFX_PointF& point); void DoMouseUp(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState, - FX_FLOAT fx, - FX_FLOAT fy); + const CFX_PointF& point); void DoMouseMove(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState, - FX_FLOAT fx, - FX_FLOAT fy); + const CFX_PointF& point); void DoMouseLeave(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState); void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState); @@ -129,8 +122,7 @@ class CFWL_ScrollBar : public CFWL_Widget { int32_t m_iMinTrackState; int32_t m_iMaxTrackState; FX_FLOAT m_fLastTrackPos; - FX_FLOAT m_cpTrackPointX; - FX_FLOAT m_cpTrackPointY; + CFX_PointF m_cpTrackPoint; int32_t m_iMouseWheel; bool m_bMouseDown; FX_FLOAT m_fButtonLen; |