OLD | NEW |
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_widgetimpproperties.h" | 11 #include "xfa/fwl/core/cfwl_widgetproperties.h" |
12 #include "xfa/fwl/core/fwl_error.h" | 12 #include "xfa/fwl/core/fwl_error.h" |
13 #include "xfa/fwl/core/ifwl_dataprovider.h" | 13 #include "xfa/fwl/core/ifwl_dataprovider.h" |
14 #include "xfa/fwl/core/ifwl_timer.h" | 14 #include "xfa/fwl/core/ifwl_timer.h" |
15 #include "xfa/fwl/core/ifwl_widget.h" | 15 #include "xfa/fwl/core/ifwl_widget.h" |
16 | 16 |
17 class CFWL_WidgetImpProperties; | |
18 class IFWL_Widget; | 17 class IFWL_Widget; |
19 | 18 |
20 #define FWL_STYLEEXT_SCB_Horz (0L << 0) | 19 #define FWL_STYLEEXT_SCB_Horz (0L << 0) |
21 #define FWL_STYLEEXT_SCB_Vert (1L << 0) | 20 #define FWL_STYLEEXT_SCB_Vert (1L << 0) |
22 | 21 |
23 enum FWL_SCBCODE { | 22 enum FWL_SCBCODE { |
24 FWL_SCBCODE_None = 1, | 23 FWL_SCBCODE_None = 1, |
25 FWL_SCBCODE_Min, | 24 FWL_SCBCODE_Min, |
26 FWL_SCBCODE_Max, | 25 FWL_SCBCODE_Max, |
27 FWL_SCBCODE_PageBackward, | 26 FWL_SCBCODE_PageBackward, |
28 FWL_SCBCODE_PageForward, | 27 FWL_SCBCODE_PageForward, |
29 FWL_SCBCODE_StepBackward, | 28 FWL_SCBCODE_StepBackward, |
30 FWL_SCBCODE_StepForward, | 29 FWL_SCBCODE_StepForward, |
31 FWL_SCBCODE_Pos, | 30 FWL_SCBCODE_Pos, |
32 FWL_SCBCODE_TrackPos, | 31 FWL_SCBCODE_TrackPos, |
33 FWL_SCBCODE_EndScroll, | 32 FWL_SCBCODE_EndScroll, |
34 }; | 33 }; |
35 | 34 |
36 class IFWL_ScrollBarDP : public IFWL_DataProvider {}; | 35 class IFWL_ScrollBarDP : public IFWL_DataProvider {}; |
37 | 36 |
38 class IFWL_ScrollBar : public IFWL_Widget { | 37 class IFWL_ScrollBar : public IFWL_Widget { |
39 public: | 38 public: |
40 IFWL_ScrollBar(const IFWL_App* app, | 39 IFWL_ScrollBar(const IFWL_App* app, |
41 const CFWL_WidgetImpProperties& properties, | 40 std::unique_ptr<CFWL_WidgetProperties> properties, |
42 IFWL_Widget* pOuter); | 41 IFWL_Widget* pOuter); |
43 ~IFWL_ScrollBar() override; | 42 ~IFWL_ScrollBar() override; |
44 | 43 |
45 // IFWL_Widget | 44 // IFWL_Widget |
46 FWL_Type GetClassID() const override; | 45 FWL_Type GetClassID() const override; |
47 FWL_Error GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false) override; | 46 FWL_Error GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false) override; |
48 FWL_Error Update() override; | 47 FWL_Error Update() override; |
49 FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 48 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
50 const CFX_Matrix* pMatrix = nullptr) override; | 49 const CFX_Matrix* pMatrix = nullptr) override; |
51 void OnProcessMessage(CFWL_Message* pMessage) override; | 50 void OnProcessMessage(CFWL_Message* pMessage) override; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 void DoMouseMove(int32_t iItem, | 154 void DoMouseMove(int32_t iItem, |
156 const CFX_RectF& rtItem, | 155 const CFX_RectF& rtItem, |
157 int32_t& iState, | 156 int32_t& iState, |
158 FX_FLOAT fx, | 157 FX_FLOAT fx, |
159 FX_FLOAT fy); | 158 FX_FLOAT fy); |
160 void DoMouseLeave(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState); | 159 void DoMouseLeave(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState); |
161 void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState); | 160 void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState); |
162 }; | 161 }; |
163 | 162 |
164 #endif // XFA_FWL_CORE_IFWL_SCROLLBAR_H_ | 163 #endif // XFA_FWL_CORE_IFWL_SCROLLBAR_H_ |
OLD | NEW |