summaryrefslogtreecommitdiff
path: root/xfa/fwl/core
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/core')
-rw-r--r--xfa/fwl/core/ifwl_barcode.cpp10
-rw-r--r--xfa/fwl/core/ifwl_barcode.h4
-rw-r--r--xfa/fwl/core/ifwl_caret.cpp6
-rw-r--r--xfa/fwl/core/ifwl_caret.h3
-rw-r--r--xfa/fwl/core/ifwl_checkbox.cpp11
-rw-r--r--xfa/fwl/core/ifwl_checkbox.h6
-rw-r--r--xfa/fwl/core/ifwl_combobox.cpp24
-rw-r--r--xfa/fwl/core/ifwl_combobox.h5
-rw-r--r--xfa/fwl/core/ifwl_comboedit.cpp7
-rw-r--r--xfa/fwl/core/ifwl_comboedit.h3
-rw-r--r--xfa/fwl/core/ifwl_combolist.cpp7
-rw-r--r--xfa/fwl/core/ifwl_combolist.h3
-rw-r--r--xfa/fwl/core/ifwl_datetimecalendar.cpp7
-rw-r--r--xfa/fwl/core/ifwl_datetimecalendar.h4
-rw-r--r--xfa/fwl/core/ifwl_datetimeedit.cpp7
-rw-r--r--xfa/fwl/core/ifwl_datetimeedit.h3
-rw-r--r--xfa/fwl/core/ifwl_datetimepicker.cpp29
-rw-r--r--xfa/fwl/core/ifwl_datetimepicker.h6
-rw-r--r--xfa/fwl/core/ifwl_edit.cpp10
-rw-r--r--xfa/fwl/core/ifwl_edit.h3
-rw-r--r--xfa/fwl/core/ifwl_formproxy.cpp6
-rw-r--r--xfa/fwl/core/ifwl_formproxy.h3
-rw-r--r--xfa/fwl/core/ifwl_listbox.cpp8
-rw-r--r--xfa/fwl/core/ifwl_listbox.h3
-rw-r--r--xfa/fwl/core/ifwl_monthcalendar.cpp7
-rw-r--r--xfa/fwl/core/ifwl_monthcalendar.h3
-rw-r--r--xfa/fwl/core/ifwl_picturebox.cpp12
-rw-r--r--xfa/fwl/core/ifwl_picturebox.h6
-rw-r--r--xfa/fwl/core/ifwl_pushbutton.cpp12
-rw-r--r--xfa/fwl/core/ifwl_pushbutton.h6
-rw-r--r--xfa/fwl/core/ifwl_scrollbar.cpp7
-rw-r--r--xfa/fwl/core/ifwl_scrollbar.h3
-rw-r--r--xfa/fwl/core/ifwl_spinbutton.cpp12
-rw-r--r--xfa/fwl/core/ifwl_spinbutton.h6
-rw-r--r--xfa/fwl/core/ifwl_tooltip.cpp6
-rw-r--r--xfa/fwl/core/ifwl_tooltip.h3
36 files changed, 42 insertions, 219 deletions
diff --git a/xfa/fwl/core/ifwl_barcode.cpp b/xfa/fwl/core/ifwl_barcode.cpp
index 76f64facd0..770a857d78 100644
--- a/xfa/fwl/core/ifwl_barcode.cpp
+++ b/xfa/fwl/core/ifwl_barcode.cpp
@@ -12,14 +12,8 @@
#include "xfa/fwl/core/fwl_noteimp.h"
#include "xfa/fwl/core/ifwl_themeprovider.h"
-// static
-IFWL_Barcode* IFWL_Barcode::Create(const CFWL_WidgetImpProperties& properties) {
- return new IFWL_Barcode(properties, nullptr);
-}
-
-IFWL_Barcode::IFWL_Barcode(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
- : IFWL_Edit(properties, pOuter), m_dwStatus(0), m_type(BC_UNKNOWN) {}
+IFWL_Barcode::IFWL_Barcode(const CFWL_WidgetImpProperties& properties)
+ : IFWL_Edit(properties, nullptr), m_dwStatus(0), m_type(BC_UNKNOWN) {}
IFWL_Barcode::~IFWL_Barcode() {}
diff --git a/xfa/fwl/core/ifwl_barcode.h b/xfa/fwl/core/ifwl_barcode.h
index 6f58ad1012..cccc4f1b9c 100644
--- a/xfa/fwl/core/ifwl_barcode.h
+++ b/xfa/fwl/core/ifwl_barcode.h
@@ -59,9 +59,7 @@ class IFWL_BarcodeDP : public IFWL_EditDP {
class IFWL_Barcode : public IFWL_Edit {
public:
- static IFWL_Barcode* Create(const CFWL_WidgetImpProperties& properties);
-
- IFWL_Barcode(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter);
+ explicit IFWL_Barcode(const CFWL_WidgetImpProperties& properties);
~IFWL_Barcode() override;
// IFWL_Widget
diff --git a/xfa/fwl/core/ifwl_caret.cpp b/xfa/fwl/core/ifwl_caret.cpp
index 5ece9626eb..643875a001 100644
--- a/xfa/fwl/core/ifwl_caret.cpp
+++ b/xfa/fwl/core/ifwl_caret.cpp
@@ -12,12 +12,6 @@
#include "xfa/fwl/core/ifwl_caret.h"
#include "xfa/fwl/core/ifwl_themeprovider.h"
-// static
-IFWL_Caret* IFWL_Caret::Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_Caret(properties, pOuter);
-}
-
IFWL_Caret::IFWL_Caret(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: IFWL_Widget(properties, pOuter),
diff --git a/xfa/fwl/core/ifwl_caret.h b/xfa/fwl/core/ifwl_caret.h
index e261fe95c3..8cc3cf7e02 100644
--- a/xfa/fwl/core/ifwl_caret.h
+++ b/xfa/fwl/core/ifwl_caret.h
@@ -22,9 +22,6 @@ class CFWL_CaretImpDelegate;
class IFWL_Caret : public IFWL_Widget {
public:
- static IFWL_Caret* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
IFWL_Caret(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter);
~IFWL_Caret() override;
diff --git a/xfa/fwl/core/ifwl_checkbox.cpp b/xfa/fwl/core/ifwl_checkbox.cpp
index d822d3e820..20298c7308 100644
--- a/xfa/fwl/core/ifwl_checkbox.cpp
+++ b/xfa/fwl/core/ifwl_checkbox.cpp
@@ -23,15 +23,8 @@ const int kCaptionMargin = 5;
} // namespace
-// static
-IFWL_CheckBox* IFWL_CheckBox::Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_CheckBox(properties, pOuter);
-}
-
-IFWL_CheckBox::IFWL_CheckBox(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
- : IFWL_Widget(properties, pOuter),
+IFWL_CheckBox::IFWL_CheckBox(const CFWL_WidgetImpProperties& properties)
+ : IFWL_Widget(properties, nullptr),
m_dwTTOStyles(FDE_TTOSTYLE_SingleLine),
m_iTTOAlign(FDE_TTOALIGNMENT_Center),
m_bBtnDown(FALSE) {
diff --git a/xfa/fwl/core/ifwl_checkbox.h b/xfa/fwl/core/ifwl_checkbox.h
index 237a15b30e..56a9139b99 100644
--- a/xfa/fwl/core/ifwl_checkbox.h
+++ b/xfa/fwl/core/ifwl_checkbox.h
@@ -58,11 +58,7 @@ class IFWL_CheckBoxDP : public IFWL_DataProvider {
class IFWL_CheckBox : public IFWL_Widget {
public:
- static IFWL_CheckBox* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- IFWL_CheckBox(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ explicit IFWL_CheckBox(const CFWL_WidgetImpProperties& properties);
~IFWL_CheckBox() override;
// IFWL_Widget
diff --git a/xfa/fwl/core/ifwl_combobox.cpp b/xfa/fwl/core/ifwl_combobox.cpp
index 6a4c13f4a6..9d3e58cec6 100644
--- a/xfa/fwl/core/ifwl_combobox.cpp
+++ b/xfa/fwl/core/ifwl_combobox.cpp
@@ -20,15 +20,8 @@
#include "xfa/fwl/core/ifwl_formproxy.h"
#include "xfa/fwl/core/ifwl_themeprovider.h"
-// static
-IFWL_ComboBox* IFWL_ComboBox::Create(
- const CFWL_WidgetImpProperties& properties) {
- return new IFWL_ComboBox(properties, nullptr);
-}
-
-IFWL_ComboBox::IFWL_ComboBox(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
- : IFWL_Widget(properties, pOuter),
+IFWL_ComboBox::IFWL_ComboBox(const CFWL_WidgetImpProperties& properties)
+ : IFWL_Widget(properties, nullptr),
m_pForm(nullptr),
m_bLButtonDown(FALSE),
m_iCurSel(-1),
@@ -66,11 +59,11 @@ FWL_Error IFWL_ComboBox::Initialize() {
prop.m_dwStyleExes |= FWL_STYLEEXT_LTB_Icon;
prop.m_pDataProvider = m_pProperties->m_pDataProvider;
- m_pListBox.reset(IFWL_ComboList::Create(prop, this));
+ m_pListBox.reset(new IFWL_ComboList(prop, this));
m_pListBox->Initialize();
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown) && !m_pEdit) {
CFWL_WidgetImpProperties prop2;
- m_pEdit.reset(IFWL_ComboEdit::Create(prop2, this));
+ m_pEdit.reset(new IFWL_ComboEdit(prop2, this));
m_pEdit->Initialize();
m_pEdit->SetOuter(this);
}
@@ -125,7 +118,7 @@ FWL_Error IFWL_ComboBox::ModifyStylesEx(uint32_t dwStylesExAdded,
bool bRemoveDropDown = !!(dwStylesExRemoved & FWL_STYLEEXT_CMB_DropDown);
if (bAddDropDown && !m_pEdit) {
CFWL_WidgetImpProperties prop;
- m_pEdit.reset(IFWL_ComboEdit::Create(prop, nullptr));
+ m_pEdit.reset(new IFWL_ComboEdit(prop, nullptr));
m_pEdit->Initialize();
m_pEdit->SetOuter(this);
m_pEdit->SetParent(this);
@@ -723,7 +716,8 @@ void IFWL_ComboBox::InitProxyForm() {
propForm.m_pOwner = this;
propForm.m_dwStyles = FWL_WGTSTYLE_Popup;
propForm.m_dwStates = FWL_WGTSTATE_Invisible;
- m_pForm = IFWL_FormProxy::Create(propForm, m_pListBox.get());
+
+ m_pForm = new IFWL_FormProxy(propForm, m_pListBox.get());
m_pForm->Initialize();
m_pListBox->SetParent(m_pForm);
m_pListProxyDelegate = new CFWL_ComboProxyImpDelegate(m_pForm, this);
@@ -750,7 +744,7 @@ void IFWL_ComboBox::DisForm_InitComboList() {
prop.m_dwStates = FWL_WGTSTATE_Invisible;
prop.m_pDataProvider = m_pProperties->m_pDataProvider;
prop.m_pThemeProvider = m_pProperties->m_pThemeProvider;
- m_pListBox.reset(IFWL_ComboList::Create(prop, this));
+ m_pListBox.reset(new IFWL_ComboList(prop, this));
m_pListBox->Initialize();
}
@@ -761,7 +755,7 @@ void IFWL_ComboBox::DisForm_InitComboEdit() {
CFWL_WidgetImpProperties prop;
prop.m_pParent = this;
prop.m_pThemeProvider = m_pProperties->m_pThemeProvider;
- m_pEdit.reset(IFWL_ComboEdit::Create(prop, this));
+ m_pEdit.reset(new IFWL_ComboEdit(prop, this));
m_pEdit->Initialize();
m_pEdit->SetOuter(this);
}
diff --git a/xfa/fwl/core/ifwl_combobox.h b/xfa/fwl/core/ifwl_combobox.h
index 106b7c0c08..a40f6d583a 100644
--- a/xfa/fwl/core/ifwl_combobox.h
+++ b/xfa/fwl/core/ifwl_combobox.h
@@ -85,10 +85,7 @@ class IFWL_ComboBoxDP : public IFWL_ListBoxDP {
class IFWL_ComboBox : public IFWL_Widget {
public:
- static IFWL_ComboBox* Create(const CFWL_WidgetImpProperties& properties);
-
- IFWL_ComboBox(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ explicit IFWL_ComboBox(const CFWL_WidgetImpProperties& properties);
~IFWL_ComboBox() override;
// IFWL_Widget
diff --git a/xfa/fwl/core/ifwl_comboedit.cpp b/xfa/fwl/core/ifwl_comboedit.cpp
index f345090fca..62b2d5a1de 100644
--- a/xfa/fwl/core/ifwl_comboedit.cpp
+++ b/xfa/fwl/core/ifwl_comboedit.cpp
@@ -9,13 +9,6 @@
#include "xfa/fde/cfde_txtedtengine.h"
#include "xfa/fwl/core/ifwl_combobox.h"
-// static
-IFWL_ComboEdit* IFWL_ComboEdit::Create(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_ComboEdit(properties, pOuter);
-}
-
IFWL_ComboEdit::IFWL_ComboEdit(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: IFWL_Edit(properties, pOuter) {
diff --git a/xfa/fwl/core/ifwl_comboedit.h b/xfa/fwl/core/ifwl_comboedit.h
index 22c3f01e41..fceba2f528 100644
--- a/xfa/fwl/core/ifwl_comboedit.h
+++ b/xfa/fwl/core/ifwl_comboedit.h
@@ -15,9 +15,6 @@ class IFWL_ComboBox;
class IFWL_ComboEdit : public IFWL_Edit {
public:
- static IFWL_ComboEdit* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
IFWL_ComboEdit(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter);
diff --git a/xfa/fwl/core/ifwl_combolist.cpp b/xfa/fwl/core/ifwl_combolist.cpp
index 9090622b10..abe2c092d2 100644
--- a/xfa/fwl/core/ifwl_combolist.cpp
+++ b/xfa/fwl/core/ifwl_combolist.cpp
@@ -9,13 +9,6 @@
#include "xfa/fwl/core/ifwl_combobox.h"
#include "xfa/fwl/core/ifwl_comboedit.h"
-// static
-IFWL_ComboList* IFWL_ComboList::Create(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_ComboList(properties, pOuter);
-}
-
IFWL_ComboList::IFWL_ComboList(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: IFWL_ListBox(properties, pOuter), m_bNotifyOwner(TRUE) {
diff --git a/xfa/fwl/core/ifwl_combolist.h b/xfa/fwl/core/ifwl_combolist.h
index 74e79cd805..5d21b43681 100644
--- a/xfa/fwl/core/ifwl_combolist.h
+++ b/xfa/fwl/core/ifwl_combolist.h
@@ -13,9 +13,6 @@
class IFWL_ComboList : public IFWL_ListBox {
public:
- static IFWL_ComboList* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
IFWL_ComboList(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter);
diff --git a/xfa/fwl/core/ifwl_datetimecalendar.cpp b/xfa/fwl/core/ifwl_datetimecalendar.cpp
index 26d1f17da9..786d16860e 100644
--- a/xfa/fwl/core/ifwl_datetimecalendar.cpp
+++ b/xfa/fwl/core/ifwl_datetimecalendar.cpp
@@ -10,13 +10,6 @@
#include "xfa/fwl/core/ifwl_datetimepicker.h"
#include "xfa/fwl/core/ifwl_formproxy.h"
-// static
-IFWL_DateTimeCalendar* IFWL_DateTimeCalendar::Create(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_DateTimeCalendar(properties, pOuter);
-}
-
IFWL_DateTimeCalendar::IFWL_DateTimeCalendar(
const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
diff --git a/xfa/fwl/core/ifwl_datetimecalendar.h b/xfa/fwl/core/ifwl_datetimecalendar.h
index 3f29a59820..864e756c96 100644
--- a/xfa/fwl/core/ifwl_datetimecalendar.h
+++ b/xfa/fwl/core/ifwl_datetimecalendar.h
@@ -11,10 +11,6 @@
class IFWL_DateTimeCalendar : public IFWL_MonthCalendar {
public:
- static IFWL_DateTimeCalendar* Create(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
IFWL_DateTimeCalendar(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter);
diff --git a/xfa/fwl/core/ifwl_datetimeedit.cpp b/xfa/fwl/core/ifwl_datetimeedit.cpp
index a0f473b21e..a16b729484 100644
--- a/xfa/fwl/core/ifwl_datetimeedit.cpp
+++ b/xfa/fwl/core/ifwl_datetimeedit.cpp
@@ -9,13 +9,6 @@
#include "xfa/fwl/core/cfwl_widgetmgr.h"
#include "xfa/fwl/core/ifwl_datetimepicker.h"
-// static
-IFWL_DateTimeEdit* IFWL_DateTimeEdit::Create(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_DateTimeEdit(properties, pOuter);
-}
-
IFWL_DateTimeEdit::IFWL_DateTimeEdit(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: IFWL_Edit(properties, pOuter) {}
diff --git a/xfa/fwl/core/ifwl_datetimeedit.h b/xfa/fwl/core/ifwl_datetimeedit.h
index 98b1a364b2..29433e5173 100644
--- a/xfa/fwl/core/ifwl_datetimeedit.h
+++ b/xfa/fwl/core/ifwl_datetimeedit.h
@@ -15,9 +15,6 @@
class IFWL_DateTimeEdit : public IFWL_Edit {
public:
- static IFWL_DateTimeEdit* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
IFWL_DateTimeEdit(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter);
diff --git a/xfa/fwl/core/ifwl_datetimepicker.cpp b/xfa/fwl/core/ifwl_datetimepicker.cpp
index ce5f28bf08..04290b62d1 100644
--- a/xfa/fwl/core/ifwl_datetimepicker.cpp
+++ b/xfa/fwl/core/ifwl_datetimepicker.cpp
@@ -23,17 +23,9 @@ const int kDateTimePickerHeight = 20;
} // namespace
-// static
-IFWL_DateTimePicker* IFWL_DateTimePicker::Create(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_DateTimePicker(properties, pOuter);
-}
-
IFWL_DateTimePicker::IFWL_DateTimePicker(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
- : IFWL_Widget(properties, pOuter),
+ const CFWL_WidgetImpProperties& properties)
+ : IFWL_Widget(properties, nullptr),
m_iBtnState(1),
m_iYear(-1),
m_iMonth(-1),
@@ -65,7 +57,8 @@ FWL_Error IFWL_DateTimePicker::Initialize() {
propMonth.m_pDataProvider = &m_MonthCalendarDP;
propMonth.m_pParent = this;
propMonth.m_pThemeProvider = m_pProperties->m_pThemeProvider;
- m_pMonthCal.reset(IFWL_DateTimeCalendar::Create(propMonth, this));
+
+ m_pMonthCal.reset(new IFWL_DateTimeCalendar(propMonth, this));
m_pMonthCal->Initialize();
CFX_RectF rtMonthCal;
m_pMonthCal->GetWidgetRect(rtMonthCal, TRUE);
@@ -74,7 +67,8 @@ FWL_Error IFWL_DateTimePicker::Initialize() {
CFWL_WidgetImpProperties propEdit;
propEdit.m_pParent = this;
propEdit.m_pThemeProvider = m_pProperties->m_pThemeProvider;
- m_pEdit.reset(IFWL_DateTimeEdit::Create(propEdit, this));
+
+ m_pEdit.reset(new IFWL_DateTimeEdit(propEdit, this));
m_pEdit->Initialize();
RegisterEventTarget(m_pMonthCal.get());
RegisterEventTarget(m_pEdit.get());
@@ -341,7 +335,7 @@ void IFWL_DateTimePicker::DrawDropDownButton(CFX_Graphics* pGraphics,
prop.m_dwStyleExes |= FWL_STYLEEXE_SPB_Vert;
prop.m_pParent = this;
prop.m_rtWidget = m_rtBtn;
- IFWL_SpinButton* pSpin = IFWL_SpinButton::Create(prop, this);
+ IFWL_SpinButton* pSpin = new IFWL_SpinButton(prop);
pSpin->Initialize();
} else {
CFWL_ThemeBackground param;
@@ -475,7 +469,8 @@ void IFWL_DateTimePicker::InitProxyForm() {
propForm.m_dwStyles = FWL_WGTSTYLE_Popup;
propForm.m_dwStates = FWL_WGTSTATE_Invisible;
propForm.m_pOwner = this;
- m_pForm.reset(IFWL_FormProxy::Create(propForm, m_pMonthCal.get()));
+
+ m_pForm.reset(new IFWL_FormProxy(propForm, m_pMonthCal.get()));
m_pForm->Initialize();
m_pMonthCal->SetParent(m_pForm.get());
}
@@ -504,7 +499,8 @@ void IFWL_DateTimePicker::DisForm_InitDateTimeCalendar() {
propMonth.m_pParent = this;
propMonth.m_pDataProvider = &m_MonthCalendarDP;
propMonth.m_pThemeProvider = m_pProperties->m_pThemeProvider;
- m_pMonthCal.reset(IFWL_DateTimeCalendar::Create(propMonth, this));
+
+ m_pMonthCal.reset(new IFWL_DateTimeCalendar(propMonth, this));
m_pMonthCal->Initialize();
CFX_RectF rtMonthCal;
m_pMonthCal->GetWidgetRect(rtMonthCal, TRUE);
@@ -519,7 +515,8 @@ void IFWL_DateTimePicker::DisForm_InitDateTimeEdit() {
CFWL_WidgetImpProperties propEdit;
propEdit.m_pParent = this;
propEdit.m_pThemeProvider = m_pProperties->m_pThemeProvider;
- m_pEdit.reset(IFWL_DateTimeEdit::Create(propEdit, this));
+
+ m_pEdit.reset(new IFWL_DateTimeEdit(propEdit, this));
m_pEdit->Initialize();
}
diff --git a/xfa/fwl/core/ifwl_datetimepicker.h b/xfa/fwl/core/ifwl_datetimepicker.h
index e14073df09..28eefe1cde 100644
--- a/xfa/fwl/core/ifwl_datetimepicker.h
+++ b/xfa/fwl/core/ifwl_datetimepicker.h
@@ -63,11 +63,7 @@ class IFWL_DateTimePickerDP : public IFWL_DataProvider {
class IFWL_DateTimePicker : public IFWL_Widget {
public:
- static IFWL_DateTimePicker* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- IFWL_DateTimePicker(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ explicit IFWL_DateTimePicker(const CFWL_WidgetImpProperties& properties);
~IFWL_DateTimePicker() override;
// IFWL_Widget
diff --git a/xfa/fwl/core/ifwl_edit.cpp b/xfa/fwl/core/ifwl_edit.cpp
index 83c00627c3..189df97c89 100644
--- a/xfa/fwl/core/ifwl_edit.cpp
+++ b/xfa/fwl/core/ifwl_edit.cpp
@@ -51,12 +51,6 @@ void AddSquigglyPath(CFX_Path* pPathData,
} // namespace
-// static
-IFWL_Edit* IFWL_Edit::Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_Edit(properties, pOuter);
-}
-
IFWL_Edit::IFWL_Edit(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: IFWL_Widget(properties, pOuter),
@@ -1482,7 +1476,7 @@ void IFWL_Edit::InitScrollBar(FX_BOOL bVert) {
prop.m_dwStates = FWL_WGTSTATE_Disabled | FWL_WGTSTATE_Invisible;
prop.m_pParent = this;
prop.m_pThemeProvider = m_pProperties->m_pThemeProvider;
- IFWL_ScrollBar* pScrollBar = IFWL_ScrollBar::Create(prop, this);
+ IFWL_ScrollBar* pScrollBar = new IFWL_ScrollBar(prop, this);
pScrollBar->Initialize();
(bVert ? &m_pVertScrollBar : &m_pHorzScrollBar)->reset(pScrollBar);
}
@@ -1580,7 +1574,7 @@ void IFWL_Edit::InitCaret() {
if (!m_pCaret) {
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_InnerCaret)) {
CFWL_WidgetImpProperties prop;
- m_pCaret.reset(IFWL_Caret::Create(prop, this));
+ m_pCaret.reset(new IFWL_Caret(prop, this));
m_pCaret->Initialize();
m_pCaret->SetParent(this);
m_pCaret->SetStates(m_pProperties->m_dwStates);
diff --git a/xfa/fwl/core/ifwl_edit.h b/xfa/fwl/core/ifwl_edit.h
index 2d65897b8c..688c09c349 100644
--- a/xfa/fwl/core/ifwl_edit.h
+++ b/xfa/fwl/core/ifwl_edit.h
@@ -107,9 +107,6 @@ class IFWL_EditDP : public IFWL_DataProvider {};
class IFWL_Edit : public IFWL_Widget {
public:
- static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
IFWL_Edit(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter);
~IFWL_Edit() override;
diff --git a/xfa/fwl/core/ifwl_formproxy.cpp b/xfa/fwl/core/ifwl_formproxy.cpp
index 123db79f19..d97b5b6185 100644
--- a/xfa/fwl/core/ifwl_formproxy.cpp
+++ b/xfa/fwl/core/ifwl_formproxy.cpp
@@ -8,12 +8,6 @@
#include "xfa/fwl/core/fwl_noteimp.h"
-// static
-IFWL_FormProxy* IFWL_FormProxy::Create(CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_FormProxy(properties, pOuter);
-}
-
IFWL_FormProxy::IFWL_FormProxy(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: IFWL_Form(properties, pOuter) {}
diff --git a/xfa/fwl/core/ifwl_formproxy.h b/xfa/fwl/core/ifwl_formproxy.h
index c188d93a05..d5a1bd97de 100644
--- a/xfa/fwl/core/ifwl_formproxy.h
+++ b/xfa/fwl/core/ifwl_formproxy.h
@@ -14,9 +14,6 @@ class CFWL_FormProxyImpDelegate;
class IFWL_FormProxy : public IFWL_Form {
public:
- static IFWL_FormProxy* Create(CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
IFWL_FormProxy(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter);
~IFWL_FormProxy() override;
diff --git a/xfa/fwl/core/ifwl_listbox.cpp b/xfa/fwl/core/ifwl_listbox.cpp
index a0a9eacd27..ac2b1338b9 100644
--- a/xfa/fwl/core/ifwl_listbox.cpp
+++ b/xfa/fwl/core/ifwl_listbox.cpp
@@ -20,12 +20,6 @@ const int kItemTextMargin = 2;
} // namespace
-// static
-IFWL_ListBox* IFWL_ListBox::Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_ListBox(properties, pOuter);
-}
-
IFWL_ListBox::IFWL_ListBox(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: IFWL_Widget(properties, pOuter),
@@ -912,7 +906,7 @@ void IFWL_ListBox::InitScrollBar(FX_BOOL bVert) {
prop.m_dwStates = FWL_WGTSTATE_Invisible;
prop.m_pParent = this;
prop.m_pThemeProvider = m_pScrollBarTP;
- IFWL_ScrollBar* pScrollBar = IFWL_ScrollBar::Create(prop, this);
+ IFWL_ScrollBar* pScrollBar = new IFWL_ScrollBar(prop, this);
pScrollBar->Initialize();
(bVert ? &m_pVertScrollBar : &m_pHorzScrollBar)->reset(pScrollBar);
}
diff --git a/xfa/fwl/core/ifwl_listbox.h b/xfa/fwl/core/ifwl_listbox.h
index 79fb2e94cc..faab63056b 100644
--- a/xfa/fwl/core/ifwl_listbox.h
+++ b/xfa/fwl/core/ifwl_listbox.h
@@ -103,9 +103,6 @@ class IFWL_ListBoxCompare {
class IFWL_ListBox : public IFWL_Widget {
public:
- static IFWL_ListBox* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
IFWL_ListBox(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter);
~IFWL_ListBox() override;
diff --git a/xfa/fwl/core/ifwl_monthcalendar.cpp b/xfa/fwl/core/ifwl_monthcalendar.cpp
index 741c88f606..096e3586d0 100644
--- a/xfa/fwl/core/ifwl_monthcalendar.cpp
+++ b/xfa/fwl/core/ifwl_monthcalendar.cpp
@@ -117,13 +117,6 @@ CFX_WideString* GetCapacityForMonth(IFWL_ThemeProvider* pTheme,
} // namespace
-// static
-IFWL_MonthCalendar* IFWL_MonthCalendar::Create(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_MonthCalendar(properties, pOuter);
-}
-
IFWL_MonthCalendar::IFWL_MonthCalendar(
const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
diff --git a/xfa/fwl/core/ifwl_monthcalendar.h b/xfa/fwl/core/ifwl_monthcalendar.h
index 340acf0bcc..48b15fef19 100644
--- a/xfa/fwl/core/ifwl_monthcalendar.h
+++ b/xfa/fwl/core/ifwl_monthcalendar.h
@@ -53,9 +53,6 @@ class IFWL_MonthCalendarDP : public IFWL_DataProvider {
class IFWL_MonthCalendar : public IFWL_Widget {
public:
- static IFWL_MonthCalendar* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
IFWL_MonthCalendar(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter);
~IFWL_MonthCalendar() override;
diff --git a/xfa/fwl/core/ifwl_picturebox.cpp b/xfa/fwl/core/ifwl_picturebox.cpp
index 12d8713971..cff711ca99 100644
--- a/xfa/fwl/core/ifwl_picturebox.cpp
+++ b/xfa/fwl/core/ifwl_picturebox.cpp
@@ -9,16 +9,8 @@
#include "xfa/fwl/core/fwl_noteimp.h"
#include "xfa/fwl/lightwidget/cfwl_picturebox.h"
-// static
-IFWL_PictureBox* IFWL_PictureBox::Create(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_PictureBox(properties, pOuter);
-}
-
-IFWL_PictureBox::IFWL_PictureBox(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
- : IFWL_Widget(properties, pOuter),
+IFWL_PictureBox::IFWL_PictureBox(const CFWL_WidgetImpProperties& properties)
+ : IFWL_Widget(properties, nullptr),
m_bTop(FALSE),
m_bVCenter(FALSE),
m_bButton(FALSE) {
diff --git a/xfa/fwl/core/ifwl_picturebox.h b/xfa/fwl/core/ifwl_picturebox.h
index eb9c70efca..98edd2793f 100644
--- a/xfa/fwl/core/ifwl_picturebox.h
+++ b/xfa/fwl/core/ifwl_picturebox.h
@@ -45,11 +45,7 @@ class IFWL_PictureBoxDP : public IFWL_DataProvider {
class IFWL_PictureBox : public IFWL_Widget {
public:
- static IFWL_PictureBox* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- IFWL_PictureBox(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ explicit IFWL_PictureBox(const CFWL_WidgetImpProperties& properties);
~IFWL_PictureBox() override;
// IFWL_Widget
diff --git a/xfa/fwl/core/ifwl_pushbutton.cpp b/xfa/fwl/core/ifwl_pushbutton.cpp
index a3efb10296..7cbc2e116d 100644
--- a/xfa/fwl/core/ifwl_pushbutton.cpp
+++ b/xfa/fwl/core/ifwl_pushbutton.cpp
@@ -14,16 +14,8 @@
#include "xfa/fwl/core/ifwl_pushbutton.h"
#include "xfa/fwl/core/ifwl_themeprovider.h"
-// static
-IFWL_PushButton* IFWL_PushButton::Create(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_PushButton(properties, pOuter);
-}
-
-IFWL_PushButton::IFWL_PushButton(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
- : IFWL_Widget(properties, pOuter),
+IFWL_PushButton::IFWL_PushButton(const CFWL_WidgetImpProperties& properties)
+ : IFWL_Widget(properties, nullptr),
m_bBtnDown(FALSE),
m_dwTTOStyles(FDE_TTOSTYLE_SingleLine),
m_iTTOAlign(FDE_TTOALIGNMENT_Center) {
diff --git a/xfa/fwl/core/ifwl_pushbutton.h b/xfa/fwl/core/ifwl_pushbutton.h
index 9901c1a44c..d5ada29e41 100644
--- a/xfa/fwl/core/ifwl_pushbutton.h
+++ b/xfa/fwl/core/ifwl_pushbutton.h
@@ -41,11 +41,7 @@ class IFWL_PushButtonDP : public IFWL_DataProvider {
class IFWL_PushButton : public IFWL_Widget {
public:
- static IFWL_PushButton* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- IFWL_PushButton(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ IFWL_PushButton(const CFWL_WidgetImpProperties& properties);
~IFWL_PushButton() override;
// IFWL_Widget
diff --git a/xfa/fwl/core/ifwl_scrollbar.cpp b/xfa/fwl/core/ifwl_scrollbar.cpp
index 15478ff092..8c677f6a0b 100644
--- a/xfa/fwl/core/ifwl_scrollbar.cpp
+++ b/xfa/fwl/core/ifwl_scrollbar.cpp
@@ -16,13 +16,6 @@
#define FWL_SCROLLBAR_Elapse 500
#define FWL_SCROLLBAR_MinThumb 5
-// static
-IFWL_ScrollBar* IFWL_ScrollBar::Create(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_ScrollBar(properties, pOuter);
-}
-
IFWL_ScrollBar::IFWL_ScrollBar(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: IFWL_Widget(properties, pOuter),
diff --git a/xfa/fwl/core/ifwl_scrollbar.h b/xfa/fwl/core/ifwl_scrollbar.h
index 2a46e0f33d..39d3c04eb2 100644
--- a/xfa/fwl/core/ifwl_scrollbar.h
+++ b/xfa/fwl/core/ifwl_scrollbar.h
@@ -39,9 +39,6 @@ class IFWL_ScrollBarDP : public IFWL_DataProvider {};
class IFWL_ScrollBar : public IFWL_Widget, public IFWL_Timer {
public:
- static IFWL_ScrollBar* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
IFWL_ScrollBar(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter);
~IFWL_ScrollBar() override;
diff --git a/xfa/fwl/core/ifwl_spinbutton.cpp b/xfa/fwl/core/ifwl_spinbutton.cpp
index dbba2f67f4..a4212bcaeb 100644
--- a/xfa/fwl/core/ifwl_spinbutton.cpp
+++ b/xfa/fwl/core/ifwl_spinbutton.cpp
@@ -23,16 +23,8 @@ const int kElapseTime = 200;
} // namespace
-// static
-IFWL_SpinButton* IFWL_SpinButton::Create(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_SpinButton(properties, nullptr);
-}
-
-IFWL_SpinButton::IFWL_SpinButton(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
- : IFWL_Widget(properties, pOuter),
+IFWL_SpinButton::IFWL_SpinButton(const CFWL_WidgetImpProperties& properties)
+ : IFWL_Widget(properties, nullptr),
m_dwUpState(CFWL_PartState_Normal),
m_dwDnState(CFWL_PartState_Normal),
m_iButtonIndex(0),
diff --git a/xfa/fwl/core/ifwl_spinbutton.h b/xfa/fwl/core/ifwl_spinbutton.h
index 717ba9f011..f35732c4ca 100644
--- a/xfa/fwl/core/ifwl_spinbutton.h
+++ b/xfa/fwl/core/ifwl_spinbutton.h
@@ -23,11 +23,7 @@ FWL_EVENT_DEF(CFWL_EvtSpbClick, CFWL_EventType::Click, FX_BOOL m_bUp;)
class IFWL_SpinButton : public IFWL_Widget, public IFWL_Timer {
public:
- static IFWL_SpinButton* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- IFWL_SpinButton(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ explicit IFWL_SpinButton(const CFWL_WidgetImpProperties& properties);
~IFWL_SpinButton() override;
// IFWL_Widget
diff --git a/xfa/fwl/core/ifwl_tooltip.cpp b/xfa/fwl/core/ifwl_tooltip.cpp
index f0c46555a0..6281040546 100644
--- a/xfa/fwl/core/ifwl_tooltip.cpp
+++ b/xfa/fwl/core/ifwl_tooltip.cpp
@@ -15,12 +15,6 @@
#include "xfa/fwl/core/ifwl_tooltip.h"
#include "xfa/fwl/theme/cfwl_widgettp.h"
-// static
-IFWL_ToolTip* IFWL_ToolTip::Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_ToolTip(properties, pOuter);
-}
-
IFWL_ToolTip::IFWL_ToolTip(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: IFWL_Form(properties, pOuter),
diff --git a/xfa/fwl/core/ifwl_tooltip.h b/xfa/fwl/core/ifwl_tooltip.h
index 69f0e13596..7554f82bf9 100644
--- a/xfa/fwl/core/ifwl_tooltip.h
+++ b/xfa/fwl/core/ifwl_tooltip.h
@@ -35,9 +35,6 @@ class IFWL_ToolTipDP : public IFWL_DataProvider {
class IFWL_ToolTip : public IFWL_Form {
public:
- static IFWL_ToolTip* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
IFWL_ToolTip(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter);
~IFWL_ToolTip() override;