Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1136)

Side by Side Diff: xfa/fwl/basewidget/fwl_scrollbarimp.h

Issue 1952693003: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_pushbuttonimp.cpp ('k') | xfa/fwl/basewidget/fwl_scrollbarimp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_ 7 #ifndef XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_
8 #define XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_ 8 #define XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_
9 9
10 #include "xfa/fwl/core/fwl_widgetimp.h" 10 #include "xfa/fwl/core/fwl_widgetimp.h"
11 #include "xfa/fwl/core/ifwl_timer.h" 11 #include "xfa/fwl/core/ifwl_timer.h"
12 12
13 class CFWL_WidgetImpProperties; 13 class CFWL_WidgetImpProperties;
14 class IFWL_Widget; 14 class IFWL_Widget;
15 class CFWL_ScrollBarImpDelegate; 15 class CFWL_ScrollBarImpDelegate;
16 16
17 class CFWL_ScrollBarImp : public CFWL_WidgetImp, public IFWL_Timer { 17 class CFWL_ScrollBarImp : public CFWL_WidgetImp, public IFWL_Timer {
18 public: 18 public:
19 CFWL_ScrollBarImp(const CFWL_WidgetImpProperties& properties, 19 CFWL_ScrollBarImp(const CFWL_WidgetImpProperties& properties,
20 IFWL_Widget* pOuter); 20 IFWL_Widget* pOuter);
21 ~CFWL_ScrollBarImp(); 21 ~CFWL_ScrollBarImp();
22 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; 22 virtual FWL_Error GetClassName(CFX_WideString& wsClass) const;
23 virtual uint32_t GetClassID() const; 23 virtual uint32_t GetClassID() const;
24 virtual FWL_ERR Initialize(); 24 virtual FWL_Error Initialize();
25 virtual FWL_ERR Finalize(); 25 virtual FWL_Error Finalize();
26 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); 26 virtual FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
27 virtual FWL_ERR Update(); 27 virtual FWL_Error Update();
28 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, 28 virtual FWL_Error DrawWidget(CFX_Graphics* pGraphics,
29 const CFX_Matrix* pMatrix = NULL); 29 const CFX_Matrix* pMatrix = NULL);
30 virtual FX_BOOL IsVertical(); 30 virtual FX_BOOL IsVertical();
31 virtual FWL_ERR GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax); 31 virtual FWL_Error GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax);
32 virtual FWL_ERR SetRange(FX_FLOAT fMin, FX_FLOAT fMax); 32 virtual FWL_Error SetRange(FX_FLOAT fMin, FX_FLOAT fMax);
33 virtual FX_FLOAT GetPageSize(); 33 virtual FX_FLOAT GetPageSize();
34 virtual FWL_ERR SetPageSize(FX_FLOAT fPageSize); 34 virtual FWL_Error SetPageSize(FX_FLOAT fPageSize);
35 virtual FX_FLOAT GetStepSize(); 35 virtual FX_FLOAT GetStepSize();
36 virtual FWL_ERR SetStepSize(FX_FLOAT fStepSize); 36 virtual FWL_Error SetStepSize(FX_FLOAT fStepSize);
37 virtual FX_FLOAT GetPos(); 37 virtual FX_FLOAT GetPos();
38 virtual FWL_ERR SetPos(FX_FLOAT fPos); 38 virtual FWL_Error SetPos(FX_FLOAT fPos);
39 virtual FX_FLOAT GetTrackPos(); 39 virtual FX_FLOAT GetTrackPos();
40 virtual FWL_ERR SetTrackPos(FX_FLOAT fTrackPos); 40 virtual FWL_Error SetTrackPos(FX_FLOAT fTrackPos);
41 virtual FX_BOOL DoScroll(uint32_t dwCode, FX_FLOAT fPos = 0.0f); 41 virtual FX_BOOL DoScroll(uint32_t dwCode, FX_FLOAT fPos = 0.0f);
42 virtual FWL_ERR SetOuter(IFWL_Widget* pOuter); 42 virtual FWL_Error SetOuter(IFWL_Widget* pOuter);
43 virtual int32_t Run(FWL_HTIMER hTimer); 43 virtual int32_t Run(FWL_HTIMER hTimer);
44 44
45 protected: 45 protected:
46 void DrawTrack(CFX_Graphics* pGraphics, 46 void DrawTrack(CFX_Graphics* pGraphics,
47 IFWL_ThemeProvider* pTheme, 47 IFWL_ThemeProvider* pTheme,
48 FX_BOOL bLower = TRUE, 48 FX_BOOL bLower = TRUE,
49 const CFX_Matrix* pMatrix = NULL); 49 const CFX_Matrix* pMatrix = NULL);
50 void DrawArrowBtn(CFX_Graphics* pGraphics, 50 void DrawArrowBtn(CFX_Graphics* pGraphics,
51 IFWL_ThemeProvider* pTheme, 51 IFWL_ThemeProvider* pTheme,
52 FX_BOOL bMinBtn = TRUE, 52 FX_BOOL bMinBtn = TRUE,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 CFX_RectF m_rtMaxBtn; 94 CFX_RectF m_rtMaxBtn;
95 CFX_RectF m_rtMinTrack; 95 CFX_RectF m_rtMinTrack;
96 CFX_RectF m_rtMaxTrack; 96 CFX_RectF m_rtMaxTrack;
97 FX_BOOL m_bCustomLayout; 97 FX_BOOL m_bCustomLayout;
98 FX_FLOAT m_fMinThumb; 98 FX_FLOAT m_fMinThumb;
99 friend class CFWL_ScrollBarImpDelegate; 99 friend class CFWL_ScrollBarImpDelegate;
100 }; 100 };
101 class CFWL_ScrollBarImpDelegate : public CFWL_WidgetImpDelegate { 101 class CFWL_ScrollBarImpDelegate : public CFWL_WidgetImpDelegate {
102 public: 102 public:
103 CFWL_ScrollBarImpDelegate(CFWL_ScrollBarImp* pOwner); 103 CFWL_ScrollBarImpDelegate(CFWL_ScrollBarImp* pOwner);
104 int32_t OnProcessMessage(CFWL_Message* pMessage) override; 104 void OnProcessMessage(CFWL_Message* pMessage) override;
105 FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics, 105 void OnDrawWidget(CFX_Graphics* pGraphics,
106 const CFX_Matrix* pMatrix = NULL) override; 106 const CFX_Matrix* pMatrix = NULL) override;
107 107
108 protected: 108 protected:
109 void OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 109 void OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
110 void OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 110 void OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
111 void OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 111 void OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
112 void OnMouseLeave(); 112 void OnMouseLeave();
113 void OnMouseWheel(FX_FLOAT fx, 113 void OnMouseWheel(FX_FLOAT fx,
114 FX_FLOAT fy, 114 FX_FLOAT fy,
115 uint32_t dwFlags, 115 uint32_t dwFlags,
116 FX_FLOAT fDeltaX, 116 FX_FLOAT fDeltaX,
(...skipping 13 matching lines...) Expand all
130 int32_t& iState, 130 int32_t& iState,
131 FX_FLOAT fx, 131 FX_FLOAT fx,
132 FX_FLOAT fy); 132 FX_FLOAT fy);
133 void DoMouseLeave(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState); 133 void DoMouseLeave(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
134 void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState); 134 void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
135 135
136 CFWL_ScrollBarImp* m_pOwner; 136 CFWL_ScrollBarImp* m_pOwner;
137 }; 137 };
138 138
139 #endif // XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_ 139 #endif // XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_pushbuttonimp.cpp ('k') | xfa/fwl/basewidget/fwl_scrollbarimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698