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

Side by Side Diff: xfa/fwl/core/ifwl_scrollbar.h

Issue 2482253004: Convert FWL_SCBCODE to an enum class (Closed)
Patch Set: Rebase to master Created 4 years, 1 month 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/core/ifwl_listbox.cpp ('k') | xfa/fwl/core/ifwl_scrollbar.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_CORE_IFWL_SCROLLBAR_H_ 7 #ifndef XFA_FWL_CORE_IFWL_SCROLLBAR_H_
8 #define XFA_FWL_CORE_IFWL_SCROLLBAR_H_ 8 #define XFA_FWL_CORE_IFWL_SCROLLBAR_H_
9 9
10 #include "core/fxcrt/fx_system.h" 10 #include "core/fxcrt/fx_system.h"
11 #include "xfa/fwl/core/cfwl_widgetproperties.h" 11 #include "xfa/fwl/core/cfwl_widgetproperties.h"
12 #include "xfa/fwl/core/ifwl_dataprovider.h" 12 #include "xfa/fwl/core/ifwl_dataprovider.h"
13 #include "xfa/fwl/core/ifwl_timer.h" 13 #include "xfa/fwl/core/ifwl_timer.h"
14 #include "xfa/fwl/core/ifwl_widget.h" 14 #include "xfa/fwl/core/ifwl_widget.h"
15 15
16 class IFWL_Widget; 16 class IFWL_Widget;
17 17
18 #define FWL_STYLEEXT_SCB_Horz (0L << 0) 18 #define FWL_STYLEEXT_SCB_Horz (0L << 0)
19 #define FWL_STYLEEXT_SCB_Vert (1L << 0) 19 #define FWL_STYLEEXT_SCB_Vert (1L << 0)
20 20
21 enum FWL_SCBCODE {
22 FWL_SCBCODE_None = 1,
23 FWL_SCBCODE_Min,
24 FWL_SCBCODE_Max,
25 FWL_SCBCODE_PageBackward,
26 FWL_SCBCODE_PageForward,
27 FWL_SCBCODE_StepBackward,
28 FWL_SCBCODE_StepForward,
29 FWL_SCBCODE_Pos,
30 FWL_SCBCODE_TrackPos,
31 FWL_SCBCODE_EndScroll,
32 };
33
34 class IFWL_ScrollBarDP : public IFWL_DataProvider {}; 21 class IFWL_ScrollBarDP : public IFWL_DataProvider {};
35 22
36 class IFWL_ScrollBar : public IFWL_Widget { 23 class IFWL_ScrollBar : public IFWL_Widget {
37 public: 24 public:
38 IFWL_ScrollBar(const IFWL_App* app, 25 IFWL_ScrollBar(const IFWL_App* app,
39 std::unique_ptr<CFWL_WidgetProperties> properties, 26 std::unique_ptr<CFWL_WidgetProperties> properties,
40 IFWL_Widget* pOuter); 27 IFWL_Widget* pOuter);
41 ~IFWL_ScrollBar() override; 28 ~IFWL_ScrollBar() override;
42 29
43 // IFWL_Widget 30 // IFWL_Widget
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void Layout(); 82 void Layout();
96 void CalcButtonLen(); 83 void CalcButtonLen();
97 void CalcMinButtonRect(CFX_RectF& rect); 84 void CalcMinButtonRect(CFX_RectF& rect);
98 void CalcMaxButtonRect(CFX_RectF& rect); 85 void CalcMaxButtonRect(CFX_RectF& rect);
99 void CalcThumbButtonRect(CFX_RectF& rect); 86 void CalcThumbButtonRect(CFX_RectF& rect);
100 void CalcMinTrackRect(CFX_RectF& rect); 87 void CalcMinTrackRect(CFX_RectF& rect);
101 void CalcMaxTrackRect(CFX_RectF& rect); 88 void CalcMaxTrackRect(CFX_RectF& rect);
102 FX_FLOAT GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy); 89 FX_FLOAT GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy);
103 void GetTrackRect(CFX_RectF& rect, bool bLower = true); 90 void GetTrackRect(CFX_RectF& rect, bool bLower = true);
104 bool SendEvent(); 91 bool SendEvent();
105 bool OnScroll(uint32_t dwCode, FX_FLOAT fPos); 92 bool OnScroll(FWL_SCBCODE dwCode, FX_FLOAT fPos);
106 void OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 93 void OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
107 void OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 94 void OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
108 void OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); 95 void OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
109 void OnMouseLeave(); 96 void OnMouseLeave();
110 void OnMouseWheel(FX_FLOAT fx, 97 void OnMouseWheel(FX_FLOAT fx,
111 FX_FLOAT fy, 98 FX_FLOAT fy,
112 uint32_t dwFlags, 99 uint32_t dwFlags,
113 FX_FLOAT fDeltaX, 100 FX_FLOAT fDeltaX,
114 FX_FLOAT fDeltaY); 101 FX_FLOAT fDeltaY);
115 bool DoScroll(uint32_t dwCode, FX_FLOAT fPos = 0.0f); 102 bool DoScroll(FWL_SCBCODE dwCode, FX_FLOAT fPos = 0.0f);
116 void DoMouseDown(int32_t iItem, 103 void DoMouseDown(int32_t iItem,
117 const CFX_RectF& rtItem, 104 const CFX_RectF& rtItem,
118 int32_t& iState, 105 int32_t& iState,
119 FX_FLOAT fx, 106 FX_FLOAT fx,
120 FX_FLOAT fy); 107 FX_FLOAT fy);
121 void DoMouseUp(int32_t iItem, 108 void DoMouseUp(int32_t iItem,
122 const CFX_RectF& rtItem, 109 const CFX_RectF& rtItem,
123 int32_t& iState, 110 int32_t& iState,
124 FX_FLOAT fx, 111 FX_FLOAT fx,
125 FX_FLOAT fy); 112 FX_FLOAT fy);
(...skipping 29 matching lines...) Expand all
155 CFX_RectF m_rtMinBtn; 142 CFX_RectF m_rtMinBtn;
156 CFX_RectF m_rtMaxBtn; 143 CFX_RectF m_rtMaxBtn;
157 CFX_RectF m_rtMinTrack; 144 CFX_RectF m_rtMinTrack;
158 CFX_RectF m_rtMaxTrack; 145 CFX_RectF m_rtMaxTrack;
159 bool m_bCustomLayout; 146 bool m_bCustomLayout;
160 FX_FLOAT m_fMinThumb; 147 FX_FLOAT m_fMinThumb;
161 IFWL_ScrollBar::Timer m_Timer; 148 IFWL_ScrollBar::Timer m_Timer;
162 }; 149 };
163 150
164 #endif // XFA_FWL_CORE_IFWL_SCROLLBAR_H_ 151 #endif // XFA_FWL_CORE_IFWL_SCROLLBAR_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_listbox.cpp ('k') | xfa/fwl/core/ifwl_scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698