summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/pdfwindow/PWL_Wnd.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-26 14:24:28 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-26 14:24:28 -0800
commit281a9eadff15b167e2ee3032e21b83190ad49125 (patch)
treef02f7d0842f59d8e69bda011b3e62547ffb1acde /fpdfsdk/include/pdfwindow/PWL_Wnd.h
parent566b974287ce0e81a963138152b8898f22480f52 (diff)
downloadpdfium-281a9eadff15b167e2ee3032e21b83190ad49125.tar.xz
Re-land "Replace CPDF_Rect and CPDF_Point with CFX types."
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1737593006 .
Diffstat (limited to 'fpdfsdk/include/pdfwindow/PWL_Wnd.h')
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Wnd.h61
1 files changed, 31 insertions, 30 deletions
diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
index 1bc5023c98..19046e6c9c 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
@@ -228,7 +228,7 @@ struct PWL_CREATEPARAM {
eCursorType(FXCT_ARROW),
mtChild(1, 0, 0, 1, 0, 0) {}
- CPDF_Rect rcRectWnd; // required
+ CFX_FloatRect rcRectWnd; // required
IFX_SystemHandler* pSystemHandler; // required
IFX_Edit_FontMap* pFontMap; // required for text window
IPWL_Provider* pProvider; // required for self coordinate
@@ -293,25 +293,25 @@ class CPWL_Wnd : public CPWL_TimerHandler {
void InvalidateFocusHandler(IPWL_FocusHandler* handler);
void InvalidateProvider(IPWL_Provider* provider);
void Destroy();
- void Move(const CPDF_Rect& rcNew, FX_BOOL bReset, FX_BOOL bRefresh);
- virtual void InvalidateRect(CPDF_Rect* pRect = NULL);
+ void Move(const CFX_FloatRect& rcNew, FX_BOOL bReset, FX_BOOL bRefresh);
+ virtual void InvalidateRect(CFX_FloatRect* pRect = NULL);
void DrawAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device);
virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
virtual FX_BOOL OnKeyUp(FX_WORD nChar, FX_DWORD nFlag);
virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnMButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnMButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnMButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnRButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag);
+ virtual FX_BOOL OnLButtonDblClk(const CFX_FloatPoint& point, FX_DWORD nFlag);
+ virtual FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag);
+ virtual FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag);
+ virtual FX_BOOL OnMButtonDblClk(const CFX_FloatPoint& point, FX_DWORD nFlag);
+ virtual FX_BOOL OnMButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag);
+ virtual FX_BOOL OnMButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag);
+ virtual FX_BOOL OnRButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag);
+ virtual FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag);
+ virtual FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag);
virtual FX_BOOL OnMouseWheel(short zDelta,
- const CPDF_Point& point,
+ const CFX_FloatPoint& point,
FX_DWORD nFlag);
virtual void SetFocus();
@@ -327,7 +327,7 @@ class CPWL_Wnd : public CPWL_TimerHandler {
virtual void SetTextStrokeColor(const CPWL_Color& color);
virtual void SetVisible(FX_BOOL bVisible);
- virtual CPDF_Rect GetFocusRect() const;
+ virtual CFX_FloatRect GetFocusRect() const;
virtual CPWL_Color GetBackgroundColor() const;
virtual CPWL_Color GetBorderColor() const;
virtual CPWL_Color GetTextColor() const;
@@ -340,25 +340,25 @@ class CPWL_Wnd : public CPWL_TimerHandler {
virtual void SetFontSize(FX_FLOAT fFontSize);
void SetBackgroundColor(const CPWL_Color& color);
- void SetClipRect(const CPDF_Rect& rect);
+ void SetClipRect(const CFX_FloatRect& rect);
void SetBorderStyle(int32_t eBorderStyle);
- virtual CPDF_Rect GetWindowRect() const;
- virtual CPDF_Rect GetClientRect() const;
- CPDF_Point GetCenterPoint() const;
+ virtual CFX_FloatRect GetWindowRect() const;
+ virtual CFX_FloatRect GetClientRect() const;
+ CFX_FloatPoint GetCenterPoint() const;
int32_t GetBorderWidth() const;
FX_BOOL IsVisible() const { return m_bVisible; }
FX_BOOL HasFlag(FX_DWORD dwFlags) const;
void AddFlag(FX_DWORD dwFlags);
void RemoveFlag(FX_DWORD dwFlags);
- const CPDF_Rect& GetClipRect() const;
+ const CFX_FloatRect& GetClipRect() const;
CPWL_Wnd* GetParentWindow() const;
int32_t GetBorderStyle() const;
const CPWL_Dash& GetBorderDash() const;
void* GetAttachedData() const;
- FX_BOOL WndHitTest(const CPDF_Point& point) const;
- FX_BOOL ClientHitTest(const CPDF_Point& point) const;
+ FX_BOOL WndHitTest(const CFX_FloatPoint& point) const;
+ FX_BOOL ClientHitTest(const CFX_FloatPoint& point) const;
FX_BOOL IsCaptureMouse() const;
const CPWL_Wnd* GetFocused() const;
@@ -378,10 +378,10 @@ class CPWL_Wnd : public CPWL_TimerHandler {
void SetChildMatrix(const CFX_Matrix& mt);
CFX_Matrix GetWindowMatrix() const;
- virtual CPDF_Point ChildToParent(const CPDF_Point& point) const;
- virtual CPDF_Rect ChildToParent(const CPDF_Rect& rect) const;
- virtual CPDF_Point ParentToChild(const CPDF_Point& point) const;
- virtual CPDF_Rect ParentToChild(const CPDF_Rect& rect) const;
+ virtual CFX_FloatPoint ChildToParent(const CFX_FloatPoint& point) const;
+ virtual CFX_FloatRect ChildToParent(const CFX_FloatRect& rect) const;
+ virtual CFX_FloatPoint ParentToChild(const CFX_FloatPoint& point) const;
+ virtual CFX_FloatRect ParentToChild(const CFX_FloatRect& rect) const;
// those methods only implemented by listctrl item
virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) { return 0; }
@@ -423,10 +423,11 @@ class CPWL_Wnd : public CPWL_TimerHandler {
const PWL_CREATEPARAM& GetCreationParam() const;
FX_BOOL IsNotifying() const { return m_bNotifying; }
- void InvalidateRectMove(const CPDF_Rect& rcOld, const CPDF_Rect& rcNew);
+ void InvalidateRectMove(const CFX_FloatRect& rcOld,
+ const CFX_FloatRect& rcNew);
- void PWLtoWnd(const CPDF_Point& point, int32_t& x, int32_t& y) const;
- FX_RECT PWLtoWnd(const CPDF_Rect& rect) const;
+ void PWLtoWnd(const CFX_FloatPoint& point, int32_t& x, int32_t& y) const;
+ FX_RECT PWLtoWnd(const CFX_FloatRect& rect) const;
FX_HWND GetAttachedHWnd() const;
FX_BOOL IsWndCaptureMouse(const CPWL_Wnd* pWnd) const;
@@ -459,8 +460,8 @@ class CPWL_Wnd : public CPWL_TimerHandler {
CPWL_ScrollBar* m_pVScrollBar;
- CPDF_Rect m_rcWindow;
- CPDF_Rect m_rcClip;
+ CFX_FloatRect m_rcWindow;
+ CFX_FloatRect m_rcClip;
FX_BOOL m_bCreated;
FX_BOOL m_bVisible;