diff options
Diffstat (limited to 'xfa/include/fwl/core')
-rw-r--r-- | xfa/include/fwl/core/fwl_app.h | 30 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_content.h | 30 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_error.h | 105 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_form.h | 126 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_grid.h | 117 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_note.h | 539 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_panel.h | 52 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_target.h | 28 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_theme.h | 136 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_thread.h | 68 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_timer.h | 17 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_widget.h | 196 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_widgetdef.h | 476 | ||||
-rw-r--r-- | xfa/include/fwl/core/fwl_widgetmgr.h | 72 |
14 files changed, 1006 insertions, 986 deletions
diff --git a/xfa/include/fwl/core/fwl_app.h b/xfa/include/fwl/core/fwl_app.h index bc38db0854..8959726d43 100644 --- a/xfa/include/fwl/core/fwl_app.h +++ b/xfa/include/fwl/core/fwl_app.h @@ -13,23 +13,23 @@ class IFWL_WidgetMgr; class IFWL_ThemeProvider;
class IFWL_AdapterWidgetMgr;
class IFWL_App;
-class IFWL_App : public IFWL_NoteThread
-{
-public:
- static IFWL_App* Create(IFWL_AdapterNative *pAdapter);
- virtual FWL_ERR Initialize() = 0;
- virtual FWL_ERR Finalize() = 0;
- virtual IFWL_AdapterNative* GetAdapterNative() = 0;
- virtual IFWL_WidgetMgr* GetWidgetMgr() = 0;
- virtual FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) = 0;
- virtual FWL_ERR Exit(int32_t iExitCode = 0) = 0;
+class IFWL_App : public IFWL_NoteThread {
+ public:
+ static IFWL_App* Create(IFWL_AdapterNative* pAdapter);
+ virtual FWL_ERR Initialize() = 0;
+ virtual FWL_ERR Finalize() = 0;
+ virtual IFWL_AdapterNative* GetAdapterNative() = 0;
+ virtual IFWL_WidgetMgr* GetWidgetMgr() = 0;
+ virtual FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) = 0;
+ virtual FWL_ERR Exit(int32_t iExitCode = 0) = 0;
};
IFWL_App* FWL_GetApp();
-void FWL_SetApp(IFWL_App *pApp);
-IFWL_AdapterNative* FWL_GetAdapterNative();
+void FWL_SetApp(IFWL_App* pApp);
+IFWL_AdapterNative* FWL_GetAdapterNative();
IFWL_AdapterWidgetMgr* FWL_GetAdapterWidgetMgr();
-IFWL_ThemeProvider* FWL_GetThemeProvider();
-extern FWL_ERR FWL_Execute(const CFX_WideStringC& wsExecutable, const CFX_WideStringC& wsParameters);
-FWL_ERR FWL_SetFullScreen(IFWL_Widget *pWidget, FX_BOOL bFullScreen);
+IFWL_ThemeProvider* FWL_GetThemeProvider();
+extern FWL_ERR FWL_Execute(const CFX_WideStringC& wsExecutable,
+ const CFX_WideStringC& wsParameters);
+FWL_ERR FWL_SetFullScreen(IFWL_Widget* pWidget, FX_BOOL bFullScreen);
FX_BOOL FWL_AppIsActived();
#endif
diff --git a/xfa/include/fwl/core/fwl_content.h b/xfa/include/fwl/core/fwl_content.h index 4a00154ef3..41b1af93b5 100644 --- a/xfa/include/fwl/core/fwl_content.h +++ b/xfa/include/fwl/core/fwl_content.h @@ -8,20 +8,20 @@ #define _FWL_CONTENT_H
class IFWL_Widget;
class IFWL_Content;
-class IFWL_Content : public IFWL_Widget
-{
-public:
- static IFWL_Content* Create();
- FWL_ERR Initialize();
- FWL_ERR InsertWidget(IFWL_Widget *pChild, int32_t nIndex = -1);
- FWL_ERR RemoveWidget(IFWL_Widget *pWidget);
- FWL_ERR RemoveAllWidgets();
- FWL_ERR GetMinSize(FX_FLOAT &fWidth, FX_FLOAT &fHeight);
- FWL_ERR SetMinSize(FX_FLOAT fWidth, FX_FLOAT fHeight);
- FWL_ERR GetMaxSize(FX_FLOAT &fWidth, FX_FLOAT &fHeight);
- FWL_ERR SetMaxSize(FX_FLOAT fWidth, FX_FLOAT fHeight);
-protected:
- IFWL_Content();
- virtual ~IFWL_Content();
+class IFWL_Content : public IFWL_Widget {
+ public:
+ static IFWL_Content* Create();
+ FWL_ERR Initialize();
+ FWL_ERR InsertWidget(IFWL_Widget* pChild, int32_t nIndex = -1);
+ FWL_ERR RemoveWidget(IFWL_Widget* pWidget);
+ FWL_ERR RemoveAllWidgets();
+ FWL_ERR GetMinSize(FX_FLOAT& fWidth, FX_FLOAT& fHeight);
+ FWL_ERR SetMinSize(FX_FLOAT fWidth, FX_FLOAT fHeight);
+ FWL_ERR GetMaxSize(FX_FLOAT& fWidth, FX_FLOAT& fHeight);
+ FWL_ERR SetMaxSize(FX_FLOAT fWidth, FX_FLOAT fHeight);
+
+ protected:
+ IFWL_Content();
+ virtual ~IFWL_Content();
};
#endif
diff --git a/xfa/include/fwl/core/fwl_error.h b/xfa/include/fwl/core/fwl_error.h index 465808a116..4c0f3b96e7 100644 --- a/xfa/include/fwl/core/fwl_error.h +++ b/xfa/include/fwl/core/fwl_error.h @@ -6,45 +6,76 @@ #ifndef _FWL_ERROR_H
#define _FWL_ERROR_H
-typedef int32_t FWL_ERR;
-#define FWL_ERR_Succeeded 0
-#define FWL_ERR_Indefinite -1
-#define FWL_ERR_Parameter_Invalid -100
-#define FWL_ERR_Property_Invalid -200
-#define FWL_ERR_Intermediate_Value__Invalid -300
-#define FWL_ERR_Method_Not_Supported -400
-#define FWL_ERR_Out_Of_Memory -500
-#if defined (__WIN32__) || defined (_WIN32)
-#define _FWL_ALARM_IF_FAIL(arg, alarm) { if (!(arg)) ::OutputDebugString(alarm); }
-#elif defined (__linux) || defined (linux) || defined (__APPLE__) || defined (__MACOSX__)
-#define _FWL_ALARM_IF_FAIL(arg, alarm) { if (!(arg)) printf(alarm); }
+typedef int32_t FWL_ERR;
+#define FWL_ERR_Succeeded 0
+#define FWL_ERR_Indefinite -1
+#define FWL_ERR_Parameter_Invalid -100
+#define FWL_ERR_Property_Invalid -200
+#define FWL_ERR_Intermediate_Value__Invalid -300
+#define FWL_ERR_Method_Not_Supported -400
+#define FWL_ERR_Out_Of_Memory -500
+#if defined(__WIN32__) || defined(_WIN32)
+#define _FWL_ALARM_IF_FAIL(arg, alarm) \
+ { \
+ if (!(arg)) \
+ ::OutputDebugString(alarm); \
+ }
+#elif defined(__linux) || defined(linux) || defined(__APPLE__) || \
+ defined(__MACOSX__)
+#define _FWL_ALARM_IF_FAIL(arg, alarm) \
+ { \
+ if (!(arg)) \
+ printf(alarm); \
+ }
#else
#endif
-#define _FWL_RETURN_IF_FAIL(arg) { if (!(arg)) return; }
-#define _FWL_RETURN_VALUE_IF_FAIL(arg, val) { if (!(arg)) return val; }
-#define _FWL_GOTO_POSITION_IF_FAIL(arg, pos) { if (!(arg)) goto pos; }
-#if defined (__WIN32__) || defined (_WIN32)
-#define \
- _FWL_ERR_CHECK_ALARM_IF_FAIL(arg) \
- { \
- if ((arg) != FWL_ERR_Succeeded) \
- { \
- char buf[36]; \
- memset(buf, 0, sizeof(buf)); \
- FXSYS_snprintf(buf, sizeof(buf) - 1, "Error code is %d\n", arg); \
- ::OutputDebugString(buf); \
- } \
- }
-#elif defined (__linux) || defined (linux) || defined (__APPLE__) || defined (__MACOSX__)
-#define \
- _FWL_ERR_CHECK_ALARM_IF_FAIL(arg) \
- { \
- if ((arg) != FWL_ERR_Succeeded) \
- printf("%d\n", arg); \
- }
+#define _FWL_RETURN_IF_FAIL(arg) \
+ { \
+ if (!(arg)) \
+ return; \
+ }
+#define _FWL_RETURN_VALUE_IF_FAIL(arg, val) \
+ { \
+ if (!(arg)) \
+ return val; \
+ }
+#define _FWL_GOTO_POSITION_IF_FAIL(arg, pos) \
+ { \
+ if (!(arg)) \
+ goto pos; \
+ }
+#if defined(__WIN32__) || defined(_WIN32)
+#define _FWL_ERR_CHECK_ALARM_IF_FAIL(arg) \
+ { \
+ if ((arg) != FWL_ERR_Succeeded) { \
+ char buf[36]; \
+ memset(buf, 0, sizeof(buf)); \
+ FXSYS_snprintf(buf, sizeof(buf) - 1, "Error code is %d\n", arg); \
+ ::OutputDebugString(buf); \
+ } \
+ }
+#elif defined(__linux) || defined(linux) || defined(__APPLE__) || \
+ defined(__MACOSX__)
+#define _FWL_ERR_CHECK_ALARM_IF_FAIL(arg) \
+ { \
+ if ((arg) != FWL_ERR_Succeeded) \
+ printf("%d\n", arg); \
+ }
#else
#endif
-#define _FWL_ERR_CHECK_RETURN_IF_FAIL(arg) { if ((arg) != FWL_ERR_Succeeded) return; }
-#define _FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(arg, val) { if ((arg) != FWL_ERR_Succeeded) return val; }
-#define _FWL_ERR_CHECK_GOTO_POSITION_IF_FAIL(arg, pos) { if ((arg) != FWL_ERR_Succeeded) goto pos; }
+#define _FWL_ERR_CHECK_RETURN_IF_FAIL(arg) \
+ { \
+ if ((arg) != FWL_ERR_Succeeded) \
+ return; \
+ }
+#define _FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(arg, val) \
+ { \
+ if ((arg) != FWL_ERR_Succeeded) \
+ return val; \
+ }
+#define _FWL_ERR_CHECK_GOTO_POSITION_IF_FAIL(arg, pos) \
+ { \
+ if ((arg) != FWL_ERR_Succeeded) \
+ goto pos; \
+ }
#endif
diff --git a/xfa/include/fwl/core/fwl_form.h b/xfa/include/fwl/core/fwl_form.h index e9a8323f20..81c06c0591 100644 --- a/xfa/include/fwl/core/fwl_form.h +++ b/xfa/include/fwl/core/fwl_form.h @@ -9,76 +9,78 @@ class IFWL_Widget;
class IFWL_Panel;
class IFWL_Form;
-#define FWL_CLASS_Form L"FWL_FORM"
-#define FWL_CLASSHASH_Form 881567292
-#define FWL_CLASS_FormProxy L"FWL_FORMPROXY"
-#define FWL_CLASSHASH_FormProxy 881567291
-#define FWL_STYLEEXT_FRM_Resize (1L << 0)
-#define FWL_STYLEEXT_FRM_NativeBorder (1L << 1)
-#define FWL_STYLEEXT_FRM_RoundCorner (2L << 1)
-#define FWL_STYLEEXT_FRM_RoundCorner4 (3L << 1)
-#define FWL_STYLEEXT_FRM_NoDrawClient (1L << 3)
+#define FWL_CLASS_Form L"FWL_FORM"
+#define FWL_CLASSHASH_Form 881567292
+#define FWL_CLASS_FormProxy L"FWL_FORMPROXY"
+#define FWL_CLASSHASH_FormProxy 881567291
+#define FWL_STYLEEXT_FRM_Resize (1L << 0)
+#define FWL_STYLEEXT_FRM_NativeBorder (1L << 1)
+#define FWL_STYLEEXT_FRM_RoundCorner (2L << 1)
+#define FWL_STYLEEXT_FRM_RoundCorner4 (3L << 1)
+#define FWL_STYLEEXT_FRM_NoDrawClient (1L << 3)
#define FWL_STYLEEXT_FRM_BorderCornerMask (3L << 1)
-#define FWL_STYLEEXT_FRM_Max (3)
-#if (_FX_OS_==_FX_MACOSX_)
+#define FWL_STYLEEXT_FRM_Max (3)
+#if (_FX_OS_ == _FX_MACOSX_)
#define FWL_UseMacSystemBorder
#endif
-#define FWL_WGTCAPACITY_FRM_CYCaption (FWL_WGTCAPACITY_MAX + 1)
-#define FWL_WGTCAPACITY_FRM_CYNarrowCaption (FWL_WGTCAPACITY_MAX + 2)
-#define FWL_WGTCAPACITY_FRM_BigIcon (FWL_WGTCAPACITY_MAX + 3)
-#define FWL_WGTCAPACITY_FRM_SmallIcon (FWL_WGTCAPACITY_MAX + 4)
-#define FWL_PART_FRM_Border 1
-#define FWL_PART_FRM_Edge 2
-#define FWL_PART_FRM_Background 3
-#define FWL_PART_FRM_Caption 4
-#define FWL_PART_FRM_NarrowCaption 5
-#define FWL_PART_FRM_CloseBox 6
-#define FWL_PART_FRM_MinimizeBox 7
-#define FWL_PART_FRM_MaximizeBox 8
-#define FWL_PART_FRM_HeadText 9
-#define FWL_PART_FRM_Icon 10
-#define FWL_PARTSTATE_FRM_Normal 1
-#define FWL_PARTSTATE_FRM_Hover 2
-#define FWL_PARTSTATE_FRM_Pressed 3
-#define FWL_PARTSTATE_FRM_Inactive 4
-#define FWL_PARTSTATE_FRM_Disabled 5
+#define FWL_WGTCAPACITY_FRM_CYCaption (FWL_WGTCAPACITY_MAX + 1)
+#define FWL_WGTCAPACITY_FRM_CYNarrowCaption (FWL_WGTCAPACITY_MAX + 2)
+#define FWL_WGTCAPACITY_FRM_BigIcon (FWL_WGTCAPACITY_MAX + 3)
+#define FWL_WGTCAPACITY_FRM_SmallIcon (FWL_WGTCAPACITY_MAX + 4)
+#define FWL_PART_FRM_Border 1
+#define FWL_PART_FRM_Edge 2
+#define FWL_PART_FRM_Background 3
+#define FWL_PART_FRM_Caption 4
+#define FWL_PART_FRM_NarrowCaption 5
+#define FWL_PART_FRM_CloseBox 6
+#define FWL_PART_FRM_MinimizeBox 7
+#define FWL_PART_FRM_MaximizeBox 8
+#define FWL_PART_FRM_HeadText 9
+#define FWL_PART_FRM_Icon 10
+#define FWL_PARTSTATE_FRM_Normal 1
+#define FWL_PARTSTATE_FRM_Hover 2
+#define FWL_PARTSTATE_FRM_Pressed 3
+#define FWL_PARTSTATE_FRM_Inactive 4
+#define FWL_PARTSTATE_FRM_Disabled 5
-class IFWL_FormDP : public IFWL_DataProvider
-{
-public:
- virtual CFX_DIBitmap* GetIcon(IFWL_Widget *pWidget, FX_BOOL bBig) = 0;
+class IFWL_FormDP : public IFWL_DataProvider {
+ public:
+ virtual CFX_DIBitmap* GetIcon(IFWL_Widget* pWidget, FX_BOOL bBig) = 0;
};
enum FWL_FORMSIZE {
- FWL_FORMSIZE_Manual = 0,
- FWL_FORMSIZE_Width,
- FWL_FORMSIZE_Height,
- FWL_FORMSIZE_All,
+ FWL_FORMSIZE_Manual = 0,
+ FWL_FORMSIZE_Width,
+ FWL_FORMSIZE_Height,
+ FWL_FORMSIZE_All,
};
enum FWL_COMMANDID {
- FWL_COMMANDID_Close = 0,
- FWL_COMMANDID_Ok,
- FWL_COMMANDID_Cancel,
- FWL_COMMANDID_Abort,
- FWL_COMMANDID_Retry,
- FWL_COMMANDID_Ignore,
- FWL_COMMANDID_Yes,
- FWL_COMMANDID_No,
+ FWL_COMMANDID_Close = 0,
+ FWL_COMMANDID_Ok,
+ FWL_COMMANDID_Cancel,
+ FWL_COMMANDID_Abort,
+ FWL_COMMANDID_Retry,
+ FWL_COMMANDID_Ignore,
+ FWL_COMMANDID_Yes,
+ FWL_COMMANDID_No,
};
-class IFWL_Form : public IFWL_Panel
-{
-public:
- static IFWL_Form* Create();
- FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
- FWL_ERR Initialize(CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
- FWL_ERR Initialize(CFWL_WidgetImpProperties &properties, CFX_WideString *classname, IFWL_Widget *pOuter = NULL);
- FWL_FORMSIZE GetFormSize();
- FWL_ERR SetFormSize(FWL_FORMSIZE eFormSize);
- IFWL_Widget* DoModal();
- IFWL_Widget* DoModal(FX_DWORD &dwCommandID);
- FWL_ERR EndDoModal();
- FWL_ERR SetBorderRegion(CFX_Path *pPath);
-protected:
- IFWL_Form();
- virtual ~IFWL_Form();
+class IFWL_Form : public IFWL_Panel {
+ public:
+ static IFWL_Form* Create();
+ FWL_ERR Initialize(IFWL_Widget* pOuter = NULL);
+ FWL_ERR Initialize(CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter = NULL);
+ FWL_ERR Initialize(CFWL_WidgetImpProperties& properties,
+ CFX_WideString* classname,
+ IFWL_Widget* pOuter = NULL);
+ FWL_FORMSIZE GetFormSize();
+ FWL_ERR SetFormSize(FWL_FORMSIZE eFormSize);
+ IFWL_Widget* DoModal();
+ IFWL_Widget* DoModal(FX_DWORD& dwCommandID);
+ FWL_ERR EndDoModal();
+ FWL_ERR SetBorderRegion(CFX_Path* pPath);
+
+ protected:
+ IFWL_Form();
+ virtual ~IFWL_Form();
};
#endif
diff --git a/xfa/include/fwl/core/fwl_grid.h b/xfa/include/fwl/core/fwl_grid.h index 677bd918f5..fc97c9a841 100644 --- a/xfa/include/fwl/core/fwl_grid.h +++ b/xfa/include/fwl/core/fwl_grid.h @@ -9,68 +9,79 @@ class IFWL_Widget;
class IFWL_Content;
class IFWL_Grid;
-#define FWL_CLASS_Grid L"FWL_GRID"
-#define FWL_CLASSHASH_Grid 3150298670
+#define FWL_CLASS_Grid L"FWL_GRID"
+#define FWL_CLASSHASH_Grid 3150298670
#define FWL_GRIDSTYLEEXT_ShowGridLines (1L << 0)
struct FWL_LAYOUTDATA {
- FX_FLOAT fWidth;
- FX_FLOAT fHeight;
+ FX_FLOAT fWidth;
+ FX_FLOAT fHeight;
};
enum FWL_GRIDUNIT {
- FWL_GRIDUNIT_Auto = 0,
- FWL_GRIDUNIT_Fixed,
- FWL_GRIDUNIT_Scaled,
- FWL_GRIDUNIT_Infinity,
+ FWL_GRIDUNIT_Auto = 0,
+ FWL_GRIDUNIT_Fixed,
+ FWL_GRIDUNIT_Scaled,
+ FWL_GRIDUNIT_Infinity,
};
enum FWL_GRIDMARGIN {
- FWL_GRIDMARGIN_Left = 0,
- FWL_GRIDMARGIN_Top,
- FWL_GRIDMARGIN_Right,
- FWL_GRIDMARGIN_Bottom,
+ FWL_GRIDMARGIN_Left = 0,
+ FWL_GRIDMARGIN_Top,
+ FWL_GRIDMARGIN_Right,
+ FWL_GRIDMARGIN_Bottom,
};
enum FWL_GRIDSIZE {
- FWL_GRIDSIZE_Width = 0,
- FWL_GRIDSIZE_Height,
- FWL_GRIDSIZE_MinWidth,
- FWL_GRIDSIZE_MinHeight,
- FWL_GRIDSIZE_MaxWidth,
- FWL_GRIDSIZE_MaxHeight,
+ FWL_GRIDSIZE_Width = 0,
+ FWL_GRIDSIZE_Height,
+ FWL_GRIDSIZE_MinWidth,
+ FWL_GRIDSIZE_MinHeight,
+ FWL_GRIDSIZE_MaxWidth,
+ FWL_GRIDSIZE_MaxHeight,
};
-typedef struct _FWL_HGRIDCOLROW {
- void* pData;
-} * FWL_HGRIDCOLROW;
-class IFWL_Grid : public IFWL_Content
-{
-public:
- static IFWL_Grid* Create();
- FWL_ERR Initialize();
- FWL_ERR Initialize(CFWL_WidgetImpProperties &properties);
+typedef struct _FWL_HGRIDCOLROW { void* pData; } * FWL_HGRIDCOLROW;
+class IFWL_Grid : public IFWL_Content {
+ public:
+ static IFWL_Grid* Create();
+ FWL_ERR Initialize();
+ FWL_ERR Initialize(CFWL_WidgetImpProperties& properties);
- FWL_HGRIDCOLROW InsertColRow(FX_BOOL bColumn, int32_t nIndex = -1);
- int32_t CountColRows(FX_BOOL bColumn);
- FWL_HGRIDCOLROW GetColRow(FX_BOOL bColumn, int32_t nIndex);
- int32_t GetIndex(FWL_HGRIDCOLROW hColRow);
- FX_FLOAT GetSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT &eUnit);
- FWL_ERR SetSize(FWL_HGRIDCOLROW hColRow, FX_FLOAT fSize, FWL_GRIDUNIT eUnit);
- FX_FLOAT GetMinSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT &eUnit);
- FWL_ERR SetMinSize(FWL_HGRIDCOLROW hColRow, FX_FLOAT fSize, FWL_GRIDUNIT eUnit);
- FX_FLOAT GetMaxSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT &eUnit);
- FWL_ERR SetMaxSize(FWL_HGRIDCOLROW hColRow, FX_FLOAT fSize, FWL_GRIDUNIT eUnit);
- FX_BOOL DeleteColRow(FWL_HGRIDCOLROW hColRow);
- FX_BOOL IsColumn(FWL_HGRIDCOLROW hColRow);
- int32_t GetWidgetPos(IFWL_Widget *pWidget, FX_BOOL bColumn);
- FWL_ERR SetWidgetPos(IFWL_Widget *pWidget, int32_t iPos, FX_BOOL bColumn);
- int32_t GetWidgetSpan(IFWL_Widget *pWidget, FX_BOOL bColumn);
- FWL_ERR SetWidgetSpan(IFWL_Widget *pWidget, int32_t iSpan, FX_BOOL bColumn);
- FX_FLOAT GetWidgetSize(IFWL_Widget *pWidget, FWL_GRIDSIZE eSize, FWL_GRIDUNIT &eUnit);
- FWL_ERR SetWidgetSize(IFWL_Widget *pWidget, FWL_GRIDSIZE eSize, FX_FLOAT fSize, FWL_GRIDUNIT eUit);
- FX_BOOL GetWidgetMargin(IFWL_Widget *pWidget, FWL_GRIDMARGIN eMargin, FX_FLOAT &fMargin);
- FWL_ERR SetWidgetMargin(IFWL_Widget *pWidget, FWL_GRIDMARGIN eMargin, FX_FLOAT fMargin);
- FWL_ERR RemoveWidgetMargin(IFWL_Widget *pWidget, FWL_GRIDMARGIN eMargin);
- FX_FLOAT GetGridSize(FWL_GRIDSIZE eSize, FWL_GRIDUNIT &eUnit);
- FWL_ERR SetGridSize(FWL_GRIDSIZE eSize, FX_FLOAT fSize, FWL_GRIDUNIT eUit);
-protected:
- IFWL_Grid();
- virtual ~IFWL_Grid();
+ FWL_HGRIDCOLROW InsertColRow(FX_BOOL bColumn, int32_t nIndex = -1);
+ int32_t CountColRows(FX_BOOL bColumn);
+ FWL_HGRIDCOLROW GetColRow(FX_BOOL bColumn, int32_t nIndex);
+ int32_t GetIndex(FWL_HGRIDCOLROW hColRow);
+ FX_FLOAT GetSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit);
+ FWL_ERR SetSize(FWL_HGRIDCOLROW hColRow, FX_FLOAT fSize, FWL_GRIDUNIT eUnit);
+ FX_FLOAT GetMinSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit);
+ FWL_ERR SetMinSize(FWL_HGRIDCOLROW hColRow,
+ FX_FLOAT fSize,
+ FWL_GRIDUNIT eUnit);
+ FX_FLOAT GetMaxSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit);
+ FWL_ERR SetMaxSize(FWL_HGRIDCOLROW hColRow,
+ FX_FLOAT fSize,
+ FWL_GRIDUNIT eUnit);
+ FX_BOOL DeleteColRow(FWL_HGRIDCOLROW hColRow);
+ FX_BOOL IsColumn(FWL_HGRIDCOLROW hColRow);
+ int32_t GetWidgetPos(IFWL_Widget* pWidget, FX_BOOL bColumn);
+ FWL_ERR SetWidgetPos(IFWL_Widget* pWidget, int32_t iPos, FX_BOOL bColumn);
+ int32_t GetWidgetSpan(IFWL_Widget* pWidget, FX_BOOL bColumn);
+ FWL_ERR SetWidgetSpan(IFWL_Widget* pWidget, int32_t iSpan, FX_BOOL bColumn);
+ FX_FLOAT GetWidgetSize(IFWL_Widget* pWidget,
+ FWL_GRIDSIZE eSize,
+ FWL_GRIDUNIT& eUnit);
+ FWL_ERR SetWidgetSize(IFWL_Widget* pWidget,
+ FWL_GRIDSIZE eSize,
+ FX_FLOAT fSize,
+ FWL_GRIDUNIT eUit);
+ FX_BOOL GetWidgetMargin(IFWL_Widget* pWidget,
+ FWL_GRIDMARGIN eMargin,
+ FX_FLOAT& fMargin);
+ FWL_ERR SetWidgetMargin(IFWL_Widget* pWidget,
+ FWL_GRIDMARGIN eMargin,
+ FX_FLOAT fMargin);
+ FWL_ERR RemoveWidgetMargin(IFWL_Widget* pWidget, FWL_GRIDMARGIN eMargin);
+ FX_FLOAT GetGridSize(FWL_GRIDSIZE eSize, FWL_GRIDUNIT& eUnit);
+ FWL_ERR SetGridSize(FWL_GRIDSIZE eSize, FX_FLOAT fSize, FWL_GRIDUNIT eUit);
+
+ protected:
+ IFWL_Grid();
+ virtual ~IFWL_Grid();
};
#endif
diff --git a/xfa/include/fwl/core/fwl_note.h b/xfa/include/fwl/core/fwl_note.h index c423cd5a24..ceea8a6a2f 100644 --- a/xfa/include/fwl/core/fwl_note.h +++ b/xfa/include/fwl/core/fwl_note.h @@ -42,351 +42,336 @@ class CFWL_EvtSizeChanged; class CFWL_EvtIdle;
class IFWL_NoteDriver;
class IFWL_NoteLoop;
-#define FWL_MSG_Activate L"FWL_MESSAGE_Activate"
-#define FWL_MSG_Deactivate L"FWL_MESSAGE_Deactivate"
-#define FWL_MSG_SetFocus L"FWL_MESSAGE_SetFocus"
-#define FWL_MSG_KillFocus L"FWL_MESSAGE_KillFocus"
-#define FWL_MSG_Mouse L"FWL_MESSAGE_Mouse"
-#define FWL_MSG_MouseWheel L"FWL_MESSAGE_MouseWheel"
-#define FWL_MSG_Key L"FWL_MESSAGE_Key"
-#define FWL_MSG_Cursor L"FWL_MESSAGE_Cursor"
-#define FWL_MSG_Size L"FWL_MESSAGE_Size"
-#define FWL_MSG_WindowMove L"FWL_MESSAGE_WindowMove"
-#define FWL_MSG_DropFiles L"FWL_MESSAGE_DropFiles"
-#define FWL_MSG_TaskClicked L"FWL_MESSAGE_TaskClicked"
-#define FWL_MSG_Close L"FWL_MESSAGE_Close"
-#define FWL_MSG_Post L"FWL_MESSAGE_Post"
-#define FWL_MSG_WindowWillMove L"FWL_MESSAGE_WindowWillMove"
-#define FWL_MSGHASH_Activate 2410369469
-#define FWL_MSGHASH_Deactivate 1184214790
-#define FWL_MSGHASH_SetFocus 4174512504
-#define FWL_MSGHASH_KillFocus 1557903832
-#define FWL_MSGHASH_Mouse 706128309
-#define FWL_MSGHASH_MouseWheel 893703466
-#define FWL_MSGHASH_Key 3751372405
-#define FWL_MSGHASH_Cursor 3182626218
-#define FWL_MSGHASH_Size 160077735
-#define FWL_MSGHASH_WindowMove 1032269377
-#define FWL_MSGHASH_DropFiles 2004165236
-#define FWL_MSGHASH_TaskClicked 3128231086
-#define FWL_MSGHASH_Close 2977563906
-#define FWL_MSGHASH_Post 1969633074
-#define FWL_MSGHASH_WindowWillMove 2229175763
-#define FWL_EVT_Mouse L"FWL_EVENT_Mouse"
-#define FWL_EVT_MouseWheel L"FWL_EVENT_MouseWheel"
-#define FWL_EVT_Key L"FWL_EVENT_Key"
-#define FWL_EVT_SetFocus L"FWL_EVENT_SetFocus"
-#define FWL_EVT_KillFocus L"FWL_EVENT_KillFocus"
-#define FWL_EVT_Click L"FWL_EVENT_Click"
-#define FWL_EVT_Draw L"FWL_EVENT_Draw"
-#define FWL_EVT_Scroll L"FWL_EVENT_Scroll"
-#define FWL_EVT_Close L"FWL_EVENT_Close"
-#define FWL_EVT_ContextMenu L"FWL_EVENT_ContextMenu"
-#define FWL_EVT_MenuCommand L"FWL_EVENT_MenuCommand"
-#define FWL_EVT_SizeChanged L"FWL_EVENT_SizeChanged"
-#define FWL_EVTHASH_Mouse 1765258002
-#define FWL_EVTHASH_MouseWheel 3907114407
-#define FWL_EVTHASH_Key 2408354450
-#define FWL_EVTHASH_SetFocus 3909721269
-#define FWL_EVTHASH_KillFocus 1779363253
-#define FWL_EVTHASH_Draw 2430713303
-#define FWL_EVTHASH_Click 4026328783
-#define FWL_EVTHASH_Scroll 2965158968
-#define FWL_EVTHASH_Close 4036693599
-#define FWL_EVTHASH_ContextMenu 2717307715
-#define FWL_EVTHASH_MenuCommand 497763741
-#define FWL_EVTHASH_SizeChanged 3083958510
-#define FWL_EVTHASH_Idle 839546759
-#define FWL_MSGMOUSECMD_LButtonDown 1
-#define FWL_MSGMOUSECMD_LButtonUp 2
-#define FWL_MSGMOUSECMD_LButtonDblClk 3
-#define FWL_MSGMOUSECMD_RButtonDown 4
-#define FWL_MSGMOUSECMD_RButtonUp 5
-#define FWL_MSGMOUSECMD_RButtonDblClk 6
-#define FWL_MSGMOUSECMD_MButtonDown 7
-#define FWL_MSGMOUSECMD_MButtonUp 8
-#define FWL_MSGMOUSECMD_MButtonDblClk 9
-#define FWL_MSGMOUSECMD_MouseMove 10
-#define FWL_MSGMOUSECMD_MouseEnter 11
-#define FWL_MSGMOUSECMD_MouseLeave 12
-#define FWL_MSGMOUSECMD_MouseHover 13
-#define FWL_MSGKEYCMD_KeyDown 1
-#define FWL_MSGKEYCMD_KeyUp 2
-#define FWL_MSGKEYCMD_Char 3
-#define FWL_KEYFLAG_Ctrl (1 << 0)
-#define FWL_KEYFLAG_Alt (1 << 1)
-#define FWL_KEYFLAG_Shift (1 << 2)
-#define FWL_KEYFLAG_Command (1 << 3)
-#define FWL_KEYFLAG_LButton (1 << 4)
-#define FWL_KEYFLAG_RButton (1 << 5)
-#define FWL_KEYFLAG_MButton (1 << 6)
-class CFWL_Note
-{
-public:
- virtual FX_DWORD Release()
- {
- m_dwRefCount --;
- FX_DWORD dwRefCount = m_dwRefCount;
- if (!m_dwRefCount) {
- delete this;
- }
- return dwRefCount;
+#define FWL_MSG_Activate L"FWL_MESSAGE_Activate"
+#define FWL_MSG_Deactivate L"FWL_MESSAGE_Deactivate"
+#define FWL_MSG_SetFocus L"FWL_MESSAGE_SetFocus"
+#define FWL_MSG_KillFocus L"FWL_MESSAGE_KillFocus"
+#define FWL_MSG_Mouse L"FWL_MESSAGE_Mouse"
+#define FWL_MSG_MouseWheel L"FWL_MESSAGE_MouseWheel"
+#define FWL_MSG_Key L"FWL_MESSAGE_Key"
+#define FWL_MSG_Cursor L"FWL_MESSAGE_Cursor"
+#define FWL_MSG_Size L"FWL_MESSAGE_Size"
+#define FWL_MSG_WindowMove L"FWL_MESSAGE_WindowMove"
+#define FWL_MSG_DropFiles L"FWL_MESSAGE_DropFiles"
+#define FWL_MSG_TaskClicked L"FWL_MESSAGE_TaskClicked"
+#define FWL_MSG_Close L"FWL_MESSAGE_Close"
+#define FWL_MSG_Post L"FWL_MESSAGE_Post"
+#define FWL_MSG_WindowWillMove L"FWL_MESSAGE_WindowWillMove"
+#define FWL_MSGHASH_Activate 2410369469
+#define FWL_MSGHASH_Deactivate 1184214790
+#define FWL_MSGHASH_SetFocus 4174512504
+#define FWL_MSGHASH_KillFocus 1557903832
+#define FWL_MSGHASH_Mouse 706128309
+#define FWL_MSGHASH_MouseWheel 893703466
+#define FWL_MSGHASH_Key 3751372405
+#define FWL_MSGHASH_Cursor 3182626218
+#define FWL_MSGHASH_Size 160077735
+#define FWL_MSGHASH_WindowMove 1032269377
+#define FWL_MSGHASH_DropFiles 2004165236
+#define FWL_MSGHASH_TaskClicked 3128231086
+#define FWL_MSGHASH_Close 2977563906
+#define FWL_MSGHASH_Post 1969633074
+#define FWL_MSGHASH_WindowWillMove 2229175763
+#define FWL_EVT_Mouse L"FWL_EVENT_Mouse"
+#define FWL_EVT_MouseWheel L"FWL_EVENT_MouseWheel"
+#define FWL_EVT_Key L"FWL_EVENT_Key"
+#define FWL_EVT_SetFocus L"FWL_EVENT_SetFocus"
+#define FWL_EVT_KillFocus L"FWL_EVENT_KillFocus"
+#define FWL_EVT_Click L"FWL_EVENT_Click"
+#define FWL_EVT_Draw L"FWL_EVENT_Draw"
+#define FWL_EVT_Scroll L"FWL_EVENT_Scroll"
+#define FWL_EVT_Close L"FWL_EVENT_Close"
+#define FWL_EVT_ContextMenu L"FWL_EVENT_ContextMenu"
+#define FWL_EVT_MenuCommand L"FWL_EVENT_MenuCommand"
+#define FWL_EVT_SizeChanged L"FWL_EVENT_SizeChanged"
+#define FWL_EVTHASH_Mouse 1765258002
+#define FWL_EVTHASH_MouseWheel 3907114407
+#define FWL_EVTHASH_Key 2408354450
+#define FWL_EVTHASH_SetFocus 3909721269
+#define FWL_EVTHASH_KillFocus 1779363253
+#define FWL_EVTHASH_Draw 2430713303
+#define FWL_EVTHASH_Click 4026328783
+#define FWL_EVTHASH_Scroll 2965158968
+#define FWL_EVTHASH_Close 4036693599
+#define FWL_EVTHASH_ContextMenu 2717307715
+#define FWL_EVTHASH_MenuCommand 497763741
+#define FWL_EVTHASH_SizeChanged 3083958510
+#define FWL_EVTHASH_Idle 839546759
+#define FWL_MSGMOUSECMD_LButtonDown 1
+#define FWL_MSGMOUSECMD_LButtonUp 2
+#define FWL_MSGMOUSECMD_LButtonDblClk 3
+#define FWL_MSGMOUSECMD_RButtonDown 4
+#define FWL_MSGMOUSECMD_RButtonUp 5
+#define FWL_MSGMOUSECMD_RButtonDblClk 6
+#define FWL_MSGMOUSECMD_MButtonDown 7
+#define FWL_MSGMOUSECMD_MButtonUp 8
+#define FWL_MSGMOUSECMD_MButtonDblClk 9
+#define FWL_MSGMOUSECMD_MouseMove 10
+#define FWL_MSGMOUSECMD_MouseEnter 11
+#define FWL_MSGMOUSECMD_MouseLeave 12
+#define FWL_MSGMOUSECMD_MouseHover 13
+#define FWL_MSGKEYCMD_KeyDown 1
+#define FWL_MSGKEYCMD_KeyUp 2
+#define FWL_MSGKEYCMD_Char 3
+#define FWL_KEYFLAG_Ctrl (1 << 0)
+#define FWL_KEYFLAG_Alt (1 << 1)
+#define FWL_KEYFLAG_Shift (1 << 2)
+#define FWL_KEYFLAG_Command (1 << 3)
+#define FWL_KEYFLAG_LButton (1 << 4)
+#define FWL_KEYFLAG_RButton (1 << 5)
+#define FWL_KEYFLAG_MButton (1 << 6)
+class CFWL_Note {
+ public:
+ virtual FX_DWORD Release() {
+ m_dwRefCount--;
+ FX_DWORD dwRefCount = m_dwRefCount;
+ if (!m_dwRefCount) {
+ delete this;
}
- virtual IFWL_Target* Retain()
- {
- m_dwRefCount ++;
- return (IFWL_Target*)this;
- }
- virtual FWL_ERR GetClassName(CFX_WideString &wsClass) const
- {
- wsClass = L"CFWL_Note";
- return FWL_ERR_Succeeded;
- }
- virtual FX_DWORD GetClassID() const
- {
- return 0;
- }
- virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const
- {
- return TRUE;
- }
- virtual CFWL_Note* Clone()
- {
- return NULL;
- }
- FX_BOOL IsEvent() const
- {
- return m_bIsEvent;
- }
- IFWL_Widget *m_pSrcTarget;
- IFWL_Widget *m_pDstTarget;
-protected:
- CFWL_Note(FX_BOOL bIsEvent)
- : m_pSrcTarget(NULL)
- , m_pDstTarget(NULL)
- , m_dwRefCount(1)
- , m_bIsEvent(bIsEvent)
- , m_dwExtend(0)
- {
- }
- virtual ~CFWL_Note() {}
- virtual FX_BOOL Initialize()
- {
- return TRUE;
- }
- virtual int32_t Finalize()
- {
- return 0;
- }
- FX_DWORD m_dwRefCount;
- FX_BOOL m_bIsEvent;
-public:
- FX_DWORD m_dwExtend;
+ return dwRefCount;
+ }
+ virtual IFWL_Target* Retain() {
+ m_dwRefCount++;
+ return (IFWL_Target*)this;
+ }
+ virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const {
+ wsClass = L"CFWL_Note";
+ return FWL_ERR_Succeeded;
+ }
+ virtual FX_DWORD GetClassID() const { return 0; }
+ virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const {
+ return TRUE;
+ }
+ virtual CFWL_Note* Clone() { return NULL; }
+ FX_BOOL IsEvent() const { return m_bIsEvent; }
+ IFWL_Widget* m_pSrcTarget;
+ IFWL_Widget* m_pDstTarget;
+
+ protected:
+ CFWL_Note(FX_BOOL bIsEvent)
+ : m_pSrcTarget(NULL),
+ m_pDstTarget(NULL),
+ m_dwRefCount(1),
+ m_bIsEvent(bIsEvent),
+ m_dwExtend(0) {}
+ virtual ~CFWL_Note() {}
+ virtual FX_BOOL Initialize() { return TRUE; }
+ virtual int32_t Finalize() { return 0; }
+ FX_DWORD m_dwRefCount;
+ FX_BOOL m_bIsEvent;
+
+ public:
+ FX_DWORD m_dwExtend;
};
-class CFWL_Message : public CFWL_Note
-{
-public:
- CFWL_Message() : CFWL_Note(FALSE) {}
- virtual ~CFWL_Message() {}
- virtual CFWL_Event* CloneToEvent()
- {
- return NULL;
- }
+class CFWL_Message : public CFWL_Note {
+ public:
+ CFWL_Message() : CFWL_Note(FALSE) {}
+ virtual ~CFWL_Message() {}
+ virtual CFWL_Event* CloneToEvent() { return NULL; }
};
-#define BEGIN_FWL_MESSAGE_DEF(classname, msghashcode) \
- class classname : public CFWL_Message \
- { \
- public: \
- classname() : CFWL_Message() {} \
- virtual CFWL_Note* Clone() {return FX_NEW classname(*this);} \
- virtual FWL_ERR GetClassName(CFX_WideString &wsClass) const {wsClass = L" ## classname ## "; return FWL_ERR_Succeeded;} \
- virtual FX_DWORD GetClassID() const {return msghashcode;} \
- virtual CFWL_Event* CloneToEvent() {classname *pEvent = FX_NEW classname; pEvent->m_bIsEvent = TRUE; return (CFWL_Event*)pEvent;}
+#define BEGIN_FWL_MESSAGE_DEF(classname, msghashcode) \
+ class classname : public CFWL_Message { \
+ public: \
+ classname() : CFWL_Message() {} \
+ virtual CFWL_Note* Clone() { return FX_NEW classname(*this); } \
+ virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const { \
+ wsClass = L" ## classname ## "; \
+ return FWL_ERR_Succeeded; \
+ } \
+ virtual FX_DWORD GetClassID() const { return msghashcode; } \
+ virtual CFWL_Event* CloneToEvent() { \
+ classname* pEvent = FX_NEW classname; \
+ pEvent->m_bIsEvent = TRUE; \
+ return (CFWL_Event*)pEvent; \
+ }
#define END_FWL_MESSAGE_DEF \
- };
+ } \
+ ;
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgActivate, FWL_MSGHASH_Activate)
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgDeactivate, FWL_MSGHASH_Deactivate)
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgMouse, FWL_MSGHASH_Mouse)
-FX_FLOAT m_fx;
-FX_FLOAT m_fy;
-FX_DWORD m_dwFlags;
-FX_DWORD m_dwCmd;
+FX_FLOAT m_fx;
+FX_FLOAT m_fy;
+FX_DWORD m_dwFlags;
+FX_DWORD m_dwCmd;
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgMouseWheel, FWL_MSGHASH_MouseWheel)
-FX_FLOAT m_fx;
-FX_FLOAT m_fy;
-FX_FLOAT m_fDeltaX;
-FX_FLOAT m_fDeltaY;
-FX_DWORD m_dwFlags;
+FX_FLOAT m_fx;
+FX_FLOAT m_fy;
+FX_FLOAT m_fDeltaX;
+FX_FLOAT m_fDeltaY;
+FX_DWORD m_dwFlags;
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgSetFocus, FWL_MSGHASH_SetFocus)
-IFWL_Widget *m_pKillFocus;
+IFWL_Widget* m_pKillFocus;
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgKillFocus, FWL_MSGHASH_KillFocus)
-IFWL_Widget *m_pSetFocus;
+IFWL_Widget* m_pSetFocus;
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgKey, FWL_MSGHASH_Key)
-FX_DWORD m_dwKeyCode;
-FX_DWORD m_dwFlags;
-FX_DWORD m_dwCmd;
+FX_DWORD m_dwKeyCode;
+FX_DWORD m_dwFlags;
+FX_DWORD m_dwCmd;
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgCursor, FWL_MSGHASH_Cursor)
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgSize, FWL_MSGHASH_Size)
-int32_t m_iWidth;
-int32_t m_iHeight;
+int32_t m_iWidth;
+int32_t m_iHeight;
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgWindowMove, FWL_MSGHASH_WindowMove)
-FX_FLOAT m_fx;
-FX_FLOAT m_fy;
+FX_FLOAT m_fx;
+FX_FLOAT m_fy;
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgDropFiles, FWL_MSGHASH_DropFiles)
-CFWL_MsgDropFiles(const CFWL_MsgDropFiles& copy)
-{
- m_pDstTarget = copy.m_pDstTarget;
- m_pSrcTarget = copy.m_pSrcTarget;
- m_fx = copy.m_fx;
- m_fy = copy.m_fy;
- m_files.Append(copy.m_files);
+CFWL_MsgDropFiles(const CFWL_MsgDropFiles& copy) {
+ m_pDstTarget = copy.m_pDstTarget;
+ m_pSrcTarget = copy.m_pSrcTarget;
+ m_fx = copy.m_fx;
+ m_fy = copy.m_fy;
+ m_files.Append(copy.m_files);
}
-FX_FLOAT m_fx;
-FX_FLOAT m_fy;
-CFX_WideStringArray m_files;
+FX_FLOAT m_fx;
+FX_FLOAT m_fy;
+CFX_WideStringArray m_files;
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgTaskClicked, FWL_MSGHASH_TaskClicked)
-FX_FLOAT m_fx;
-FX_FLOAT m_fy;
+FX_FLOAT m_fx;
+FX_FLOAT m_fy;
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgClose, FWL_MSGHASH_Close)
END_FWL_MESSAGE_DEF
BEGIN_FWL_MESSAGE_DEF(CFWL_MsgWindowWillMove, FWL_MSGHASH_WindowWillMove)
END_FWL_MESSAGE_DEF
-class CFWL_Event : public CFWL_Note
-{
-public:
- CFWL_Event() : CFWL_Note(TRUE) {}
- virtual ~CFWL_Event() {}
+class CFWL_Event : public CFWL_Note {
+ public:
+ CFWL_Event() : CFWL_Note(TRUE) {}
+ virtual ~CFWL_Event() {}
};
-#define BEGIN_FWL_EVENT_DEF(classname, eventhashcode) \
- class classname : public CFWL_Event \
- { \
- public: \
- classname() : CFWL_Event() {} \
- virtual FWL_ERR GetClassName(CFX_WideString &wsClass) const {wsClass = L" ## classname ## "; return FWL_ERR_Succeeded;} \
- virtual FX_DWORD GetClassID() const {return eventhashcode;}
+#define BEGIN_FWL_EVENT_DEF(classname, eventhashcode) \
+ class classname : public CFWL_Event { \
+ public: \
+ classname() : CFWL_Event() {} \
+ virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const { \
+ wsClass = L" ## classname ## "; \
+ return FWL_ERR_Succeeded; \
+ } \
+ virtual FX_DWORD GetClassID() const { return eventhashcode; }
#define END_FWL_EVENT_DEF \
- };
+ } \
+ ;
BEGIN_FWL_EVENT_DEF(CFWL_EvtMouse, FWL_EVTHASH_Mouse)
-FX_FLOAT m_fx;
-FX_FLOAT m_fy;
-FX_DWORD m_dwFlags;
-FX_DWORD m_dwCmd;
+FX_FLOAT m_fx;
+FX_FLOAT m_fy;
+FX_DWORD m_dwFlags;
+FX_DWORD m_dwCmd;
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtMouseWheel, FWL_EVTHASH_MouseWheel)
-FX_FLOAT m_fx;
-FX_FLOAT m_fy;
-FX_FLOAT m_fDeltaX;
-FX_FLOAT m_fDeltaY;
-FX_DWORD m_dwFlags;
+FX_FLOAT m_fx;
+FX_FLOAT m_fy;
+FX_FLOAT m_fDeltaX;
+FX_FLOAT m_fDeltaY;
+FX_DWORD m_dwFlags;
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtKey, FWL_EVTHASH_Key)
-FX_DWORD m_dwKeyCode;
-FX_DWORD m_dwFlags;
-FX_DWORD m_dwCmd;
+FX_DWORD m_dwKeyCode;
+FX_DWORD m_dwFlags;
+FX_DWORD m_dwCmd;
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtSetFocus, FWL_EVTHASH_SetFocus)
-IFWL_Widget *m_pSetFocus;
+IFWL_Widget* m_pSetFocus;
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtKillFocus, FWL_EVTHASH_KillFocus)
-IFWL_Widget *m_pKillFocus;
+IFWL_Widget* m_pKillFocus;
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtDraw, FWL_EVTHASH_Draw)
-CFX_Graphics *m_pGraphics;
-IFWL_Widget *m_pWidget;
+CFX_Graphics* m_pGraphics;
+IFWL_Widget* m_pWidget;
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtClick, FWL_EVTHASH_Click)
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtScroll, FWL_EVTHASH_Scroll)
FX_DWORD m_iScrollCode;
FX_FLOAT m_fPos;
-FX_BOOL *m_pRet;
+FX_BOOL* m_pRet;
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtClose, FWL_EVTHASH_Close)
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtContextMenu, FWL_EVTHASH_ContextMenu)
-FX_FLOAT m_fPosX;
-FX_FLOAT m_fPosY;
-IFWL_Widget *m_pOwner;
+FX_FLOAT m_fPosX;
+FX_FLOAT m_fPosY;
+IFWL_Widget* m_pOwner;
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtMenuCommand, FWL_EVTHASH_MenuCommand)
int32_t m_iCommand;
void* m_pData;
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtSizeChanged, FWL_EVTHASH_SizeChanged)
-IFWL_Widget *m_pWidget;
-CFX_RectF m_rtOld;
-CFX_RectF m_rtNew;
+IFWL_Widget* m_pWidget;
+CFX_RectF m_rtOld;
+CFX_RectF m_rtNew;
END_FWL_MESSAGE_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtIdle, FWL_EVTHASH_Idle)
END_FWL_EVENT_DEF
typedef enum {
- FWL_EVENT_MOUSE_MASK = 1 << 0,
- FWL_EVENT_MOUSEWHEEL_MASK = 1 << 1,
- FWL_EVENT_KEY_MASK = 1 << 2,
- FWL_EVENT_FOCUSCHANGED_MASK = 1 << 3,
- FWL_EVENT_DRAW_MASK = 1 << 4,
- FWL_EVENT_CLOSE_MASK = 1 << 5,
- FWL_EVENT_SIZECHANGED_MASK = 1 << 6,
- FWL_EVENT_IDLE_MASK = 1 << 7,
- FWL_EVENT_CONTROL_MASK = 1 << 8,
- FWL_EVENT_ALL_MASK = 0xFF
+ FWL_EVENT_MOUSE_MASK = 1 << 0,
+ FWL_EVENT_MOUSEWHEEL_MASK = 1 << 1,
+ FWL_EVENT_KEY_MASK = 1 << 2,
+ FWL_EVENT_FOCUSCHANGED_MASK = 1 << 3,
+ FWL_EVENT_DRAW_MASK = 1 << 4,
+ FWL_EVENT_CLOSE_MASK = 1 << 5,
+ FWL_EVENT_SIZECHANGED_MASK = 1 << 6,
+ FWL_EVENT_IDLE_MASK = 1 << 7,
+ FWL_EVENT_CONTROL_MASK = 1 << 8,
+ FWL_EVENT_ALL_MASK = 0xFF
} FWLEventMask;
-class IFWL_NoteDriver
-{
-public:
- virtual ~IFWL_NoteDriver() {}
- virtual FX_BOOL SendNote(CFWL_Note *pNote) = 0;
- virtual FX_BOOL PostMessage(CFWL_Message *pMessage) = 0;
- virtual FWL_ERR RegisterEventTarget(IFWL_Widget *pListener, IFWL_Widget *pEventSource = NULL, FX_DWORD dwFilter = FWL_EVENT_ALL_MASK) = 0;
- virtual FWL_ERR UnregisterEventTarget(IFWL_Widget *pListener) = 0;
- virtual void ClearEventTargets(FX_BOOL bRemoveAll) = 0;
- virtual int32_t GetQueueMaxSize() const = 0;
- virtual FWL_ERR SetQueueMaxSize(const int32_t size) = 0;
- virtual IFWL_NoteThread* GetOwnerThread() const = 0;
- virtual FWL_ERR PushNoteLoop(IFWL_NoteLoop *pNoteLoop) = 0;
- virtual IFWL_NoteLoop* PopNoteLoop() = 0;
- virtual FX_BOOL SetFocus(IFWL_Widget *pFocus, FX_BOOL bNotify = FALSE) = 0;
- virtual FWL_ERR Run() = 0;
+class IFWL_NoteDriver {
+ public:
+ virtual ~IFWL_NoteDriver() {}
+ virtual FX_BOOL SendNote(CFWL_Note* pNote) = 0;
+ virtual FX_BOOL PostMessage(CFWL_Message* pMessage) = 0;
+ virtual FWL_ERR RegisterEventTarget(
+ IFWL_Widget* pListener,
+ IFWL_Widget* pEventSource = NULL,
+ FX_DWORD dwFilter = FWL_EVENT_ALL_MASK) = 0;
+ virtual FWL_ERR UnregisterEventTarget(IFWL_Widget* pListener) = 0;
+ virtual void ClearEventTargets(FX_BOOL bRemoveAll) = 0;
+ virtual int32_t GetQueueMaxSize() const = 0;
+ virtual FWL_ERR SetQueueMaxSize(const int32_t size) = 0;
+ virtual IFWL_NoteThread* GetOwnerThread() const = 0;
+ virtual FWL_ERR PushNoteLoop(IFWL_NoteLoop* pNoteLoop) = 0;
+ virtual IFWL_NoteLoop* PopNoteLoop() = 0;
+ virtual FX_BOOL SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify = FALSE) = 0;
+ virtual FWL_ERR Run() = 0;
};
-IFWL_Widget* FWL_GetCurrentThreadModalWidget(IFWL_NoteThread *pNoteThread);
-class IFWL_NoteLoop
-{
-public:
- virtual ~IFWL_NoteLoop() {}
- virtual FX_BOOL PreProcessMessage(CFWL_Message *pMessage) = 0;
- virtual FWL_ERR Idle(int32_t count) = 0;
+IFWL_Widget* FWL_GetCurrentThreadModalWidget(IFWL_NoteThread* pNoteThread);
+class IFWL_NoteLoop {
+ public:
+ virtual ~IFWL_NoteLoop() {}
+ virtual FX_BOOL PreProcessMessage(CFWL_Message* pMessage) = 0;
+ virtual FWL_ERR Idle(int32_t count) = 0;
};
-class IFWL_ToolTipTarget
-{
-public:
- virtual ~IFWL_ToolTipTarget() {}
- virtual IFWL_Widget* GetWidget() = 0;
- virtual FX_BOOL IsShowed() = 0;
- virtual FWL_ERR DrawToolTip(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix, IFWL_Widget *pToolTip) = 0;
- virtual FX_BOOL UseDefaultTheme() = 0;
- virtual FWL_ERR GetCaption(CFX_WideString &wsCaption) = 0;
- virtual FWL_ERR GetToolTipSize(CFX_SizeF &sz) = 0;
- virtual FWL_ERR GetToolTipPos(CFX_PointF &pt)
- {
- return FWL_ERR_Indefinite;
- }
+class IFWL_ToolTipTarget {
+ public:
+ virtual ~IFWL_ToolTipTarget() {}
+ virtual IFWL_Widget* GetWidget() = 0;
+ virtual FX_BOOL IsShowed() = 0;
+ virtual FWL_ERR DrawToolTip(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix,
+ IFWL_Widget* pToolTip) = 0;
+ virtual FX_BOOL UseDefaultTheme() = 0;
+ virtual FWL_ERR GetCaption(CFX_WideString& wsCaption) = 0;
+ virtual FWL_ERR GetToolTipSize(CFX_SizeF& sz) = 0;
+ virtual FWL_ERR GetToolTipPos(CFX_PointF& pt) { return FWL_ERR_Indefinite; }
};
-FWL_ERR FWL_AddToolTipTarget(IFWL_ToolTipTarget *pTarget);
-FWL_ERR FWL_RemoveToolTipTarget(IFWL_ToolTipTarget *pTarget);
-FWL_ERR FWL_SetToolTipInitialDelay(int32_t iDelayTime);
-FWL_ERR FWL_SetToolTipAutoPopDelay(int32_t iDelayTime);
-typedef FX_BOOL (*FWLMessageHookCallback)(CFWL_Message *msg, void* info);
-FWL_ERR FWL_SetHook(IFWL_NoteDriver *driver, FWLMessageHookCallback callback, void* info);
+FWL_ERR FWL_AddToolTipTarget(IFWL_ToolTipTarget* pTarget);
+FWL_ERR FWL_RemoveToolTipTarget(IFWL_ToolTipTarget* pTarget);
+FWL_ERR FWL_SetToolTipInitialDelay(int32_t iDelayTime);
+FWL_ERR FWL_SetToolTipAutoPopDelay(int32_t iDelayTime);
+typedef FX_BOOL (*FWLMessageHookCallback)(CFWL_Message* msg, void* info);
+FWL_ERR FWL_SetHook(IFWL_NoteDriver* driver,
+ FWLMessageHookCallback callback,
+ void* info);
#endif
diff --git a/xfa/include/fwl/core/fwl_panel.h b/xfa/include/fwl/core/fwl_panel.h index 94c354a698..b2aa6f4799 100644 --- a/xfa/include/fwl/core/fwl_panel.h +++ b/xfa/include/fwl/core/fwl_panel.h @@ -10,31 +10,33 @@ class IFWL_Widget; class IFWL_Content;
class IFWL_Panel;
class IFWL_CustomPanel;
-#define FWL_CLASS_Panel L"FWL_Panel"
-#define FWL_CLASSHASH_Panel 881567292
-class IFWL_Panel : public IFWL_Widget
-{
-public:
- static IFWL_Panel* Create();
- FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
- FWL_ERR Initialize(CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
- IFWL_Content* GetContent();
- FWL_ERR SetContent(IFWL_Content *pContent);
-protected:
- IFWL_Panel();
- virtual ~IFWL_Panel();
+#define FWL_CLASS_Panel L"FWL_Panel"
+#define FWL_CLASSHASH_Panel 881567292
+class IFWL_Panel : public IFWL_Widget {
+ public:
+ static IFWL_Panel* Create();
+ FWL_ERR Initialize(IFWL_Widget* pOuter = NULL);
+ FWL_ERR Initialize(CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter = NULL);
+ IFWL_Content* GetContent();
+ FWL_ERR SetContent(IFWL_Content* pContent);
+
+ protected:
+ IFWL_Panel();
+ virtual ~IFWL_Panel();
};
-class IFWL_CustomPanel : public IFWL_Widget
-{
-public:
- static IFWL_CustomPanel* Create();
- FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
- FWL_ERR Initialize(CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
- IFWL_Content* GetContent();
- FWL_ERR SetContent(IFWL_Content *pContent);
- FWL_ERR SetProxy(IFWL_Proxy *pProxy);
-protected:
- IFWL_CustomPanel();
- virtual ~IFWL_CustomPanel();
+class IFWL_CustomPanel : public IFWL_Widget {
+ public:
+ static IFWL_CustomPanel* Create();
+ FWL_ERR Initialize(IFWL_Widget* pOuter = NULL);
+ FWL_ERR Initialize(CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter = NULL);
+ IFWL_Content* GetContent();
+ FWL_ERR SetContent(IFWL_Content* pContent);
+ FWL_ERR SetProxy(IFWL_Proxy* pProxy);
+
+ protected:
+ IFWL_CustomPanel();
+ virtual ~IFWL_CustomPanel();
};
#endif
diff --git a/xfa/include/fwl/core/fwl_target.h b/xfa/include/fwl/core/fwl_target.h index 7ba7bf7cda..facd28fb70 100644 --- a/xfa/include/fwl/core/fwl_target.h +++ b/xfa/include/fwl/core/fwl_target.h @@ -7,19 +7,19 @@ #ifndef _FWL_TARGET_H
#define _FWL_TARGET_H
class IFWL_Target;
-class IFWL_Target
-{
-public:
- FX_DWORD Release();
- IFWL_Target* Retain();
- FX_DWORD GetRefCount() const;
- FWL_ERR GetClassName(CFX_WideString &wsClass) const;
- FX_DWORD GetClassID() const;
- FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
- FWL_ERR Initialize();
- FWL_ERR Finalize();
-protected:
- virtual ~IFWL_Target();
- void* m_pData;
+class IFWL_Target {
+ public:
+ FX_DWORD Release();
+ IFWL_Target* Retain();
+ FX_DWORD GetRefCount() const;
+ FWL_ERR GetClassName(CFX_WideString& wsClass) const;
+ FX_DWORD GetClassID() const;
+ FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
+ FWL_ERR Initialize();
+ FWL_ERR Finalize();
+
+ protected:
+ virtual ~IFWL_Target();
+ void* m_pData;
};
#endif
diff --git a/xfa/include/fwl/core/fwl_theme.h b/xfa/include/fwl/core/fwl_theme.h index 94e81771a9..3dfe7c74e1 100644 --- a/xfa/include/fwl/core/fwl_theme.h +++ b/xfa/include/fwl/core/fwl_theme.h @@ -12,81 +12,71 @@ class CFWL_ThemeBackground; class CFWL_ThemeText;
class CFWL_ThemeElement;
class IFWL_ThemeProvider;
-#define FWL_WGTCAPACITY_CXBorder 1
-#define FWL_WGTCAPACITY_CYBorder 2
-#define FWL_WGTCAPACITY_ScrollBarWidth 3
-#define FWL_WGTCAPACITY_EdgeFlat 4
-#define FWL_WGTCAPACITY_EdgeRaised 5
-#define FWL_WGTCAPACITY_EdgeSunken 6
-#define FWL_WGTCAPACITY_Font 7
-#define FWL_WGTCAPACITY_FontSize 8
-#define FWL_WGTCAPACITY_TextColor 9
-#define FWL_WGTCAPACITY_TextSelColor 10
-#define FWL_WGTCAPACITY_LineHeight 11
-#define FWL_WGTCAPACITY_UIMargin 12
-#define FWL_WGTCAPACITY_SpaceAboveBelow 13
-#define FWL_WGTCAPACITY_MAX 65535
-class CFWL_ThemePart
-{
-public:
- CFWL_ThemePart()
- : m_pWidget(NULL)
- , m_iPart(0)
- , m_dwStates(0)
- , m_dwData(0)
- , m_pData(NULL)
- {
- m_rtPart.Reset();
- m_matrix.Reset();
- }
- CFX_Matrix m_matrix;
- CFX_RectF m_rtPart;
- IFWL_Widget *m_pWidget;
- int32_t m_iPart;
- FX_DWORD m_dwStates;
- FX_DWORD m_dwData;
- void* m_pData;
+#define FWL_WGTCAPACITY_CXBorder 1
+#define FWL_WGTCAPACITY_CYBorder 2
+#define FWL_WGTCAPACITY_ScrollBarWidth 3
+#define FWL_WGTCAPACITY_EdgeFlat 4
+#define FWL_WGTCAPACITY_EdgeRaised 5
+#define FWL_WGTCAPACITY_EdgeSunken 6
+#define FWL_WGTCAPACITY_Font 7
+#define FWL_WGTCAPACITY_FontSize 8
+#define FWL_WGTCAPACITY_TextColor 9
+#define FWL_WGTCAPACITY_TextSelColor 10
+#define FWL_WGTCAPACITY_LineHeight 11
+#define FWL_WGTCAPACITY_UIMargin 12
+#define FWL_WGTCAPACITY_SpaceAboveBelow 13
+#define FWL_WGTCAPACITY_MAX 65535
+class CFWL_ThemePart {
+ public:
+ CFWL_ThemePart()
+ : m_pWidget(NULL), m_iPart(0), m_dwStates(0), m_dwData(0), m_pData(NULL) {
+ m_rtPart.Reset();
+ m_matrix.Reset();
+ }
+ CFX_Matrix m_matrix;
+ CFX_RectF m_rtPart;
+ IFWL_Widget* m_pWidget;
+ int32_t m_iPart;
+ FX_DWORD m_dwStates;
+ FX_DWORD m_dwData;
+ void* m_pData;
};
-class CFWL_ThemeBackground : public CFWL_ThemePart
-{
-public:
- CFWL_ThemeBackground()
- : m_pGraphics(NULL)
- , m_pImage(NULL)
- , m_pPath(NULL)
- {
- }
- CFX_Graphics *m_pGraphics;
- CFX_DIBitmap *m_pImage;
- CFX_Path *m_pPath;
+class CFWL_ThemeBackground : public CFWL_ThemePart {
+ public:
+ CFWL_ThemeBackground() : m_pGraphics(NULL), m_pImage(NULL), m_pPath(NULL) {}
+ CFX_Graphics* m_pGraphics;
+ CFX_DIBitmap* m_pImage;
+ CFX_Path* m_pPath;
};
-class CFWL_ThemeText : public CFWL_ThemePart
-{
-public:
- CFWL_ThemeText()
- : m_pGraphics(NULL)
- {
- }
- CFX_WideString m_wsText;
- FX_DWORD m_dwTTOStyles;
- int32_t m_iTTOAlign;
- CFX_Graphics *m_pGraphics;
+class CFWL_ThemeText : public CFWL_ThemePart {
+ public:
+ CFWL_ThemeText() : m_pGraphics(NULL) {}
+ CFX_WideString m_wsText;
+ FX_DWORD m_dwTTOStyles;
+ int32_t m_iTTOAlign;
+ CFX_Graphics* m_pGraphics;
};
-class IFWL_ThemeProvider
-{
-public:
- virtual ~IFWL_ThemeProvider() {}
- virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget) = 0;
- virtual FX_DWORD GetThemeID(IFWL_Widget *pWidget) = 0;
- virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE) = 0;
- virtual FWL_ERR GetThemeMatrix(IFWL_Widget *pWidget, CFX_Matrix &matrix) = 0;
- virtual FWL_ERR SetThemeMatrix(IFWL_Widget *pWidget, const CFX_Matrix &matrix) = 0;
- virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams) = 0;
- virtual FX_BOOL DrawText(CFWL_ThemeText *pParams) = 0;
- virtual void* GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity) = 0;
- virtual FX_BOOL IsCustomizedLayout(IFWL_Widget *pWidget) = 0;
- virtual FWL_ERR GetPartRect(CFWL_ThemePart *pThemePart, CFX_RectF &rtPart) = 0;
- virtual FX_BOOL IsInPart(CFWL_ThemePart *pThemePart, FX_FLOAT fx, FX_FLOAT fy) = 0;
- virtual FX_BOOL CalcTextRect(CFWL_ThemeText *pParams, CFX_RectF &rect) = 0;
+class IFWL_ThemeProvider {
+ public:
+ virtual ~IFWL_ThemeProvider() {}
+ virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget) = 0;
+ virtual FX_DWORD GetThemeID(IFWL_Widget* pWidget) = 0;
+ virtual FX_DWORD SetThemeID(IFWL_Widget* pWidget,
+ FX_DWORD dwThemeID,
+ FX_BOOL bChildren = TRUE) = 0;
+ virtual FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) = 0;
+ virtual FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget,
+ const CFX_Matrix& matrix) = 0;
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) = 0;
+ virtual FX_BOOL DrawText(CFWL_ThemeText* pParams) = 0;
+ virtual void* GetCapacity(CFWL_ThemePart* pThemePart,
+ FX_DWORD dwCapacity) = 0;
+ virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) = 0;
+ virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart,
+ CFX_RectF& rtPart) = 0;
+ virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
+ FX_FLOAT fx,
+ FX_FLOAT fy) = 0;
+ virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) = 0;
};
#endif
diff --git a/xfa/include/fwl/core/fwl_thread.h b/xfa/include/fwl/core/fwl_thread.h index d6bbf93f3a..3bc5c3c289 100644 --- a/xfa/include/fwl/core/fwl_thread.h +++ b/xfa/include/fwl/core/fwl_thread.h @@ -9,48 +9,42 @@ class IFWL_NoteDriver;
class IFWL_Thread;
class IFWL_NoteThread;
-typedef struct _FWL_HTHREAD {
- void* pData;
-} *FWL_HTHREAD;
-class IFWL_Thread
-{
-public:
- static IFWL_Thread * Create();
-protected:
- virtual ~IFWL_Thread() {}
-public:
- virtual void Release() = 0;
- virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0;
+typedef struct _FWL_HTHREAD { void* pData; } * FWL_HTHREAD;
+class IFWL_Thread {
+ public:
+ static IFWL_Thread* Create();
+
+ protected:
+ virtual ~IFWL_Thread() {}
+
+ public:
+ virtual void Release() = 0;
+ virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0;
};
-FWL_HTHREAD FWL_StartThread(IFWL_Thread *pThread, FX_BOOL bSuspended = FALSE);
+FWL_HTHREAD FWL_StartThread(IFWL_Thread* pThread, FX_BOOL bSuspended = FALSE);
FWL_ERR FWL_ResumeThread(FWL_HTHREAD hThread);
FWL_ERR FWL_SuspendThread(FWL_HTHREAD hThread);
FWL_ERR FWL_KillThread(FWL_HTHREAD hThread, int32_t iExitCode);
FWL_ERR FWL_StopThread(FWL_HTHREAD hThread, int32_t iExitCode);
FWL_ERR FWL_Sleep(FX_DWORD dwMilliseconds);
-class IFWL_NoteThread : public IFWL_Thread
-{
-public:
- static IFWL_NoteThread* Create();
- virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0;
- virtual IFWL_NoteDriver* GetNoteDriver() = 0;
+class IFWL_NoteThread : public IFWL_Thread {
+ public:
+ static IFWL_NoteThread* Create();
+ virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0;
+ virtual IFWL_NoteDriver* GetNoteDriver() = 0;
};
-typedef struct _FWL_HMUTEX {
- void* pData;
-} *FWL_HMUTEX;
-FWL_HMUTEX FWL_CreateMutex();
-FWL_ERR FWL_DestroyMutex(FWL_HMUTEX hMutex);
-FWL_ERR FWL_LockMutex(FWL_HMUTEX hMutex);
-FWL_ERR FWL_TryLockMutex(FWL_HMUTEX hMutex);
-FWL_ERR FWL_UnlockMutex(FWL_HMUTEX hMutex);
-FWL_ERR FWL_IsLockedMutex(FWL_HMUTEX hMutex, FX_BOOL &bLocked);
-typedef struct _FWL_HSEMAPHORE {
- void* pData;
-} *FWL_HSEMAPHORE;
-FWL_HSEMAPHORE FWL_CreateSemaphore();
-FWL_ERR FWL_DestroySemaphore(FWL_HSEMAPHORE hSemaphore);
-FWL_ERR FWL_WaitSemaphore(FWL_HSEMAPHORE hSemaphore);
-FWL_ERR FWL_PostSemaphore(FWL_HSEMAPHORE hSemaphore, int32_t down = 1);
-FWL_ERR FWL_GetSemaphoreValue(FWL_HSEMAPHORE hSemaphore, int32_t &value);
-FWL_ERR FWL_ResetSemaphore(FWL_HSEMAPHORE hSemaphore, int32_t init);
+typedef struct _FWL_HMUTEX { void* pData; } * FWL_HMUTEX;
+FWL_HMUTEX FWL_CreateMutex();
+FWL_ERR FWL_DestroyMutex(FWL_HMUTEX hMutex);
+FWL_ERR FWL_LockMutex(FWL_HMUTEX hMutex);
+FWL_ERR FWL_TryLockMutex(FWL_HMUTEX hMutex);
+FWL_ERR FWL_UnlockMutex(FWL_HMUTEX hMutex);
+FWL_ERR FWL_IsLockedMutex(FWL_HMUTEX hMutex, FX_BOOL& bLocked);
+typedef struct _FWL_HSEMAPHORE { void* pData; } * FWL_HSEMAPHORE;
+FWL_HSEMAPHORE FWL_CreateSemaphore();
+FWL_ERR FWL_DestroySemaphore(FWL_HSEMAPHORE hSemaphore);
+FWL_ERR FWL_WaitSemaphore(FWL_HSEMAPHORE hSemaphore);
+FWL_ERR FWL_PostSemaphore(FWL_HSEMAPHORE hSemaphore, int32_t down = 1);
+FWL_ERR FWL_GetSemaphoreValue(FWL_HSEMAPHORE hSemaphore, int32_t& value);
+FWL_ERR FWL_ResetSemaphore(FWL_HSEMAPHORE hSemaphore, int32_t init);
#endif
diff --git a/xfa/include/fwl/core/fwl_timer.h b/xfa/include/fwl/core/fwl_timer.h index eae5bf48b4..4c8b466a52 100644 --- a/xfa/include/fwl/core/fwl_timer.h +++ b/xfa/include/fwl/core/fwl_timer.h @@ -7,15 +7,14 @@ #ifndef _FWL_TIMER_H
#define _FWL_TIMER_H
class IFWL_Timer;
-typedef struct _FWL_HTIMER {
- void* pData;
-} *FWL_HTIMER;
-class IFWL_Timer
-{
-public:
- virtual ~IFWL_Timer() {}
- virtual int32_t Run(FWL_HTIMER hTimer) = 0;
+typedef struct _FWL_HTIMER { void* pData; } * FWL_HTIMER;
+class IFWL_Timer {
+ public:
+ virtual ~IFWL_Timer() {}
+ virtual int32_t Run(FWL_HTIMER hTimer) = 0;
};
-FWL_HTIMER FWL_StartTimer(IFWL_Timer *pTimer, FX_DWORD dwElapse, FX_BOOL bImmediately = TRUE);
+FWL_HTIMER FWL_StartTimer(IFWL_Timer* pTimer,
+ FX_DWORD dwElapse,
+ FX_BOOL bImmediately = TRUE);
int32_t FWL_StopTimer(FWL_HTIMER hTimer);
#endif
diff --git a/xfa/include/fwl/core/fwl_widget.h b/xfa/include/fwl/core/fwl_widget.h index 6c3164c5e0..10808bcac5 100644 --- a/xfa/include/fwl/core/fwl_widget.h +++ b/xfa/include/fwl/core/fwl_widget.h @@ -16,111 +16,111 @@ class IFWL_Custom; class IFWL_Proxy;
class IFWL_Form;
-class IFWL_DataProvider
-{
-public:
- virtual ~IFWL_DataProvider() {}
- virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption) = 0;
+class IFWL_DataProvider {
+ public:
+ virtual ~IFWL_DataProvider() {}
+ virtual FWL_ERR GetCaption(IFWL_Widget* pWidget,
+ CFX_WideString& wsCaption) = 0;
};
-class IFWL_Widget : public IFWL_Target
-{
-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 &rect);
- IFWL_Widget* GetParent();
- FWL_ERR SetParent(IFWL_Widget *pParent);
- IFWL_Widget* GetOwner();
- FWL_ERR SetOwner(IFWL_Widget *pOwner);
- IFWL_Widget* GetOuter();
- 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(IFWL_Widget *pWidget, FX_FLOAT &fx, FX_FLOAT &fy);
- FWL_ERR TransformTo(IFWL_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);
- IFWL_ThemeProvider* GetThemeProvider();
- FWL_ERR SetThemeProvider(IFWL_ThemeProvider *pThemeProvider);
- FWL_ERR SetDataProvider(IFWL_DataProvider *pDataProvider);
- IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate *pDelegate);
- IFWL_NoteThread* GetOwnerThread() const;
- CFX_SizeF GetOffsetFromParent(IFWL_Widget *pParent);
+class IFWL_Widget : public IFWL_Target {
+ 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& rect);
+ IFWL_Widget* GetParent();
+ FWL_ERR SetParent(IFWL_Widget* pParent);
+ IFWL_Widget* GetOwner();
+ FWL_ERR SetOwner(IFWL_Widget* pOwner);
+ IFWL_Widget* GetOuter();
+ 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(IFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy);
+ FWL_ERR TransformTo(IFWL_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);
+ IFWL_ThemeProvider* GetThemeProvider();
+ FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
+ FWL_ERR SetDataProvider(IFWL_DataProvider* pDataProvider);
+ IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate);
+ IFWL_NoteThread* GetOwnerThread() const;
+ CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent);
};
-class IFWL_WidgetDelegate
-{
-public:
- virtual ~IFWL_WidgetDelegate() {}
- virtual int32_t OnProcessMessage(CFWL_Message *pMessage) = 0;
- virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent) = 0;
- virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL) = 0;
+class IFWL_WidgetDelegate {
+ public:
+ virtual ~IFWL_WidgetDelegate() {}
+ virtual int32_t OnProcessMessage(CFWL_Message* pMessage) = 0;
+ virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent) = 0;
+ virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix = NULL) = 0;
};
-class CFWL_WidgetImpProperties
-{
-public:
- CFWL_WidgetImpProperties()
- {
- m_ctmOnParent.Reset();
- m_rtWidget.Set(0, 0, 0, 0);
- m_dwStyles = FWL_WGTSTYLE_Child;
- m_dwStyleExes = 0;
- m_dwStates = 0;
- m_pThemeProvider = NULL;
- m_pDataProvider = NULL;
- m_pParent = NULL;
- m_pOwner = NULL;
- }
- CFX_Matrix m_ctmOnParent;
- CFX_RectF m_rtWidget;
- FX_DWORD m_dwStyles;
- FX_DWORD m_dwStyleExes;
- FX_DWORD m_dwStates;
- IFWL_ThemeProvider *m_pThemeProvider;
- IFWL_DataProvider *m_pDataProvider;
- IFWL_Widget *m_pParent;
- IFWL_Widget *m_pOwner;
+class CFWL_WidgetImpProperties {
+ public:
+ CFWL_WidgetImpProperties() {
+ m_ctmOnParent.Reset();
+ m_rtWidget.Set(0, 0, 0, 0);
+ m_dwStyles = FWL_WGTSTYLE_Child;
+ m_dwStyleExes = 0;
+ m_dwStates = 0;
+ m_pThemeProvider = NULL;
+ m_pDataProvider = NULL;
+ m_pParent = NULL;
+ m_pOwner = NULL;
+ }
+ CFX_Matrix m_ctmOnParent;
+ CFX_RectF m_rtWidget;
+ FX_DWORD m_dwStyles;
+ FX_DWORD m_dwStyleExes;
+ FX_DWORD m_dwStates;
+ IFWL_ThemeProvider* m_pThemeProvider;
+ IFWL_DataProvider* m_pDataProvider;
+ IFWL_Widget* m_pParent;
+ IFWL_Widget* m_pOwner;
};
-class IFWL_Custom : public IFWL_Widget
-{
-public:
- static IFWL_Custom* Create();
+class IFWL_Custom : public IFWL_Widget {
+ public:
+ static IFWL_Custom* Create();
- FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
- FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
- FWL_ERR SetProxy(IFWL_Proxy *pProxy);
-protected:
- IFWL_Custom();
- virtual ~IFWL_Custom();
+ FWL_ERR Initialize(IFWL_Widget* pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter = NULL);
+ FWL_ERR SetProxy(IFWL_Proxy* pProxy);
+
+ protected:
+ IFWL_Custom();
+ virtual ~IFWL_Custom();
};
-class IFWL_Proxy
-{
-public:
- virtual ~IFWL_Proxy() {}
- virtual FWL_ERR GetWidgetRect(CFX_RectF &rect, FX_BOOL bAutoSize = FALSE) = 0;
- virtual FWL_ERR Update() = 0;
+class IFWL_Proxy {
+ public:
+ virtual ~IFWL_Proxy() {}
+ virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) = 0;
+ virtual FWL_ERR Update() = 0;
};
-#define FWL_ACCEL_Control (1L << 0)
-#define FWL_ACCEL_Alt (1L << 1)
-#define FWL_ACCEL_Shift (1L << 2)
-#define FWL_ACCEL_VirtKey (1L << 3)
+#define FWL_ACCEL_Control (1L << 0)
+#define FWL_ACCEL_Alt (1L << 1)
+#define FWL_ACCEL_Shift (1L << 2)
+#define FWL_ACCEL_VirtKey (1L << 3)
typedef struct _FWL_ACCEL {
- FX_DWORD dwKey;
- FX_DWORD dwCmd;
+ FX_DWORD dwKey;
+ FX_DWORD dwCmd;
} FWL_ACCEL;
-typedef CFX_MapPtrTemplate <FX_DWORD, FX_DWORD> CFX_MapAccelerators;
-FWL_ERR FWL_Accelerator_SetApp(CFX_MapAccelerators *pMapAccel);
-FWL_ERR FWL_Accelerator_SetThread(CFX_MapAccelerators *pMapAccel);
-FWL_ERR FWL_Accelerator_SetForm(IFWL_Form *pFrom, CFX_MapAccelerators *pMapAccel);
-FWL_ERR FWL_EnabelWidget(IFWL_Widget *widget, FX_BOOL bEnable);
+typedef CFX_MapPtrTemplate<FX_DWORD, FX_DWORD> CFX_MapAccelerators;
+FWL_ERR FWL_Accelerator_SetApp(CFX_MapAccelerators* pMapAccel);
+FWL_ERR FWL_Accelerator_SetThread(CFX_MapAccelerators* pMapAccel);
+FWL_ERR FWL_Accelerator_SetForm(IFWL_Form* pFrom,
+ CFX_MapAccelerators* pMapAccel);
+FWL_ERR FWL_EnabelWidget(IFWL_Widget* widget, FX_BOOL bEnable);
#endif
diff --git a/xfa/include/fwl/core/fwl_widgetdef.h b/xfa/include/fwl/core/fwl_widgetdef.h index 27c3b55b67..1cdcc36522 100644 --- a/xfa/include/fwl/core/fwl_widgetdef.h +++ b/xfa/include/fwl/core/fwl_widgetdef.h @@ -6,242 +6,242 @@ #ifndef _FWL_WIDGETDEF_H
#define _FWL_WIDGETDEF_H
-#define FWL_WGTSTYLE_OverLapper (0L << 0)
-#define FWL_WGTSTYLE_Popup (1L << 0)
-#define FWL_WGTSTYLE_Child (2L << 0)
-#define FWL_WGTSTYLE_Border (1L << 2)
-#define FWL_WGTSTYLE_Caption (1L << 3)
-#define FWL_WGTSTYLE_NarrowCaption (1L << 4)
-#define FWL_WGTSTYLE_Icon (1L << 5)
-#define FWL_WGTSTYLE_MinimizeBox (1L << 6)
-#define FWL_WGTSTYLE_MaximizeBox (1L << 7)
-#define FWL_WGTSTYLE_CloseBox (1L << 8)
-#define FWL_WGTSTYLE_HScroll (1L << 9)
-#define FWL_WGTSTYLE_VScroll (1L << 11)
-#define FWL_WGTSTYLE_LeftScrollbar (1L << 12)
-#define FWL_WGTSTYLE_LeftAlignment (0L << 13)
-#define FWL_WGTSTYLE_CenterAlignment (1L << 13)
-#define FWL_WGTSTYLE_RightAlignment (2L << 13)
-#define FWL_WGTSTYLE_TopAlignment (0L << 15)
-#define FWL_WGTSTYLE_VCenterAlignment (1L << 15)
-#define FWL_WGTSTYLE_BottomAlignment (2L << 15)
-#define FWL_WGTSTYLE_RTLReading (1L << 17)
-#define FWL_WGTSTYLE_RTLLayout (1L << 18)
-#define FWL_WGTSTYLE_EdgeNone (0L << 19)
-#define FWL_WGTSTYLE_EdgeFlat (1L << 19)
-#define FWL_WGTSTYLE_EdgeRaised (2L << 19)
-#define FWL_WGTSTYLE_EdgeSunken (3L << 19)
-#define FWL_WGTSTYLE_EdgeMask (3L << 19)
-#define FWL_WGTSTYLE_Shadow (3L << 21)
-#define FWL_WGTSTYLE_Group (1L << 22)
-#define FWL_WGTSTYLE_TabStop (1L << 23)
-#define FWL_WGTSTYLE_Offscreen (1L << 24)
-#define FWL_WGTSTYLE_DragAcceptFiles (1L << 25)
-#define FWL_WGTSTYLE_TopMost (1L << 26)
-#define FWL_WGTSTYLE_TransParent (1L << 27)
-#define FWL_WGTSTYLE_NoBackground (1L << 28)
-#define FWL_WGTSTYLE_WindowTypeMask (3L << 0)
-#define FWL_WGTSTATE_Restored (0L << 0)
-#define FWL_WGTSTATE_Minimized (1L << 0)
-#define FWL_WGTSTATE_Maximized (2L << 0)
-#define FWL_WGTSTATE_Disabled (1L << 2)
-#define FWL_WGTSTATE_Deactivated (1L << 3)
-#define FWL_WGTSTATE_Focused (1L << 4)
-#define FWL_WGTSTATE_Invisible (1L << 5)
-#define FWL_WGTSTATE_MAX (6)
-#define FWL_WGTHITTEST_Unknown 0
-#define FWL_WGTHITTEST_Client 1
-#define FWL_WGTHITTEST_Left 2
-#define FWL_WGTHITTEST_Top 3
-#define FWL_WGTHITTEST_Right 4
-#define FWL_WGTHITTEST_Bottom 5
-#define FWL_WGTHITTEST_LeftTop 6
-#define FWL_WGTHITTEST_RightTop 7
-#define FWL_WGTHITTEST_LeftBottom 8
-#define FWL_WGTHITTEST_RightBottom 9
-#define FWL_WGTHITTEST_Icon 10
-#define FWL_WGTHITTEST_Titlebar 11
-#define FWL_WGTHITTEST_MinBox 12
-#define FWL_WGTHITTEST_MaxBox 13
-#define FWL_WGTHITTEST_CloseBox 14
-#define FWL_WGTHITTEST_HScrollBar 15
-#define FWL_WGTHITTEST_VScrollBar 16
-#define FWL_WGTHITTEST_Border 17
-#define FWL_WGTHITTEST_Edge 18
-#define FWL_WGTHITTEST_Edit 19
-#define FWL_WGTHITTEST_Transparent 20
-#define FWL_WGTHITTEST_MAX 21
-#define FWL_VKEY_LButton 0x01
-#define FWL_VKEY_RButton 0x02
-#define FWL_VKEY_MButton 0x04
-#define FWL_VKEY_Back 0x08
-#define FWL_VKEY_Tab 0x09
-#define FWL_VKEY_Clear 0x0C
-#define FWL_VKEY_Return 0x0D
-#define FWL_VKEY_Shift 0x10
-#define FWL_VKEY_Control 0x11
-#define FWL_VKEY_Menu 0x12
-#define FWL_VKEY_Pause 0x13
-#define FWL_VKEY_Capital 0x14
-#define FWL_VKEY_Kana 0x15
-#define FWL_VKEY_Hangul 0x15
-#define FWL_VKEY_Junja 0x17
-#define FWL_VKEY_Final 0x18
-#define FWL_VKEY_Hanja 0x19
-#define FWL_VKEY_Kanji 0x19
-#define FWL_VKEY_Escape 0x1B
-#define FWL_VKEY_Convert 0x1C
-#define FWL_VKEY_NonConvert 0x1D
-#define FWL_VKEY_Accept 0x1E
-#define FWL_VKEY_ModeChange 0x1F
-#define FWL_VKEY_Space 0x20
-#define FWL_VKEY_Prior 0x21
-#define FWL_VKEY_Next 0x22
-#define FWL_VKEY_End 0x23
-#define FWL_VKEY_Home 0x24
-#define FWL_VKEY_Left 0x25
-#define FWL_VKEY_Up 0x26
-#define FWL_VKEY_Right 0x27
-#define FWL_VKEY_Down 0x28
-#define FWL_VKEY_Select 0x29
-#define FWL_VKEY_Print 0x2A
-#define FWL_VKEY_Execute 0x2B
-#define FWL_VKEY_Snapshot 0x2C
-#define FWL_VKEY_Insert 0x2D
-#define FWL_VKEY_Delete 0x2E
-#define FWL_VKEY_Help 0x2F
-#define FWL_VKEY_0 0x30
-#define FWL_VKEY_1 0x31
-#define FWL_VKEY_2 0x32
-#define FWL_VKEY_3 0x33
-#define FWL_VKEY_4 0x34
-#define FWL_VKEY_5 0x35
-#define FWL_VKEY_6 0x36
-#define FWL_VKEY_7 0x37
-#define FWL_VKEY_8 0x38
-#define FWL_VKEY_9 0x39
-#define FWL_VKEY_A 0x41
-#define FWL_VKEY_B 0x42
-#define FWL_VKEY_C 0x43
-#define FWL_VKEY_D 0x44
-#define FWL_VKEY_E 0x45
-#define FWL_VKEY_F 0x46
-#define FWL_VKEY_G 0x47
-#define FWL_VKEY_H 0x48
-#define FWL_VKEY_I 0x49
-#define FWL_VKEY_J 0x4A
-#define FWL_VKEY_K 0x4B
-#define FWL_VKEY_L 0x4C
-#define FWL_VKEY_M 0x4D
-#define FWL_VKEY_N 0x4E
-#define FWL_VKEY_O 0x4F
-#define FWL_VKEY_P 0x50
-#define FWL_VKEY_Q 0x51
-#define FWL_VKEY_R 0x52
-#define FWL_VKEY_S 0x53
-#define FWL_VKEY_T 0x54
-#define FWL_VKEY_U 0x55
-#define FWL_VKEY_V 0x56
-#define FWL_VKEY_W 0x57
-#define FWL_VKEY_X 0x58
-#define FWL_VKEY_Y 0x59
-#define FWL_VKEY_Z 0x5A
-#define FWL_VKEY_LWin 0x5B
-#define FWL_VKEY_Command 0x5B
-#define FWL_VKEY_RWin 0x5C
-#define FWL_VKEY_Apps 0x5D
-#define FWL_VKEY_Sleep 0x5F
-#define FWL_VKEY_NumPad0 0x60
-#define FWL_VKEY_NumPad1 0x61
-#define FWL_VKEY_NumPad2 0x62
-#define FWL_VKEY_NumPad3 0x63
-#define FWL_VKEY_NumPad4 0x64
-#define FWL_VKEY_NumPad5 0x65
-#define FWL_VKEY_NumPad6 0x66
-#define FWL_VKEY_NumPad7 0x67
-#define FWL_VKEY_NumPad8 0x68
-#define FWL_VKEY_NumPad9 0x69
-#define FWL_VKEY_Multiply 0x6A
-#define FWL_VKEY_Add 0x6B
-#define FWL_VKEY_Separator 0x6C
-#define FWL_VKEY_Subtract 0x6D
-#define FWL_VKEY_Decimal 0x6E
-#define FWL_VKEY_Divide 0x6F
-#define FWL_VKEY_F1 0x70
-#define FWL_VKEY_F2 0x71
-#define FWL_VKEY_F3 0x72
-#define FWL_VKEY_F4 0x73
-#define FWL_VKEY_F5 0x74
-#define FWL_VKEY_F6 0x75
-#define FWL_VKEY_F7 0x76
-#define FWL_VKEY_F8 0x77
-#define FWL_VKEY_F9 0x78
-#define FWL_VKEY_F10 0x79
-#define FWL_VKEY_F11 0x7A
-#define FWL_VKEY_F12 0x7B
-#define FWL_VKEY_F13 0x7C
-#define FWL_VKEY_F14 0x7D
-#define FWL_VKEY_F15 0x7E
-#define FWL_VKEY_F16 0x7F
-#define FWL_VKEY_F17 0x80
-#define FWL_VKEY_F18 0x81
-#define FWL_VKEY_F19 0x82
-#define FWL_VKEY_F20 0x83
-#define FWL_VKEY_F21 0x84
-#define FWL_VKEY_F22 0x85
-#define FWL_VKEY_F23 0x86
-#define FWL_VKEY_F24 0x87
-#define FWL_VKEY_NunLock 0x90
-#define FWL_VKEY_Scroll 0x91
-#define FWL_VKEY_LShift 0xA0
-#define FWL_VKEY_RShift 0xA1
-#define FWL_VKEY_LControl 0xA2
-#define FWL_VKEY_RControl 0xA3
-#define FWL_VKEY_LMenu 0xA4
-#define FWL_VKEY_RMenu 0xA5
-#define FWL_VKEY_BROWSER_Back 0xA6
-#define FWL_VKEY_BROWSER_Forward 0xA7
-#define FWL_VKEY_BROWSER_Refresh 0xA8
-#define FWL_VKEY_BROWSER_Stop 0xA9
-#define FWL_VKEY_BROWSER_Search 0xAA
-#define FWL_VKEY_BROWSER_Favorites 0xAB
-#define FWL_VKEY_BROWSER_Home 0xAC
-#define FWL_VKEY_VOLUME_Mute 0xAD
-#define FWL_VKEY_VOLUME_Down 0xAE
-#define FWL_VKEY_VOLUME_Up 0xAF
-#define FWL_VKEY_MEDIA_NEXT_Track 0xB0
-#define FWL_VKEY_MEDIA_PREV_Track 0xB1
-#define FWL_VKEY_MEDIA_Stop 0xB2
-#define FWL_VKEY_MEDIA_PLAY_Pause 0xB3
-#define FWL_VKEY_MEDIA_LAUNCH_Mail 0xB4
-#define FWL_VKEY_MEDIA_LAUNCH_MEDIA_Select 0xB5
-#define FWL_VKEY_MEDIA_LAUNCH_APP1 0xB6
-#define FWL_VKEY_MEDIA_LAUNCH_APP2 0xB7
-#define FWL_VKEY_OEM_1 0xBA
-#define FWL_VKEY_OEM_Plus 0xBB
-#define FWL_VKEY_OEM_Comma 0xBC
-#define FWL_VKEY_OEM_Minus 0xBD
-#define FWL_VKEY_OEM_Period 0xBE
-#define FWL_VKEY_OEM_2 0xBF
-#define FWL_VKEY_OEM_3 0xC0
-#define FWL_VKEY_OEM_4 0xDB
-#define FWL_VKEY_OEM_5 0xDC
-#define FWL_VKEY_OEM_6 0xDD
-#define FWL_VKEY_OEM_7 0xDE
-#define FWL_VKEY_OEM_8 0xDF
-#define FWL_VKEY_OEM_102 0xE2
-#define FWL_VKEY_ProcessKey 0xE5
-#define FWL_VKEY_Packet 0xE7
-#define FWL_VKEY_Attn 0xF6
-#define FWL_VKEY_Crsel 0xF7
-#define FWL_VKEY_Exsel 0xF8
-#define FWL_VKEY_Ereof 0xF9
-#define FWL_VKEY_Play 0xFA
-#define FWL_VKEY_Zoom 0xFB
-#define FWL_VKEY_NoName 0xFC
-#define FWL_VKEY_PA1 0xFD
-#define FWL_VKEY_OEM_Clear 0xFE
-#define FWL_VKEY_Unknown 0
-#define FWL_VKEYSTATE_Toggled 0x0001
-#define FWL_VKEYSTATE_Down 0x0100
+#define FWL_WGTSTYLE_OverLapper (0L << 0)
+#define FWL_WGTSTYLE_Popup (1L << 0)
+#define FWL_WGTSTYLE_Child (2L << 0)
+#define FWL_WGTSTYLE_Border (1L << 2)
+#define FWL_WGTSTYLE_Caption (1L << 3)
+#define FWL_WGTSTYLE_NarrowCaption (1L << 4)
+#define FWL_WGTSTYLE_Icon (1L << 5)
+#define FWL_WGTSTYLE_MinimizeBox (1L << 6)
+#define FWL_WGTSTYLE_MaximizeBox (1L << 7)
+#define FWL_WGTSTYLE_CloseBox (1L << 8)
+#define FWL_WGTSTYLE_HScroll (1L << 9)
+#define FWL_WGTSTYLE_VScroll (1L << 11)
+#define FWL_WGTSTYLE_LeftScrollbar (1L << 12)
+#define FWL_WGTSTYLE_LeftAlignment (0L << 13)
+#define FWL_WGTSTYLE_CenterAlignment (1L << 13)
+#define FWL_WGTSTYLE_RightAlignment (2L << 13)
+#define FWL_WGTSTYLE_TopAlignment (0L << 15)
+#define FWL_WGTSTYLE_VCenterAlignment (1L << 15)
+#define FWL_WGTSTYLE_BottomAlignment (2L << 15)
+#define FWL_WGTSTYLE_RTLReading (1L << 17)
+#define FWL_WGTSTYLE_RTLLayout (1L << 18)
+#define FWL_WGTSTYLE_EdgeNone (0L << 19)
+#define FWL_WGTSTYLE_EdgeFlat (1L << 19)
+#define FWL_WGTSTYLE_EdgeRaised (2L << 19)
+#define FWL_WGTSTYLE_EdgeSunken (3L << 19)
+#define FWL_WGTSTYLE_EdgeMask (3L << 19)
+#define FWL_WGTSTYLE_Shadow (3L << 21)
+#define FWL_WGTSTYLE_Group (1L << 22)
+#define FWL_WGTSTYLE_TabStop (1L << 23)
+#define FWL_WGTSTYLE_Offscreen (1L << 24)
+#define FWL_WGTSTYLE_DragAcceptFiles (1L << 25)
+#define FWL_WGTSTYLE_TopMost (1L << 26)
+#define FWL_WGTSTYLE_TransParent (1L << 27)
+#define FWL_WGTSTYLE_NoBackground (1L << 28)
+#define FWL_WGTSTYLE_WindowTypeMask (3L << 0)
+#define FWL_WGTSTATE_Restored (0L << 0)
+#define FWL_WGTSTATE_Minimized (1L << 0)
+#define FWL_WGTSTATE_Maximized (2L << 0)
+#define FWL_WGTSTATE_Disabled (1L << 2)
+#define FWL_WGTSTATE_Deactivated (1L << 3)
+#define FWL_WGTSTATE_Focused (1L << 4)
+#define FWL_WGTSTATE_Invisible (1L << 5)
+#define FWL_WGTSTATE_MAX (6)
+#define FWL_WGTHITTEST_Unknown 0
+#define FWL_WGTHITTEST_Client 1
+#define FWL_WGTHITTEST_Left 2
+#define FWL_WGTHITTEST_Top 3
+#define FWL_WGTHITTEST_Right 4
+#define FWL_WGTHITTEST_Bottom 5
+#define FWL_WGTHITTEST_LeftTop 6
+#define FWL_WGTHITTEST_RightTop 7
+#define FWL_WGTHITTEST_LeftBottom 8
+#define FWL_WGTHITTEST_RightBottom 9
+#define FWL_WGTHITTEST_Icon 10
+#define FWL_WGTHITTEST_Titlebar 11
+#define FWL_WGTHITTEST_MinBox 12
+#define FWL_WGTHITTEST_MaxBox 13
+#define FWL_WGTHITTEST_CloseBox 14
+#define FWL_WGTHITTEST_HScrollBar 15
+#define FWL_WGTHITTEST_VScrollBar 16
+#define FWL_WGTHITTEST_Border 17
+#define FWL_WGTHITTEST_Edge 18
+#define FWL_WGTHITTEST_Edit 19
+#define FWL_WGTHITTEST_Transparent 20
+#define FWL_WGTHITTEST_MAX 21
+#define FWL_VKEY_LButton 0x01
+#define FWL_VKEY_RButton 0x02
+#define FWL_VKEY_MButton 0x04
+#define FWL_VKEY_Back 0x08
+#define FWL_VKEY_Tab 0x09
+#define FWL_VKEY_Clear 0x0C
+#define FWL_VKEY_Return 0x0D
+#define FWL_VKEY_Shift 0x10
+#define FWL_VKEY_Control 0x11
+#define FWL_VKEY_Menu 0x12
+#define FWL_VKEY_Pause 0x13
+#define FWL_VKEY_Capital 0x14
+#define FWL_VKEY_Kana 0x15
+#define FWL_VKEY_Hangul 0x15
+#define FWL_VKEY_Junja 0x17
+#define FWL_VKEY_Final 0x18
+#define FWL_VKEY_Hanja 0x19
+#define FWL_VKEY_Kanji 0x19
+#define FWL_VKEY_Escape 0x1B
+#define FWL_VKEY_Convert 0x1C
+#define FWL_VKEY_NonConvert 0x1D
+#define FWL_VKEY_Accept 0x1E
+#define FWL_VKEY_ModeChange 0x1F
+#define FWL_VKEY_Space 0x20
+#define FWL_VKEY_Prior 0x21
+#define FWL_VKEY_Next 0x22
+#define FWL_VKEY_End 0x23
+#define FWL_VKEY_Home 0x24
+#define FWL_VKEY_Left 0x25
+#define FWL_VKEY_Up 0x26
+#define FWL_VKEY_Right 0x27
+#define FWL_VKEY_Down 0x28
+#define FWL_VKEY_Select 0x29
+#define FWL_VKEY_Print 0x2A
+#define FWL_VKEY_Execute 0x2B
+#define FWL_VKEY_Snapshot 0x2C
+#define FWL_VKEY_Insert 0x2D
+#define FWL_VKEY_Delete 0x2E
+#define FWL_VKEY_Help 0x2F
+#define FWL_VKEY_0 0x30
+#define FWL_VKEY_1 0x31
+#define FWL_VKEY_2 0x32
+#define FWL_VKEY_3 0x33
+#define FWL_VKEY_4 0x34
+#define FWL_VKEY_5 0x35
+#define FWL_VKEY_6 0x36
+#define FWL_VKEY_7 0x37
+#define FWL_VKEY_8 0x38
+#define FWL_VKEY_9 0x39
+#define FWL_VKEY_A 0x41
+#define FWL_VKEY_B 0x42
+#define FWL_VKEY_C 0x43
+#define FWL_VKEY_D 0x44
+#define FWL_VKEY_E 0x45
+#define FWL_VKEY_F 0x46
+#define FWL_VKEY_G 0x47
+#define FWL_VKEY_H 0x48
+#define FWL_VKEY_I 0x49
+#define FWL_VKEY_J 0x4A
+#define FWL_VKEY_K 0x4B
+#define FWL_VKEY_L 0x4C
+#define FWL_VKEY_M 0x4D
+#define FWL_VKEY_N 0x4E
+#define FWL_VKEY_O 0x4F
+#define FWL_VKEY_P 0x50
+#define FWL_VKEY_Q 0x51
+#define FWL_VKEY_R 0x52
+#define FWL_VKEY_S 0x53
+#define FWL_VKEY_T 0x54
+#define FWL_VKEY_U 0x55
+#define FWL_VKEY_V 0x56
+#define FWL_VKEY_W 0x57
+#define FWL_VKEY_X 0x58
+#define FWL_VKEY_Y 0x59
+#define FWL_VKEY_Z 0x5A
+#define FWL_VKEY_LWin 0x5B
+#define FWL_VKEY_Command 0x5B
+#define FWL_VKEY_RWin 0x5C
+#define FWL_VKEY_Apps 0x5D
+#define FWL_VKEY_Sleep 0x5F
+#define FWL_VKEY_NumPad0 0x60
+#define FWL_VKEY_NumPad1 0x61
+#define FWL_VKEY_NumPad2 0x62
+#define FWL_VKEY_NumPad3 0x63
+#define FWL_VKEY_NumPad4 0x64
+#define FWL_VKEY_NumPad5 0x65
+#define FWL_VKEY_NumPad6 0x66
+#define FWL_VKEY_NumPad7 0x67
+#define FWL_VKEY_NumPad8 0x68
+#define FWL_VKEY_NumPad9 0x69
+#define FWL_VKEY_Multiply 0x6A
+#define FWL_VKEY_Add 0x6B
+#define FWL_VKEY_Separator 0x6C
+#define FWL_VKEY_Subtract 0x6D
+#define FWL_VKEY_Decimal 0x6E
+#define FWL_VKEY_Divide 0x6F
+#define FWL_VKEY_F1 0x70
+#define FWL_VKEY_F2 0x71
+#define FWL_VKEY_F3 0x72
+#define FWL_VKEY_F4 0x73
+#define FWL_VKEY_F5 0x74
+#define FWL_VKEY_F6 0x75
+#define FWL_VKEY_F7 0x76
+#define FWL_VKEY_F8 0x77
+#define FWL_VKEY_F9 0x78
+#define FWL_VKEY_F10 0x79
+#define FWL_VKEY_F11 0x7A
+#define FWL_VKEY_F12 0x7B
+#define FWL_VKEY_F13 0x7C
+#define FWL_VKEY_F14 0x7D
+#define FWL_VKEY_F15 0x7E
+#define FWL_VKEY_F16 0x7F
+#define FWL_VKEY_F17 0x80
+#define FWL_VKEY_F18 0x81
+#define FWL_VKEY_F19 0x82
+#define FWL_VKEY_F20 0x83
+#define FWL_VKEY_F21 0x84
+#define FWL_VKEY_F22 0x85
+#define FWL_VKEY_F23 0x86
+#define FWL_VKEY_F24 0x87
+#define FWL_VKEY_NunLock 0x90
+#define FWL_VKEY_Scroll 0x91
+#define FWL_VKEY_LShift 0xA0
+#define FWL_VKEY_RShift 0xA1
+#define FWL_VKEY_LControl 0xA2
+#define FWL_VKEY_RControl 0xA3
+#define FWL_VKEY_LMenu 0xA4
+#define FWL_VKEY_RMenu 0xA5
+#define FWL_VKEY_BROWSER_Back 0xA6
+#define FWL_VKEY_BROWSER_Forward 0xA7
+#define FWL_VKEY_BROWSER_Refresh 0xA8
+#define FWL_VKEY_BROWSER_Stop 0xA9
+#define FWL_VKEY_BROWSER_Search 0xAA
+#define FWL_VKEY_BROWSER_Favorites 0xAB
+#define FWL_VKEY_BROWSER_Home 0xAC
+#define FWL_VKEY_VOLUME_Mute 0xAD
+#define FWL_VKEY_VOLUME_Down 0xAE
+#define FWL_VKEY_VOLUME_Up 0xAF
+#define FWL_VKEY_MEDIA_NEXT_Track 0xB0
+#define FWL_VKEY_MEDIA_PREV_Track 0xB1
+#define FWL_VKEY_MEDIA_Stop 0xB2
+#define FWL_VKEY_MEDIA_PLAY_Pause 0xB3
+#define FWL_VKEY_MEDIA_LAUNCH_Mail 0xB4
+#define FWL_VKEY_MEDIA_LAUNCH_MEDIA_Select 0xB5
+#define FWL_VKEY_MEDIA_LAUNCH_APP1 0xB6
+#define FWL_VKEY_MEDIA_LAUNCH_APP2 0xB7
+#define FWL_VKEY_OEM_1 0xBA
+#define FWL_VKEY_OEM_Plus 0xBB
+#define FWL_VKEY_OEM_Comma 0xBC
+#define FWL_VKEY_OEM_Minus 0xBD
+#define FWL_VKEY_OEM_Period 0xBE
+#define FWL_VKEY_OEM_2 0xBF
+#define FWL_VKEY_OEM_3 0xC0
+#define FWL_VKEY_OEM_4 0xDB
+#define FWL_VKEY_OEM_5 0xDC
+#define FWL_VKEY_OEM_6 0xDD
+#define FWL_VKEY_OEM_7 0xDE
+#define FWL_VKEY_OEM_8 0xDF
+#define FWL_VKEY_OEM_102 0xE2
+#define FWL_VKEY_ProcessKey 0xE5
+#define FWL_VKEY_Packet 0xE7
+#define FWL_VKEY_Attn 0xF6
+#define FWL_VKEY_Crsel 0xF7
+#define FWL_VKEY_Exsel 0xF8
+#define FWL_VKEY_Ereof 0xF9
+#define FWL_VKEY_Play 0xFA
+#define FWL_VKEY_Zoom 0xFB
+#define FWL_VKEY_NoName 0xFC
+#define FWL_VKEY_PA1 0xFD
+#define FWL_VKEY_OEM_Clear 0xFE
+#define FWL_VKEY_Unknown 0
+#define FWL_VKEYSTATE_Toggled 0x0001
+#define FWL_VKEYSTATE_Down 0x0100
#endif
diff --git a/xfa/include/fwl/core/fwl_widgetmgr.h b/xfa/include/fwl/core/fwl_widgetmgr.h index f658476636..c191cae0c2 100644 --- a/xfa/include/fwl/core/fwl_widgetmgr.h +++ b/xfa/include/fwl/core/fwl_widgetmgr.h @@ -10,40 +10,46 @@ class IFWL_Widget; class IFWL_WidgetMgr;
class IFWL_WidgetMgrDelegate;
enum FWL_WGTRELATION {
- FWL_WGTRELATION_Parent = 0,
- FWL_WGTRELATION_Owner,
- FWL_WGTRELATION_FirstSibling,
- FWL_WGTRELATION_PriorSibling,
- FWL_WGTRELATION_NextSibling,
- FWL_WGTRELATION_LastSibling,
- FWL_WGTRELATION_FirstChild,
- FWL_WGTRELATION_LastChild,
- FWL_WGTRELATION_SystemForm
+ FWL_WGTRELATION_Parent = 0,
+ FWL_WGTRELATION_Owner,
+ FWL_WGTRELATION_FirstSibling,
+ FWL_WGTRELATION_PriorSibling,
+ FWL_WGTRELATION_NextSibling,
+ FWL_WGTRELATION_LastSibling,
+ FWL_WGTRELATION_FirstChild,
+ FWL_WGTRELATION_LastChild,
+ FWL_WGTRELATION_SystemForm
};
-class IFWL_WidgetMgr
-{
-public:
- virtual ~IFWL_WidgetMgr() {}
- virtual int32_t CountWidgets(IFWL_Widget *pParent = NULL) = 0;
- virtual IFWL_Widget* GetWidget(int32_t nIndex, IFWL_Widget *pParent = NULL) = 0;
- virtual IFWL_Widget* GetWidget(IFWL_Widget *pWidget, FWL_WGTRELATION eRelation) = 0;
- virtual int32_t GetWidgetIndex(IFWL_Widget *pWidget) = 0;
- virtual FX_BOOL SetWidgetIndex(IFWL_Widget *pWidget, int32_t nIndex) = 0;
- virtual FX_BOOL IsWidget(void* pObj) = 0;
- virtual FWL_ERR RepaintWidget(IFWL_Widget *pWidget, const CFX_RectF *pRect = NULL) = 0;
- virtual FX_DWORD GetCapability() = 0;
+class IFWL_WidgetMgr {
+ public:
+ virtual ~IFWL_WidgetMgr() {}
+ virtual int32_t CountWidgets(IFWL_Widget* pParent = NULL) = 0;
+ virtual IFWL_Widget* GetWidget(int32_t nIndex,
+ IFWL_Widget* pParent = NULL) = 0;
+ virtual IFWL_Widget* GetWidget(IFWL_Widget* pWidget,
+ FWL_WGTRELATION eRelation) = 0;
+ virtual int32_t GetWidgetIndex(IFWL_Widget* pWidget) = 0;
+ virtual FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex) = 0;
+ virtual FX_BOOL IsWidget(void* pObj) = 0;
+ virtual FWL_ERR RepaintWidget(IFWL_Widget* pWidget,
+ const CFX_RectF* pRect = NULL) = 0;
+ virtual FX_DWORD GetCapability() = 0;
};
-IFWL_WidgetMgr* FWL_GetWidgetMgr();
-FX_BOOL FWL_WidgetIsChild(IFWL_Widget *parent, IFWL_Widget *find);
-#define FWL_WGTMGR_DisableThread 0x00000001
-#define FWL_WGTMGR_DisableForm 0x00000002
-class IFWL_WidgetMgrDelegate
-{
-public:
- virtual ~IFWL_WidgetMgrDelegate() {}
- virtual FWL_ERR OnSetCapability(FX_DWORD dwCapability = FWL_WGTMGR_DisableThread) = 0;
- virtual int32_t OnProcessMessageToForm(CFWL_Message *pMessage) = 0;
- virtual FWL_ERR OnDrawWidget(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL) = 0;
+IFWL_WidgetMgr* FWL_GetWidgetMgr();
+FX_BOOL FWL_WidgetIsChild(IFWL_Widget* parent, IFWL_Widget* find);
+#define FWL_WGTMGR_DisableThread 0x00000001
+#define FWL_WGTMGR_DisableForm 0x00000002
+class IFWL_WidgetMgrDelegate {
+ public:
+ virtual ~IFWL_WidgetMgrDelegate() {}
+ virtual FWL_ERR OnSetCapability(
+ FX_DWORD dwCapability = FWL_WGTMGR_DisableThread) = 0;
+ virtual int32_t OnProcessMessageToForm(CFWL_Message* pMessage) = 0;
+ virtual FWL_ERR OnDrawWidget(IFWL_Widget* pWidget,
+ CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix = NULL) = 0;
};
-FWL_ERR FWL_WidgetMgrSnapshot(IFWL_Widget *pWidget, const CFX_WideString *saveFile, const CFX_Matrix *pMatrix = NULL);
+FWL_ERR FWL_WidgetMgrSnapshot(IFWL_Widget* pWidget,
+ const CFX_WideString* saveFile,
+ const CFX_Matrix* pMatrix = NULL);
#endif
|