summaryrefslogtreecommitdiff
path: root/xfa/include/fwl/basewidget
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/include/fwl/basewidget')
-rw-r--r--xfa/include/fwl/basewidget/fwl_barcode.h8
-rw-r--r--xfa/include/fwl/basewidget/fwl_caret.h11
-rw-r--r--xfa/include/fwl/basewidget/fwl_checkbox.h19
-rw-r--r--xfa/include/fwl/basewidget/fwl_combobox.h8
-rw-r--r--xfa/include/fwl/basewidget/fwl_datetimepicker.h9
-rw-r--r--xfa/include/fwl/basewidget/fwl_edit.h10
-rw-r--r--xfa/include/fwl/basewidget/fwl_listbox.h11
-rw-r--r--xfa/include/fwl/basewidget/fwl_monthcalendar.h5
-rw-r--r--xfa/include/fwl/basewidget/fwl_picturebox.h7
-rw-r--r--xfa/include/fwl/basewidget/fwl_pushbutton.h6
-rw-r--r--xfa/include/fwl/basewidget/fwl_scrollbar.h9
-rw-r--r--xfa/include/fwl/basewidget/fwl_spinbutton.h9
-rw-r--r--xfa/include/fwl/basewidget/fwl_tooltipctrl.h9
13 files changed, 72 insertions, 49 deletions
diff --git a/xfa/include/fwl/basewidget/fwl_barcode.h b/xfa/include/fwl/basewidget/fwl_barcode.h
index 28b40baad1..b55630f4e2 100644
--- a/xfa/include/fwl/basewidget/fwl_barcode.h
+++ b/xfa/include/fwl/basewidget/fwl_barcode.h
@@ -47,12 +47,14 @@ class IFWL_BarcodeDP : public IFWL_EditDP {
virtual FX_BOOL GetTruncated() = 0;
virtual FX_DWORD GetBarcodeAttributeMask() = 0;
};
+
class IFWL_Barcode : public IFWL_Edit {
public:
- IFWL_Barcode();
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ static IFWL_Barcode* Create(const CFWL_WidgetImpProperties& properties);
void SetType(BC_TYPE type);
FX_BOOL IsProtectedType();
+
+ protected:
+ IFWL_Barcode();
};
#endif
diff --git a/xfa/include/fwl/basewidget/fwl_caret.h b/xfa/include/fwl/basewidget/fwl_caret.h
index d2e8a807ce..0e5a0c2afe 100644
--- a/xfa/include/fwl/basewidget/fwl_caret.h
+++ b/xfa/include/fwl/basewidget/fwl_caret.h
@@ -14,17 +14,18 @@ class IFWL_Caret;
#define FWL_STATE_CAT_HightLight 1
#define FWL_PART_CAT_Background 1
#define FWL_PARTSTATE_CAT_HightLight 1
+
class IFWL_Caret : public IFWL_Widget {
public:
- IFWL_Caret();
-
- FWL_ERR Initialize(IFWL_Widget* pOuter = NULL);
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ static IFWL_Caret* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
FWL_ERR ShowCaret(FX_BOOL bFlag = TRUE);
FWL_ERR GetFrequency(FX_DWORD& elapse);
FWL_ERR SetFrequency(FX_DWORD elapse);
FWL_ERR SetColor(CFX_Color crFill);
+
+ protected:
+ IFWL_Caret();
};
#endif
diff --git a/xfa/include/fwl/basewidget/fwl_checkbox.h b/xfa/include/fwl/basewidget/fwl_checkbox.h
index 3e08a63972..f6102d6150 100644
--- a/xfa/include/fwl/basewidget/fwl_checkbox.h
+++ b/xfa/include/fwl/basewidget/fwl_checkbox.h
@@ -11,9 +11,7 @@ class IFWL_Widget;
class IFWL_CheckBoxDP;
class IFWL_CheckBox;
#define FWL_CLASS_CheckBox L"FWL_CHECKBOX"
-#define FWL_CLASS_RadioButton L"FWL_RADIOBUTTON"
#define FWL_CLASSHASH_CheckBox 4107183823
-#define FWL_CLASSHASH_RadioButton 3811304691
#define FWL_STYLEEXT_CKB_Left (0L << 0)
#define FWL_STYLEEXT_CKB_Center (1L << 0)
#define FWL_STYLEEXT_CKB_Right (2L << 0)
@@ -68,21 +66,16 @@ class IFWL_CheckBoxDP : public IFWL_DataProvider {
public:
virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) = 0;
};
+
class IFWL_CheckBox : public IFWL_Widget {
public:
- IFWL_CheckBox();
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ static IFWL_CheckBox* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
int32_t GetCheckState();
FWL_ERR SetCheckState(int32_t iCheck);
+ protected:
+ IFWL_CheckBox();
};
-class IFWL_RadioButton : public IFWL_Widget {
- public:
- IFWL_RadioButton();
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
- int32_t GetCheckState();
- FWL_ERR SetCheckState(int32_t iCheck);
-};
+
#endif
diff --git a/xfa/include/fwl/basewidget/fwl_combobox.h b/xfa/include/fwl/basewidget/fwl_combobox.h
index 184d0107a4..7fa9bddc3d 100644
--- a/xfa/include/fwl/basewidget/fwl_combobox.h
+++ b/xfa/include/fwl/basewidget/fwl_combobox.h
@@ -97,9 +97,8 @@ class IFWL_ComboBoxDP : public IFWL_ListBoxDP {
};
class IFWL_ComboBox : public IFWL_Widget {
public:
- IFWL_ComboBox();
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ static IFWL_ComboBox* Create(const CFWL_WidgetImpProperties& properties);
+
int32_t GetCurSel();
FWL_ERR SetCurSel(int32_t iSel);
FWL_ERR SetEditText(const CFX_WideString& wsText);
@@ -133,5 +132,8 @@ class IFWL_ComboBox : public IFWL_Widget {
FWL_ERR GetBBox(CFX_RectF& rect);
FWL_ERR EditModifyStylesEx(FX_DWORD dwStylesExAdded,
FX_DWORD dwStylesExRemoved);
+
+ protected:
+ IFWL_ComboBox();
};
#endif
diff --git a/xfa/include/fwl/basewidget/fwl_datetimepicker.h b/xfa/include/fwl/basewidget/fwl_datetimepicker.h
index 1f3750aaca..15ba0eaeff 100644
--- a/xfa/include/fwl/basewidget/fwl_datetimepicker.h
+++ b/xfa/include/fwl/basewidget/fwl_datetimepicker.h
@@ -70,9 +70,9 @@ class IFWL_DateTimePickerDP : public IFWL_DataProvider {
};
class IFWL_DateTimePicker : public IFWL_Widget {
public:
- IFWL_DateTimePicker();
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ static IFWL_DateTimePicker* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
+
FWL_ERR GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay);
FWL_ERR SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay);
FWL_ERR SetEditText(const CFX_WideString& wsText);
@@ -98,5 +98,8 @@ class IFWL_DateTimePicker : public IFWL_Widget {
FWL_ERR SetEditLimit(int32_t nLimit);
FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded,
FX_DWORD dwStylesExRemoved);
+
+ protected:
+ IFWL_DateTimePicker();
};
#endif
diff --git a/xfa/include/fwl/basewidget/fwl_edit.h b/xfa/include/fwl/basewidget/fwl_edit.h
index 207e6ef614..da7398a2ca 100644
--- a/xfa/include/fwl/basewidget/fwl_edit.h
+++ b/xfa/include/fwl/basewidget/fwl_edit.h
@@ -112,10 +112,11 @@ class IFWL_EditDP : public IFWL_DataProvider {};
typedef struct _FWL_HEDTFIND { void* pData; } * FWL_HEDTFIND;
class IFWL_Edit : public IFWL_Widget {
public:
- IFWL_Edit();
+ static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
+ static IFWL_Edit* CreateComboEdit(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
FWL_ERR SetText(const CFX_WideString& wsText);
int32_t GetTextLength() const;
FWL_ERR GetText(CFX_WideString& wsText,
@@ -159,5 +160,8 @@ class IFWL_Edit : public IFWL_Widget {
FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray& sSuggest);
FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf,
const CFX_ByteStringC& bsReplace);
+
+ protected:
+ IFWL_Edit();
};
#endif
diff --git a/xfa/include/fwl/basewidget/fwl_listbox.h b/xfa/include/fwl/basewidget/fwl_listbox.h
index cc2fe91feb..1d585881d3 100644
--- a/xfa/include/fwl/basewidget/fwl_listbox.h
+++ b/xfa/include/fwl/basewidget/fwl_listbox.h
@@ -109,10 +109,12 @@ class IFWL_ListBoxCompare {
};
class IFWL_ListBox : public IFWL_Widget {
public:
- IFWL_ListBox();
+ static IFWL_ListBox* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
+ static IFWL_ListBox* CreateComboList(
+ const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
int32_t CountSelItems();
FWL_HLISTITEM GetSelItem(int32_t nIndexSel);
int32_t GetSelIndex(int32_t nIndex);
@@ -120,5 +122,8 @@ class IFWL_ListBox : public IFWL_Widget {
FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText);
FWL_ERR GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE);
FWL_ERR* Sort(IFWL_ListBoxCompare* pCom);
+
+ protected:
+ IFWL_ListBox();
};
#endif
diff --git a/xfa/include/fwl/basewidget/fwl_monthcalendar.h b/xfa/include/fwl/basewidget/fwl_monthcalendar.h
index 23bc0ea712..c1c3001825 100644
--- a/xfa/include/fwl/basewidget/fwl_monthcalendar.h
+++ b/xfa/include/fwl/basewidget/fwl_monthcalendar.h
@@ -114,10 +114,9 @@ class IFWL_MonthCalendarDP : public IFWL_DataProvider {
};
class IFWL_MonthCalendar : public IFWL_Widget {
public:
- static IFWL_MonthCalendar* Create();
+ static IFWL_MonthCalendar* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
int32_t CountSelect();
FX_BOOL GetSelect(int32_t& iYear,
int32_t& iMonth,
diff --git a/xfa/include/fwl/basewidget/fwl_picturebox.h b/xfa/include/fwl/basewidget/fwl_picturebox.h
index b55d4c30d9..d0eefdea1d 100644
--- a/xfa/include/fwl/basewidget/fwl_picturebox.h
+++ b/xfa/include/fwl/basewidget/fwl_picturebox.h
@@ -40,10 +40,13 @@ class IFWL_PictureBoxDP : public IFWL_DataProvider {
virtual int32_t GetFlipMode(IFWL_Widget* pWidget) = 0;
virtual FWL_ERR GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) = 0;
};
+
class IFWL_PictureBox : public IFWL_Widget {
public:
+ static IFWL_PictureBox* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
+
+ protected:
IFWL_PictureBox();
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
};
#endif
diff --git a/xfa/include/fwl/basewidget/fwl_pushbutton.h b/xfa/include/fwl/basewidget/fwl_pushbutton.h
index e0239190ad..953fb01893 100644
--- a/xfa/include/fwl/basewidget/fwl_pushbutton.h
+++ b/xfa/include/fwl/basewidget/fwl_pushbutton.h
@@ -45,8 +45,10 @@ class IFWL_PushButtonDP : public IFWL_DataProvider {
};
class IFWL_PushButton : public IFWL_Widget {
public:
+ static IFWL_PushButton* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
+
+ protected:
IFWL_PushButton();
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
};
#endif
diff --git a/xfa/include/fwl/basewidget/fwl_scrollbar.h b/xfa/include/fwl/basewidget/fwl_scrollbar.h
index 10ce5f2688..04263a8967 100644
--- a/xfa/include/fwl/basewidget/fwl_scrollbar.h
+++ b/xfa/include/fwl/basewidget/fwl_scrollbar.h
@@ -47,9 +47,9 @@ enum FWL_SCBCODE {
class IFWL_ScrollBarDP : public IFWL_DataProvider {};
class IFWL_ScrollBar : public IFWL_Widget {
public:
- IFWL_ScrollBar();
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ static IFWL_ScrollBar* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
+
FX_BOOL IsVertical();
FWL_ERR GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax);
FWL_ERR SetRange(FX_FLOAT fMin, FX_FLOAT fMax);
@@ -62,5 +62,8 @@ class IFWL_ScrollBar : public IFWL_Widget {
FX_FLOAT GetTrackPos();
FWL_ERR SetTrackPos(FX_FLOAT fTrackPos);
FX_BOOL DoScroll(FX_DWORD dwCode, FX_FLOAT fPos = 0.0f);
+
+ protected:
+ IFWL_ScrollBar();
};
#endif
diff --git a/xfa/include/fwl/basewidget/fwl_spinbutton.h b/xfa/include/fwl/basewidget/fwl_spinbutton.h
index 79e3f68b5b..efcfa22a49 100644
--- a/xfa/include/fwl/basewidget/fwl_spinbutton.h
+++ b/xfa/include/fwl/basewidget/fwl_spinbutton.h
@@ -30,10 +30,13 @@ END_FWL_EVENT_DEF
class IFWL_SpinButton : public IFWL_Widget {
public:
- IFWL_SpinButton();
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ static IFWL_SpinButton* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
+
FWL_ERR EnableButton(FX_BOOL bEnable, FX_BOOL bUp = TRUE);
FX_BOOL IsButtonEnable(FX_BOOL bUp = TRUE);
+
+ protected:
+ IFWL_SpinButton();
};
#endif
diff --git a/xfa/include/fwl/basewidget/fwl_tooltipctrl.h b/xfa/include/fwl/basewidget/fwl_tooltipctrl.h
index ac467556d8..7205c37cd7 100644
--- a/xfa/include/fwl/basewidget/fwl_tooltipctrl.h
+++ b/xfa/include/fwl/basewidget/fwl_tooltipctrl.h
@@ -31,11 +31,14 @@ class IFWL_ToolTipDP : public IFWL_DataProvider {
};
class IFWL_ToolTip : public IFWL_Form {
public:
- IFWL_ToolTip();
- FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ static IFWL_ToolTip* Create(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
+
FWL_ERR SetAnchor(const CFX_RectF& rtAnchor);
FWL_ERR Show();
FWL_ERR Hide();
+
+ protected:
+ IFWL_ToolTip();
};
#endif