From 7311006b16f30da32fed5145e2e1c2c04a5cea41 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 30 Jan 2018 20:36:50 +0000 Subject: Move CheckButton code from CXFA_Node to CXFA_CheckButton This CL moves some of the code specific to CheckButtons out of CXFA_Node and into the CXFA_CheckButton class. The CheckButton is passed as a parameter to the CXFA_FFCheckButton class. Change-Id: I3344c484d90e3b8d1024024a2851685044113a23 Reviewed-on: https://pdfium-review.googlesource.com/24711 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/cxfa_ffcheckbutton.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/cxfa_ffcheckbutton.h') diff --git a/xfa/fxfa/cxfa_ffcheckbutton.h b/xfa/fxfa/cxfa_ffcheckbutton.h index 230695f85a..d1fb21c47d 100644 --- a/xfa/fxfa/cxfa_ffcheckbutton.h +++ b/xfa/fxfa/cxfa_ffcheckbutton.h @@ -7,13 +7,16 @@ #ifndef XFA_FXFA_CXFA_FFCHECKBUTTON_H_ #define XFA_FXFA_CXFA_FFCHECKBUTTON_H_ +#include "core/fxcrt/unowned_ptr.h" #include "xfa/fxfa/cxfa_fffield.h" #include "xfa/fxfa/cxfa_ffpageview.h" #include "xfa/fxfa/parser/cxfa_node.h" +class CXFA_CheckButton; + class CXFA_FFCheckButton : public CXFA_FFField { public: - explicit CXFA_FFCheckButton(CXFA_Node* pNode); + explicit CXFA_FFCheckButton(CXFA_Node* pNode, CXFA_CheckButton* button); ~CXFA_FFCheckButton() override; // CXFA_FFField @@ -41,8 +44,9 @@ class CXFA_FFCheckButton : public CXFA_FFField { void AddUIMargin(XFA_AttributeEnum iCapPlacement); XFA_CHECKSTATE FWLState2XFAState(); - IFWL_WidgetDelegate* m_pOldDelegate; + IFWL_WidgetDelegate* m_pOldDelegate = nullptr; CFX_RectF m_rtCheckBox; + UnownedPtr button_; }; #endif // XFA_FXFA_CXFA_FFCHECKBUTTON_H_ -- cgit v1.2.3