| Index: xfa/fwl/core/ifwl_widget.h
|
| diff --git a/xfa/fwl/core/ifwl_widget.h b/xfa/fwl/core/ifwl_widget.h
|
| index 3540a3c87c87d6765b51e0bfb163ce42e68b859f..26d20d3a83c9ae1515f2242578e490ad5aa4f66a 100644
|
| --- a/xfa/fwl/core/ifwl_widget.h
|
| +++ b/xfa/fwl/core/ifwl_widget.h
|
| @@ -11,17 +11,31 @@
|
| #include "core/fxcrt/include/fx_coordinates.h"
|
| #include "core/fxcrt/include/fx_system.h"
|
| #include "xfa/fwl/core/fwl_error.h"
|
| -#include "xfa/fwl/core/ifwl_target.h"
|
|
|
| +// FWL contains three parallel inheritance hierarchies, which reference each
|
| +// other via pointers as follows:
|
| +//
|
| +// m_pIface m_pImpl
|
| +// CFWL_Widget ----------> IFWL_Widget ----------> CFWL_WidgetImp
|
| +// | | |
|
| +// A A A
|
| +// | | |
|
| +// CFWL_... IFWL_... CFWL_...Imp
|
| +//
|
| +
|
| +class CFWL_WidgetImp;
|
| class CFX_Graphics;
|
| +class IFWL_App;
|
| class IFWL_DataProvider;
|
| class IFWL_Form;
|
| -class IFWL_Thread;
|
| class IFWL_ThemeProvider;
|
| class IFWL_WidgetDelegate;
|
|
|
| -class IFWL_Widget : public IFWL_Target {
|
| +class IFWL_Widget {
|
| public:
|
| + IFWL_Widget() : m_pImpl(nullptr) {}
|
| + virtual ~IFWL_Widget();
|
| +
|
| FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
|
| FWL_ERR GetGlobalRect(CFX_RectF& rect);
|
| FWL_ERR SetWidgetRect(const CFX_RectF& rect);
|
| @@ -54,8 +68,24 @@ class IFWL_Widget : public IFWL_Target {
|
| FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
|
| FWL_ERR SetDataProvider(IFWL_DataProvider* pDataProvider);
|
| IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate);
|
| - IFWL_Thread* GetOwnerThread() const;
|
| + IFWL_App* GetOwnerThread() const;
|
| CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent);
|
| +
|
| + // These call into equivalent polymorphic methods of m_pImpl. There
|
| + // should be no need to override these in subclasses.
|
| + FWL_ERR GetClassName(CFX_WideString& wsClass) const;
|
| + uint32_t GetClassID() const;
|
| + FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
|
| + FWL_ERR Initialize();
|
| + FWL_ERR Finalize();
|
| +
|
| + CFWL_WidgetImp* GetImpl() const { return m_pImpl; }
|
| +
|
| + protected:
|
| + void SetImpl(CFWL_WidgetImp* pImpl) { m_pImpl = pImpl; }
|
| +
|
| + private:
|
| + CFWL_WidgetImp* m_pImpl;
|
| };
|
|
|
| #endif // XFA_FWL_CORE_IFWL_WIDGET_H_
|
|
|