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

Unified Diff: xfa/fwl/core/ifwl_scrollbar.h

Issue 2432423002: Merge the CFWL_*Imp classes into the IFWL_* classes. (Closed)
Patch Set: Review feedback Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_pushbutton.cpp ('k') | xfa/fwl/core/ifwl_scrollbar.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_scrollbar.h
diff --git a/xfa/fwl/basewidget/fwl_scrollbarimp.h b/xfa/fwl/core/ifwl_scrollbar.h
similarity index 79%
rename from xfa/fwl/basewidget/fwl_scrollbarimp.h
rename to xfa/fwl/core/ifwl_scrollbar.h
index 4a7a4634abf1c4dc48d37377780db0498f2bdd81..2a46e0f33d8cc14b9107e2966fadf444dda8c831 100644
--- a/xfa/fwl/basewidget/fwl_scrollbarimp.h
+++ b/xfa/fwl/core/ifwl_scrollbar.h
@@ -4,24 +4,49 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_
-#define XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_
+#ifndef XFA_FWL_CORE_IFWL_SCROLLBAR_H_
+#define XFA_FWL_CORE_IFWL_SCROLLBAR_H_
-#include "xfa/fwl/core/fwl_widgetimp.h"
+#include "core/fxcrt/fx_system.h"
+#include "xfa/fwl/core/cfwl_widgetimpproperties.h"
+#include "xfa/fwl/core/fwl_error.h"
+#include "xfa/fwl/core/ifwl_dataprovider.h"
#include "xfa/fwl/core/ifwl_timer.h"
#include "xfa/fwl/core/ifwl_widget.h"
+class CFWL_ScrollBarImpDelegate;
class CFWL_WidgetImpProperties;
class IFWL_Widget;
-class CFWL_ScrollBarImpDelegate;
-class CFWL_ScrollBarImp : public CFWL_WidgetImp, public IFWL_Timer {
+#define FWL_CLASS_ScrollBar L"FWL_SCROLLBAR"
+#define FWL_STYLEEXT_SCB_Horz (0L << 0)
+#define FWL_STYLEEXT_SCB_Vert (1L << 0)
+
+enum FWL_SCBCODE {
+ FWL_SCBCODE_None = 1,
+ FWL_SCBCODE_Min,
+ FWL_SCBCODE_Max,
+ FWL_SCBCODE_PageBackward,
+ FWL_SCBCODE_PageForward,
+ FWL_SCBCODE_StepBackward,
+ FWL_SCBCODE_StepForward,
+ FWL_SCBCODE_Pos,
+ FWL_SCBCODE_TrackPos,
+ FWL_SCBCODE_EndScroll,
+};
+
+class IFWL_ScrollBarDP : public IFWL_DataProvider {};
+
+class IFWL_ScrollBar : public IFWL_Widget, public IFWL_Timer {
public:
- CFWL_ScrollBarImp(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
- ~CFWL_ScrollBarImp() override;
+ static IFWL_ScrollBar* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
+
+ IFWL_ScrollBar(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
+ ~IFWL_ScrollBar() override;
- // CFWL_WidgetImp
+ // IFWL_Widget
FWL_Error GetClassName(CFX_WideString& wsClass) const override;
FWL_Type GetClassID() const override;
FWL_Error Initialize() override;
@@ -104,11 +129,14 @@ class CFWL_ScrollBarImp : public CFWL_WidgetImp, public IFWL_Timer {
CFX_RectF m_rtMaxTrack;
FX_BOOL m_bCustomLayout;
FX_FLOAT m_fMinThumb;
+
+ protected:
+ IFWL_ScrollBar();
};
class CFWL_ScrollBarImpDelegate : public CFWL_WidgetImpDelegate {
public:
- CFWL_ScrollBarImpDelegate(CFWL_ScrollBarImp* pOwner);
+ CFWL_ScrollBarImpDelegate(IFWL_ScrollBar* pOwner);
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix = nullptr) override;
@@ -141,7 +169,7 @@ class CFWL_ScrollBarImpDelegate : public CFWL_WidgetImpDelegate {
void DoMouseLeave(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
- CFWL_ScrollBarImp* m_pOwner;
+ IFWL_ScrollBar* m_pOwner;
};
-#endif // XFA_FWL_BASEWIDGET_FWL_SCROLLBARIMP_H_
+#endif // XFA_FWL_CORE_IFWL_SCROLLBAR_H_
« no previous file with comments | « xfa/fwl/core/ifwl_pushbutton.cpp ('k') | xfa/fwl/core/ifwl_scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698