Index: xfa/fwl/basewidget/fwl_scrollbarimp.h |
diff --git a/xfa/fwl/basewidget/fwl_scrollbarimp.h b/xfa/fwl/basewidget/fwl_scrollbarimp.h |
index 08f7c69bf7edf5d969acc1b947fd0b32aa68d65e..83da0bfcd59834be0e833059fb983d606247cf9a 100644 |
--- a/xfa/fwl/basewidget/fwl_scrollbarimp.h |
+++ b/xfa/fwl/basewidget/fwl_scrollbarimp.h |
@@ -9,6 +9,7 @@ |
#include "xfa/fwl/core/fwl_widgetimp.h" |
#include "xfa/fwl/core/ifwl_timer.h" |
+#include "xfa/fwl/core/ifwl_widget.h" |
class CFWL_WidgetImpProperties; |
class IFWL_Widget; |
@@ -18,31 +19,38 @@ class CFWL_ScrollBarImp : public CFWL_WidgetImp, public IFWL_Timer { |
public: |
CFWL_ScrollBarImp(const CFWL_WidgetImpProperties& properties, |
IFWL_Widget* pOuter); |
- ~CFWL_ScrollBarImp(); |
- virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; |
- virtual uint32_t GetClassID() const; |
- virtual FWL_ERR Initialize(); |
- virtual FWL_ERR Finalize(); |
- virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); |
- virtual FWL_ERR Update(); |
- virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, |
- const CFX_Matrix* pMatrix = NULL); |
- virtual FX_BOOL IsVertical(); |
- virtual FWL_ERR GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax); |
- virtual FWL_ERR SetRange(FX_FLOAT fMin, FX_FLOAT fMax); |
- virtual FX_FLOAT GetPageSize(); |
- virtual FWL_ERR SetPageSize(FX_FLOAT fPageSize); |
- virtual FX_FLOAT GetStepSize(); |
- virtual FWL_ERR SetStepSize(FX_FLOAT fStepSize); |
- virtual FX_FLOAT GetPos(); |
- virtual FWL_ERR SetPos(FX_FLOAT fPos); |
- virtual FX_FLOAT GetTrackPos(); |
- virtual FWL_ERR SetTrackPos(FX_FLOAT fTrackPos); |
- virtual FX_BOOL DoScroll(uint32_t dwCode, FX_FLOAT fPos = 0.0f); |
- virtual FWL_ERR SetOuter(IFWL_Widget* pOuter); |
- virtual int32_t Run(FWL_HTIMER hTimer); |
+ ~CFWL_ScrollBarImp() override; |
+ |
+ // CFWL_WidgetImp |
+ FWL_ERR GetClassName(CFX_WideString& wsClass) const override; |
+ FWL_Type GetClassID() const override { return FWL_Type::ScrollBar; } |
+ FWL_ERR Initialize() override; |
+ FWL_ERR Finalize() override; |
+ FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; |
+ FWL_ERR Update() override; |
+ FWL_ERR DrawWidget(CFX_Graphics* pGraphics, |
+ const CFX_Matrix* pMatrix = nullptr) override; |
+ |
+ // IFWL_Timer |
+ int32_t Run(FWL_HTIMER hTimer) override; |
+ |
+ FX_BOOL IsVertical(); |
+ FWL_ERR GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax); |
+ FWL_ERR SetRange(FX_FLOAT fMin, FX_FLOAT fMax); |
+ FX_FLOAT GetPageSize(); |
+ FWL_ERR SetPageSize(FX_FLOAT fPageSize); |
+ FX_FLOAT GetStepSize(); |
+ FWL_ERR SetStepSize(FX_FLOAT fStepSize); |
+ FX_FLOAT GetPos(); |
+ FWL_ERR SetPos(FX_FLOAT fPos); |
+ FX_FLOAT GetTrackPos(); |
+ FWL_ERR SetTrackPos(FX_FLOAT fTrackPos); |
+ FX_BOOL DoScroll(uint32_t dwCode, FX_FLOAT fPos = 0.0f); |
+ FWL_ERR SetOuter(IFWL_Widget* pOuter); |
protected: |
+ friend class CFWL_ScrollBarImpDelegate; |
+ |
void DrawTrack(CFX_Graphics* pGraphics, |
IFWL_ThemeProvider* pTheme, |
FX_BOOL bLower = TRUE, |
@@ -96,8 +104,8 @@ class CFWL_ScrollBarImp : public CFWL_WidgetImp, public IFWL_Timer { |
CFX_RectF m_rtMaxTrack; |
FX_BOOL m_bCustomLayout; |
FX_FLOAT m_fMinThumb; |
- friend class CFWL_ScrollBarImpDelegate; |
}; |
+ |
class CFWL_ScrollBarImpDelegate : public CFWL_WidgetImpDelegate { |
public: |
CFWL_ScrollBarImpDelegate(CFWL_ScrollBarImp* pOwner); |