From 7c47e1d3172ce6f625b93be50aac2ebf86a45d0c Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 23 Nov 2016 10:49:33 -0800 Subject: Remove DataProvider from CFWL_WidgetProperties This CL removes the generic DataProvider code from CFWL_WidgetProperties and adds the specific providers to the two classes that require them. Review-Url: https://codereview.chromium.org/2527683002 --- xfa/fwl/core/ifwl_checkbox.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'xfa/fwl/core/ifwl_checkbox.h') diff --git a/xfa/fwl/core/ifwl_checkbox.h b/xfa/fwl/core/ifwl_checkbox.h index 8d777fc0f5..3a5b83cb5b 100644 --- a/xfa/fwl/core/ifwl_checkbox.h +++ b/xfa/fwl/core/ifwl_checkbox.h @@ -50,7 +50,7 @@ class IFWL_Widget; class IFWL_CheckBox : public IFWL_Widget { public: - class DataProvider : public IFWL_Widget::DataProvider { + class DataProvider { public: virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) = 0; }; @@ -70,6 +70,10 @@ class IFWL_CheckBox : public IFWL_Widget { void OnDrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) override; + void SetDataProvider(IFWL_CheckBox::DataProvider* pProvider) { + m_pDataProvider = pProvider; + } + private: void SetCheckState(int32_t iCheck); void Layout(); @@ -83,6 +87,7 @@ class IFWL_CheckBox : public IFWL_Widget { void OnMouseLeave(); void OnKeyDown(CFWL_MsgKey* pMsg); + IFWL_CheckBox::DataProvider* m_pDataProvider; // Not owned. CFX_RectF m_rtClient; CFX_RectF m_rtBox; CFX_RectF m_rtCaption; -- cgit v1.2.3