From eb3f68cc7f25a1e28464eb251161b8f08fcd04bc Mon Sep 17 00:00:00 2001 From: dsinclair Date: Mon, 7 Nov 2016 10:28:47 -0800 Subject: Fold DataProviders into parent classes This CL removes the data provider classes and folds the code into the parent classes. Review-Url: https://codereview.chromium.org/2480233003 --- xfa/fwl/core/fwl_noteimp.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'xfa/fwl/core/fwl_noteimp.h') diff --git a/xfa/fwl/core/fwl_noteimp.h b/xfa/fwl/core/fwl_noteimp.h index e9a738aa87..0b99dba80c 100644 --- a/xfa/fwl/core/fwl_noteimp.h +++ b/xfa/fwl/core/fwl_noteimp.h @@ -13,10 +13,10 @@ #include "xfa/fwl/core/cfwl_event.h" #include "xfa/fwl/core/cfwl_message.h" #include "xfa/fwl/core/fwl_error.h" +#include "xfa/fwl/core/ifwl_tooltip.h" #include "xfa/fwl/core/ifwl_widget.h" #include "xfa/fxgraphics/cfx_graphics.h" -class CFWL_CoreToolTipDP; class CFWL_EventTarget; class CFWL_MsgActivate; class CFWL_MsgDeactivate; @@ -127,19 +127,31 @@ class CFWL_EventTarget { bool m_bInvalid; }; -class CFWL_ToolTipContainer final { +class CFWL_ToolTipContainer final : public IFWL_ToolTipDP { public: static CFWL_ToolTipContainer* getInstance(); static void DeleteInstance(); + // IFWL_ToolTipDP + FWL_Error GetCaption(IFWL_Widget* pWidget, + CFX_WideString& wsCaption) override; + int32_t GetInitialDelay(IFWL_Widget* pWidget) override; + int32_t GetAutoPopDelay(IFWL_Widget* pWidget) override; + CFX_DIBitmap* GetToolTipIcon(IFWL_Widget* pWidget) override; + CFX_SizeF GetToolTipIconSize(IFWL_Widget* pWidget) override; + protected: CFWL_ToolTipContainer(); - ~CFWL_ToolTipContainer(); + ~CFWL_ToolTipContainer() override; - std::unique_ptr m_pToolTipDp; + CFX_RectF GetAnchor(); private: static CFWL_ToolTipContainer* s_pInstance; + CFX_WideString m_wsCaption; + int32_t m_nInitDelayTime; + int32_t m_nAutoPopDelayTime; + CFX_RectF m_fAnchor; }; #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ -- cgit v1.2.3