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

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

Issue 2004213002: Remove IWFL_WidgetMgr in favor of CFWL_WidgetMgr (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix mac build. 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 side-by-side diff with in-line comments
Download patch
Index: xfa/fwl/core/fwl_widgetmgrimp.h
diff --git a/xfa/fwl/core/fwl_widgetmgrimp.h b/xfa/fwl/core/fwl_widgetmgrimp.h
index 6e4fffeca15962e14c26298b227cacf1ce7232bc..ee71053a994cd28509c241484c6f1a3799505948 100644
--- a/xfa/fwl/core/fwl_widgetmgrimp.h
+++ b/xfa/fwl/core/fwl_widgetmgrimp.h
@@ -12,7 +12,6 @@
#include "core/fxcrt/include/fx_system.h"
#include "xfa/fwl/core/fwl_error.h"
-#include "xfa/fwl/core/ifwl_widgetmgr.h"
#include "xfa/fxgraphics/include/cfx_graphics.h"
#define FWL_WGTMGR_DisableThread 0x00000001
@@ -58,21 +57,25 @@ class CFWL_WidgetMgrItem {
#endif
};
-class CFWL_WidgetMgr : public IFWL_WidgetMgr {
+class CFWL_WidgetMgr {
public:
+ static CFWL_WidgetMgr* GetInstance();
+
CFWL_WidgetMgr(CXFA_FFApp* pAdapterNative);
Lei Zhang 2016/05/24 00:36:10 explicit
Tom Sepez 2016/05/24 16:27:15 Done.
- ~CFWL_WidgetMgr() override;
-
- // IFWL_WidgetMgr:
- int32_t CountWidgets(IFWL_Widget* pParent = NULL) override;
- IFWL_Widget* GetWidget(int32_t nIndex, IFWL_Widget* pParent = NULL) override;
- IFWL_Widget* GetWidget(IFWL_Widget* pWidget,
- FWL_WGTRELATION eRelation) override;
- int32_t GetWidgetIndex(IFWL_Widget* pWidget) override;
- FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex) override;
- FWL_Error RepaintWidget(IFWL_Widget* pWidget,
- const CFX_RectF* pRect = NULL) override;
- uint32_t GetCapability() override { return m_dwCapability; }
+ ~CFWL_WidgetMgr();
+
+ IFWL_Widget* GetParentWidget(IFWL_Widget* pWidget) const;
+ IFWL_Widget* GetOwnerWidget(IFWL_Widget* pWidget) const;
+ IFWL_Widget* GetFirstSiblingWidget(IFWL_Widget* pWidget) const;
+ IFWL_Widget* GetPriorSiblingWidget(IFWL_Widget* pWidget) const;
+ IFWL_Widget* GetNextSiblingWidget(IFWL_Widget* pWidget) const;
+ IFWL_Widget* GetLastSiblingWidget(IFWL_Widget* pWidget) const;
+ IFWL_Widget* GetFirstChildWidget(IFWL_Widget* pWidget) const;
+ IFWL_Widget* GetLastChildWidget(IFWL_Widget* pWidget) const;
+ IFWL_Widget* GetSystemFormWidget(IFWL_Widget* pWidget) const;
+
+ FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex);
Lei Zhang 2016/05/24 00:36:10 BTW, nobody checks the return value.
Lei Zhang 2016/05/24 00:36:51 I'm fine if we leave it alone for now.
Tom Sepez 2016/05/24 16:27:15 Left alone for now.
+ FWL_Error RepaintWidget(IFWL_Widget* pWidget, const CFX_RectF* pRect = NULL);
void AddWidget(IFWL_Widget* pWidget);
void InsertWidget(IFWL_Widget* pParent,
@@ -110,7 +113,7 @@ class CFWL_WidgetMgr : public IFWL_WidgetMgr {
int32_t* pIndex,
CFWL_WidgetMgrItem* pItem,
IFWL_Widget** pWidget = NULL);
- FX_BOOL IsAbleNative(IFWL_Widget* pWidget);
+ FX_BOOL IsAbleNative(IFWL_Widget* pWidget) const;
uint32_t m_dwCapability;
std::unique_ptr<CFWL_WidgetMgrDelegate> m_pDelegate;

Powered by Google App Engine
This is Rietveld 408576698