summaryrefslogtreecommitdiff
path: root/xfa/include/fwl/lightwidget
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/include/fwl/lightwidget')
-rw-r--r--xfa/include/fwl/lightwidget/app.h24
-rw-r--r--xfa/include/fwl/lightwidget/barcode.h260
-rw-r--r--xfa/include/fwl/lightwidget/caret.h24
-rw-r--r--xfa/include/fwl/lightwidget/checkbox.h45
-rw-r--r--xfa/include/fwl/lightwidget/combobox.h211
-rw-r--r--xfa/include/fwl/lightwidget/datetimepicker.h89
-rw-r--r--xfa/include/fwl/lightwidget/edit.h92
-rw-r--r--xfa/include/fwl/lightwidget/listbox.h174
-rw-r--r--xfa/include/fwl/lightwidget/picturebox.h96
-rw-r--r--xfa/include/fwl/lightwidget/pushbutton.h43
-rw-r--r--xfa/include/fwl/lightwidget/scrollbar.h37
-rw-r--r--xfa/include/fwl/lightwidget/theme.h54
-rw-r--r--xfa/include/fwl/lightwidget/tooltipctrl.h77
-rw-r--r--xfa/include/fwl/lightwidget/widget.h168
14 files changed, 693 insertions, 701 deletions
diff --git a/xfa/include/fwl/lightwidget/app.h b/xfa/include/fwl/lightwidget/app.h
index 72d9dc01c7..367e732f5c 100644
--- a/xfa/include/fwl/lightwidget/app.h
+++ b/xfa/include/fwl/lightwidget/app.h
@@ -9,17 +9,17 @@
class CFWL_Theme;
class IFWL_App;
class CFWL_App;
-class CFWL_App
-{
-public:
- CFWL_App();
- virtual ~CFWL_App();
- FWL_ERR Initialize();
- CFWL_Theme* GetTheme();
- FWL_ERR Exit(int32_t iExitCode = 0);
- IFWL_App* GetApp();
-protected:
- IFWL_App *m_pAppImp;
- CFWL_Theme *m_pThemeProvider;
+class CFWL_App {
+ public:
+ CFWL_App();
+ virtual ~CFWL_App();
+ FWL_ERR Initialize();
+ CFWL_Theme* GetTheme();
+ FWL_ERR Exit(int32_t iExitCode = 0);
+ IFWL_App* GetApp();
+
+ protected:
+ IFWL_App* m_pAppImp;
+ CFWL_Theme* m_pThemeProvider;
};
#endif
diff --git a/xfa/include/fwl/lightwidget/barcode.h b/xfa/include/fwl/lightwidget/barcode.h
index 242b432ab1..ab1719373a 100644
--- a/xfa/include/fwl/lightwidget/barcode.h
+++ b/xfa/include/fwl/lightwidget/barcode.h
@@ -12,166 +12,106 @@ class IFWL_BarcodeDP;
class CFWL_Edit;
class CFWL_Barcode;
class CFWL_BarcodeDP;
-class CFWL_Barcode : public CFWL_Edit
-{
-public:
- static CFWL_Barcode* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- void SetType(BC_TYPE type);
- FX_BOOL IsProtectedType();
-public:
- void SetCharEncoding(BC_CHAR_ENCODING encoding)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING;
- m_barcodeData.m_eCharEncoding = encoding;
- }
- void SetModuleHeight(int32_t height)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT;
- m_barcodeData.m_nModuleHeight = height;
- }
- void SetModuleWidth(int32_t width)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEWIDTH;
- m_barcodeData.m_nModuleWidth = width;
- }
- void SetDataLength(int32_t dataLength)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_DATALENGTH;
- m_barcodeData.m_nDataLength = dataLength;
- ((IFWL_Barcode*)m_pImp)->SetLimit(dataLength);
- }
- void SetCalChecksum(int32_t calChecksum)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CALCHECKSUM;
- m_barcodeData.m_nCalChecksum = calChecksum;
- }
- void SetPrintChecksum(FX_BOOL printChecksum)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_PRINTCHECKSUM;
- m_barcodeData.m_bPrintChecksum = printChecksum;
- }
- void SetTextLocation(BC_TEXT_LOC location)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TEXTLOCATION;
- m_barcodeData.m_eTextLocation = location;
- }
- void SetWideNarrowRatio(int32_t ratio)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_WIDENARROWRATIO;
- m_barcodeData.m_nWideNarrowRatio = ratio;
- }
- void SetStartChar(FX_CHAR startChar)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_STARTCHAR;
- m_barcodeData.m_cStartChar = startChar;
- }
- void SetEndChar(FX_CHAR endChar)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ENDCHAR;
- m_barcodeData.m_cEndChar = endChar;
- }
- void SetVersion(int32_t version)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_VERSION;
- m_barcodeData.m_nVersion = version;
- }
- void SetErrorCorrectionLevel(int32_t ecLevel)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ECLEVEL;
- m_barcodeData.m_nECLevel = ecLevel;
- }
- void SetTruncated(FX_BOOL truncated)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED;
- m_barcodeData.m_bTruncated = truncated;
- }
- void ResetBarcodeAttributes()
- {
- m_barcodeData.m_dwAttributeMask = 0;
- }
-protected:
- CFWL_Barcode();
- virtual ~CFWL_Barcode();
- class CFWL_BarcodeDP : public IFWL_BarcodeDP
- {
- public:
- virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);
- BC_CHAR_ENCODING m_eCharEncoding;
- virtual BC_CHAR_ENCODING GetCharEncoding()
- {
- return m_eCharEncoding;
- }
- int32_t m_nModuleHeight, m_nModuleWidth;
- virtual int32_t GetModuleHeight()
- {
- return m_nModuleHeight;
- }
- virtual int32_t GetModuleWidth()
- {
- return m_nModuleWidth;
- }
- int32_t m_nDataLength;
- virtual int32_t GetDataLength()
- {
- return m_nDataLength;
- }
- int32_t m_nCalChecksum;
- virtual int32_t GetCalChecksum()
- {
- return m_nCalChecksum;
- }
- FX_BOOL m_bPrintChecksum;
- virtual FX_BOOL GetPrintChecksum()
- {
- return m_bPrintChecksum;
- }
+class CFWL_Barcode : public CFWL_Edit {
+ public:
+ static CFWL_Barcode* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ void SetType(BC_TYPE type);
+ FX_BOOL IsProtectedType();
- BC_TEXT_LOC m_eTextLocation;
- virtual BC_TEXT_LOC GetTextLocation()
- {
- return m_eTextLocation;
- }
- int32_t m_nWideNarrowRatio;
- virtual int32_t GetWideNarrowRatio()
- {
- return m_nWideNarrowRatio;
- }
- FX_CHAR m_cStartChar, m_cEndChar;
- virtual FX_CHAR GetStartChar()
- {
- return m_cStartChar;
- }
- virtual FX_CHAR GetEndChar()
- {
- return m_cEndChar;
- }
- int32_t m_nVersion;
- virtual int32_t GetVersion()
- {
- return m_nVersion;
- }
- int32_t m_nECLevel;
- virtual int32_t GetErrorCorrectionLevel()
- {
- return m_nECLevel;
- }
- FX_BOOL m_bTruncated;
- virtual FX_BOOL GetTruncated()
- {
- return m_bTruncated;
- }
- FX_DWORD m_dwAttributeMask;
- virtual FX_DWORD GetBarcodeAttributeMask()
- {
- return m_dwAttributeMask;
- }
- public:
- CFWL_BarcodeDP()
- : m_dwAttributeMask(0)
- {
- }
- };
- CFWL_BarcodeDP m_barcodeData;
+ public:
+ void SetCharEncoding(BC_CHAR_ENCODING encoding) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING;
+ m_barcodeData.m_eCharEncoding = encoding;
+ }
+ void SetModuleHeight(int32_t height) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT;
+ m_barcodeData.m_nModuleHeight = height;
+ }
+ void SetModuleWidth(int32_t width) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEWIDTH;
+ m_barcodeData.m_nModuleWidth = width;
+ }
+ void SetDataLength(int32_t dataLength) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_DATALENGTH;
+ m_barcodeData.m_nDataLength = dataLength;
+ ((IFWL_Barcode*)m_pImp)->SetLimit(dataLength);
+ }
+ void SetCalChecksum(int32_t calChecksum) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CALCHECKSUM;
+ m_barcodeData.m_nCalChecksum = calChecksum;
+ }
+ void SetPrintChecksum(FX_BOOL printChecksum) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_PRINTCHECKSUM;
+ m_barcodeData.m_bPrintChecksum = printChecksum;
+ }
+ void SetTextLocation(BC_TEXT_LOC location) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TEXTLOCATION;
+ m_barcodeData.m_eTextLocation = location;
+ }
+ void SetWideNarrowRatio(int32_t ratio) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_WIDENARROWRATIO;
+ m_barcodeData.m_nWideNarrowRatio = ratio;
+ }
+ void SetStartChar(FX_CHAR startChar) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_STARTCHAR;
+ m_barcodeData.m_cStartChar = startChar;
+ }
+ void SetEndChar(FX_CHAR endChar) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ENDCHAR;
+ m_barcodeData.m_cEndChar = endChar;
+ }
+ void SetVersion(int32_t version) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_VERSION;
+ m_barcodeData.m_nVersion = version;
+ }
+ void SetErrorCorrectionLevel(int32_t ecLevel) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ECLEVEL;
+ m_barcodeData.m_nECLevel = ecLevel;
+ }
+ void SetTruncated(FX_BOOL truncated) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED;
+ m_barcodeData.m_bTruncated = truncated;
+ }
+ void ResetBarcodeAttributes() { m_barcodeData.m_dwAttributeMask = 0; }
+
+ protected:
+ CFWL_Barcode();
+ virtual ~CFWL_Barcode();
+ class CFWL_BarcodeDP : public IFWL_BarcodeDP {
+ public:
+ virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
+ BC_CHAR_ENCODING m_eCharEncoding;
+ virtual BC_CHAR_ENCODING GetCharEncoding() { return m_eCharEncoding; }
+ int32_t m_nModuleHeight, m_nModuleWidth;
+ virtual int32_t GetModuleHeight() { return m_nModuleHeight; }
+ virtual int32_t GetModuleWidth() { return m_nModuleWidth; }
+ int32_t m_nDataLength;
+ virtual int32_t GetDataLength() { return m_nDataLength; }
+ int32_t m_nCalChecksum;
+ virtual int32_t GetCalChecksum() { return m_nCalChecksum; }
+ FX_BOOL m_bPrintChecksum;
+ virtual FX_BOOL GetPrintChecksum() { return m_bPrintChecksum; }
+
+ BC_TEXT_LOC m_eTextLocation;
+ virtual BC_TEXT_LOC GetTextLocation() { return m_eTextLocation; }
+ int32_t m_nWideNarrowRatio;
+ virtual int32_t GetWideNarrowRatio() { return m_nWideNarrowRatio; }
+ FX_CHAR m_cStartChar, m_cEndChar;
+ virtual FX_CHAR GetStartChar() { return m_cStartChar; }
+ virtual FX_CHAR GetEndChar() { return m_cEndChar; }
+ int32_t m_nVersion;
+ virtual int32_t GetVersion() { return m_nVersion; }
+ int32_t m_nECLevel;
+ virtual int32_t GetErrorCorrectionLevel() { return m_nECLevel; }
+ FX_BOOL m_bTruncated;
+ virtual FX_BOOL GetTruncated() { return m_bTruncated; }
+ FX_DWORD m_dwAttributeMask;
+ virtual FX_DWORD GetBarcodeAttributeMask() { return m_dwAttributeMask; }
+
+ public:
+ CFWL_BarcodeDP() : m_dwAttributeMask(0) {}
+ };
+ CFWL_BarcodeDP m_barcodeData;
};
#endif
diff --git a/xfa/include/fwl/lightwidget/caret.h b/xfa/include/fwl/lightwidget/caret.h
index d4c2e7702f..534dca5b01 100644
--- a/xfa/include/fwl/lightwidget/caret.h
+++ b/xfa/include/fwl/lightwidget/caret.h
@@ -9,17 +9,17 @@
class CFWL_Widget;
class CFWL_WidgetProperties;
class CFWL_Caret;
-class CFWL_Caret : public CFWL_Widget
-{
-public:
- static CFWL_Caret* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- 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:
- CFWL_Caret();
- virtual ~CFWL_Caret();
+class CFWL_Caret : public CFWL_Widget {
+ public:
+ static CFWL_Caret* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ 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:
+ CFWL_Caret();
+ virtual ~CFWL_Caret();
};
#endif
diff --git a/xfa/include/fwl/lightwidget/checkbox.h b/xfa/include/fwl/lightwidget/checkbox.h
index f06750821f..1365188ac3 100644
--- a/xfa/include/fwl/lightwidget/checkbox.h
+++ b/xfa/include/fwl/lightwidget/checkbox.h
@@ -11,29 +11,28 @@ class CFWL_WidgetProperties;
class IFWL_CheckBoxDP;
class CFWL_CheckBox;
class CFWL_CheckBoxDP;
-class CFWL_CheckBox : public CFWL_Widget
-{
-public:
- static CFWL_CheckBox* Create();
+class CFWL_CheckBox : public CFWL_Widget {
+ public:
+ static CFWL_CheckBox* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- FWL_ERR GetCaption(CFX_WideString &wsCaption);
- FWL_ERR SetCaption(const CFX_WideStringC& wsCaption);
- FWL_ERR SetBoxSize(FX_FLOAT fHeight);
- int32_t GetCheckState();
- FWL_ERR SetCheckState(int32_t iCheck);
- CFWL_CheckBox();
- virtual ~CFWL_CheckBox();
-protected:
- class CFWL_CheckBoxDP : public IFWL_CheckBoxDP
- {
- public:
- CFWL_CheckBoxDP();
- virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);
- virtual FX_FLOAT GetBoxSize(IFWL_Widget *pWidget);
- FX_FLOAT m_fBoxHeight;
- CFX_WideString m_wsCaption;
- };
- CFWL_CheckBoxDP m_checkboxData;
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ FWL_ERR GetCaption(CFX_WideString& wsCaption);
+ FWL_ERR SetCaption(const CFX_WideStringC& wsCaption);
+ FWL_ERR SetBoxSize(FX_FLOAT fHeight);
+ int32_t GetCheckState();
+ FWL_ERR SetCheckState(int32_t iCheck);
+ CFWL_CheckBox();
+ virtual ~CFWL_CheckBox();
+
+ protected:
+ class CFWL_CheckBoxDP : public IFWL_CheckBoxDP {
+ public:
+ CFWL_CheckBoxDP();
+ virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
+ virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget);
+ FX_FLOAT m_fBoxHeight;
+ CFX_WideString m_wsCaption;
+ };
+ CFWL_CheckBoxDP m_checkboxData;
};
#endif
diff --git a/xfa/include/fwl/lightwidget/combobox.h b/xfa/include/fwl/lightwidget/combobox.h
index fc09f63af0..cb8ef703dc 100644
--- a/xfa/include/fwl/lightwidget/combobox.h
+++ b/xfa/include/fwl/lightwidget/combobox.h
@@ -12,104 +12,125 @@ class IFWL_ComboBoxDP;
class CFWL_ComboBox;
class CFWL_ComboBoxDP;
class CFWL_ComboBoxItem;
-class CFWL_ComboBox : public CFWL_Widget
-{
-public:
- static CFWL_ComboBox* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- int32_t AddString(const CFX_WideStringC& wsText);
- int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap *pIcon);
- int32_t RemoveAt(int32_t iIndex);
- int32_t RemoveAll();
- int32_t CountItems();
- FWL_ERR GetTextByIndex(int32_t iIndex, CFX_WideString &wsText);
- int32_t GetCurSel();
- FWL_ERR SetCurSel(int32_t iSel);
- FWL_ERR SetEditText(const CFX_WideStringC& wsText);
- int32_t GetEditTextLength() const;
- FWL_ERR GetEditText(CFX_WideString &wsText, int32_t nStart = 0, int32_t nCount = -1) const ;
- FWL_ERR SetEditSelRange(int32_t nStart, int32_t nCount = -1);
- int32_t GetEditSelRange(int32_t nIndex, int32_t &nStart);
- int32_t GetEditLimit();
- FWL_ERR SetEditLimit(int32_t nLimit);
- FWL_ERR EditDoClipboard(int32_t iCmd);
- FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord);
- FX_BOOL EditUndo(const CFX_ByteStringC& bsRecord);
- FWL_ERR SetMaxListHeight(FX_FLOAT fMaxHeight);
- FWL_ERR SetItemData(int32_t iIndex, void* pData);
- void* GetItemData(int32_t iIndex);
- FWL_ERR SetListTheme(IFWL_ThemeProvider *pTheme);
- FX_BOOL AfterFocusShowDropList();
- FWL_ERR OpenDropDownList(FX_BOOL bActivate);
-public:
- FX_BOOL EditCanUndo();
- FX_BOOL EditCanRedo();
- FX_BOOL EditUndo();
- FX_BOOL EditRedo();
- FX_BOOL EditCanCopy();
- FX_BOOL EditCanCut();
- FX_BOOL EditCanSelectAll();
- FX_BOOL EditCopy(CFX_WideString &wsCopy);
- FX_BOOL EditCut(CFX_WideString &wsCut);
- FX_BOOL EditPaste(const CFX_WideString &wsPaste);
- FX_BOOL EditSelectAll();
- FX_BOOL EditDelete();
- FX_BOOL EditDeSelect();
- FWL_ERR GetBBox(CFX_RectF &rect);
- FWL_ERR EditModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
- CFWL_ComboBox();
- virtual ~CFWL_ComboBox();
-protected:
- class CFWL_ComboBoxDP : public IFWL_ComboBoxDP
- {
- public:
- CFWL_ComboBoxDP();
- ~CFWL_ComboBoxDP();
- virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption)
- {
- return FWL_ERR_Succeeded;
- }
+class CFWL_ComboBox : public CFWL_Widget {
+ public:
+ static CFWL_ComboBox* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ int32_t AddString(const CFX_WideStringC& wsText);
+ int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon);
+ int32_t RemoveAt(int32_t iIndex);
+ int32_t RemoveAll();
+ int32_t CountItems();
+ FWL_ERR GetTextByIndex(int32_t iIndex, CFX_WideString& wsText);
+ int32_t GetCurSel();
+ FWL_ERR SetCurSel(int32_t iSel);
+ FWL_ERR SetEditText(const CFX_WideStringC& wsText);
+ int32_t GetEditTextLength() const;
+ FWL_ERR GetEditText(CFX_WideString& wsText,
+ int32_t nStart = 0,
+ int32_t nCount = -1) const;
+ FWL_ERR SetEditSelRange(int32_t nStart, int32_t nCount = -1);
+ int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart);
+ int32_t GetEditLimit();
+ FWL_ERR SetEditLimit(int32_t nLimit);
+ FWL_ERR EditDoClipboard(int32_t iCmd);
+ FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord);
+ FX_BOOL EditUndo(const CFX_ByteStringC& bsRecord);
+ FWL_ERR SetMaxListHeight(FX_FLOAT fMaxHeight);
+ FWL_ERR SetItemData(int32_t iIndex, void* pData);
+ void* GetItemData(int32_t iIndex);
+ FWL_ERR SetListTheme(IFWL_ThemeProvider* pTheme);
+ FX_BOOL AfterFocusShowDropList();
+ FWL_ERR OpenDropDownList(FX_BOOL bActivate);
- virtual int32_t CountItems(IFWL_Widget *pWidget);
- virtual FWL_HLISTITEM GetItem(IFWL_Widget *pWidget, int32_t nIndex);
- virtual int32_t GetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
- virtual FX_BOOL SetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, int32_t nIndex);
+ public:
+ FX_BOOL EditCanUndo();
+ FX_BOOL EditCanRedo();
+ FX_BOOL EditUndo();
+ FX_BOOL EditRedo();
+ FX_BOOL EditCanCopy();
+ FX_BOOL EditCanCut();
+ FX_BOOL EditCanSelectAll();
+ FX_BOOL EditCopy(CFX_WideString& wsCopy);
+ FX_BOOL EditCut(CFX_WideString& wsCut);
+ FX_BOOL EditPaste(const CFX_WideString& wsPaste);
+ FX_BOOL EditSelectAll();
+ FX_BOOL EditDelete();
+ FX_BOOL EditDeSelect();
+ FWL_ERR GetBBox(CFX_RectF& rect);
+ FWL_ERR EditModifyStylesEx(FX_DWORD dwStylesExAdded,
+ FX_DWORD dwStylesExRemoved);
+ CFWL_ComboBox();
+ virtual ~CFWL_ComboBox();
- virtual FX_DWORD GetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR GetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_WideString &wsText);
- virtual FWL_ERR GetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_RectF& rtItem);
- virtual void* GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR SetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_DWORD dwStyle);
- virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const FX_WCHAR* pszText);
- virtual FWL_ERR SetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const CFX_RectF& rtItem);
- virtual FX_FLOAT GetItemHeight(IFWL_Widget *pWidget);
- virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR GetItemCheckRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_RectF& rtCheck);
- virtual FWL_ERR SetItemCheckRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const CFX_RectF& rtCheck);
- virtual FX_DWORD GetItemCheckState(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR SetItemCheckState(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_DWORD dwCheckState);
- virtual FX_FLOAT GetListHeight(IFWL_Widget *pWidget);
+ protected:
+ class CFWL_ComboBoxDP : public IFWL_ComboBoxDP {
+ public:
+ CFWL_ComboBoxDP();
+ ~CFWL_ComboBoxDP();
+ virtual FWL_ERR GetCaption(IFWL_Widget* pWidget,
+ CFX_WideString& wsCaption) {
+ return FWL_ERR_Succeeded;
+ }
+
+ virtual int32_t CountItems(IFWL_Widget* pWidget);
+ virtual FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex);
+ virtual int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
+ virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ int32_t nIndex);
- CFX_PtrArray m_arrItem;
- FX_FLOAT m_fMaxListHeight;
- FX_FLOAT m_fItemHeight;
- };
- CFWL_ComboBoxDP m_comboBoxData;
+ virtual FX_DWORD GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
+ virtual FWL_ERR GetItemText(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ CFX_WideString& wsText);
+ virtual FWL_ERR GetItemRect(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ CFX_RectF& rtItem);
+ virtual void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
+ virtual FWL_ERR SetItemStyles(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ FX_DWORD dwStyle);
+ virtual FWL_ERR SetItemText(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ const FX_WCHAR* pszText);
+ virtual FWL_ERR SetItemRect(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ const CFX_RectF& rtItem);
+ virtual FX_FLOAT GetItemHeight(IFWL_Widget* pWidget);
+ virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem);
+ virtual FWL_ERR GetItemCheckRect(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ CFX_RectF& rtCheck);
+ virtual FWL_ERR SetItemCheckRect(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ const CFX_RectF& rtCheck);
+ virtual FX_DWORD GetItemCheckState(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem);
+ virtual FWL_ERR SetItemCheckState(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ FX_DWORD dwCheckState);
+ virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget);
+
+ CFX_PtrArray m_arrItem;
+ FX_FLOAT m_fMaxListHeight;
+ FX_FLOAT m_fItemHeight;
+ };
+ CFWL_ComboBoxDP m_comboBoxData;
};
-class CFWL_ComboBoxItem
-{
-public:
- CFWL_ComboBoxItem()
- {
- m_pDIB = NULL;
- m_pData = NULL;
- }
- CFX_RectF m_rtItem;
- FX_DWORD m_dwStyles;
- CFX_WideString m_wsText;
- CFX_DIBitmap *m_pDIB;
- FX_DWORD m_dwCheckState;
- CFX_RectF m_rtCheckBox;
- void* m_pData;
+class CFWL_ComboBoxItem {
+ public:
+ CFWL_ComboBoxItem() {
+ m_pDIB = NULL;
+ m_pData = NULL;
+ }
+ CFX_RectF m_rtItem;
+ FX_DWORD m_dwStyles;
+ CFX_WideString m_wsText;
+ CFX_DIBitmap* m_pDIB;
+ FX_DWORD m_dwCheckState;
+ CFX_RectF m_rtCheckBox;
+ void* m_pData;
};
#endif
diff --git a/xfa/include/fwl/lightwidget/datetimepicker.h b/xfa/include/fwl/lightwidget/datetimepicker.h
index 13d223cf8e..21bdd612d0 100644
--- a/xfa/include/fwl/lightwidget/datetimepicker.h
+++ b/xfa/include/fwl/lightwidget/datetimepicker.h
@@ -11,48 +11,51 @@ class CFWL_WidgetProperties;
class IFWL_DateTimePickerDP;
class CFWL_DateTimePicker;
class CFWL_DateTimePickerDP;
-class CFWL_DateTimePicker : public CFWL_Widget
-{
-public:
- static CFWL_DateTimePicker* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- FWL_ERR SetToday(int32_t iYear, int32_t iMonth, int32_t iDay);
- FWL_ERR GetEditText(CFX_WideString &wsText);
- FWL_ERR SetEditText(const CFX_WideStringC& wsText);
- int32_t CountSelRanges();
- int32_t GetSelRange(int32_t nIndex, int32_t &nStart);
- FWL_ERR GetCurSel(int32_t &iYear, int32_t &iMonth, int32_t &iDay);
- FWL_ERR SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay);
- FX_BOOL CanUndo();
- FX_BOOL CanRedo();
- FX_BOOL Undo();
- FX_BOOL Redo();
- FX_BOOL CanCopy();
- FX_BOOL CanCut();
- FX_BOOL CanSelectAll();
- FX_BOOL Copy(CFX_WideString &wsCopy);
- FX_BOOL Cut(CFX_WideString &wsCut);
- FX_BOOL Paste(const CFX_WideString &wsPaste);
- FX_BOOL SelectAll();
- FX_BOOL Delete();
- FX_BOOL DeSelect();
- FWL_ERR GetBBox(CFX_RectF &rect);
- FWL_ERR SetEditLimit(int32_t nLimit);
- FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
-protected:
- CFWL_DateTimePicker();
- virtual ~CFWL_DateTimePicker();
- class CFWL_DateTimePickerDP : public IFWL_DateTimePickerDP
- {
- public:
- CFWL_DateTimePickerDP();
- virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);
- virtual FWL_ERR GetToday(IFWL_Widget *pWidget, int32_t &iYear, int32_t &iMonth, int32_t &iDay);
- int32_t m_iYear;
- int32_t m_iMonth;
- int32_t m_iDay;
- CFX_WideString m_wsData;
- };
- CFWL_DateTimePickerDP m_DateTimePickerDP;
+class CFWL_DateTimePicker : public CFWL_Widget {
+ public:
+ static CFWL_DateTimePicker* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ FWL_ERR SetToday(int32_t iYear, int32_t iMonth, int32_t iDay);
+ FWL_ERR GetEditText(CFX_WideString& wsText);
+ FWL_ERR SetEditText(const CFX_WideStringC& wsText);
+ int32_t CountSelRanges();
+ int32_t GetSelRange(int32_t nIndex, int32_t& nStart);
+ FWL_ERR GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay);
+ FWL_ERR SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay);
+ FX_BOOL CanUndo();
+ FX_BOOL CanRedo();
+ FX_BOOL Undo();
+ FX_BOOL Redo();
+ FX_BOOL CanCopy();
+ FX_BOOL CanCut();
+ FX_BOOL CanSelectAll();
+ FX_BOOL Copy(CFX_WideString& wsCopy);
+ FX_BOOL Cut(CFX_WideString& wsCut);
+ FX_BOOL Paste(const CFX_WideString& wsPaste);
+ FX_BOOL SelectAll();
+ FX_BOOL Delete();
+ FX_BOOL DeSelect();
+ FWL_ERR GetBBox(CFX_RectF& rect);
+ FWL_ERR SetEditLimit(int32_t nLimit);
+ FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded,
+ FX_DWORD dwStylesExRemoved);
+
+ protected:
+ CFWL_DateTimePicker();
+ virtual ~CFWL_DateTimePicker();
+ class CFWL_DateTimePickerDP : public IFWL_DateTimePickerDP {
+ public:
+ CFWL_DateTimePickerDP();
+ virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
+ virtual FWL_ERR GetToday(IFWL_Widget* pWidget,
+ int32_t& iYear,
+ int32_t& iMonth,
+ int32_t& iDay);
+ int32_t m_iYear;
+ int32_t m_iMonth;
+ int32_t m_iDay;
+ CFX_WideString m_wsData;
+ };
+ CFWL_DateTimePickerDP m_DateTimePickerDP;
};
#endif
diff --git a/xfa/include/fwl/lightwidget/edit.h b/xfa/include/fwl/lightwidget/edit.h
index 06c10728b0..a5406ec2bf 100644
--- a/xfa/include/fwl/lightwidget/edit.h
+++ b/xfa/include/fwl/lightwidget/edit.h
@@ -9,49 +9,53 @@
class CFWL_Widget;
class CFWL_WidgetProperties;
class CFWL_Edit;
-class CFWL_Edit : public CFWL_Widget
-{
-public:
- static CFWL_Edit* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- FWL_ERR SetText(const CFX_WideString &wsText);
- int32_t GetTextLength() const;
- FWL_ERR GetText(CFX_WideString &wsText, int32_t nStart = 0, int32_t nCount = -1) const;
- FWL_ERR ClearText();
- int32_t GetCaretPos() const;
- int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE);
- FWL_ERR AddSelRange(int32_t nStart, int32_t nCount = -1);
- int32_t CountSelRanges();
- int32_t GetSelRange(int32_t nIndex, int32_t &nStart);
- FWL_ERR ClearSelections();
- int32_t GetLimit();
- FWL_ERR SetLimit(int32_t nLimit);
- FWL_ERR SetAliasChar(FX_WCHAR wAlias);
- FWL_ERR SetFormatString(const CFX_WideString &wsFormat);
- FWL_ERR Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen);
- FWL_ERR DeleteSelections();
- FWL_ERR DeleteRange(int32_t nStart, int32_t nCount = -1);
- FWL_ERR ReplaceSelections(const CFX_WideStringC &wsReplace);
- FWL_ERR Replace(int32_t nStart, int32_t nLen, const CFX_WideStringC &wsReplace);
- FWL_ERR DoClipboard(int32_t iCmd);
- FX_BOOL Redo(const CFX_ByteStringC& bsRecord);
- FX_BOOL Undo(const CFX_ByteStringC& bsRecord);
- FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
- FWL_ERR SetNumberRange(int32_t iMin, int32_t iMax);
- FWL_ERR SetBackColor(FX_DWORD dwColor);
- FWL_ERR SetFont(const CFX_WideString &wsFont, FX_FLOAT fSize);
- FX_BOOL CanUndo();
- FX_BOOL CanRedo();
- FX_BOOL Undo();
- FX_BOOL Redo();
- FX_BOOL Copy(CFX_WideString &wsCopy);
- FX_BOOL Cut(CFX_WideString &wsCut);
- FX_BOOL Paste(const CFX_WideString &wsPaste);
- FX_BOOL Delete();
- void SetScrollOffset(FX_FLOAT fScrollOffset);
- FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSuggest);
- FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace);
- CFWL_Edit();
- virtual ~CFWL_Edit();
+class CFWL_Edit : public CFWL_Widget {
+ public:
+ static CFWL_Edit* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ FWL_ERR SetText(const CFX_WideString& wsText);
+ int32_t GetTextLength() const;
+ FWL_ERR GetText(CFX_WideString& wsText,
+ int32_t nStart = 0,
+ int32_t nCount = -1) const;
+ FWL_ERR ClearText();
+ int32_t GetCaretPos() const;
+ int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE);
+ FWL_ERR AddSelRange(int32_t nStart, int32_t nCount = -1);
+ int32_t CountSelRanges();
+ int32_t GetSelRange(int32_t nIndex, int32_t& nStart);
+ FWL_ERR ClearSelections();
+ int32_t GetLimit();
+ FWL_ERR SetLimit(int32_t nLimit);
+ FWL_ERR SetAliasChar(FX_WCHAR wAlias);
+ FWL_ERR SetFormatString(const CFX_WideString& wsFormat);
+ FWL_ERR Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen);
+ FWL_ERR DeleteSelections();
+ FWL_ERR DeleteRange(int32_t nStart, int32_t nCount = -1);
+ FWL_ERR ReplaceSelections(const CFX_WideStringC& wsReplace);
+ FWL_ERR Replace(int32_t nStart,
+ int32_t nLen,
+ const CFX_WideStringC& wsReplace);
+ FWL_ERR DoClipboard(int32_t iCmd);
+ FX_BOOL Redo(const CFX_ByteStringC& bsRecord);
+ FX_BOOL Undo(const CFX_ByteStringC& bsRecord);
+ FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
+ FWL_ERR SetNumberRange(int32_t iMin, int32_t iMax);
+ FWL_ERR SetBackColor(FX_DWORD dwColor);
+ FWL_ERR SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize);
+ FX_BOOL CanUndo();
+ FX_BOOL CanRedo();
+ FX_BOOL Undo();
+ FX_BOOL Redo();
+ FX_BOOL Copy(CFX_WideString& wsCopy);
+ FX_BOOL Cut(CFX_WideString& wsCut);
+ FX_BOOL Paste(const CFX_WideString& wsPaste);
+ FX_BOOL Delete();
+ void SetScrollOffset(FX_FLOAT fScrollOffset);
+ FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray& sSuggest);
+ FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf,
+ const CFX_ByteStringC& bsReplace);
+ CFWL_Edit();
+ virtual ~CFWL_Edit();
};
#endif
diff --git a/xfa/include/fwl/lightwidget/listbox.h b/xfa/include/fwl/lightwidget/listbox.h
index d095e0e5e3..e5f31bd901 100644
--- a/xfa/include/fwl/lightwidget/listbox.h
+++ b/xfa/include/fwl/lightwidget/listbox.h
@@ -11,88 +11,106 @@ class CFWL_WidgetProperties;
class IFWL_ListBoxDP;
class CFWL_ListBox;
class CFWL_ListItem;
-class CFWL_ListBox : public CFWL_Widget
-{
-public:
- static CFWL_ListBox* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- FWL_ERR AddDIBitmap(CFX_DIBitmap * pDIB, FWL_HLISTITEM hItem);
- FWL_HLISTITEM AddString(const CFX_WideStringC& wsAdd, FX_BOOL bSelect = FALSE);
- FX_BOOL DeleteString(FWL_HLISTITEM hItem);
- FX_BOOL DeleteAll();
- int32_t CountSelItems();
- FWL_HLISTITEM GetSelItem(int32_t nIndexSel);
- int32_t GetSelIndex(int32_t nIndex);
- FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE);
- FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString &wsText);
- FWL_ERR GetScrollPos(FX_FLOAT &fPos, FX_BOOL bVert = TRUE);
- FWL_ERR SetItemHeight(FX_FLOAT fItemHeight);
- FWL_HLISTITEM GetFocusItem();
- FWL_ERR SetFocusItem(FWL_HLISTITEM hItem);
- FWL_ERR* Sort(IFWL_ListBoxCompare *pCom);
- int32_t CountItems();
- FWL_HLISTITEM GetItem(int32_t nIndex);
- FWL_ERR SetItemString(FWL_HLISTITEM hItem, const CFX_WideStringC& wsText);
- FWL_ERR GetItemString(FWL_HLISTITEM hItem, CFX_WideString &wsText);
- FWL_ERR SetItemData(FWL_HLISTITEM hItem, void* pData);
- void* GetItemData(FWL_HLISTITEM hItem);
- FWL_HLISTITEM GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy);
- FX_DWORD GetItemStates(FWL_HLISTITEM hItem);
- CFWL_ListBox();
- virtual ~CFWL_ListBox();
-protected:
- class CFWL_ListBoxDP : public IFWL_ListBoxDP
- {
- public:
- CFWL_ListBoxDP();
- ~CFWL_ListBoxDP();
- virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);
+class CFWL_ListBox : public CFWL_Widget {
+ public:
+ static CFWL_ListBox* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ FWL_ERR AddDIBitmap(CFX_DIBitmap* pDIB, FWL_HLISTITEM hItem);
+ FWL_HLISTITEM AddString(const CFX_WideStringC& wsAdd,
+ FX_BOOL bSelect = FALSE);
+ FX_BOOL DeleteString(FWL_HLISTITEM hItem);
+ FX_BOOL DeleteAll();
+ int32_t CountSelItems();
+ FWL_HLISTITEM GetSelItem(int32_t nIndexSel);
+ int32_t GetSelIndex(int32_t nIndex);
+ FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE);
+ FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText);
+ FWL_ERR GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE);
+ FWL_ERR SetItemHeight(FX_FLOAT fItemHeight);
+ FWL_HLISTITEM GetFocusItem();
+ FWL_ERR SetFocusItem(FWL_HLISTITEM hItem);
+ FWL_ERR* Sort(IFWL_ListBoxCompare* pCom);
+ int32_t CountItems();
+ FWL_HLISTITEM GetItem(int32_t nIndex);
+ FWL_ERR SetItemString(FWL_HLISTITEM hItem, const CFX_WideStringC& wsText);
+ FWL_ERR GetItemString(FWL_HLISTITEM hItem, CFX_WideString& wsText);
+ FWL_ERR SetItemData(FWL_HLISTITEM hItem, void* pData);
+ void* GetItemData(FWL_HLISTITEM hItem);
+ FWL_HLISTITEM GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy);
+ FX_DWORD GetItemStates(FWL_HLISTITEM hItem);
+ CFWL_ListBox();
+ virtual ~CFWL_ListBox();
- virtual int32_t CountItems(IFWL_Widget *pWidget);
- virtual FWL_HLISTITEM GetItem(IFWL_Widget *pWidget, int32_t nIndex);
- virtual int32_t GetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
- virtual FX_BOOL SetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, int32_t nIndex);
+ protected:
+ class CFWL_ListBoxDP : public IFWL_ListBoxDP {
+ public:
+ CFWL_ListBoxDP();
+ ~CFWL_ListBoxDP();
+ virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
- virtual FX_DWORD GetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR GetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_WideString &wsText);
- virtual FWL_ERR GetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_RectF &rtItem);
- virtual void* GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
+ virtual int32_t CountItems(IFWL_Widget* pWidget);
+ virtual FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex);
+ virtual int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
+ virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ int32_t nIndex);
- virtual FWL_ERR SetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_DWORD dwStyle);
- virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const FX_WCHAR* pszText);
- virtual FWL_ERR SetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const CFX_RectF &rtItem);
- virtual FX_FLOAT GetItemHeight(IFWL_Widget *pWidget);
- virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR GetItemCheckRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_RectF& rtCheck);
- virtual FWL_ERR SetItemCheckRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const CFX_RectF& rtCheck);
- virtual FX_DWORD GetItemCheckState(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR SetItemCheckState(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_DWORD dwCheckState);
+ virtual FX_DWORD GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
+ virtual FWL_ERR GetItemText(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ CFX_WideString& wsText);
+ virtual FWL_ERR GetItemRect(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ CFX_RectF& rtItem);
+ virtual void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
- CFX_PtrArray m_arrItem;
- CFX_WideString m_wsData;
- FX_FLOAT m_fItemHeight;
- };
- CFWL_ListBoxDP m_ListBoxDP;
+ virtual FWL_ERR SetItemStyles(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ FX_DWORD dwStyle);
+ virtual FWL_ERR SetItemText(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ const FX_WCHAR* pszText);
+ virtual FWL_ERR SetItemRect(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ const CFX_RectF& rtItem);
+ virtual FX_FLOAT GetItemHeight(IFWL_Widget* pWidget);
+ virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem);
+ virtual FWL_ERR GetItemCheckRect(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ CFX_RectF& rtCheck);
+ virtual FWL_ERR SetItemCheckRect(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ const CFX_RectF& rtCheck);
+ virtual FX_DWORD GetItemCheckState(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem);
+ virtual FWL_ERR SetItemCheckState(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ FX_DWORD dwCheckState);
+
+ CFX_PtrArray m_arrItem;
+ CFX_WideString m_wsData;
+ FX_FLOAT m_fItemHeight;
+ };
+ CFWL_ListBoxDP m_ListBoxDP;
};
-class CFWL_ListItem
-{
-public:
- CFWL_ListItem()
- {
- m_rtItem.Reset();
- m_dwStates = 0;
- m_wsText = L"";
- m_pDIB = NULL;
- m_pData = NULL;
- m_dwCheckState = 0;
- m_rtCheckBox.Reset();
- }
- CFX_RectF m_rtItem;
- FX_DWORD m_dwStates;
- CFX_WideString m_wsText;
- CFX_DIBitmap *m_pDIB;
- void* m_pData;
- FX_DWORD m_dwCheckState;
- CFX_RectF m_rtCheckBox;
+class CFWL_ListItem {
+ public:
+ CFWL_ListItem() {
+ m_rtItem.Reset();
+ m_dwStates = 0;
+ m_wsText = L"";
+ m_pDIB = NULL;
+ m_pData = NULL;
+ m_dwCheckState = 0;
+ m_rtCheckBox.Reset();
+ }
+ CFX_RectF m_rtItem;
+ FX_DWORD m_dwStates;
+ CFX_WideString m_wsText;
+ CFX_DIBitmap* m_pDIB;
+ void* m_pData;
+ FX_DWORD m_dwCheckState;
+ CFX_RectF m_rtCheckBox;
};
#endif
diff --git a/xfa/include/fwl/lightwidget/picturebox.h b/xfa/include/fwl/lightwidget/picturebox.h
index d15c2510a0..63d681e71b 100644
--- a/xfa/include/fwl/lightwidget/picturebox.h
+++ b/xfa/include/fwl/lightwidget/picturebox.h
@@ -11,55 +11,53 @@ class CFWL_WidgetProperties;
class IFWL_PictureBoxDP;
class CFWL_PictureBox;
class CFWL_PictureBoxDP;
-class CFWL_PictureBox : public CFWL_Widget
-{
-public:
- static CFWL_PictureBox* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- CFX_DIBitmap* GetPicture();
- FWL_ERR SetPicture(CFX_DIBitmap *pBitmap);
- FX_FLOAT GetRotation();
- FWL_ERR SetRotation(FX_FLOAT fRotation);
- int32_t GetFlipMode();
- FWL_ERR SetFlipMode(int32_t iFlipMode);
- int32_t GetOpacity();
- FWL_ERR SetOpacity(int32_t iOpacity);
- FWL_ERR GetScale(FX_FLOAT &fScaleX, FX_FLOAT &fScaleY);
- FWL_ERR SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY);
- FWL_ERR GetOffset(FX_FLOAT &fx, FX_FLOAT &fy);
- FWL_ERR SetOffset(FX_FLOAT fx, FX_FLOAT fy);
- CFWL_PictureBox();
- virtual ~CFWL_PictureBox();
-protected:
- class CFWL_PictureBoxDP : public IFWL_PictureBoxDP
- {
- public:
- CFWL_PictureBoxDP()
- {
- m_fRotation = 0.0f;
- m_fScaleX = 1.0f;
- m_fScaleY = 1.0f;
- m_fOffSetX = 0.0f;
- m_fOffSetY = 0.0f;
- m_pBitmap = NULL;
- };
- virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);
- virtual CFX_DIBitmap* GetPicture(IFWL_Widget *pWidget);
- virtual CFX_DIBitmap* GetErrorPicture(IFWL_Widget *pWidget);
- virtual CFX_DIBitmap* GetInitialPicture(IFWL_Widget *pWidget);
- virtual int32_t GetOpacity(IFWL_Widget *pWidget);
- virtual int32_t GetFlipMode(IFWL_Widget *pWidget);
- virtual FWL_ERR GetMatrix(IFWL_Widget *pWidget, CFX_Matrix &matrix);
- CFX_DIBitmap *m_pBitmap;
- int32_t m_iOpacity;
- int32_t m_iFlipMode;
- FX_FLOAT m_fRotation;
- FX_FLOAT m_fScaleX;
- FX_FLOAT m_fScaleY;
- FX_FLOAT m_fOffSetX;
- FX_FLOAT m_fOffSetY;
- CFX_WideString m_wsData;
+class CFWL_PictureBox : public CFWL_Widget {
+ public:
+ static CFWL_PictureBox* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ CFX_DIBitmap* GetPicture();
+ FWL_ERR SetPicture(CFX_DIBitmap* pBitmap);
+ FX_FLOAT GetRotation();
+ FWL_ERR SetRotation(FX_FLOAT fRotation);
+ int32_t GetFlipMode();
+ FWL_ERR SetFlipMode(int32_t iFlipMode);
+ int32_t GetOpacity();
+ FWL_ERR SetOpacity(int32_t iOpacity);
+ FWL_ERR GetScale(FX_FLOAT& fScaleX, FX_FLOAT& fScaleY);
+ FWL_ERR SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY);
+ FWL_ERR GetOffset(FX_FLOAT& fx, FX_FLOAT& fy);
+ FWL_ERR SetOffset(FX_FLOAT fx, FX_FLOAT fy);
+ CFWL_PictureBox();
+ virtual ~CFWL_PictureBox();
+
+ protected:
+ class CFWL_PictureBoxDP : public IFWL_PictureBoxDP {
+ public:
+ CFWL_PictureBoxDP() {
+ m_fRotation = 0.0f;
+ m_fScaleX = 1.0f;
+ m_fScaleY = 1.0f;
+ m_fOffSetX = 0.0f;
+ m_fOffSetY = 0.0f;
+ m_pBitmap = NULL;
};
- CFWL_PictureBoxDP m_PictureBoxDP;
+ virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
+ virtual CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget);
+ virtual CFX_DIBitmap* GetErrorPicture(IFWL_Widget* pWidget);
+ virtual CFX_DIBitmap* GetInitialPicture(IFWL_Widget* pWidget);
+ virtual int32_t GetOpacity(IFWL_Widget* pWidget);
+ virtual int32_t GetFlipMode(IFWL_Widget* pWidget);
+ virtual FWL_ERR GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix);
+ CFX_DIBitmap* m_pBitmap;
+ int32_t m_iOpacity;
+ int32_t m_iFlipMode;
+ FX_FLOAT m_fRotation;
+ FX_FLOAT m_fScaleX;
+ FX_FLOAT m_fScaleY;
+ FX_FLOAT m_fOffSetX;
+ FX_FLOAT m_fOffSetY;
+ CFX_WideString m_wsData;
+ };
+ CFWL_PictureBoxDP m_PictureBoxDP;
};
#endif
diff --git a/xfa/include/fwl/lightwidget/pushbutton.h b/xfa/include/fwl/lightwidget/pushbutton.h
index feb9450951..e7023c70b6 100644
--- a/xfa/include/fwl/lightwidget/pushbutton.h
+++ b/xfa/include/fwl/lightwidget/pushbutton.h
@@ -11,27 +11,26 @@ class CFWL_WidgetProperties;
class IFWL_PushButtonDP;
class CFWL_PushButton;
class CFWL_PushButtonDP;
-class CFWL_PushButton : public CFWL_Widget
-{
-public:
- static CFWL_PushButton* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- FWL_ERR GetCaption(CFX_WideString &wsCaption);
- FWL_ERR SetCaption(const CFX_WideStringC& wsCaption);
- CFX_DIBitmap* GetPicture();
- FWL_ERR SetPicture(CFX_DIBitmap *pBitmap);
- CFWL_PushButton();
- virtual ~CFWL_PushButton();
-protected:
- class CFWL_PushButtonDP : public IFWL_PushButtonDP
- {
- public:
- CFWL_PushButtonDP(): m_pBitmap(NULL) {}
- FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);
- virtual CFX_DIBitmap* GetPicture(IFWL_Widget *pWidget);
- CFX_WideString m_wsCaption;
- CFX_DIBitmap *m_pBitmap;
- };
- CFWL_PushButtonDP m_buttonData;
+class CFWL_PushButton : public CFWL_Widget {
+ public:
+ static CFWL_PushButton* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ FWL_ERR GetCaption(CFX_WideString& wsCaption);
+ FWL_ERR SetCaption(const CFX_WideStringC& wsCaption);
+ CFX_DIBitmap* GetPicture();
+ FWL_ERR SetPicture(CFX_DIBitmap* pBitmap);
+ CFWL_PushButton();
+ virtual ~CFWL_PushButton();
+
+ protected:
+ class CFWL_PushButtonDP : public IFWL_PushButtonDP {
+ public:
+ CFWL_PushButtonDP() : m_pBitmap(NULL) {}
+ FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
+ virtual CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget);
+ CFX_WideString m_wsCaption;
+ CFX_DIBitmap* m_pBitmap;
+ };
+ CFWL_PushButtonDP m_buttonData;
};
#endif
diff --git a/xfa/include/fwl/lightwidget/scrollbar.h b/xfa/include/fwl/lightwidget/scrollbar.h
index 5aabd56685..8a299a6462 100644
--- a/xfa/include/fwl/lightwidget/scrollbar.h
+++ b/xfa/include/fwl/lightwidget/scrollbar.h
@@ -9,24 +9,23 @@
class CFWL_Widget;
class CFWL_WidgetProperties;
class CFWL_ScrollBar;
-class CFWL_ScrollBar : public CFWL_Widget
-{
-public:
- static CFWL_ScrollBar* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- FX_BOOL IsVertical();
- FWL_ERR GetRange(FX_FLOAT &fMin, FX_FLOAT &fMax);
- FWL_ERR SetRange(FX_FLOAT fMin, FX_FLOAT fMax);
- FX_FLOAT GetPageSize();
- FWL_ERR SetPageSize(FX_FLOAT fPageSize);
- FX_FLOAT GetStepSize();
- FWL_ERR SetStepSize(FX_FLOAT fStepSize);
- FX_FLOAT GetPos();
- FWL_ERR SetPos(FX_FLOAT fPos);
- FX_FLOAT GetTrackPos();
- FWL_ERR SetTrackPos(FX_FLOAT fTrackPos);
- FX_BOOL DoScroll(FX_DWORD dwCode, FX_FLOAT fPos = 0.0f);
- CFWL_ScrollBar();
- virtual ~CFWL_ScrollBar();
+class CFWL_ScrollBar : public CFWL_Widget {
+ public:
+ static CFWL_ScrollBar* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ FX_BOOL IsVertical();
+ FWL_ERR GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax);
+ FWL_ERR SetRange(FX_FLOAT fMin, FX_FLOAT fMax);
+ FX_FLOAT GetPageSize();
+ FWL_ERR SetPageSize(FX_FLOAT fPageSize);
+ FX_FLOAT GetStepSize();
+ FWL_ERR SetStepSize(FX_FLOAT fStepSize);
+ FX_FLOAT GetPos();
+ FWL_ERR SetPos(FX_FLOAT fPos);
+ FX_FLOAT GetTrackPos();
+ FWL_ERR SetTrackPos(FX_FLOAT fTrackPos);
+ FX_BOOL DoScroll(FX_DWORD dwCode, FX_FLOAT fPos = 0.0f);
+ CFWL_ScrollBar();
+ virtual ~CFWL_ScrollBar();
};
#endif
diff --git a/xfa/include/fwl/lightwidget/theme.h b/xfa/include/fwl/lightwidget/theme.h
index 9c36ab5035..f5945f377d 100644
--- a/xfa/include/fwl/lightwidget/theme.h
+++ b/xfa/include/fwl/lightwidget/theme.h
@@ -12,28 +12,36 @@ class CFWL_ThemePart;
class CFWL_WidgetTP;
class IFWL_Widget;
class CFWL_Theme;
-class CFWL_Theme
-{
-public:
- virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
- virtual FX_DWORD GetThemeID(IFWL_Widget *pWidget);
- virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);
- virtual FWL_ERR GetThemeMatrix(IFWL_Widget *pWidget, CFX_Matrix &matrix);
- virtual FWL_ERR SetThemeMatrix(IFWL_Widget *pWidget, const CFX_Matrix &matrix);
- virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
- virtual FX_BOOL DrawText(CFWL_ThemeText *pParams);
- virtual void* GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
- virtual FX_BOOL IsCustomizedLayout(IFWL_Widget *pWidget);
- virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF &rtPart);
- virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL CalcTextRect(CFWL_ThemeText *pParams, CFX_RectF &rect);
- virtual FWL_ERR Initialize();
- virtual FWL_ERR Finalize();
- CFWL_Theme();
- virtual ~CFWL_Theme();
- FWL_ERR SetFont(IFWL_Widget *pWidget, const FX_WCHAR* strFont, FX_FLOAT fFontSize, FX_ARGB rgbFont);
- CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget);
-protected:
- CFX_PtrArray m_arrThemes;
+class CFWL_Theme {
+ public:
+ virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget);
+ virtual FX_DWORD GetThemeID(IFWL_Widget* pWidget);
+ virtual FX_DWORD SetThemeID(IFWL_Widget* pWidget,
+ FX_DWORD dwThemeID,
+ FX_BOOL bChildren = TRUE);
+ virtual FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix);
+ virtual FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget,
+ const CFX_Matrix& matrix);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams);
+ virtual FX_BOOL DrawText(CFWL_ThemeText* pParams);
+ virtual void* GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity);
+ virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget);
+ virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart);
+ virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect);
+ virtual FWL_ERR Initialize();
+ virtual FWL_ERR Finalize();
+ CFWL_Theme();
+ virtual ~CFWL_Theme();
+ FWL_ERR SetFont(IFWL_Widget* pWidget,
+ const FX_WCHAR* strFont,
+ FX_FLOAT fFontSize,
+ FX_ARGB rgbFont);
+ CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget);
+
+ protected:
+ CFX_PtrArray m_arrThemes;
};
#endif
diff --git a/xfa/include/fwl/lightwidget/tooltipctrl.h b/xfa/include/fwl/lightwidget/tooltipctrl.h
index 703283963b..cf2ed7b134 100644
--- a/xfa/include/fwl/lightwidget/tooltipctrl.h
+++ b/xfa/include/fwl/lightwidget/tooltipctrl.h
@@ -11,44 +11,43 @@ class CFWL_WidgetProperties;
class IFWL_ToolTipDP;
class CFWL_ToolTip;
class CFWL_ToolTipDP;
-class CFWL_ToolTip : public CFWL_Widget
-{
-public:
- static CFWL_ToolTip* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- FWL_ERR GetCaption(CFX_WideString &wsCaption);
- FWL_ERR SetCaption(const CFX_WideStringC& wsCaption);
- int32_t GetInitialDelay();
- int32_t SetInitialDelay(int32_t nDelayTime);
- int32_t GetAutoPopDelay();
- int32_t SetAutoPopDelay(int32_t nDelayTime);
- CFX_DIBitmap* GetToolTipIcon();
- FWL_ERR SetToolTipIcon(CFX_DIBitmap* pBitmap);
- CFX_SizeF GetToolTipIconSize();
- FWL_ERR SetToolTipIconSize( CFX_SizeF fSize);
- FWL_ERR SetAnchor(const CFX_RectF &rtAnchor);
- FWL_ERR Show();
- FWL_ERR Hide();
- CFWL_ToolTip();
- virtual ~CFWL_ToolTip();
-protected:
- class CFWL_ToolTipDP : public IFWL_ToolTipDP
- {
- public:
- CFWL_ToolTipDP();
- FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);
- int32_t GetInitialDelay(IFWL_Widget *pWidget);
- int32_t GetAutoPopDelay(IFWL_Widget *pWidget);
- CFX_DIBitmap* GetToolTipIcon(IFWL_Widget *pWidget);
- CFX_SizeF GetToolTipIconSize(IFWL_Widget *pWidget);
- CFX_RectF GetAnchor();
- CFX_WideString m_wsCaption;
- int32_t m_nInitDelayTime;
- int32_t m_nAutoPopDelayTime;
- CFX_DIBitmap* m_pBitmap;
- CFX_SizeF m_fIconSize;
- CFX_RectF m_fAnchor;
- };
- CFWL_ToolTipDP m_tooltipData;
+class CFWL_ToolTip : public CFWL_Widget {
+ public:
+ static CFWL_ToolTip* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ FWL_ERR GetCaption(CFX_WideString& wsCaption);
+ FWL_ERR SetCaption(const CFX_WideStringC& wsCaption);
+ int32_t GetInitialDelay();
+ int32_t SetInitialDelay(int32_t nDelayTime);
+ int32_t GetAutoPopDelay();
+ int32_t SetAutoPopDelay(int32_t nDelayTime);
+ CFX_DIBitmap* GetToolTipIcon();
+ FWL_ERR SetToolTipIcon(CFX_DIBitmap* pBitmap);
+ CFX_SizeF GetToolTipIconSize();
+ FWL_ERR SetToolTipIconSize(CFX_SizeF fSize);
+ FWL_ERR SetAnchor(const CFX_RectF& rtAnchor);
+ FWL_ERR Show();
+ FWL_ERR Hide();
+ CFWL_ToolTip();
+ virtual ~CFWL_ToolTip();
+
+ protected:
+ class CFWL_ToolTipDP : public IFWL_ToolTipDP {
+ public:
+ CFWL_ToolTipDP();
+ FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
+ int32_t GetInitialDelay(IFWL_Widget* pWidget);
+ int32_t GetAutoPopDelay(IFWL_Widget* pWidget);
+ CFX_DIBitmap* GetToolTipIcon(IFWL_Widget* pWidget);
+ CFX_SizeF GetToolTipIconSize(IFWL_Widget* pWidget);
+ CFX_RectF GetAnchor();
+ CFX_WideString m_wsCaption;
+ int32_t m_nInitDelayTime;
+ int32_t m_nAutoPopDelayTime;
+ CFX_DIBitmap* m_pBitmap;
+ CFX_SizeF m_fIconSize;
+ CFX_RectF m_fAnchor;
+ };
+ CFWL_ToolTipDP m_tooltipData;
};
#endif
diff --git a/xfa/include/fwl/lightwidget/widget.h b/xfa/include/fwl/lightwidget/widget.h
index 8f1246ba41..02f96e9bdf 100644
--- a/xfa/include/fwl/lightwidget/widget.h
+++ b/xfa/include/fwl/lightwidget/widget.h
@@ -13,89 +13,93 @@ class IFWL_WidgetDelegate;
class IFWL_Widget;
class CFWL_Widget;
class CFWL_WidgetDelegate;
-class CFWL_WidgetProperties
-{
-public:
- CFWL_WidgetProperties()
- {
- m_ctmOnParent.Reset();
- m_rtWidget.Set(0, 0, 0, 0);
- m_dwStyles = FWL_WGTSTYLE_Child;
- m_dwStyleExes = 0;
- m_dwStates = 0;
- m_pParent = NULL;
- m_pOwner = NULL;
- }
- CFX_WideString m_wsWindowclass;
- CFX_Matrix m_ctmOnParent;
- CFX_RectF m_rtWidget;
- FX_DWORD m_dwStyles;
- FX_DWORD m_dwStyleExes;
- FX_DWORD m_dwStates;
- CFWL_Widget *m_pParent;
- CFWL_Widget *m_pOwner;
+class CFWL_WidgetProperties {
+ public:
+ CFWL_WidgetProperties() {
+ m_ctmOnParent.Reset();
+ m_rtWidget.Set(0, 0, 0, 0);
+ m_dwStyles = FWL_WGTSTYLE_Child;
+ m_dwStyleExes = 0;
+ m_dwStates = 0;
+ m_pParent = NULL;
+ m_pOwner = NULL;
+ }
+ CFX_WideString m_wsWindowclass;
+ CFX_Matrix m_ctmOnParent;
+ CFX_RectF m_rtWidget;
+ FX_DWORD m_dwStyles;
+ FX_DWORD m_dwStyleExes;
+ FX_DWORD m_dwStates;
+ CFWL_Widget* m_pParent;
+ CFWL_Widget* m_pOwner;
};
-class CFWL_Widget
-{
-public:
- IFWL_Widget* GetWidget();
- FX_DWORD Release();
- CFWL_Widget* Retain();
- FX_DWORD GetRefCount() const;
- FWL_ERR GetClassName(CFX_WideString &wsClass) const;
- FX_DWORD GetClassID() const;
- virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
-protected:
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
-public:
- FWL_ERR GetWidgetRect(CFX_RectF &rect, FX_BOOL bAutoSize = FALSE);
- FWL_ERR GetGlobalRect(CFX_RectF &rect);
- FWL_ERR SetWidgetRect(const CFX_RectF &rect);
- FWL_ERR GetClientRect(CFX_RectF &rtClient);
- CFWL_Widget* GetParent();
- FWL_ERR SetParent(CFWL_Widget *pParent);
- CFWL_Widget* GetOwner();
- FWL_ERR SetOwner(CFWL_Widget *pOwner);
- FX_DWORD GetStyles();
- FWL_ERR ModifyStyles(FX_DWORD dwStylesAdded, FX_DWORD dwStylesRemoved);
- FX_DWORD GetStylesEx();
- FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
- FX_DWORD GetStates();
- FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE);
- FWL_ERR SetPrivateData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback);
- void* GetPrivateData(void* module_id);
- FWL_ERR Update();
- FWL_ERR LockUpdate();
- FWL_ERR UnlockUpdate();
- FX_DWORD HitTest(FX_FLOAT fx, FX_FLOAT fy);
- FWL_ERR TransformTo(CFWL_Widget *pWidget, FX_FLOAT &fx, FX_FLOAT &fy);
- FWL_ERR TransformTo(CFWL_Widget *pWidget, CFX_RectF &rt);
- FWL_ERR GetMatrix(CFX_Matrix &matrix, FX_BOOL bGlobal = FALSE);
- FWL_ERR SetMatrix(const CFX_Matrix &matrix);
- FWL_ERR DrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
- FWL_ERR GetProperties(CFWL_WidgetProperties &properties);
- FWL_ERR SetProperties(const CFWL_WidgetProperties &properties);
- IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate);
- FWL_ERR Repaint(const CFX_RectF *pRect = NULL);
- FWL_ERR SetFocus(FX_BOOL bFocus);
- FWL_ERR SetGrab(FX_BOOL bSet);
- CFWL_Widget();
- virtual ~CFWL_Widget();
- void RegisterEventTarget(CFWL_Widget *pEventSource = NULL, FX_DWORD dwFilter = FWL_EVENT_ALL_MASK);
- void DispatchEvent(CFWL_Event *pEvent);
- CFX_SizeF CalcTextSize(const CFX_WideString &wsText, FX_BOOL bMultiLine = FALSE, int32_t iLineWidth = -1);
- IFWL_Widget *m_pImp;
- IFWL_WidgetDelegate *m_pDelegate;
- CFWL_WidgetMgr *m_pWidgetMgr;
- CFWL_WidgetProperties *m_pProperties;
+class CFWL_Widget {
+ public:
+ IFWL_Widget* GetWidget();
+ FX_DWORD Release();
+ CFWL_Widget* Retain();
+ FX_DWORD GetRefCount() const;
+ FWL_ERR GetClassName(CFX_WideString& wsClass) const;
+ FX_DWORD GetClassID() const;
+ virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
+
+ protected:
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+
+ public:
+ FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
+ FWL_ERR GetGlobalRect(CFX_RectF& rect);
+ FWL_ERR SetWidgetRect(const CFX_RectF& rect);
+ FWL_ERR GetClientRect(CFX_RectF& rtClient);
+ CFWL_Widget* GetParent();
+ FWL_ERR SetParent(CFWL_Widget* pParent);
+ CFWL_Widget* GetOwner();
+ FWL_ERR SetOwner(CFWL_Widget* pOwner);
+ FX_DWORD GetStyles();
+ FWL_ERR ModifyStyles(FX_DWORD dwStylesAdded, FX_DWORD dwStylesRemoved);
+ FX_DWORD GetStylesEx();
+ FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
+ FX_DWORD GetStates();
+ FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE);
+ FWL_ERR SetPrivateData(void* module_id,
+ void* pData,
+ PD_CALLBACK_FREEDATA callback);
+ void* GetPrivateData(void* module_id);
+ FWL_ERR Update();
+ FWL_ERR LockUpdate();
+ FWL_ERR UnlockUpdate();
+ FX_DWORD HitTest(FX_FLOAT fx, FX_FLOAT fy);
+ FWL_ERR TransformTo(CFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy);
+ FWL_ERR TransformTo(CFWL_Widget* pWidget, CFX_RectF& rt);
+ FWL_ERR GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE);
+ FWL_ERR SetMatrix(const CFX_Matrix& matrix);
+ FWL_ERR DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix = NULL);
+ FWL_ERR GetProperties(CFWL_WidgetProperties& properties);
+ FWL_ERR SetProperties(const CFWL_WidgetProperties& properties);
+ IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate);
+ FWL_ERR Repaint(const CFX_RectF* pRect = NULL);
+ FWL_ERR SetFocus(FX_BOOL bFocus);
+ FWL_ERR SetGrab(FX_BOOL bSet);
+ CFWL_Widget();
+ virtual ~CFWL_Widget();
+ void RegisterEventTarget(CFWL_Widget* pEventSource = NULL,
+ FX_DWORD dwFilter = FWL_EVENT_ALL_MASK);
+ void DispatchEvent(CFWL_Event* pEvent);
+ CFX_SizeF CalcTextSize(const CFX_WideString& wsText,
+ FX_BOOL bMultiLine = FALSE,
+ int32_t iLineWidth = -1);
+ IFWL_Widget* m_pImp;
+ IFWL_WidgetDelegate* m_pDelegate;
+ CFWL_WidgetMgr* m_pWidgetMgr;
+ CFWL_WidgetProperties* m_pProperties;
};
-class CFWL_WidgetDelegate
-{
-public:
- CFWL_WidgetDelegate();
- virtual ~CFWL_WidgetDelegate();
- virtual int32_t OnProcessMessage(CFWL_Message *pMessage);
- virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
- virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
+class CFWL_WidgetDelegate {
+ public:
+ CFWL_WidgetDelegate();
+ virtual ~CFWL_WidgetDelegate();
+ virtual int32_t OnProcessMessage(CFWL_Message* pMessage);
+ virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent);
+ virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix = NULL);
};
#endif