summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_checkbox.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-23 10:49:33 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-23 10:49:33 -0800
commit7c47e1d3172ce6f625b93be50aac2ebf86a45d0c (patch)
treebb7beae7637635cd0c631f015411a63fd2892486 /xfa/fwl/core/ifwl_checkbox.h
parent7172b71a005c181e9f103ac0e19f6675bf3bc8e8 (diff)
downloadpdfium-7c47e1d3172ce6f625b93be50aac2ebf86a45d0c.tar.xz
Remove DataProvider from CFWL_WidgetPropertieschromium/2931chromium/2930
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
Diffstat (limited to 'xfa/fwl/core/ifwl_checkbox.h')
-rw-r--r--xfa/fwl/core/ifwl_checkbox.h7
1 files changed, 6 insertions, 1 deletions
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;