Index: xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp |
diff --git a/xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp b/xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp |
index ed80622c7eb5379285a9f8715f883380dc04d566..b9ab6a215cddfe1b703f4c8c15e3db5c5bb7a920 100644 |
--- a/xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp |
+++ b/xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp |
@@ -11,40 +11,36 @@ |
#include "../core/include/fwl_widgetmgrimp.h" |
#include "include/fwl_checkboximp.h" |
#define FWL_CKB_CaptionMargin 5 |
-IFWL_CheckBox::IFWL_CheckBox() { |
-} |
-FWL_ERR IFWL_CheckBox::Initialize(const CFWL_WidgetImpProperties& properties, |
- IFWL_Widget* pOuter) { |
+ |
+// static |
+IFWL_CheckBox* IFWL_CheckBox::Create(const CFWL_WidgetImpProperties& properties, |
+ IFWL_Widget* pOuter) { |
+ IFWL_CheckBox* pCheckBox = new IFWL_CheckBox; |
CFWL_CheckBoxImp* pCheckBoxImpl = new CFWL_CheckBoxImp(properties, pOuter); |
- SetImpl(pCheckBoxImpl); |
- pCheckBoxImpl->SetInterface(this); |
- return pCheckBoxImpl->Initialize(); |
+ pCheckBox->SetImpl(pCheckBoxImpl); |
+ pCheckBoxImpl->SetInterface(pCheckBox); |
+ return pCheckBox; |
} |
+IFWL_CheckBox::IFWL_CheckBox() {} |
int32_t IFWL_CheckBox::GetCheckState() { |
return static_cast<CFWL_CheckBoxImp*>(GetImpl())->GetCheckState(); |
} |
FWL_ERR IFWL_CheckBox::SetCheckState(int32_t iCheck) { |
return static_cast<CFWL_CheckBoxImp*>(GetImpl())->SetCheckState(iCheck); |
} |
-IFWL_RadioButton::IFWL_RadioButton() { |
-} |
-FWL_ERR IFWL_RadioButton::Initialize(const CFWL_WidgetImpProperties& properties, |
- IFWL_Widget* pOuter) { |
+ |
+// static |
+IFWL_RadioButton* IFWL_RadioButton::Create( |
+ const CFWL_WidgetImpProperties& properties, |
+ IFWL_Widget* pOuter) { |
+ IFWL_RadioButton* pRadioButton = new IFWL_RadioButton; |
CFWL_CheckBoxImp* pCheckBoxImpl = new CFWL_CheckBoxImp(properties, pOuter); |
- SetImpl(pCheckBoxImpl); |
- pCheckBoxImpl->SetInterface(this); |
- return pCheckBoxImpl->Initialize(); |
-} |
-CFWL_CheckBoxImp::CFWL_CheckBoxImp(IFWL_Widget* pOuter) |
- : CFWL_WidgetImp(pOuter), |
- m_dwTTOStyles(FDE_TTOSTYLE_SingleLine), |
- m_iTTOAlign(FDE_TTOALIGNMENT_Center), |
- m_bBtnDown(FALSE) { |
- m_rtClient.Reset(); |
- m_rtBox.Reset(); |
- m_rtCaption.Reset(); |
- m_rtFocus.Reset(); |
+ pRadioButton->SetImpl(pCheckBoxImpl); |
+ pCheckBoxImpl->SetInterface(pRadioButton); |
+ return pRadioButton; |
} |
+IFWL_RadioButton::IFWL_RadioButton() {} |
+ |
CFWL_CheckBoxImp::CFWL_CheckBoxImp(const CFWL_WidgetImpProperties& properties, |
IFWL_Widget* pOuter) |
: CFWL_WidgetImp(properties, pOuter), |