summaryrefslogtreecommitdiff
path: root/xfa/include
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/include')
-rw-r--r--xfa/include/foxitxfa.h20
-rw-r--r--xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h36
-rw-r--r--xfa/include/fwl/adapter/fwl_adaptercursormgr.h37
-rw-r--r--xfa/include/fwl/adapter/fwl_adaptermonitormgr.h23
-rw-r--r--xfa/include/fwl/adapter/fwl_adapternative.h29
-rw-r--r--xfa/include/fwl/adapter/fwl_adapterthreadmgr.h33
-rw-r--r--xfa/include/fwl/adapter/fwl_adaptertimermgr.h17
-rw-r--r--xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h55
-rw-r--r--xfa/include/fwl/adapter/fwl_sdadapterimp.h72
-rw-r--r--xfa/include/fwl/basewidget/fwl_barcode.h63
-rw-r--r--xfa/include/fwl/basewidget/fwl_caret.h32
-rw-r--r--xfa/include/fwl/basewidget/fwl_checkbox.h95
-rw-r--r--xfa/include/fwl/basewidget/fwl_combobox.h139
-rw-r--r--xfa/include/fwl/basewidget/fwl_datetimepicker.h101
-rw-r--r--xfa/include/fwl/basewidget/fwl_edit.h165
-rw-r--r--xfa/include/fwl/basewidget/fwl_listbox.h110
-rw-r--r--xfa/include/fwl/basewidget/fwl_menu.h15
-rw-r--r--xfa/include/fwl/basewidget/fwl_monthcalendar.h130
-rw-r--r--xfa/include/fwl/basewidget/fwl_picturebox.h55
-rw-r--r--xfa/include/fwl/basewidget/fwl_pushbutton.h57
-rw-r--r--xfa/include/fwl/basewidget/fwl_scrollbar.h73
-rw-r--r--xfa/include/fwl/basewidget/fwl_spinbutton.h43
-rw-r--r--xfa/include/fwl/basewidget/fwl_tooltipctrl.h45
-rw-r--r--xfa/include/fwl/basewidget/fxmath_barcode.h41
-rw-r--r--xfa/include/fwl/core/fwl_app.h35
-rw-r--r--xfa/include/fwl/core/fwl_content.h27
-rw-r--r--xfa/include/fwl/core/fwl_error.h49
-rw-r--r--xfa/include/fwl/core/fwl_form.h83
-rw-r--r--xfa/include/fwl/core/fwl_grid.h76
-rw-r--r--xfa/include/fwl/core/fwl_note.h389
-rw-r--r--xfa/include/fwl/core/fwl_panel.h40
-rw-r--r--xfa/include/fwl/core/fwl_target.h25
-rw-r--r--xfa/include/fwl/core/fwl_theme.h91
-rw-r--r--xfa/include/fwl/core/fwl_thread.h56
-rw-r--r--xfa/include/fwl/core/fwl_timer.h20
-rw-r--r--xfa/include/fwl/core/fwl_widget.h122
-rw-r--r--xfa/include/fwl/core/fwl_widgetdef.h247
-rw-r--r--xfa/include/fwl/core/fwl_widgetmgr.h47
-rw-r--r--xfa/include/fwl/fwl.h76
-rw-r--r--xfa/include/fwl/lightwidget/app.h25
-rw-r--r--xfa/include/fwl/lightwidget/barcode.h177
-rw-r--r--xfa/include/fwl/lightwidget/caret.h25
-rw-r--r--xfa/include/fwl/lightwidget/checkbox.h39
-rw-r--r--xfa/include/fwl/lightwidget/combobox.h115
-rw-r--r--xfa/include/fwl/lightwidget/datetimepicker.h58
-rw-r--r--xfa/include/fwl/lightwidget/edit.h57
-rw-r--r--xfa/include/fwl/lightwidget/listbox.h98
-rw-r--r--xfa/include/fwl/lightwidget/picturebox.h65
-rw-r--r--xfa/include/fwl/lightwidget/pushbutton.h37
-rw-r--r--xfa/include/fwl/lightwidget/scrollbar.h32
-rw-r--r--xfa/include/fwl/lightwidget/theme.h39
-rw-r--r--xfa/include/fwl/lightwidget/tooltipctrl.h54
-rw-r--r--xfa/include/fwl/lightwidget/widget.h101
-rw-r--r--xfa/include/fwl/theme/barcodetp.h19
-rw-r--r--xfa/include/fwl/theme/carettp.h21
-rw-r--r--xfa/include/fwl/theme/checkboxtp.h48
-rw-r--r--xfa/include/fwl/theme/comboboxtp.h23
-rw-r--r--xfa/include/fwl/theme/datetimepickertp.h26
-rw-r--r--xfa/include/fwl/theme/edittp.h21
-rw-r--r--xfa/include/fwl/theme/formtp.h74
-rw-r--r--xfa/include/fwl/theme/listboxtp.h24
-rw-r--r--xfa/include/fwl/theme/monthcalendartp.h48
-rw-r--r--xfa/include/fwl/theme/pictureboxtp.h19
-rw-r--r--xfa/include/fwl/theme/pushbuttontp.h41
-rw-r--r--xfa/include/fwl/theme/scrollbartp.h36
-rw-r--r--xfa/include/fwl/theme/utils.h87
-rw-r--r--xfa/include/fwl/theme/widgettp.h126
-rw-r--r--xfa/include/fxbarcode/BC_BarCode.h249
-rw-r--r--xfa/include/fxfa/fxfa.h622
-rw-r--r--xfa/include/fxfa/fxfa_basic.h1073
-rw-r--r--xfa/include/fxfa/fxfa_objectacc.h931
-rw-r--r--xfa/include/fxfa/fxfa_widget.h101
-rw-r--r--xfa/include/fxgraphics/fx_graphics.h511
-rw-r--r--xfa/include/fxjse/fxjse.h125
74 files changed, 8016 insertions, 0 deletions
diff --git a/xfa/include/foxitxfa.h b/xfa/include/foxitxfa.h
new file mode 100644
index 0000000000..26ab6cd8f3
--- /dev/null
+++ b/xfa/include/foxitxfa.h
@@ -0,0 +1,20 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FOXIT_XFA_H_
+#define _FOXIT_XFA_H_
+#include "../../core/include/fxcrt/fx_ext.h"
+#include "../../core/include/fxge/fx_ge.h"
+#include "../../core/include/fxcodec/fx_codec.h"
+#include "../../core/include/fpdfapi/fpdfapi.h"
+#include "../../core/include/fdrm/fx_crypt.h"
+#include "../../core/include/fpdfdoc/fpdf_doc.h"
+#include "./fxbarcode/BC_BarCode.h"
+#include "./fxgraphics/fx_graphics.h"
+#include "./fwl/fwl.h"
+#include "./fxjse/fxjse.h"
+#include "./fxfa/fxfa.h"
+#endif
diff --git a/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h b/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h
new file mode 100644
index 0000000000..82a098ebbb
--- /dev/null
+++ b/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h
@@ -0,0 +1,36 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_ADAPTER_CLIPBOARDMGR_H
+#define _FWL_ADAPTER_CLIPBOARDMGR_H
+class IFWL_Widget;
+class IFWL_AdapterClipboardMgr;
+enum FWL_CLIPBOARDFORMAT {
+ FWL_CLIPBOARDFORMAT_Dib,
+ FWL_CLIPBOARDFORMAT_Text,
+ FWL_CLIPBOARDFORMAT_UncodeText,
+};
+typedef struct _FWL_HCLIPBOARDDATA {
+ FX_LPVOID pData;
+} * FWL_HCLIPBOARDDATA;
+class IFWL_AdapterClipboardMgr
+{
+public:
+ virtual FWL_ERR Empty() = 0;
+ virtual FX_BOOL IsDataAvailable(FX_DWORD dwFormat) = 0;
+ virtual FWL_HCLIPBOARDDATA GetData(FX_DWORD dwFormat) = 0;
+ virtual FWL_ERR SetData(FX_DWORD dwFormat, FX_BYTE *pBuf, FX_INT32 iSize) = 0;
+ virtual FX_INT32 GetDataSize(FWL_HCLIPBOARDDATA hData) = 0;
+ virtual FX_LPVOID LockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0;
+ virtual FX_BOOL UnLockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0;
+ virtual FWL_ERR SetStringData(FX_WSTR ws) = 0;
+ virtual FWL_ERR SetStringData(FX_BSTR bs) = 0;
+ virtual FWL_ERR GetStringData(CFX_WideString &ws) = 0;
+ virtual FWL_ERR GetStringData(CFX_ByteString &bs) = 0;
+ virtual FWL_ERR EnumFormats(CFX_DWordArray &formats) = 0;
+ virtual FX_DWORD RegisterFormat(FX_WSTR wsFormat) = 0;
+};
+#endif
diff --git a/xfa/include/fwl/adapter/fwl_adaptercursormgr.h b/xfa/include/fwl/adapter/fwl_adaptercursormgr.h
new file mode 100644
index 0000000000..225a22ca2f
--- /dev/null
+++ b/xfa/include/fwl/adapter/fwl_adaptercursormgr.h
@@ -0,0 +1,37 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_ADAPTER_CURSORMGR_H
+#define _FWL_ADAPTER_CURSORMGR_H
+class CFX_DIBitmap;
+class IFWL_AdapterCursorMgr;
+enum FWL_CURSORTYPE {
+ FWL_CURSORTYPE_Arrow = 0,
+ FWL_CURSORTYPE_Cross,
+ FWL_CURSORTYPE_Hand,
+ FWL_CURSORTYPE_InputBeam,
+ FWL_CURSORTYPE_Wait,
+ FWL_CURSORTYPE_SizeAll,
+ FWL_CURSORTYPE_SizeNWSE,
+ FWL_CURSORTYPE_SizeNESW,
+ FWL_CURSORTYPE_SizeWE,
+ FWL_CURSORTYPE_SizeNS,
+ FWL_CURSORTYPE_Prohibition,
+ FWL_CURSORTYPE_Help
+};
+typedef struct _FWL_HCURSOR {
+ FX_LPVOID pData;
+} *FWL_HCURSOR;
+class IFWL_AdapterCursorMgr
+{
+public:
+ virtual FWL_HCURSOR GetSystemCursor(FWL_CURSORTYPE eCursorType) = 0;
+ virtual FWL_HCURSOR GetCustomCursor(const CFX_DIBitmap *pBitmap, FX_FLOAT xHotspot = 0, FX_FLOAT yHotspot = 0) = 0;
+ virtual FWL_ERR SetCursor(FWL_HCURSOR hCursor) = 0;
+ virtual FWL_ERR ShowCursor(FX_BOOL bShow) = 0;
+ virtual FWL_ERR GetCursorPos(CFX_PointF &pt) = 0;
+};
+#endif
diff --git a/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h b/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h
new file mode 100644
index 0000000000..bd194964c9
--- /dev/null
+++ b/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h
@@ -0,0 +1,23 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_ADAPTER_MONITORMGR_H
+#define _FWL_ADAPTER_MONITORMGR_H
+class IFWL_AdapterMonitorMgr;
+typedef struct _FWL_HMONITOR {
+ FX_LPVOID pData;
+} *FWL_HMONITOR;
+class IFWL_AdapterMonitorMgr
+{
+public:
+ virtual FX_INT32 CountMonitors() = 0;
+ virtual FWL_HMONITOR GetMonitor(FX_INT32 nIndex) = 0;
+ virtual FWL_HMONITOR GetCurrentMonitor() = 0;
+ virtual FWL_HMONITOR GetMonitorByRect(const CFX_RectF &rect) = 0;
+ virtual FWL_HMONITOR GetMonitorByPoint(FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FWL_ERR GetMonitorSize(FWL_HMONITOR hMonitor, FX_FLOAT &fx, FX_FLOAT &fy) = 0;
+};
+#endif
diff --git a/xfa/include/fwl/adapter/fwl_adapternative.h b/xfa/include/fwl/adapter/fwl_adapternative.h
new file mode 100644
index 0000000000..55532945f9
--- /dev/null
+++ b/xfa/include/fwl/adapter/fwl_adapternative.h
@@ -0,0 +1,29 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_ADAPTER_NATIVE_H
+#define _FWL_ADAPTER_NATIVE_H
+class IFWL_WidgetMgrDelegate;
+class IFWL_AdapterWidgetMgr;
+class IFWL_AdapterThreadMgr;
+class IFWL_AdapterTimerMgr;
+class IFWL_AdapterCursorMgr;
+class IFWL_AdapterMonitorMgr;
+class IFWL_AdapterClipboardMgr;
+class IFWL_AdapterNative;
+class IFWL_AdapterNative
+{
+public:
+ virtual IFWL_AdapterWidgetMgr* GetWidgetMgr(IFWL_WidgetMgrDelegate *pDelegate) = 0;
+ virtual IFWL_AdapterThreadMgr* GetThreadMgr() = 0;
+ virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0;
+ virtual IFWL_AdapterCursorMgr* GetCursorMgr() = 0;
+ virtual IFWL_AdapterMonitorMgr* GetMonitorMgr() = 0;
+ virtual IFWL_AdapterClipboardMgr* GetClipboardMgr() = 0;
+};
+IFWL_AdapterNative* FWL_CreateFuelAdapterNative();
+void FWL_ReleaseFuelAdapterNative(IFWL_AdapterNative *pAdapterNative);
+#endif
diff --git a/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h b/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h
new file mode 100644
index 0000000000..ad6cd58245
--- /dev/null
+++ b/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h
@@ -0,0 +1,33 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_ADAPTER_THREAD_H
+#define _FWL_ADAPTER_THREAD_H
+class IFWL_Thread;
+class IFWL_AdapterThreadMgr;
+class IFWL_AdapterMutex;
+class IFWL_AdapterSemaphore;
+class IFWL_AdapterThreadMgr
+{
+public:
+ virtual FWL_ERR Start(IFWL_Thread *pThread, FWL_HTHREAD &hThread, FX_BOOL bSuspended = FALSE) = 0;
+ virtual FWL_ERR Resume(FWL_HTHREAD hThread) = 0;
+ virtual FWL_ERR Suspend(FWL_HTHREAD hThread) = 0;
+ virtual FWL_ERR Kill(FWL_HTHREAD hThread, FX_INT32 iExitCode) = 0;
+ virtual FWL_ERR Stop(FWL_HTHREAD hThread, FX_INT32 iExitCode) = 0;
+ virtual IFWL_Thread* GetCurrentThread() = 0;
+};
+class IFWL_AdapterSemaphore
+{
+public:
+ static IFWL_AdapterSemaphore * Create();
+ virtual FWL_ERR Destroy() = 0;
+ virtual FWL_ERR Wait() const = 0;
+ virtual FWL_ERR Post() = 0;
+ virtual FWL_ERR Value(FX_DWORD &val) const = 0;
+ virtual FWL_ERR Reset(FX_INT32 init) = 0;
+};
+#endif
diff --git a/xfa/include/fwl/adapter/fwl_adaptertimermgr.h b/xfa/include/fwl/adapter/fwl_adaptertimermgr.h
new file mode 100644
index 0000000000..4c7f7e76dc
--- /dev/null
+++ b/xfa/include/fwl/adapter/fwl_adaptertimermgr.h
@@ -0,0 +1,17 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_ADAPTER_TIMERMGR_H
+#define _FWL_ADAPTER_TIMERMGR_H
+class IFWL_Timer;
+class IFWL_AdapterTimerMgr;
+class IFWL_AdapterTimerMgr
+{
+public:
+ virtual FWL_ERR Start(IFWL_Timer *pTimer, FX_DWORD dwElapse, FWL_HTIMER &hTimer, FX_BOOL bImmediately = TRUE) = 0;
+ virtual FWL_ERR Stop(FWL_HTIMER hTimer) = 0;
+};
+#endif
diff --git a/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h b/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h
new file mode 100644
index 0000000000..fbc296f7fa
--- /dev/null
+++ b/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h
@@ -0,0 +1,55 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_ADAPTER_WIDGETMGR_H
+#define _FWL_ADAPTER_WIDGETMGR_H
+class IFWL_Widget;
+class IFWL_Menu;
+class IFWL_MenuDP;
+class CFX_Path;
+class CFX_DIBitmap;
+class IFWL_AdapterWidgetMgr;
+class IFWL_AdapterMessageHook;
+class IFWL_AppDelegate;
+class IFWL_AdapterWidgetMgr
+{
+public:
+ virtual FWL_ERR CreateWidget(IFWL_Widget *pWidget, IFWL_Widget *pParent = NULL) = 0;
+ virtual FWL_ERR DestroyWidget(IFWL_Widget *pWidget) = 0;
+ virtual FWL_ERR GetWidgetRect(IFWL_Widget *pWidget, CFX_RectF &rect) = 0;
+ virtual FWL_ERR SetWidgetRect(IFWL_Widget *pWidget, const CFX_RectF &rect) = 0;
+ virtual FWL_ERR SetWidgetPosition(IFWL_Widget *pWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FWL_ERR SetParentWidget(IFWL_Widget *pWidget, IFWL_Widget *pParent) = 0;
+ virtual FWL_ERR SetWidgetIcon(IFWL_Widget *pWidget, const CFX_DIBitmap *pIcon, FX_BOOL bBig) = 0;
+ virtual FWL_ERR SetWidgetCaption(IFWL_Widget *pWidget, FX_WSTR wsCaption) = 0;
+ virtual FWL_ERR SetBorderRegion(IFWL_Widget *pWidget, CFX_Path *pPath) = 0;
+ virtual FWL_ERR SetTransparent(IFWL_Widget *pWidget, FX_DWORD dwAlpha) = 0;
+ virtual FWL_ERR ShowWidget(IFWL_Widget *pWidget) = 0;
+ virtual FWL_ERR HideWidget(IFWL_Widget *pWidget) = 0;
+ virtual FWL_ERR SetNormal(IFWL_Widget *pWidget) = 0;
+ virtual FWL_ERR SetMaximize(IFWL_Widget *pWidget) = 0;
+ virtual FWL_ERR SetMinimize(IFWL_Widget *pWidget) = 0;
+ virtual FWL_ERR SetFullScreen(IFWL_Widget *pWidget, FX_BOOL bFullScreen) = 0;
+ virtual FX_BOOL CheckMessage() = 0;
+ virtual FX_BOOL IsIdleMessage() = 0;
+ virtual FWL_ERR DispatchMessage() = 0;
+ virtual FWL_ERR RepaintWidget(IFWL_Widget *pWidget, const CFX_RectF *pRect) = 0;
+ virtual FWL_ERR Exit(FX_INT32 iExitCode) = 0;
+ virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget *pWidget, FX_LPVOID UserData) = 0;
+ virtual FWL_ERR GetWidgetDC(IFWL_Widget *pWidget, FX_LPVOID &pDC) = 0;
+ virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget *pWidget, FX_LPVOID pDC, CFX_RectF *pClip = 0) = 0;
+ virtual FX_LPVOID GetWindow(IFWL_Widget *pWidget) = 0;
+ virtual FX_DWORD GetKeyState(FX_DWORD dwVirtKey) = 0;
+ virtual FWL_ERR RunLoop(IFWL_Widget *widget) = 0;
+ virtual FWL_ERR EndLoop() = 0;
+ virtual FWL_ERR InitMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData) = 0;
+ virtual FWL_ERR UpdateMenu(IFWL_Menu *pMenu, FX_LPCVOID hItem, FX_INT32 iType) = 0;
+ virtual FX_INT32 TrackPopupMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData) = 0;
+ virtual FWL_ERR SetMessageHook(IFWL_AdapterMessageHook *hook) = 0;
+ virtual FWL_ERR GetSystemBorder(FX_FLOAT &l, FX_FLOAT &t, FX_FLOAT &r, FX_FLOAT &b) = 0;
+ virtual FX_BOOL GetPopupPos(IFWL_Widget* pWidget, FX_FLOAT fMinHeight, FX_FLOAT fMaxHeight, const CFX_RectF &rtAnchor, CFX_RectF &rtPopup) = 0;
+};
+#endif
diff --git a/xfa/include/fwl/adapter/fwl_sdadapterimp.h b/xfa/include/fwl/adapter/fwl_sdadapterimp.h
new file mode 100644
index 0000000000..98b2ecbaf0
--- /dev/null
+++ b/xfa/include/fwl/adapter/fwl_sdadapterimp.h
@@ -0,0 +1,72 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_SDAPATER_IMP_H
+#define _FWL_SDAPATER_IMP_H
+class IFWL_AdapterNative;
+class IFWL_AdapterWidgetMgr;
+class IFWL_AdapterThreadMgr;
+class IFWL_AdapterTimerMgr;
+class IFWL_WidgetMgrDelegate;
+class CFWL_SDAdatperNative;
+class CFWL_SDAdapterWidgetMgr;
+class CFWL_SDAdapterTimerMgr;
+class CFWL_SDAdapterWidgetMgr : public IFWL_AdapterWidgetMgr, public CFX_Object
+{
+public:
+ CFWL_SDAdapterWidgetMgr();
+ ~CFWL_SDAdapterWidgetMgr();
+ virtual FWL_ERR CreateWidget(IFWL_Widget *pWidget, IFWL_Widget *pParent = NULL);
+ virtual FWL_ERR DestroyWidget(IFWL_Widget *pWidget);
+ virtual FWL_ERR SetWidgetRect(IFWL_Widget *pWidget, const CFX_RectF &rect);
+ virtual FWL_ERR SetWidgetPosition(IFWL_Widget *pWidget, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FWL_ERR SetParentWidget(IFWL_Widget *pWidget, IFWL_Widget *pParent);
+ virtual FWL_ERR ShowWidget(IFWL_Widget *pWidget);
+ virtual FWL_ERR HideWidget(IFWL_Widget *pWidget);
+ virtual FWL_ERR SetNormal(IFWL_Widget *pWidget);
+ virtual FWL_ERR SetMaximize(IFWL_Widget *pWidget);
+ virtual FWL_ERR SetMinimize(IFWL_Widget *pWidget);
+ virtual FWL_ERR RunWidget(IFWL_Widget *pWidget);
+ virtual FWL_ERR RepaintWidget(IFWL_Widget *pWidget, const CFX_RectF *pRect);
+ virtual FWL_ERR Exit(FX_INT32 iExitCode);
+ virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget *pWidget, void *vp);
+ virtual FX_BOOL GetPopupPos(IFWL_Widget* pWidget, FX_FLOAT fMinHeight, FX_FLOAT fMaxHeight, const CFX_RectF &rtAnchor, CFX_RectF &rtPopup);
+public:
+ virtual FWL_ERR GetWidgetRect(IFWL_Widget *pWidget, CFX_RectF &rect);
+ virtual FWL_ERR SetWidgetIcon(IFWL_Widget *pWidget, const CFX_DIBitmap *pIcon, FX_BOOL bBig);
+ virtual FWL_ERR SetWidgetCaption(IFWL_Widget *pWidget, FX_WSTR wsCaption);
+ virtual FWL_ERR SetBorderRegion(IFWL_Widget *pWidget, CFX_Path *pPath);
+ virtual FWL_ERR SetTransparent(IFWL_Widget *pWidget, FX_DWORD dwAlpha);
+ virtual FWL_ERR SetFullScreen(IFWL_Widget *pWidget, FX_BOOL bFullScreen);
+ virtual FX_BOOL CheckMessage();
+ virtual FX_BOOL IsIdleMessage();
+ virtual FWL_ERR DispatchMessage();
+ virtual FWL_ERR GetWidgetDC(IFWL_Widget *pWidget, FX_LPVOID &pDC);
+ virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget *pWidget, FX_LPVOID pDC, CFX_RectF *pClip = 0);
+ virtual FX_LPVOID GetWindow(IFWL_Widget *pWidget);
+ virtual FX_DWORD GetKeyState(FX_DWORD dwVirtKey);
+ virtual FWL_ERR RunLoop(IFWL_Widget *widget);
+ virtual FWL_ERR EndLoop();
+ virtual FWL_ERR InitMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData);
+ virtual FWL_ERR UpdateMenu(IFWL_Menu *pMenu, FX_LPCVOID hItem, FX_INT32 iType);
+ virtual FX_INT32 TrackPopupMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData);
+ virtual FWL_ERR SetMessageHook(IFWL_AdapterMessageHook *hook);
+ virtual FWL_ERR GetSystemBorder(FX_FLOAT &l, FX_FLOAT &t, FX_FLOAT &r, FX_FLOAT &b);
+};
+class CFWL_SDAdapterThreadMgr : public IFWL_AdapterThreadMgr, public CFX_Object
+{
+public:
+ CFWL_SDAdapterThreadMgr();
+ ~CFWL_SDAdapterThreadMgr();
+public:
+ virtual FWL_ERR Start(IFWL_Thread *pThread, FWL_HTHREAD &hThread, FX_BOOL bSuspended = FALSE);
+ virtual FWL_ERR Resume(FWL_HTHREAD hThread);
+ virtual FWL_ERR Suspend(FWL_HTHREAD hThread);
+ virtual FWL_ERR Kill(FWL_HTHREAD hThread, FX_INT32 iExitCode);
+ virtual FWL_ERR Stop(FWL_HTHREAD hThread, FX_INT32 iExitCode);
+ virtual IFWL_Thread* GetCurrentThread();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_barcode.h b/xfa/include/fwl/basewidget/fwl_barcode.h
new file mode 100644
index 0000000000..ba6e99691e
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_barcode.h
@@ -0,0 +1,63 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_BARCODE_H
+#define _FWL_BARCODE_H
+#include "fwl_edit.h"
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_BarcodeDP;
+class IFWL_Barcode;
+#define FWL_CLASS_Barcode L"FWL_BARCODE"
+#define FWL_CLASSHASH_Barcode 366886968
+#define FWL_BCDATTRIBUTE_CHARENCODING (1L << 0)
+#define FWL_BCDATTRIBUTE_MODULEHEIGHT (1L << 1)
+#define FWL_BCDATTRIBUTE_MODULEWIDTH (1L << 2)
+#define FWL_BCDATTRIBUTE_DATALENGTH (1L << 3)
+#define FWL_BCDATTRIBUTE_CALCHECKSUM (1L << 4)
+#define FWL_BCDATTRIBUTE_PRINTCHECKSUM (1L << 5)
+#define FWL_BCDATTRIBUTE_TEXTLOCATION (1L << 6)
+#define FWL_BCDATTRIBUTE_WIDENARROWRATIO (1L << 7)
+#define FWL_BCDATTRIBUTE_STARTCHAR (1L << 8)
+#define FWL_BCDATTRIBUTE_ENDCHAR (1L << 9)
+#define FWL_BCDATTRIBUTE_VERSION (1L << 10)
+#define FWL_BCDATTRIBUTE_ECLEVEL (1L << 11)
+#define FWL_BCDATTRIBUTE_TRUNCATED (1L << 12)
+#define FWL_PART_BCD_Border 1
+#define FWL_PART_BCD_Edge 2
+#define FWL_PART_BCD_Background 3
+#define FWL_BCUPDATECMD_Data FWL_WGTUPDATECMD_User
+class IFWL_BarcodeDP : public IFWL_EditDP
+{
+public:
+ virtual BC_CHAR_ENCODING GetCharEncoding() = 0;
+ virtual FX_INT32 GetModuleHeight() = 0;
+ virtual FX_INT32 GetModuleWidth() = 0;
+ virtual FX_INT32 GetDataLength() = 0;
+ virtual FX_INT32 GetCalChecksum() = 0;
+ virtual FX_BOOL GetPrintChecksum() = 0;
+ virtual BC_TEXT_LOC GetTextLocation() = 0;
+ virtual FX_INT32 GetWideNarrowRatio() = 0;
+ virtual FX_CHAR GetStartChar() = 0;
+ virtual FX_CHAR GetEndChar() = 0;
+ virtual FX_INT32 GetVersion() = 0;
+ virtual FX_INT32 GetErrorCorrectionLevel() = 0;
+ virtual FX_BOOL GetTruncated() = 0;
+ virtual FX_DWORD GetBarcodeAttributeMask() = 0;
+};
+class IFWL_Barcode : public IFWL_Edit
+{
+public:
+ static IFWL_Barcode* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ void SetType(BC_TYPE type);
+ FX_BOOL IsProtectedType();
+protected:
+ IFWL_Barcode();
+ virtual ~IFWL_Barcode();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_caret.h b/xfa/include/fwl/basewidget/fwl_caret.h
new file mode 100644
index 0000000000..0d29fca863
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_caret.h
@@ -0,0 +1,32 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_CARET_H
+#define _FWL_CARET_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_Caret;
+#define FWL_CLASS_Caret L"FWL_CARET"
+#define FWL_CLASSHASH_Caret 671181879
+#define FWL_STATE_CAT_HightLight 1
+#define FWL_PART_CAT_Background 1
+#define FWL_PARTSTATE_CAT_HightLight 1
+class IFWL_Caret : public IFWL_Widget
+{
+public:
+ static IFWL_Caret* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = 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:
+ IFWL_Caret();
+ virtual ~IFWL_Caret();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_checkbox.h b/xfa/include/fwl/basewidget/fwl_checkbox.h
new file mode 100644
index 0000000000..625ad489c2
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_checkbox.h
@@ -0,0 +1,95 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_CHECKBOX_H
+#define _FWL_CHECKBOX_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_CheckBoxDP;
+class IFWL_CheckBox;
+#define FWL_CLASS_CheckBox L"FWL_CHECKBOX"
+#define FWL_CLASS_RadioButton L"FWL_RADIOBUTTON"
+#define FWL_CLASSHASH_CheckBox 4107183823
+#define FWL_CLASSHASH_RadioButton 3811304691
+#define FWL_STYLEEXT_CKB_Left (0L << 0)
+#define FWL_STYLEEXT_CKB_Center (1L << 0)
+#define FWL_STYLEEXT_CKB_Right (2L << 0)
+#define FWL_STYLEEXT_CKB_Top (0L << 2)
+#define FWL_STYLEEXT_CKB_VCenter (1L << 2)
+#define FWL_STYLEEXT_CKB_Bottom (2L << 2)
+#define FWL_STYLEEXT_CKB_LeftText (1L << 4)
+#define FWL_STYLEEXT_CKB_MultiLine (1L << 5)
+#define FWL_STYLEEXT_CKB_3State (1L << 6)
+#define FWL_STYLEEXT_CKB_RadioButton (1L << 7)
+#define FWL_STYLEEXT_CKB_ShapeSolidSquare (0L << 8)
+#define FWL_STYLEEXT_CKB_ShapeSunkenSquare (1L << 8)
+#define FWL_STYLEEXT_CKB_ShapeSolidCircle (2L << 8)
+#define FWL_STYLEEXT_CKB_ShapeSunkenCircle (3L << 8)
+#define FWL_STYLEEXT_CKB_SignShapeCheck (0L << 10)
+#define FWL_STYLEEXT_CKB_SignShapeCircle (1L << 10)
+#define FWL_STYLEEXT_CKB_SignShapeCross (2L << 10)
+#define FWL_STYLEEXT_CKB_SignShapeDiamond (3L << 10)
+#define FWL_STYLEEXT_CKB_SignShapeSquare (4L << 10)
+#define FWL_STYLEEXT_CKB_SignShapeStar (5L << 10)
+#define FWL_STYLEEXT_CKB_HLayoutMask (3L << 0)
+#define FWL_STYLEEXT_CKB_VLayoutMask (3L << 2)
+#define FWL_STYLEEXT_CKB_ShapeMask (3L << 8)
+#define FWL_STYLEEXT_CKB_SignShapeMask (7L << 10)
+#define FWL_STATE_CKB_Hovered (1 << FWL_WGTSTATE_MAX)
+#define FWL_STATE_CKB_Pressed (1 << (FWL_WGTSTATE_MAX + 1))
+#define FWL_STATE_CKB_Unchecked (0 << (FWL_WGTSTATE_MAX + 2))
+#define FWL_STATE_CKB_Checked (1 << (FWL_WGTSTATE_MAX + 2))
+#define FWL_STATE_CKB_Neutral (2 << (FWL_WGTSTATE_MAX + 2))
+#define FWL_STATE_CKB_CheckMask (3L << (FWL_WGTSTATE_MAX + 2))
+#define FWL_PART_CKB_Border 1
+#define FWL_PART_CKB_Edge 2
+#define FWL_PART_CKB_Background 3
+#define FWL_PART_CKB_CheckBox 4
+#define FWL_PART_CKB_Caption 5
+#define FWL_PARTSTATE_CKB_Normal (0L << 0)
+#define FWL_PARTSTATE_CKB_Pressed (1L << 0)
+#define FWL_PARTSTATE_CKB_Hovered (2L << 0)
+#define FWL_PARTSTATE_CKB_Disabled (3L << 0)
+#define FWL_PARTSTATE_CKB_UnChecked (0L << 2)
+#define FWL_PARTSTATE_CKB_Checked (1L << 2)
+#define FWL_PARTSTATE_CKB_Neutral (2L << 2)
+#define FWL_PARTSTATE_CKB_Focused (1L << 4)
+#define FWL_PARTSTATE_CKB_Mask1 (3L << 0)
+#define FWL_PARTSTATE_CKB_Mask2 (3L << 2)
+#define FWL_EVT_CKB_CheckStateChanged L"FWL_EVENT_CKB_CheckStateChanged"
+#define FWL_EVTHASH_CKB_CheckStateChanged 2503252963
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCkbCheckStateChanged, FWL_EVTHASH_CKB_CheckStateChanged)
+END_FWL_EVENT_DEF
+class IFWL_CheckBoxDP : public IFWL_DataProvider
+{
+public:
+ virtual FX_FLOAT GetBoxSize(IFWL_Widget *pWidget) = 0;
+};
+class IFWL_CheckBox : public IFWL_Widget
+{
+public:
+ static IFWL_CheckBox* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FX_INT32 GetCheckState();
+ FWL_ERR SetCheckState(FX_INT32 iCheck);
+protected:
+ IFWL_CheckBox();
+ virtual ~IFWL_CheckBox();
+};
+class IFWL_RadioButton : public IFWL_Widget
+{
+public:
+ static IFWL_RadioButton* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FX_INT32 GetCheckState();
+ FWL_ERR SetCheckState(FX_INT32 iCheck);
+protected:
+ IFWL_RadioButton();
+ virtual ~IFWL_RadioButton();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_combobox.h b/xfa/include/fwl/basewidget/fwl_combobox.h
new file mode 100644
index 0000000000..74d6bdf24b
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_combobox.h
@@ -0,0 +1,139 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_COMBOBOX_H
+#define _FWL_COMBOBOX_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_ListBox;
+class IFWL_ComboBoxDP;
+class IFWL_ComboBox;
+#define FWL_CLASS_ComboBox L"FWL_COMBOBOX"
+#define FWL_CLASSHASH_ComboBox 602353697
+#define FWL_STYLEEXT_CMB_DropList (0L << 0)
+#define FWL_STYLEEXT_CMB_DropDown (1L << 0)
+#define FWL_STYLEEXT_CMB_Sort (1L << 1)
+#define FWL_STYLEEXT_CMB_ListDrag (1L << 2)
+#define FWL_STYLEEXT_CMB_OwnerDraw (1L << 3)
+#define FWL_STYLEEXT_CMB_EditHNear (0L << 4)
+#define FWL_STYLEEXT_CMB_EditHCenter (1L << 4)
+#define FWL_STYLEEXT_CMB_EditHFar (2L << 4)
+#define FWL_STYLEEXT_CMB_EditVNear (0L << 6)
+#define FWL_STYLEEXT_CMB_EditVCenter (1L << 6)
+#define FWL_STYLEEXT_CMB_EditVFar (2L << 6)
+#define FWL_STYLEEXT_CMB_EditJustified (1L << 8)
+#define FWL_STYLEEXT_CMB_EditDistributed (2L << 8)
+#define FWL_STYLEEXT_CMB_EditHAlignMask (3L << 4)
+#define FWL_STYLEEXT_CMB_EditVAlignMask (3L << 6)
+#define FWL_STYLEEXT_CMB_EditHAlignModeMask (3L << 8)
+#define FWL_STYLEEXT_CMB_ListItemLeftAlign (0L << 10)
+#define FWL_STYLEEXT_CMB_ListItemCenterAlign (1L << 10)
+#define FWL_STYLEEXT_CMB_ListItemRightAlign (2L << 10)
+#define FWL_STYLEEXT_CMB_ListItemText (0L << 12)
+#define FWL_STYLEEXT_CMB_ListItemIconText (1L << 12)
+#define FWL_STYLEEXT_CMB_ListItemAlignMask (3L << 12)
+#define FWL_STYLEEXT_CMB_ReadOnly (1L << 13)
+#define FWL_PART_CMB_Border 1
+#define FWL_PART_CMB_Edge 2
+#define FWL_PART_CMB_Background 3
+#define FWL_PART_CMB_DropDownButton 4
+#define FWL_PART_CMB_Caption 5
+#define FWL_PART_CMB_StretcgHandler 6
+#define FWL_PARTSTATE_CMB_Normal (0L << 0)
+#define FWL_PARTSTATE_CMB_Hovered (1L << 0)
+#define FWL_PARTSTATE_CMB_Pressed (2L << 0)
+#define FWL_PARTSTATE_CMB_Disabled (3L << 0)
+#define FWL_PARTSTATE_CMB_Selected (1L << 2)
+#define FWL_WGTCAPACITY_CMB_ComboFormHandler (FWL_WGTCAPACITY_MAX + 7)
+enum FWL_CMB_TEXTCHANGED {
+ FWL_CMB_TEXTCHANGED_Insert = 0 ,
+ FWL_CMB_TEXTCHANGED_Delete ,
+ FWL_CMB_TEXTCHANGED_Replace ,
+};
+#define FWL_EVT_CMB_DropDown L"FWL_EVENT_CMB_PreDropDown"
+#define FWL_EVT_CMB_PostDropDown L"FWL_EVENT_CMB_PostDropDown"
+#define FWL_EVT_CMB_CloseUp L"FWL_EVENT_CMB_CloseUp"
+#define FWL_EVT_CMB_EditChanged L"FWL_EVENT_CMB_EditChanged"
+#define FWL_EVT_CMB_SelChanged L"FWL_EVENT_CMB_SelChanged"
+#define FWL_EVT_CMB_HoverChanged L"FWL_EVENT_CMB_HoverChanged"
+#define FWL_EVT_CMB_DrawItem L"FWL_EVENT_CMB_DrawItem"
+#define FWL_EVTHASH_CMB_PreDropDown 1357646798
+#define FWL_EVTHASH_CMB_PostDropDown 3677010285
+#define FWL_EVTHASH_CMB_CloseUp 2871271190
+#define FWL_EVTHASH_CMB_EditChanged 1527034762
+#define FWL_EVTHASH_CMB_SelChanged 2923227784
+#define FWL_EVTHASH_CMB_HoverChanged 944325448
+#define FWL_EVTHASH_CMB_DrawItem 917354551
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPreDropDown, FWL_EVTHASH_CMB_PreDropDown)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPostDropDown, FWL_EVTHASH_CMB_PostDropDown)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbCloseUp, FWL_EVTHASH_CMB_CloseUp)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbEditChanged, FWL_EVTHASH_CMB_EditChanged)
+FX_INT32 nChangeType;
+CFX_WideString wsInsert;
+CFX_WideString wsDelete;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbSelChanged, FWL_EVTHASH_CMB_SelChanged)
+CFX_Int32Array iArraySels;
+FX_BOOL bLButtonUp;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbHoverChanged, FWL_EVTHASH_CMB_HoverChanged)
+FX_INT32 m_iCurHover;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbDrawItem, FWL_EVTHASH_CMB_DrawItem)
+CFX_Graphics *m_pGraphics;
+CFX_Matrix m_matrix;
+FX_INT32 m_index;
+CFX_RectF m_rtItem;
+END_FWL_EVENT_DEF
+class IFWL_ComboBoxDP : public IFWL_ListBoxDP
+{
+public:
+ virtual FX_FLOAT GetListHeight(IFWL_Widget *pWidget) = 0;
+};
+class IFWL_ComboBox : public IFWL_Widget
+{
+public:
+ static IFWL_ComboBox* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FX_INT32 GetCurSel();
+ FWL_ERR SetCurSel(FX_INT32 iSel);
+ FWL_ERR SetEditText(const CFX_WideString &wsText);
+ FX_INT32 GetEditTextLength() const;
+ FWL_ERR GetEditText(CFX_WideString &wsText, FX_INT32 nStart = 0, FX_INT32 nCount = -1) const;
+ FWL_ERR SetEditSelRange(FX_INT32 nStart, FX_INT32 nCount = -1);
+ FX_INT32 GetEditSelRange(FX_INT32 nIndex, FX_INT32 &nStart);
+ FX_INT32 GetEditLimit();
+ FWL_ERR SetEditLimit(FX_INT32 nLimit);
+ FWL_ERR EditDoClipboard(FX_INT32 iCmd);
+ FX_BOOL EditRedo(FX_BSTR bsRecord);
+ FX_BOOL EditUndo(FX_BSTR bsRecord);
+ IFWL_ListBox* GetListBoxt();
+ FX_BOOL AfterFocusShowDropList();
+ FX_ERR OpenDropDownList(FX_BOOL bActivate);
+ 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);
+protected:
+ IFWL_ComboBox();
+ virtual ~IFWL_ComboBox();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_datetimepicker.h b/xfa/include/fwl/basewidget/fwl_datetimepicker.h
new file mode 100644
index 0000000000..898264eeec
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_datetimepicker.h
@@ -0,0 +1,101 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_DATETIMEPICKER_H
+#define _FWL_DATETIMEPICKER_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_DateTimePickerDP;
+class IFWL_DateTimePicker;
+#define FWL_CLASS_DateTimePicker L"FWL_DATETIMEPICKER"
+#define FWL_CLASSHASH_DateTimePicker 3851176257
+#define FWL_STYLEEXT_DTP_AllowEdit (1L << 0)
+#define FWL_STYLEEXT_DTP_LongDateFormat (0L << 1)
+#define FWL_STYLEEXT_DTP_ShortDateFormat (1L << 1)
+#define FWL_STYLEEXT_DTP_TimeFormat (2L << 1)
+#define FWL_STYLEEXT_DTP_Spin (1L << 3)
+#define FWL_STYLEEXT_DTP_EditHNear (0L << 4)
+#define FWL_STYLEEXT_DTP_EditHCenter (1L << 4)
+#define FWL_STYLEEXT_DTP_EditHFar (2L << 4)
+#define FWL_STYLEEXT_DTP_EditVNear (0L << 6)
+#define FWL_STYLEEXT_DTP_EditVCenter (1L << 6)
+#define FWL_STYLEEXT_DTP_EditVFar (2L << 6)
+#define FWL_STYLEEXT_DTP_EditJustified (1L << 8)
+#define FWL_STYLEEXT_DTP_EditDistributed (2L << 8)
+#define FWL_STYLEEXT_DTP_EditHAlignMask (3L << 4)
+#define FWL_STYLEEXT_DTP_EditVAlignMask (3L << 6)
+#define FWL_STYLEEXT_DTP_EditHAlignModeMask (3L << 8)
+#define FWL_PART_DTP_Border 1
+#define FWL_PART_DTP_Edge 2
+#define FWL_PART_DTP_Background 3
+#define FWL_PART_DTP_DropDownButton 4
+#define FWL_PARTSTATE_DTP_Normal (0L << 0)
+#define FWL_PARTSTATE_DTP_Hovered (1L << 0)
+#define FWL_PARTSTATE_DTP_Pressed (2L << 0)
+#define FWL_PARTSTATE_DTP_Disabled (3L << 0)
+#define FWL_EVT_DTP_DropDown L"FWL_EVENT_DTP_DropDown"
+#define FWL_EVTHASH_DTP_DropDown 264728733
+#define FWL_EVT_DTP_CloseUp L"FWL_EVENT_DTP_CloseUp"
+#define FWL_EVTHASH_DTP_CloseUp 4280973803
+#define FWL_EVT_DTP_EditChanged L"FWL_EVENT_DTP_EditChanged"
+#define FWL_EVTHASH_DTP_EditChanged 4009610944
+#define FWL_EVT_DTP_HoverChanged L"FWL_EVENT_DTP_HoverChanged"
+#define FWL_EVTHASH_DTP_HoverChanged 686674750
+#define FWL_EVT_DTP_SelectChanged L"FWL_EVENT_DTP_SelectChanged"
+#define FWL_EVTHASH_DTP_SelectChanged 1589616858
+BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpDropDown, FWL_EVTHASH_DTP_DropDown)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpCloseUp, FWL_EVTHASH_DTP_CloseUp)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpEditChanged, FWL_EVTHASH_DTP_EditChanged)
+CFX_WideString m_wsText;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpHoverChanged, FWL_EVTHASH_DTP_HoverChanged)
+FX_INT32 hoverday;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpSelectChanged, FWL_EVTHASH_DTP_SelectChanged)
+FX_INT32 iYear;
+FX_INT32 iMonth;
+FX_INT32 iDay;
+END_FWL_EVENT_DEF
+class IFWL_DateTimePickerDP : public IFWL_DataProvider
+{
+public:
+ virtual FWL_ERR GetToday(IFWL_Widget *pWidget, FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay) = 0;
+};
+class IFWL_DateTimePicker : public IFWL_Widget
+{
+public:
+ static IFWL_DateTimePicker* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FWL_ERR GetCurSel(FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay);
+ FWL_ERR SetCurSel(FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 iDay);
+ FWL_ERR SetEditText(const CFX_WideString &wsText);
+ FWL_ERR GetEditText(CFX_WideString &wsText, FX_INT32 nStart = 0, FX_INT32 nCount = -1) const;
+ FX_INT32 CountSelRanges();
+ FX_INT32 GetSelRange(FX_INT32 nIndex, FX_INT32 &nStart);
+ 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(FX_INT32 nLimit);
+ FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
+protected:
+ IFWL_DateTimePicker();
+ virtual ~IFWL_DateTimePicker();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_edit.h b/xfa/include/fwl/basewidget/fwl_edit.h
new file mode 100644
index 0000000000..18bdee662b
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_edit.h
@@ -0,0 +1,165 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_EDIT_H
+#define _FWL_EDIT_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_EditDP;
+class IFWL_Edit;
+#define FWL_CLASS_Edit L"FWL_EDIT"
+#define FWL_CLASSHASH_Edit 2893987822
+#define FWL_STYLEEXT_EDT_ReadOnly (1L << 0)
+#define FWL_STYLEEXT_EDT_MultiLine (1L << 1)
+#define FWL_STYLEEXT_EDT_WantReturn (1L << 2)
+#define FWL_STYLEEXT_EDT_NoHideSel (1L << 3)
+#define FWL_STYLEEXT_EDT_AutoHScroll (1L << 4)
+#define FWL_STYLEEXT_EDT_AutoVScroll (1L << 5)
+#define FWL_STYLEEXT_EDT_NoRedoUndo (1L << 6)
+#define FWL_STYLEEXT_EDT_Validate (1L << 7)
+#define FWL_STYLEEXT_EDT_Password (1L << 8)
+#define FWL_STYLEEXT_EDT_Number (1L << 9)
+#define FWL_STYLEEXT_EDT_HSelfAdaption (1L << 10)
+#define FWL_STYLEEXT_EDT_VSelfAdaption (1L << 11)
+#define FWL_STYLEEXT_EDT_VerticalLayout (1L << 12)
+#define FWL_STYLEEXT_EDT_VerticalChars (1L << 13)
+#define FWL_STYLEEXT_EDT_ReverseLine (1L << 14)
+#define FWL_STYLEEXT_EDT_ArabicShapes (1L << 15)
+#define FWL_STYLEEXT_EDT_ExpandTab (1L << 16)
+#define FWL_STYLEEXT_EDT_CombText (1L << 17)
+#define FWL_STYLEEXT_EDT_HNear (0L << 18)
+#define FWL_STYLEEXT_EDT_HCenter (1L << 18)
+#define FWL_STYLEEXT_EDT_HFar (2L << 18)
+#define FWL_STYLEEXT_EDT_VNear (0L << 20)
+#define FWL_STYLEEXT_EDT_VCenter (1L << 20)
+#define FWL_STYLEEXT_EDT_VFar (2L << 20)
+#define FWL_STYLEEXT_EDT_Justified (1L << 22)
+#define FWL_STYLEEXT_EDT_Distributed (2L << 22)
+#define FWL_STYLEEXT_EDT_HAlignMask (3L << 18)
+#define FWL_STYLEEXT_EDT_VAlignMask (3L << 20)
+#define FWL_STYLEEXT_EDT_HAlignModeMask (3L << 22)
+#define FWL_STYLEEXT_EDT_InnerCaret (1L << 24)
+#define FWL_STYLEEXT_EDT_ShowScrollbarFocus (1L << 25)
+#define FWL_STYLEEXT_EDT_OuterScrollbar (1L << 26)
+#define FWL_STYLEEXT_EDT_LastLineHeight (1L << 27)
+#define FWL_STATE_EDT_Editing (1 << FWL_WGTSTATE_MAX)
+#define FWL_PART_EDT_Border 1
+#define FWL_PART_EDT_Edge 2
+#define FWL_PART_EDT_Background 3
+#define FWL_PART_EDT_CombTextLine 4
+#define FWL_PARTDATA_EDT_Background 0
+#define FWL_PARTDATA_EDT_StaticBackground 1
+#define FWL_PARTSTATE_EDT_Normal (0L << 0)
+#define FWL_PARTSTATE_EDT_ReadOnly (1L << 0)
+#define FWL_PARTSTATE_EDT_Disable (2L << 0)
+enum FWL_EDT_TEXTCHANGED {
+ FWL_EDT_TEXTCHANGED_Insert = 0 ,
+ FWL_EDT_TEXTCHANGED_Delete ,
+ FWL_EDT_TEXTCHANGED_Replace ,
+};
+#define FWL_EVT_EDT_AddDoRecord L"FWL_EVENT_EDT_AddDoRecord"
+#define FWL_EVTHASH_EDT_AddDoRecord 3701672224
+#define FWL_EVT_EDT_TextChanged L"FWL_EVENT_EDT_TextChanged"
+#define FWL_EVTHASH_EDT_TextChanged 1064022132
+#define FWL_EVT_EDT_PreSelfAdaption L"FWL_EVENT_PreSelfAdaption"
+#define FWL_EVTHASH_EDT_PreSelfAdaption 1001979178
+#define FWL_EVT_EDT_Validate L"FWL_EVTHASH_EDT_Validate"
+#define FWL_EVTHASH_EDT_Validate 3373308608
+#define FWL_EVT_EDT_CheckWord L"FWL_EVTHASH_EDT_CheckWord"
+#define FWL_EVTHASH_EDT_CheckWord 2897181520
+#define FWL_EVT_EDT_GetSuggestWords L"FWL_EVTHASH_EDT_GetSuggestWords"
+#define FWL_EVTHASH_EDT_GetSuggestWords 315782791
+#define FWL_EVT_EDT_TextFull L"FWL_EVTHASH_EDT_TextFull"
+#define FWL_EVTHASH_EDT_TextFull 2158580174
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtAddDoRecord, FWL_EVTHASH_EDT_AddDoRecord)
+CFX_ByteString m_wsDoRecord;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtTextChanged, FWL_EVTHASH_EDT_TextChanged)
+FX_INT32 nChangeType;
+CFX_WideString wsInsert;
+CFX_WideString wsDelete;
+CFX_WideString wsPrevText;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtTextFull, FWL_EVTHASH_EDT_TextFull)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtPreSelfAdaption, FWL_EVTHASH_EDT_PreSelfAdaption)
+FX_BOOL bHSelfAdaption;
+FX_BOOL bVSelfAdaption;
+CFX_RectF rtAfterChange;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtValidate, FWL_EVTHASH_EDT_Validate)
+IFWL_Widget* pDstWidget;
+CFX_WideString wsInsert;
+FX_BOOL bValidate;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtCheckWord, FWL_EVTHASH_EDT_CheckWord)
+CFX_ByteString bsWord;
+FX_BOOL bCheckWord;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtGetSuggestWords, FWL_EVTHASH_EDT_GetSuggestWords)
+FX_BOOL bSuggestWords;
+CFX_ByteString bsWord;
+CFX_ByteStringArray bsArraySuggestWords;
+END_FWL_EVENT_DEF
+class IFWL_EditDP : public IFWL_DataProvider
+{
+};
+#define FWL_EDT_FIND_FLAGS_Prev (0L << 0)
+#define FWL_EDT_FIND_FLAGS_Next (1L << 0)
+#define FWL_EDT_FIND_FLAGS_WholeWord (1L << 1)
+#define FWL_EDT_FIND_FLAGS_NoCase (1L << 2)
+typedef struct _FWL_HEDTFIND {
+ FX_LPVOID pData;
+}* FWL_HEDTFIND;
+class IFWL_Edit : public IFWL_Widget
+{
+public:
+ static IFWL_Edit* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FWL_ERR SetText(const CFX_WideString &wsText);
+ FX_INT32 GetTextLength() const;
+ FWL_ERR GetText(CFX_WideString &wsText, FX_INT32 nStart = 0, FX_INT32 nCount = -1) const;
+ FWL_ERR ClearText();
+ FX_INT32 GetCaretPos() const;
+ FX_INT32 SetCaretPos(FX_INT32 nIndex, FX_BOOL bBefore = TRUE);
+ FWL_ERR AddSelRange(FX_INT32 nStart, FX_INT32 nCount = -1);
+ FX_INT32 CountSelRanges();
+ FX_INT32 GetSelRange(FX_INT32 nIndex, FX_INT32 &nStart);
+ FWL_ERR ClearSelections();
+ FX_INT32 GetLimit();
+ FWL_ERR SetLimit(FX_INT32 nLimit);
+ FWL_ERR SetAliasChar(FX_WCHAR wAlias);
+ FWL_ERR SetFormatString(const CFX_WideString &wsFormat);
+ FWL_ERR Insert(FX_INT32 nStart, FX_LPCWSTR lpText, FX_INT32 nLen);
+ FWL_ERR DeleteSelections();
+ FWL_ERR DeleteRange(FX_INT32 nStart, FX_INT32 nCount = -1);
+ FWL_ERR ReplaceSelections(const CFX_WideStringC &wsReplace);
+ FWL_ERR Replace(FX_INT32 nStart, FX_INT32 nLen, const CFX_WideStringC &wsReplace);
+ FWL_ERR DoClipboard(FX_INT32 iCmd);
+ FX_BOOL Copy(CFX_WideString &wsCopy);
+ FX_BOOL Cut(CFX_WideString &wsCut);
+ FX_BOOL Paste(const CFX_WideString &wsPaste);
+ FX_BOOL Delete();
+ FX_BOOL Redo(FX_BSTR bsRecord);
+ FX_BOOL Undo(FX_BSTR bsRecord);
+ FX_BOOL Undo();
+ FX_BOOL Redo();
+ FX_BOOL CanUndo();
+ FX_BOOL CanRedo();
+ FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
+ FWL_ERR SetOuter(IFWL_Widget *pOuter);
+ FWL_ERR SetNumberRange(FX_INT32 iMin, FX_INT32 iMax);
+ FWL_ERR SetBackColor(FX_DWORD dwColor);
+ FWL_ERR SetFont(const CFX_WideString &wsFont, FX_FLOAT fSize);
+ void SetScrollOffset(FX_FLOAT fScrollOffset);
+ FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSuggest);
+ FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace);
+protected:
+ IFWL_Edit();
+ virtual ~IFWL_Edit();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_listbox.h b/xfa/include/fwl/basewidget/fwl_listbox.h
new file mode 100644
index 0000000000..4b2f2555c5
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_listbox.h
@@ -0,0 +1,110 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_LISTBOX_H
+#define _FWL_LISTBOX_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_ListBoxDP;
+class IFWL_ListBox;
+#define FWL_CLASS_ListBox L"FWL_LISTBOX"
+#define FWL_CLASSHASH_ListBox 1777358317
+#define FWL_STYLEEXT_LTB_MultiSelection (1L << 0)
+#define FWL_STYLEEXT_LTB_Sort (1L << 1)
+#define FWL_STYLEEXT_LTB_ShowScrollBarAlaways (1L << 2)
+#define FWL_STYLEEXT_LTB_MultiColumn (1L << 3)
+#define FWL_STYLEEXT_LTB_LeftAlign (0L << 4)
+#define FWL_STYLEEXT_LTB_CenterAlign (1L << 4)
+#define FWL_STYLEEXT_LTB_RightAlign (2L << 4)
+#define FWL_STYLEEXT_LTB_MultiLine (1L << 6)
+#define FWL_STYLEEXT_LTB_OwnerDraw (1L << 7)
+#define FWL_STYLEEXT_LTB_Icon (1L << 8)
+#define FWL_STYLEEXT_LTB_Check (1L << 9)
+#define FWL_STYLEEXT_LTB_AlignMask (3L << 4)
+#define FWL_STYLEEXT_LTB_ShowScrollBarFocus (1L << 10)
+#define FWL_ITEMSTATE_LTB_Selected (1L << 0)
+#define FWL_ITEMSTATE_LTB_Focused (1L << 1)
+#define FWL_ITEMSTATE_LTB_Checked (1L << 2)
+#define FWL_PART_LTB_Border 1
+#define FWL_PART_LTB_Edge 2
+#define FWL_PART_LTB_Background 3
+#define FWL_PART_LTB_ListItem 4
+#define FWL_PART_LTB_Check 5
+#define FWL_PART_LTB_Icon 6
+#define FWL_PARTSTATE_LTB_Normal (0L << 0)
+#define FWL_PARTSTATE_LTB_Selected (1L << 0)
+#define FWL_PARTSTATE_LTB_Disabled (2L << 0)
+#define FWL_PARTSTATE_LTB_Focused (1L << 2)
+#define FWL_PARTSTATE_LTB_UnChecked (0L << 3)
+#define FWL_PARTSTATE_LTB_Checked (1L << 3)
+#define FWL_PARTSTATE_LTB_Mask (3L << 0)
+#define FWL_WGTHITTEST_LTB_Item FWL_WGTHITTEST_MAX + 1
+#define FWL_WGTHITTEST_LTB_HScrollBar FWL_WGTHITTEST_MAX + 2
+#define FWL_WGTHITTEST_LTB_VScrollBar FWL_WGTHITTEST_MAX + 3
+#define FWL_EVT_LTB_SelChanged L"FWL_EVENT_LTB_SelChanged"
+#define FWL_EVT_LTB_DrawItem L"FWL_EVENT_LTB_DrawItem"
+#define FWL_EVTHASH_LTB_SelChanged 1701781688
+#define FWL_EVTHASH_LTB_DrawItem 1050853991
+BEGIN_FWL_EVENT_DEF(CFWL_EvtLtbSelChanged, FWL_EVTHASH_LTB_SelChanged)
+CFX_Int32Array iarraySels;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtLtbDrawItem, FWL_EVTHASH_LTB_DrawItem)
+CFX_Graphics *m_pGraphics;
+CFX_Matrix m_matrix;
+FX_INT32 m_index;
+CFX_RectF m_rect;
+END_FWL_EVENT_DEF
+typedef struct _FWL_HLISTITEM {
+ FX_LPVOID pData;
+}* FWL_HLISTITEM;
+typedef struct _FWL_ListBoxItemData {
+ IFWL_ListBoxDP *pDataProvider;
+ FX_INT32 iIndex;
+} FWL_ListBoxItemData;
+class IFWL_ListBoxDP : public IFWL_DataProvider
+{
+public:
+ virtual FX_INT32 CountItems(IFWL_Widget *pWidget) = 0;
+ virtual FWL_HLISTITEM GetItem(IFWL_Widget *pWidget, FX_INT32 nIndex) = 0;
+ virtual FX_INT32 GetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
+ virtual FX_BOOL SetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_INT32 nIndex) = 0;
+ virtual FX_DWORD GetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
+ virtual FWL_ERR GetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_WideString &wsText) = 0;
+ virtual FWL_ERR GetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_RectF &rtItem) = 0;
+ virtual FX_LPVOID GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
+ virtual FWL_ERR SetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_DWORD dwStyle) = 0;
+ virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_LPCWSTR pszText) = 0;
+ virtual FWL_ERR SetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const CFX_RectF &rtItem) = 0;
+ virtual FX_FLOAT GetItemHeight(IFWL_Widget *pWidget) = 0;
+ virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
+ virtual FWL_ERR GetItemCheckRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_RectF& rtCheck) = 0;
+ virtual FWL_ERR SetItemCheckRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const CFX_RectF& rtCheck) = 0;
+ virtual FX_DWORD GetItemCheckState(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
+ virtual FWL_ERR SetItemCheckState(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_DWORD dwCheckState) = 0;
+};
+class IFWL_ListBoxCompare
+{
+public:
+ virtual FX_INT32 Compare(FWL_HLISTITEM hLeft, FWL_HLISTITEM hRight) = 0;
+};
+class IFWL_ListBox : public IFWL_Widget
+{
+public:
+ static IFWL_ListBox* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FX_INT32 CountSelItems();
+ FWL_HLISTITEM GetSelItem(FX_INT32 nIndexSel);
+ FX_INT32 GetSelIndex(FX_INT32 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* Sort(IFWL_ListBoxCompare *pCom);
+protected:
+ IFWL_ListBox();
+ virtual ~IFWL_ListBox();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_menu.h b/xfa/include/fwl/basewidget/fwl_menu.h
new file mode 100644
index 0000000000..156274344f
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_menu.h
@@ -0,0 +1,15 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_MENU_H
+#define _FWL_MENU_H
+#define FWL_CLASS_Menu L"FWL_MENU"
+#define FWL_CLASSHASH_Menu 3957949655
+#define FWL_STYLEEXT_MNU_Horz (0L << 0)
+#define FWL_STYLEEXT_MNU_Vert (1L << 0)
+#define FWL_STYLEEXT_MNU_Dock (1L << 1)
+#define FWL_STYLEEXT_MNU_OwnerDraw (1L << 2)
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_monthcalendar.h b/xfa/include/fwl/basewidget/fwl_monthcalendar.h
new file mode 100644
index 0000000000..7ad8f8a364
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_monthcalendar.h
@@ -0,0 +1,130 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_MONTHCALENDAR_H
+#define _FWL_MONTHCALENDAR_H
+class IFWL_MonthCalendarDP;
+class IFWL_MonthCalendar;
+#define FWL_CLASS_MonthCalendar L"FWL_MONTHCALENDAR"
+#define FWL_CLASSHASH_MonthCalendar 2733931374
+#define FWL_STYLEEXT_MCD_MultiSelect (1L << 0)
+#define FWL_STYLEEXT_MCD_NoToday (1L << 1)
+#define FWL_STYLEEXT_MCD_NoTodayCircle (1L << 2)
+#define FWL_STYLEEXT_MCD_WeekNumbers (1L << 3)
+#define FWL_WGTCAPACITY_MC_HEADER_WIDTH 12
+#define FWL_WGTCAPACITY_MC_HEADER_Height 13
+#define FWL_WGTCAPACITY_MC_HEADER_BTN_WIDTH 14
+#define FWL_WGTCAPACITY_MC_HEADER_BTN_HEIGHT 15
+#define FWL_WGTCAPACITY_MC_HEADER_BTN_HMARGIN 16
+#define FWL_WGTCAPACITY_MC_HEADER_BTN_VMARGIN 17
+#define FWL_WGTCAPACITY_MC_HEADER_TEXTWIDHT 18
+#define FWL_WGTCAPACITY_MC_HEADER_TEXTHEIGHT 19
+#define FWL_WGTCAPACITY_MC_HEADER_TEXT_HMARGIN 20
+#define FWL_WGTCAPACITY_MC_HEADER_TEXT_VMARGIN 21
+#define FWL_WGTCAPACITY_MC_HSEP_WIDTH 22
+#define FWL_WGTCAPACITY_MC_HSEP_HEIGHT 23
+#define FWL_WGTCAPACITY_MC_VSEP_WIDTH 24
+#define FWL_WGTCAPACITY_MC_VSEP_HEIGHT 25
+#define FWL_WGTCAPACITY_MC_WEEKNUM_WIDTH 26
+#define FWL_WGTCAPACITY_MC_SEP_DOFFSET 40
+#define FWL_WGTCAPACITY_MC_SEP_X 27
+#define FWL_WGTCAPACITY_MC_SEP_Y 28
+#define FWL_WGTCAPACITY_MC_WEEKNUM_HEIGHT 29
+#define FWL_WGTCAPACITY_MC_WEEK_WIDTH 30
+#define FWL_WGTCAPACITY_MC_WEEK_HEIGHT 31
+#define FWL_WGTCAPACITY_MC_DATES_CELL_WIDTH 32
+#define FWL_WGTCAPACITY_MC_DATES_CELL_HEIGHT 33
+#define FWL_WGTCAPACITY_MC_TODAY_WIDHT 34
+#define FWL_WGTCAPACITY_MC_TODAY_HEIGHT 35
+#define FWL_WGTCAPACITY_MC_TODAY_FLAG_WIDHT 36
+#define FWL_WGTCAPACITY_MC_WIDTH 37
+#define FWL_WGTCAPACITY_MC_HEIGHT 38
+#define FWL_ITEMSTATE_MCD_Nomal (0L << 0)
+#define FWL_ITEMSTATE_MCD_Flag (1L << 0)
+#define FWL_ITEMSTATE_MCD_Selected (1L << 1)
+#define FWL_ITEMSTATE_MCD_Focused (1L << 2)
+#define FWL_PART_MCD_Border 1
+#define FWL_PART_MCD_Edge 2
+#define FWL_PART_MCD_Background 3
+#define FWL_PART_MCD_LBtn 4
+#define FWL_PART_MCD_RBtn 5
+#define FWL_PART_MCD_HSeparator 6
+#define FWL_PART_MCD_VSeparator 7
+#define FWL_PART_MCD_TodayCircle 8
+#define FWL_PART_MCD_DateInCircle 9
+#define FWL_PART_MCD_DateInBK 10
+#define FWL_PART_MCD_Caption 9
+#define FWL_PART_MCD_DatesIn 10
+#define FWL_PART_MCD_DatesOut 11
+#define FWL_PART_MCD_Week 12
+#define FWL_PART_MCD_Today 13
+#define FWL_PART_MCD_Header 14
+#define FWL_PART_MCD_WeekNum 15
+#define FWL_PART_MCD_WeekNumSep 16
+#define FWL_PARTSTATE_MCD_Normal (0L << 0)
+#define FWL_PARTSTATE_MCD_Pressed (1L << 0)
+#define FWL_PARTSTATE_MCD_Hovered (2L << 0)
+#define FWL_PARTSTATE_MCD_Selected (3L << 0)
+#define FWL_PARTSTATE_MCD_LSelected (1L << 2)
+#define FWL_PARTSTATE_MCD_RSelected (2L << 2)
+#define FWL_PARTSTATE_MCD_Flagged (1L << 3)
+#define FWL_PARTSTATE_MCD_Focused (1L << 4)
+#define FWL_MCCAPACITY_Sun FWL_WGTCAPACITY_MAX + 5
+#define FWL_MCCAPACITY_Mon FWL_WGTCAPACITY_MAX + 6
+#define FWL_MCCAPACITY_Tue FWL_WGTCAPACITY_MAX + 7
+#define FWL_MCCAPACITY_Wed FWL_WGTCAPACITY_MAX + 8
+#define FWL_MCCAPACITY_Thu FWL_WGTCAPACITY_MAX + 9
+#define FWL_MCCAPACITY_Fri FWL_WGTCAPACITY_MAX + 10
+#define FWL_MCCAPACITY_Sat FWL_WGTCAPACITY_MAX + 11
+#define FWL_MCCAPACITY_January FWL_WGTCAPACITY_MAX + 12
+#define FWL_MCCAPACITY_February FWL_WGTCAPACITY_MAX + 13
+#define FWL_MCCAPACITY_March FWL_WGTCAPACITY_MAX + 14
+#define FWL_MCCAPACITY_April FWL_WGTCAPACITY_MAX + 15
+#define FWL_MCCAPACITY_May FWL_WGTCAPACITY_MAX + 16
+#define FWL_MCCAPACITY_June FWL_WGTCAPACITY_MAX + 17
+#define FWL_MCCAPACITY_July FWL_WGTCAPACITY_MAX + 18
+#define FWL_MCCAPACITY_August FWL_WGTCAPACITY_MAX + 19
+#define FWL_MCCAPACITY_September FWL_WGTCAPACITY_MAX + 20
+#define FWL_MCCAPACITY_October FWL_WGTCAPACITY_MAX + 21
+#define FWL_MCCAPACITY_November FWL_WGTCAPACITY_MAX + 22
+#define FWL_MCCAPACITY_December FWL_WGTCAPACITY_MAX + 23
+#define FWL_MCCAPACITY_Today FWL_WGTCAPACITY_MAX + 24
+#define FWL_EVENT_MCD_DATESELECTED L"FWL_EVENT_MCD_DateSelected"
+#define FWL_EVT_MCD_DateChanged L"FWL_EVENT_MCD_DateChanged"
+#define FWL_NOTEHASH_MCD_DATASELECTED 1085596932
+#define FWL_EVTHASH_MCD_DateChanged 54212227
+BEGIN_FWL_EVENT_DEF(CFWL_Event_McdDateSelected, FWL_NOTEHASH_MCD_DATASELECTED)
+FX_INT32 m_iStartDay;
+FX_INT32 m_iEndDay;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EventMcdDateChanged, FWL_EVTHASH_MCD_DateChanged)
+FX_INT32 m_iOldYear;
+FX_INT32 m_iOldMonth;
+FX_INT32 m_iStartDay;
+FX_INT32 m_iEndDay;
+END_FWL_EVENT_DEF
+class IFWL_MonthCalendarDP : public IFWL_DataProvider
+{
+public:
+ virtual FX_INT32 GetCurDay(IFWL_Widget *pWidget) = 0;
+ virtual FX_INT32 GetCurMonth(IFWL_Widget *pWidget) = 0;
+ virtual FX_INT32 GetCurYear(IFWL_Widget *pWidget) = 0;
+};
+class IFWL_MonthCalendar : public IFWL_Widget
+{
+public:
+ static IFWL_MonthCalendar* Create();
+
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FX_INT32 CountSelect();
+ FX_BOOL GetSelect(FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay, FX_INT32 nIndex = 0);
+ FX_BOOL SetSelect(FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 iDay);
+protected:
+ IFWL_MonthCalendar();
+ virtual ~IFWL_MonthCalendar();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_picturebox.h b/xfa/include/fwl/basewidget/fwl_picturebox.h
new file mode 100644
index 0000000000..419fd4e0d1
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_picturebox.h
@@ -0,0 +1,55 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_PICTUREBOX_H
+#define _FWL_PICTUREBOX_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_PictureBoxDP;
+class IFWL_PictureBox;
+#define FWL_CLASS_PictureBox L"FWL_PICTUREBOX"
+#define FWL_CLASSHASH_PictureBox 2974721741
+#define FWL_STYLEEXT_PTB_Left 0L << 0
+#define FWL_STYLEEXT_PTB_Center 1L << 0
+#define FWL_STYLEEXT_PTB_Right 2L << 0
+#define FWL_STYLEEXT_PTB_Top 0L << 2
+#define FWL_STYLEEXT_PTB_Vcenter 1L << 2
+#define FWL_STYLEEXT_PTB_Bottom 2L << 2
+#define FWL_STYLEEXT_PTB_Normal 0L << 4
+#define FWL_STYLEEXT_PTB_AutoSize 1L << 4
+#define FWL_STYLEEXT_PTB_StretchImage 2L << 4
+#define FWL_STYLEEXT_PTB_StretchHImage 3L << 4
+#define FWL_STYLEEXT_PTB_StretchVImage 4L << 4
+#define FWL_STYLEEXT_PTB_HAlignMask 3L << 0
+#define FWL_STYLEEXT_PTB_VAlignMask 3L << 2
+#define FWL_STYLEEXT_PTB_StretchAlignMask 7L << 4
+#define FWL_PART_PTB_Border 1
+#define FWL_PART_PTB_Edge 2
+#define FWL_PART_PTB_Image 3
+#define FWL_PARTSTATE_PTB_Normal (0L << 0)
+#define FWL_PARTSTATE_PTB_Disabled (1L << 0)
+class IFWL_PictureBoxDP : public IFWL_DataProvider
+{
+public:
+ virtual CFX_DIBitmap* GetPicture(IFWL_Widget *pWidget) = 0;
+ virtual CFX_DIBitmap* GetErrorPicture(IFWL_Widget *pWidget) = 0;
+ virtual CFX_DIBitmap* GetInitialPicture(IFWL_Widget *pWidget) = 0;
+ virtual FX_INT32 GetOpacity(IFWL_Widget *pWidget) = 0;
+ virtual FX_INT32 GetFlipMode(IFWL_Widget *pWidget) = 0;
+ virtual FWL_ERR GetMatrix(IFWL_Widget *pWidget, CFX_Matrix &matrix) = 0;
+};
+class IFWL_PictureBox : public IFWL_Widget
+{
+public:
+ static IFWL_PictureBox* Create();
+
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+protected:
+ IFWL_PictureBox();
+ virtual ~IFWL_PictureBox();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_pushbutton.h b/xfa/include/fwl/basewidget/fwl_pushbutton.h
new file mode 100644
index 0000000000..890689a141
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_pushbutton.h
@@ -0,0 +1,57 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_PUSHBUTTON_H
+#define _FWL_PUSHBUTTON_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_PushButtonDP;
+class IFWL_PushButton;
+#define FWL_CLASS_PushButton L"FWL_PUSHBUTTON"
+#define FWL_CLASSHASH_PushButton 3521614244
+#define FWL_STYLEEXT_PSB_Left (0L << 0)
+#define FWL_STYLEEXT_PSB_Center (1L << 0)
+#define FWL_STYLEEXT_PSB_Right (2L << 0)
+#define FWL_STYLEEXT_PSB_Top (0L << 2)
+#define FWL_STYLEEXT_PSB_VCenter (1L << 2)
+#define FWL_STYLEEXT_PSB_Bottom (2L << 2)
+#define FWL_STYLEEXT_PSB_TextOnly (0L << 4)
+#define FWL_STYLEEXT_PSB_IconOnly (1L << 4)
+#define FWL_STYLEEXT_PSB_TextIcon (2L << 4)
+#define FWL_STYLEEXT_PSB_HLayoutMask (3L << 0)
+#define FWL_STYLEEXT_PSB_VLayoutMask (3L << 2)
+#define FWL_STYLEEXT_PSB_ModeMask (3L << 4)
+#define FWL_STATE_PSB_Hovered (1 << FWL_WGTSTATE_MAX)
+#define FWL_STATE_PSB_Pressed (1 << (FWL_WGTSTATE_MAX + 1))
+#define FWL_STATE_PSB_Default (1 << (FWL_WGTSTATE_MAX + 2))
+#define FWL_WGTCAPACITY_PSB_Margin (FWL_WGTCAPACITY_MAX + 1)
+#define FWL_PART_PSB_Border 1
+#define FWL_PART_PSB_Edge 2
+#define FWL_PART_PSB_Background 3
+#define FWL_PART_PSB_Caption 4
+#define FWL_PARTSTATE_PSB_Normal (0L << 0)
+#define FWL_PARTSTATE_PSB_Pressed (1L << 0)
+#define FWL_PARTSTATE_PSB_Hovered (2L << 0)
+#define FWL_PARTSTATE_PSB_Default (3L << 0)
+#define FWL_PARTSTATE_PSB_Disabled (4L << 0)
+#define FWL_PARTSTATE_PSB_Focused (1L << 3)
+#define FWL_PARTSTATE_PSB_Mask (7L << 0)
+class IFWL_PushButtonDP : public IFWL_DataProvider
+{
+public:
+ virtual CFX_DIBitmap* GetPicture(IFWL_Widget *pWidget) = 0;
+};
+class IFWL_PushButton : public IFWL_Widget
+{
+public:
+ static IFWL_PushButton* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+protected:
+ IFWL_PushButton();
+ virtual ~IFWL_PushButton();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_scrollbar.h b/xfa/include/fwl/basewidget/fwl_scrollbar.h
new file mode 100644
index 0000000000..8fc76f6dae
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_scrollbar.h
@@ -0,0 +1,73 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_SCROLLBAR_H
+#define _FWL_SCROLLBAR_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_ScrollBarDP;
+class IFWL_ScrollBar;
+#define FWL_CLASS_ScrollBar L"FWL_SCROLLBAR"
+#define FWL_CLASSHASH_ScrollBar 2826584844
+#define FWL_STYLEEXT_SCB_Horz (0L << 0)
+#define FWL_STYLEEXT_SCB_Vert (1L << 0)
+#define FWL_PART_SCB_Border 1
+#define FWL_PART_SCB_Edge 2
+#define FWL_PART_SCB_Background 3
+#define FWL_PART_SCB_ForeArrow 4
+#define FWL_PART_SCB_BackArrow 5
+#define FWL_PART_SCB_Thumb 6
+#define FWL_PART_SCB_LowerTrack 7
+#define FWL_PART_SCB_UpperTrack 8
+#define FWL_PARTSTATE_SCB_Normal (0L << 0)
+#define FWL_PARTSTATE_SCB_Hovered (1L << 0)
+#define FWL_PARTSTATE_SCB_Pressed (2L << 0)
+#define FWL_PARTSTATE_SCB_Disabled (3L << 0)
+#define FWL_WGTHITTEST_SCB_ForeArrow FWL_WGTHITTEST_MAX + 1
+#define FWL_WGTHITTEST_SCB_BackArrow FWL_WGTHITTEST_MAX + 2
+#define FWL_WGTHITTEST_SCB_LowerTrack FWL_WGTHITTEST_MAX + 3
+#define FWL_WGTHITTEST_SCB_UpperTrack FWL_WGTHITTEST_MAX + 4
+#define FWL_WGTHITTEST_SCB_Thumb FWL_WGTHITTEST_MAX + 5
+#define FWL_CAPACITY_SCB_Size FWL_WGTCAPACITY_MAX
+enum FWL_SCBCODE {
+ FWL_SCBCODE_None = 1,
+ FWL_SCBCODE_Min ,
+ FWL_SCBCODE_Max ,
+ FWL_SCBCODE_PageBackward ,
+ FWL_SCBCODE_PageForward ,
+ FWL_SCBCODE_StepBackward ,
+ FWL_SCBCODE_StepForward ,
+ FWL_SCBCODE_Pos ,
+ FWL_SCBCODE_TrackPos ,
+ FWL_SCBCODE_EndScroll ,
+};
+class IFWL_ScrollBarDP : public IFWL_DataProvider
+{
+};
+class IFWL_ScrollBar : public IFWL_Widget
+{
+public:
+ static IFWL_ScrollBar* Create();
+
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = 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);
+protected:
+ IFWL_ScrollBar();
+ virtual ~IFWL_ScrollBar();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_spinbutton.h b/xfa/include/fwl/basewidget/fwl_spinbutton.h
new file mode 100644
index 0000000000..ba417f30bb
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_spinbutton.h
@@ -0,0 +1,43 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_SPINBUTTON_H
+#define _FWL_SPINBUTTON_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_SpinButton;
+#define FWL_CLASS_SpinButton L"FWL_SPINBUTTON"
+#define FWL_CLASSHASH_SpinButton 3793043646
+#define FWL_STYLEEXE_SPB_Vert (1L << 0)
+#define FWL_PART_SPB_Border 1
+#define FWL_PART_SPB_Edge 2
+#define FWL_PART_SPB_UpButton 3
+#define FWL_PART_SPB_DownButton 4
+#define FWL_PARTSTATE_SPB_Normal (0L << 0)
+#define FWL_PARTSTATE_SPB_Hovered (1L << 0)
+#define FWL_PARTSTATE_SPB_Pressed (2L << 0)
+#define FWL_PARTSTATE_SPB_Disabled (3L << 0)
+#define FWL_WGTHITTEST_SPB_UpButton (FWL_WGTHITTEST_MAX + 1)
+#define FWL_WGTHITTEST_SPB_DownButton (FWL_WGTHITTEST_MAX + 2)
+#define FWL_EVT_SPB_Click L"FWL_EVENT_SPB_Click"
+#define FWL_EVTHASH_SPB_Click 2927651187
+BEGIN_FWL_EVENT_DEF(CFWL_EvtSpbClick, FWL_EVTHASH_SPB_Click)
+FX_BOOL m_bUp;
+END_FWL_EVENT_DEF
+class IFWL_SpinButton : public IFWL_Widget
+{
+public:
+ static IFWL_SpinButton* Create();
+
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FWL_ERR EnableButton(FX_BOOL bEnable, FX_BOOL bUp = TRUE);
+ FX_BOOL IsButtonEnable(FX_BOOL bUp = TRUE);
+protected:
+ IFWL_SpinButton();
+ virtual ~IFWL_SpinButton();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_tooltipctrl.h b/xfa/include/fwl/basewidget/fwl_tooltipctrl.h
new file mode 100644
index 0000000000..d27b9a2638
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fwl_tooltipctrl.h
@@ -0,0 +1,45 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_TOOLTIP_H
+#define _FWL_TOOLTIP_H
+class CFWL_WidgetImpProperties;
+class IFWL_Form;
+class IFWL_ToolTipDP;
+class IFWL_ToolTip;
+#define FWL_CLASS_ToolTip L"FWL_TOOLTIP"
+#define FWL_CLASSHASH_ToolTip 1111984755
+#define FWL_STYLEEXT_TTP_Rectangle (0L << 3)
+#define FWL_STYLEEXT_TTP_RoundCorner (1L << 3)
+#define FWL_STYLEEXT_TTP_Balloon (1L << 4)
+#define FWL_STYLEEXT_TTP_Multiline (1L << 5)
+#define FWL_STYLEEXT_TTP_NoAnchor (1L << 6)
+#define FWL_PART_TTP_Border 1
+#define FWL_PART_TTP_Background 2
+#define FWL_PART_TTP_Caption 3
+class IFWL_ToolTipDP : public IFWL_DataProvider
+{
+public:
+ virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption) = 0;
+ virtual FX_INT32 GetInitialDelay(IFWL_Widget *pWidget) = 0;
+ virtual FX_INT32 GetAutoPopDelay(IFWL_Widget *pWidget) = 0;
+ virtual CFX_DIBitmap* GetToolTipIcon(IFWL_Widget *pWidget) = 0;
+ virtual CFX_SizeF GetToolTipIconSize(IFWL_Widget *pWidget) = 0;
+};
+class IFWL_ToolTip : public IFWL_Form
+{
+public:
+ static IFWL_ToolTip* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FWL_ERR SetAnchor(const CFX_RectF &rtAnchor);
+ FWL_ERR Show();
+ FWL_ERR Hide();
+protected:
+ IFWL_ToolTip();
+ virtual ~IFWL_ToolTip();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fxmath_barcode.h b/xfa/include/fwl/basewidget/fxmath_barcode.h
new file mode 100644
index 0000000000..d885ac4c57
--- /dev/null
+++ b/xfa/include/fwl/basewidget/fxmath_barcode.h
@@ -0,0 +1,41 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FXMATH_BARCODE_H_
+#define _FXMATH_BARCODE_H_
+class IFX_Barcode
+{
+public:
+ virtual void Release() = 0;
+ virtual BC_TYPE GetType() = 0;
+ virtual FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e) = 0;
+ virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e) = 0;
+ virtual FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e) = 0;
+ virtual CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 height, FX_INT32 &errorCode) = 0;
+ virtual CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &errorCode) = 0;
+ virtual FX_BOOL SetCharEncoding(BC_CHAR_ENCODING encoding) = 0;
+ virtual FX_BOOL SetModuleHeight(FX_INT32 moduleHeight) = 0;
+ virtual FX_BOOL SetModuleWidth(FX_INT32 moduleWidth) = 0;
+ virtual FX_BOOL SetHeight(FX_INT32 height) = 0;
+ virtual FX_BOOL SetWidth(FX_INT32 width) = 0;
+ virtual FX_BOOL CheckContentValidity(FX_WSTR contents) = 0;
+ virtual FX_BOOL SetPrintChecksum(FX_BOOL checksum) = 0;
+ virtual FX_BOOL SetDataLength(FX_INT32 length) = 0;
+ virtual FX_BOOL SetCalChecksum(FX_INT32 state) = 0;
+ virtual FX_BOOL SetFont(CFX_Font* pFont) = 0;
+ virtual FX_BOOL SetFontSize(FX_FLOAT size) = 0;
+ virtual FX_BOOL SetFontStyle(FX_INT32 style) = 0;
+ virtual FX_BOOL SetFontColor(FX_ARGB color) = 0;
+ virtual FX_BOOL SetTextLocation(BC_TEXT_LOC location) = 0;
+ virtual FX_BOOL SetWideNarrowRatio(FX_INT32 ratio) = 0;
+ virtual FX_BOOL SetStartChar(FX_CHAR start) = 0;
+ virtual FX_BOOL SetEndChar(FX_CHAR end) = 0;
+ virtual FX_BOOL SetVersion(FX_INT32 version) = 0;
+ virtual FX_BOOL SetErrorCorrectionLevel (FX_INT32 level) = 0;
+ virtual FX_BOOL SetTruncated(FX_BOOL truncated) = 0;
+};
+IFX_Barcode* FX_Barcode_Create(BC_TYPE type);
+#endif
diff --git a/xfa/include/fwl/core/fwl_app.h b/xfa/include/fwl/core/fwl_app.h
new file mode 100644
index 0000000000..89f6309a31
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_app.h
@@ -0,0 +1,35 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_APP_H
+#define _FWL_APP_H
+class IFWL_NoteThread;
+class IFWL_AdapterNative;
+class IFWL_Widget;
+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(FX_INT32 iExitCode = 0) = 0;
+};
+IFWL_App* FWL_GetApp();
+void FWL_SetApp(IFWL_App *pApp);
+IFWL_AdapterNative* FWL_GetAdapterNative();
+IFWL_AdapterWidgetMgr* FWL_GetAdapterWidgetMgr();
+IFWL_ThemeProvider* FWL_GetThemeProvider();
+extern FWL_ERR FWL_Execute(FX_WSTR wsExecutable, FX_WSTR 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
new file mode 100644
index 0000000000..51d5e9e8df
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_content.h
@@ -0,0 +1,27 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_CONTENT_H
+#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, FX_INT32 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
new file mode 100644
index 0000000000..4bd2ae4407
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_error.h
@@ -0,0 +1,49 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_ERROR_H
+#define _FWL_ERROR_H
+typedef FX_INT32 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[16]; \
+ sprintf(buf, "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; }
+#endif
diff --git a/xfa/include/fwl/core/fwl_form.h b/xfa/include/fwl/core/fwl_form.h
new file mode 100644
index 0000000000..eb0b083008
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_form.h
@@ -0,0 +1,83 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_FORM_H
+#define _FWL_FORM_H
+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_STYLEEXT_FRM_BorderCornerMask (3L << 1)
+#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
+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,
+};
+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,
+};
+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
new file mode 100644
index 0000000000..2883fd3784
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_grid.h
@@ -0,0 +1,76 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_GRID_H
+#define _FWL_GRID_H
+class IFWL_Widget;
+class IFWL_Content;
+class IFWL_Grid;
+#define FWL_CLASS_Grid L"FWL_GRID"
+#define FWL_CLASSHASH_Grid 3150298670
+#define FWL_GRIDSTYLEEXT_ShowGridLines (1L << 0)
+struct FWL_LAYOUTDATA : public CFX_Object {
+ FX_FLOAT fWidth;
+ FX_FLOAT fHeight;
+};
+enum FWL_GRIDUNIT {
+ 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,
+};
+enum FWL_GRIDSIZE {
+ FWL_GRIDSIZE_Width = 0,
+ FWL_GRIDSIZE_Height,
+ FWL_GRIDSIZE_MinWidth,
+ FWL_GRIDSIZE_MinHeight,
+ FWL_GRIDSIZE_MaxWidth,
+ FWL_GRIDSIZE_MaxHeight,
+};
+typedef struct _FWL_HGRIDCOLROW {
+ FX_LPVOID 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, FX_INT32 nIndex = -1);
+ FX_INT32 CountColRows(FX_BOOL bColumn);
+ FWL_HGRIDCOLROW GetColRow(FX_BOOL bColumn, FX_INT32 nIndex);
+ FX_INT32 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);
+ FX_INT32 GetWidgetPos(IFWL_Widget *pWidget, FX_BOOL bColumn);
+ FWL_ERR SetWidgetPos(IFWL_Widget *pWidget, FX_INT32 iPos, FX_BOOL bColumn);
+ FX_INT32 GetWidgetSpan(IFWL_Widget *pWidget, FX_BOOL bColumn);
+ FWL_ERR SetWidgetSpan(IFWL_Widget *pWidget, FX_INT32 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
new file mode 100644
index 0000000000..01d7ae44ca
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_note.h
@@ -0,0 +1,389 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_NOTE_H
+#define _FWL_NOTE_H
+class IFWL_Target;
+class IFWL_Widget;
+class IFWL_NoteThread;
+class IFWL_ThemeProvider;
+class CFWL_Note;
+class CFWL_Message;
+class CFWL_MsgActivate;
+class CFWL_MsgDeactivate;
+class CFWL_MsgMouse;
+class CFWL_MsgMouseWheel;
+class CFWL_MsgKey;
+class CFWL_MsgSetFocus;
+class CFWL_MsgKillFocus;
+class CFWL_MsgCursor;
+class CFWL_MsgSize;
+class CFWL_MsgWindowMove;
+class CFWL_MsgDropFiles;
+class CFWL_MsgTaskClicked;
+class CFWL_MsgClose;
+class CFWL_MsgWindowWillMove;
+class CFWL_Event;
+class CFWL_EvtMouse;
+class CFWL_EvtMouseWheel;
+class CFWL_EvtKey;
+class CFWL_EvtSetFocus;
+class CFWL_EvtKillFocus;
+class CFWL_EvtDraw;
+class CFWL_EvtClick;
+class CFWL_EvtScroll;
+class CFWL_EvtClose;
+class CFWL_EvtContextMenu;
+class CFWL_EvtMenuCommand;
+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 CFX_Object
+{
+public:
+ virtual FX_DWORD Release()
+ {
+ m_dwRefCount --;
+ FX_DWORD dwRefCount = m_dwRefCount;
+ if (!m_dwRefCount) {
+ delete this;
+ }
+ 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(FX_WSTR 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 FX_INT32 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;
+ }
+};
+#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;
+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;
+END_FWL_MESSAGE_DEF
+BEGIN_FWL_MESSAGE_DEF(CFWL_MsgSetFocus, FWL_MSGHASH_SetFocus)
+IFWL_Widget *m_pKillFocus;
+END_FWL_MESSAGE_DEF
+BEGIN_FWL_MESSAGE_DEF(CFWL_MsgKillFocus, FWL_MSGHASH_KillFocus)
+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;
+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)
+FX_INT32 m_iWidth;
+FX_INT32 m_iHeight;
+END_FWL_MESSAGE_DEF
+BEGIN_FWL_MESSAGE_DEF(CFWL_MsgWindowMove, FWL_MSGHASH_WindowMove)
+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);
+}
+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;
+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() {}
+};
+#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;
+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;
+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;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtSetFocus, FWL_EVTHASH_SetFocus)
+IFWL_Widget *m_pSetFocus;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtKillFocus, FWL_EVTHASH_KillFocus)
+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;
+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;
+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;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtMenuCommand, FWL_EVTHASH_MenuCommand)
+FX_INT32 m_iCommand;
+FX_LPVOID 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;
+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
+} FWLEventMask;
+class IFWL_NoteDriver
+{
+public:
+ 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 FX_INT32 GetQueueMaxSize() const = 0;
+ virtual FWL_ERR SetQueueMaxSize(const FX_INT32 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 FX_BOOL PreProcessMessage(CFWL_Message *pMessage) = 0;
+ virtual FWL_ERR Idle(FX_INT32 count) = 0;
+};
+class IFWL_ToolTipTarget
+{
+public:
+ 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(FX_INT32 iDelayTime);
+FWL_ERR FWL_SetToolTipAutoPopDelay(FX_INT32 iDelayTime);
+typedef FX_BOOL (*FWLMessageHookCallback)(CFWL_Message *msg, FX_LPVOID info);
+FWL_ERR FWL_SetHook(IFWL_NoteDriver *driver, FWLMessageHookCallback callback, FX_LPVOID info);
+#endif
diff --git a/xfa/include/fwl/core/fwl_panel.h b/xfa/include/fwl/core/fwl_panel.h
new file mode 100644
index 0000000000..94c354a698
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_panel.h
@@ -0,0 +1,40 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_PANEL_H
+#define _FWL_PANEL_H
+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();
+};
+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
new file mode 100644
index 0000000000..3c8b531f24
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_target.h
@@ -0,0 +1,25 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#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(FX_WSTR wsClass) const;
+ FWL_ERR Initialize();
+ FWL_ERR Finalize();
+protected:
+ virtual ~IFWL_Target();
+ FX_LPVOID m_pData;
+};
+#endif
diff --git a/xfa/include/fwl/core/fwl_theme.h b/xfa/include/fwl/core/fwl_theme.h
new file mode 100644
index 0000000000..efef288afc
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_theme.h
@@ -0,0 +1,91 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_THEME_H
+#define _FWL_THEME_H
+class IFWL_Widget;
+class CFWL_ThemePart;
+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 CFX_Object
+{
+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;
+ FX_INT32 m_iPart;
+ FX_DWORD m_dwStates;
+ FX_DWORD m_dwData;
+ FX_LPVOID 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_ThemeText : public CFWL_ThemePart
+{
+public:
+ CFWL_ThemeText()
+ : m_pGraphics(NULL)
+ {
+ }
+ CFX_WideString m_wsText;
+ FX_DWORD m_dwTTOStyles;
+ FX_INT32 m_iTTOAlign;
+ CFX_Graphics *m_pGraphics;
+};
+class IFWL_ThemeProvider
+{
+public:
+ 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 FX_LPVOID 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
new file mode 100644
index 0000000000..9ce742b368
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_thread.h
@@ -0,0 +1,56 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_THREAD_H
+#define _FWL_THREAD_H
+class IFWL_NoteDriver;
+class IFWL_Thread;
+class IFWL_NoteThread;
+typedef struct _FWL_HTHREAD {
+ FX_LPVOID 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_ERR FWL_ResumeThread(FWL_HTHREAD hThread);
+FWL_ERR FWL_SuspendThread(FWL_HTHREAD hThread);
+FWL_ERR FWL_KillThread(FWL_HTHREAD hThread, FX_INT32 iExitCode);
+FWL_ERR FWL_StopThread(FWL_HTHREAD hThread, FX_INT32 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;
+};
+typedef struct _FWL_HMUTEX {
+ FX_LPVOID 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 {
+ FX_LPVOID 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, FX_INT32 down = 1);
+FWL_ERR FWL_GetSemaphoreValue(FWL_HSEMAPHORE hSemaphore, FX_INT32 &value);
+FWL_ERR FWL_ResetSemaphore(FWL_HSEMAPHORE hSemaphore, FX_INT32 init);
+#endif
diff --git a/xfa/include/fwl/core/fwl_timer.h b/xfa/include/fwl/core/fwl_timer.h
new file mode 100644
index 0000000000..3e83c299ff
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_timer.h
@@ -0,0 +1,20 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_TIMER_H
+#define _FWL_TIMER_H
+class IFWL_Timer;
+typedef struct _FWL_HTIMER {
+ FX_LPVOID pData;
+} *FWL_HTIMER;
+class IFWL_Timer
+{
+public:
+ virtual FX_INT32 Run(FWL_HTIMER hTimer) = 0;
+};
+FWL_HTIMER FWL_StartTimer(IFWL_Timer *pTimer, FX_DWORD dwElapse, FX_BOOL bImmediately = TRUE);
+FX_INT32 FWL_StopTimer(FWL_HTIMER hTimer);
+#endif
diff --git a/xfa/include/fwl/core/fwl_widget.h b/xfa/include/fwl/core/fwl_widget.h
new file mode 100644
index 0000000000..f29932f2f2
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_widget.h
@@ -0,0 +1,122 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_WIDGET_H
+#define _FWL_WIDGET_H
+class IFWL_Target;
+class IFWL_ThemeProvider;
+class CFWL_WidgetImpProperties;
+class IFWL_DataProvider;
+class IFWL_Widget;
+class IFWL_WidgetDelegate;
+class IFWL_Custom;
+class IFWL_Proxy;
+class IFWL_Form;
+class IFWL_DataProvider
+{
+public:
+ 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(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);
+ FX_LPVOID GetPrivateData(FX_LPVOID 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 FX_INT32 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 CFX_Object
+{
+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();
+
+ 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 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)
+typedef struct _FWL_ACCEL {
+ 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);
+#endif
diff --git a/xfa/include/fwl/core/fwl_widgetdef.h b/xfa/include/fwl/core/fwl_widgetdef.h
new file mode 100644
index 0000000000..27c3b55b67
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_widgetdef.h
@@ -0,0 +1,247 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#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
+#endif
diff --git a/xfa/include/fwl/core/fwl_widgetmgr.h b/xfa/include/fwl/core/fwl_widgetmgr.h
new file mode 100644
index 0000000000..8db4f34503
--- /dev/null
+++ b/xfa/include/fwl/core/fwl_widgetmgr.h
@@ -0,0 +1,47 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_WIDGETMGR_H
+#define _FWL_WIDGETMGR_H
+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
+};
+class IFWL_WidgetMgr
+{
+public:
+ virtual FX_INT32 CountWidgets(IFWL_Widget *pParent = NULL) = 0;
+ virtual IFWL_Widget* GetWidget(FX_INT32 nIndex, IFWL_Widget *pParent = NULL) = 0;
+ virtual IFWL_Widget* GetWidget(IFWL_Widget *pWidget, FWL_WGTRELATION eRelation) = 0;
+ virtual FX_INT32 GetWidgetIndex(IFWL_Widget *pWidget) = 0;
+ virtual FX_BOOL SetWidgetIndex(IFWL_Widget *pWidget, FX_INT32 nIndex) = 0;
+ virtual FX_BOOL IsWidget(FX_LPVOID 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 FWL_ERR OnSetCapability(FX_DWORD dwCapability = FWL_WGTMGR_DisableThread) = 0;
+ virtual FX_INT32 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);
+#endif
diff --git a/xfa/include/fwl/fwl.h b/xfa/include/fwl/fwl.h
new file mode 100644
index 0000000000..a8363a192b
--- /dev/null
+++ b/xfa/include/fwl/fwl.h
@@ -0,0 +1,76 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_H
+#define _FWL_H
+#include "core/fwl_error.h"
+#include "core/fwl_target.h"
+#include "core/fwl_thread.h"
+#include "core/fwl_note.h"
+#include "core/fwl_widgetdef.h"
+#include "core/fwl_theme.h"
+#include "core/fwl_widget.h"
+#include "core/fwl_content.h"
+#include "core/fwl_panel.h"
+#include "core/fwl_form.h"
+#include "core/fwl_widgetmgr.h"
+#include "core/fwl_timer.h"
+#include "core/fwl_app.h"
+#include "core/fwl_grid.h"
+#include "basewidget/fwl_pushbutton.h"
+#include "basewidget/fwl_checkbox.h"
+#include "basewidget/fwl_scrollbar.h"
+#include "basewidget/fwl_listbox.h"
+#include "basewidget/fwl_edit.h"
+#include "basewidget/fwl_picturebox.h"
+#include "basewidget/fwl_combobox.h"
+#include "basewidget/fwl_menu.h"
+#include "basewidget/fwl_monthcalendar.h"
+#include "basewidget/fwl_datetimepicker.h"
+#include "basewidget/fwl_spinbutton.h"
+#include "basewidget/fwl_barcode.h"
+#include "basewidget/fxmath_barcode.h"
+#include "basewidget/fwl_tooltipctrl.h"
+#include "basewidget/fwl_caret.h"
+#include "lightwidget/app.h"
+#include "lightwidget/widget.h"
+#include "lightwidget/pushbutton.h"
+#include "lightwidget/checkbox.h"
+#include "lightwidget/scrollbar.h"
+#include "lightwidget/listbox.h"
+#include "lightwidget/picturebox.h"
+#include "lightwidget/edit.h"
+#include "lightwidget/combobox.h"
+#include "lightwidget/datetimepicker.h"
+#include "lightwidget/barcode.h"
+#include "lightwidget/theme.h"
+#include "lightwidget/tooltipctrl.h"
+#include "lightwidget/caret.h"
+#include "theme/utils.h"
+#include "theme/widgettp.h"
+#include "theme/barcodetp.h"
+#include "theme/checkboxtp.h"
+#include "theme/comboboxtp.h"
+#include "theme/datetimepickertp.h"
+#include "theme/edittp.h"
+#include "theme/formtp.h"
+#include "theme/listboxtp.h"
+#include "theme/monthcalendartp.h"
+#include "theme/pictureboxtp.h"
+#include "theme/pushbuttontp.h"
+#include "theme/scrollbartp.h"
+#include "theme/widgettp.h"
+#include "theme/barcodetp.h"
+#include "theme/carettp.h"
+#include "adapter/fwl_adapternative.h"
+#include "adapter/fwl_adapterthreadmgr.h"
+#include "adapter/fwl_adaptertimermgr.h"
+#include "adapter/fwl_adapterwidgetmgr.h"
+#include "adapter/fwl_adaptercursormgr.h"
+#include "adapter/fwl_adaptermonitormgr.h"
+#include "adapter/fwl_adapterclipboardmgr.h"
+#include "adapter/fwl_sdadapterimp.h"
+#endif
diff --git a/xfa/include/fwl/lightwidget/app.h b/xfa/include/fwl/lightwidget/app.h
new file mode 100644
index 0000000000..11919508aa
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/app.h
@@ -0,0 +1,25 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_APP_LIGHT_H
+#define _FWL_APP_LIGHT_H
+class CFWL_Theme;
+class IFWL_App;
+class CFWL_App;
+class CFWL_App : public CFX_Object
+{
+public:
+ CFWL_App();
+ virtual ~CFWL_App();
+ FWL_ERR Initialize();
+ CFWL_Theme* GetTheme();
+ FWL_ERR Exit(FX_INT32 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
new file mode 100644
index 0000000000..e8fcfea476
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/barcode.h
@@ -0,0 +1,177 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_BARCODE_LIGHT_H
+#define _FWL_BARCODE_LIGHT_H
+class CFWL_Widget;
+class CFWL_WidgetProperties;
+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(FX_INT32 height)
+ {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT;
+ m_barcodeData.m_nModuleHeight = height;
+ }
+ void SetModuleWidth(FX_INT32 width)
+ {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEWIDTH;
+ m_barcodeData.m_nModuleWidth = width;
+ }
+ void SetDataLength(FX_INT32 dataLength)
+ {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_DATALENGTH;
+ m_barcodeData.m_nDataLength = dataLength;
+ ((IFWL_Barcode*)m_pImp)->SetLimit(dataLength);
+ }
+ void SetCalChecksum(FX_INT32 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(FX_INT32 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(FX_INT32 version)
+ {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_VERSION;
+ m_barcodeData.m_nVersion = version;
+ }
+ void SetErrorCorrectionLevel(FX_INT32 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;
+ }
+ FX_INT32 m_nModuleHeight, m_nModuleWidth;
+ virtual FX_INT32 GetModuleHeight()
+ {
+ return m_nModuleHeight;
+ }
+ virtual FX_INT32 GetModuleWidth()
+ {
+ return m_nModuleWidth;
+ }
+ FX_INT32 m_nDataLength;
+ virtual FX_INT32 GetDataLength()
+ {
+ return m_nDataLength;
+ }
+ FX_INT32 m_nCalChecksum;
+ virtual FX_INT32 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;
+ }
+ FX_INT32 m_nWideNarrowRatio;
+ virtual FX_INT32 GetWideNarrowRatio()
+ {
+ return m_nWideNarrowRatio;
+ }
+ FX_CHAR m_cStartChar, m_cEndChar;
+ virtual FX_CHAR GetStartChar()
+ {
+ return m_cStartChar;
+ }
+ virtual FX_CHAR GetEndChar()
+ {
+ return m_cEndChar;
+ }
+ FX_INT32 m_nVersion;
+ virtual FX_INT32 GetVersion()
+ {
+ return m_nVersion;
+ }
+ FX_INT32 m_nECLevel;
+ virtual FX_INT32 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
new file mode 100644
index 0000000000..d4c2e7702f
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/caret.h
@@ -0,0 +1,25 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_CARET_LIGHT_H
+#define _FWL_CARET_LIGHT_H
+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();
+};
+#endif
diff --git a/xfa/include/fwl/lightwidget/checkbox.h b/xfa/include/fwl/lightwidget/checkbox.h
new file mode 100644
index 0000000000..2f7b2bac97
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/checkbox.h
@@ -0,0 +1,39 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_CHECKBOX_LIGHT_H
+#define _FWL_CHECKBOX_LIGHT_H
+class CFWL_Widget;
+class CFWL_WidgetProperties;
+class IFWL_CheckBoxDP;
+class CFWL_CheckBox;
+class CFWL_CheckBoxDP;
+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(FX_WSTR wsCaption);
+ FWL_ERR SetBoxSize(FX_FLOAT fHeight);
+ FX_INT32 GetCheckState();
+ FWL_ERR SetCheckState(FX_INT32 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
new file mode 100644
index 0000000000..eac58569aa
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/combobox.h
@@ -0,0 +1,115 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_COMBOBOX_LIGHT_H
+#define _FWL_COMBOBOX_LIGHT_H
+class CFWL_Widget;
+class CFWL_WidgetProperties;
+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);
+ FX_INT32 AddString(FX_WSTR wsText);
+ FX_INT32 AddString(FX_WSTR wsText, CFX_DIBitmap *pIcon);
+ FX_INT32 RemoveAt(FX_INT32 iIndex);
+ FX_INT32 RemoveAll();
+ FX_INT32 CountItems();
+ FWL_ERR GetTextByIndex(FX_INT32 iIndex, CFX_WideString &wsText);
+ FX_INT32 GetCurSel();
+ FWL_ERR SetCurSel(FX_INT32 iSel);
+ FWL_ERR SetEditText(FX_WSTR wsText);
+ FX_INT32 GetEditTextLength() const;
+ FWL_ERR GetEditText(CFX_WideString &wsText, FX_INT32 nStart = 0, FX_INT32 nCount = -1) const ;
+ FWL_ERR SetEditSelRange(FX_INT32 nStart, FX_INT32 nCount = -1);
+ FX_INT32 GetEditSelRange(FX_INT32 nIndex, FX_INT32 &nStart);
+ FX_INT32 GetEditLimit();
+ FWL_ERR SetEditLimit(FX_INT32 nLimit);
+ FWL_ERR EditDoClipboard(FX_INT32 iCmd);
+ FX_BOOL EditRedo(FX_BSTR bsRecord);
+ FX_BOOL EditUndo(FX_BSTR bsRecord);
+ FWL_ERR SetMaxListHeight(FX_FLOAT fMaxHeight);
+ FWL_ERR SetItemData(FX_INT32 iIndex, FX_LPVOID pData);
+ FX_LPVOID GetItemData(FX_INT32 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;
+ }
+
+ virtual FX_INT32 CountItems(IFWL_Widget *pWidget);
+ virtual FWL_HLISTITEM GetItem(IFWL_Widget *pWidget, FX_INT32 nIndex);
+ virtual FX_INT32 GetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
+ virtual FX_BOOL SetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_INT32 nIndex);
+
+ 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 FX_LPVOID 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, FX_LPCWSTR 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 CFX_Object
+{
+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;
+ FX_LPVOID m_pData;
+};
+#endif
diff --git a/xfa/include/fwl/lightwidget/datetimepicker.h b/xfa/include/fwl/lightwidget/datetimepicker.h
new file mode 100644
index 0000000000..73a382c08c
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/datetimepicker.h
@@ -0,0 +1,58 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_DATETIMEPICKER_LIGHT_H
+#define _FWL_DATETIMEPICKER_LIGHT_H
+class CFWL_Widget;
+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(FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 iDay);
+ FWL_ERR GetEditText(CFX_WideString &wsText);
+ FWL_ERR SetEditText(FX_WSTR wsText);
+ FX_INT32 CountSelRanges();
+ FX_INT32 GetSelRange(FX_INT32 nIndex, FX_INT32 &nStart);
+ FWL_ERR GetCurSel(FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay);
+ FWL_ERR SetCurSel(FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 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(FX_INT32 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, FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay);
+ FX_INT32 m_iYear;
+ FX_INT32 m_iMonth;
+ FX_INT32 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
new file mode 100644
index 0000000000..8299a20322
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/edit.h
@@ -0,0 +1,57 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_EDIT_LIGHT_H
+#define _FWL_EDIT_LIGHT_H
+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);
+ FX_INT32 GetTextLength() const;
+ FWL_ERR GetText(CFX_WideString &wsText, FX_INT32 nStart = 0, FX_INT32 nCount = -1) const;
+ FWL_ERR ClearText();
+ FX_INT32 GetCaretPos() const;
+ FX_INT32 SetCaretPos(FX_INT32 nIndex, FX_BOOL bBefore = TRUE);
+ FWL_ERR AddSelRange(FX_INT32 nStart, FX_INT32 nCount = -1);
+ FX_INT32 CountSelRanges();
+ FX_INT32 GetSelRange(FX_INT32 nIndex, FX_INT32 &nStart);
+ FWL_ERR ClearSelections();
+ FX_INT32 GetLimit();
+ FWL_ERR SetLimit(FX_INT32 nLimit);
+ FWL_ERR SetAliasChar(FX_WCHAR wAlias);
+ FWL_ERR SetFormatString(const CFX_WideString &wsFormat);
+ FWL_ERR Insert(FX_INT32 nStart, FX_LPCWSTR lpText, FX_INT32 nLen);
+ FWL_ERR DeleteSelections();
+ FWL_ERR DeleteRange(FX_INT32 nStart, FX_INT32 nCount = -1);
+ FWL_ERR ReplaceSelections(const CFX_WideStringC &wsReplace);
+ FWL_ERR Replace(FX_INT32 nStart, FX_INT32 nLen, const CFX_WideStringC &wsReplace);
+ FWL_ERR DoClipboard(FX_INT32 iCmd);
+ FX_BOOL Redo(FX_BSTR bsRecord);
+ FX_BOOL Undo(FX_BSTR bsRecord);
+ FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
+ FWL_ERR SetNumberRange(FX_INT32 iMin, FX_INT32 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, FX_BSTR bsReplace);
+ CFWL_Edit();
+ virtual ~CFWL_Edit();
+};
+#endif
diff --git a/xfa/include/fwl/lightwidget/listbox.h b/xfa/include/fwl/lightwidget/listbox.h
new file mode 100644
index 0000000000..3cb1131e8b
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/listbox.h
@@ -0,0 +1,98 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_LISTBOX_LIGHT_H
+#define _FWL_LISTBOX_LIGHT_H
+class CFWL_Widget;
+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(FX_WSTR wsAdd, FX_BOOL bSelect = FALSE);
+ FX_BOOL DeleteString(FWL_HLISTITEM hItem);
+ FX_BOOL DeleteAll();
+ FX_INT32 CountSelItems();
+ FWL_HLISTITEM GetSelItem(FX_INT32 nIndexSel);
+ FX_INT32 GetSelIndex(FX_INT32 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);
+ FX_INT32 CountItems();
+ FWL_HLISTITEM GetItem(FX_INT32 nIndex);
+ FWL_ERR SetItemString(FWL_HLISTITEM hItem, FX_WSTR wsText);
+ FWL_ERR GetItemString(FWL_HLISTITEM hItem, CFX_WideString &wsText);
+ FWL_ERR SetItemData(FWL_HLISTITEM hItem, FX_LPVOID pData);
+ FX_LPVOID 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 CFX_Object
+ {
+ public:
+ CFWL_ListBoxDP();
+ ~CFWL_ListBoxDP();
+ virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);
+
+ virtual FX_INT32 CountItems(IFWL_Widget *pWidget);
+ virtual FWL_HLISTITEM GetItem(IFWL_Widget *pWidget, FX_INT32 nIndex);
+ virtual FX_INT32 GetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
+ virtual FX_BOOL SetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_INT32 nIndex);
+
+ 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 FX_LPVOID 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, FX_LPCWSTR 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 CFX_Object
+{
+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;
+ FX_LPVOID 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
new file mode 100644
index 0000000000..dd87d6806b
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/picturebox.h
@@ -0,0 +1,65 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_PICTUREBOX_LIGHT_H
+#define _FWL_PICTUREBOX_LIGHT_H
+class CFWL_Widget;
+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);
+ FX_INT32 GetFlipMode();
+ FWL_ERR SetFlipMode(FX_INT32 iFlipMode);
+ FX_INT32 GetOpacity();
+ FWL_ERR SetOpacity(FX_INT32 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 FX_INT32 GetOpacity(IFWL_Widget *pWidget);
+ virtual FX_INT32 GetFlipMode(IFWL_Widget *pWidget);
+ virtual FWL_ERR GetMatrix(IFWL_Widget *pWidget, CFX_Matrix &matrix);
+ CFX_DIBitmap *m_pBitmap;
+ FX_INT32 m_iOpacity;
+ FX_INT32 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
new file mode 100644
index 0000000000..a7c2a13cfa
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/pushbutton.h
@@ -0,0 +1,37 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_PUSHBUTTON_LIGHT_H
+#define _FWL_PUSHBUTTON_LIGHT_H
+class CFWL_Widget;
+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(FX_WSTR 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
new file mode 100644
index 0000000000..5aabd56685
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/scrollbar.h
@@ -0,0 +1,32 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_SCROLLBAR_LIGHT_H
+#define _FWL_SCROLLBAR_LIGHT_H
+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();
+};
+#endif
diff --git a/xfa/include/fwl/lightwidget/theme.h b/xfa/include/fwl/lightwidget/theme.h
new file mode 100644
index 0000000000..95e4ed16e3
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/theme.h
@@ -0,0 +1,39 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_THEME_LIGHT_H
+#define _FWL_THEME_LIGHT_H
+class CFWL_ThemeBackground;
+class CFWL_ThemeText;
+class CFWL_ThemePart;
+class CFWL_WidgetTP;
+class IFWL_Widget;
+class CFWL_Theme;
+class CFWL_Theme : public CFX_Object
+{
+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 FX_LPVOID 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, FX_LPCWSTR 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
new file mode 100644
index 0000000000..114696ff13
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/tooltipctrl.h
@@ -0,0 +1,54 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_ToolTip_LIGHT_H
+#define _FWL_ToolTip_LIGHT_H
+class CFWL_Widget;
+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(FX_WSTR wsCaption);
+ FX_INT32 GetInitialDelay();
+ FX_INT32 SetInitialDelay(FX_INT32 nDelayTime);
+ FX_INT32 GetAutoPopDelay();
+ FX_INT32 SetAutoPopDelay(FX_INT32 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);
+ FX_INT32 GetInitialDelay(IFWL_Widget *pWidget);
+ FX_INT32 GetAutoPopDelay(IFWL_Widget *pWidget);
+ CFX_DIBitmap* GetToolTipIcon(IFWL_Widget *pWidget);
+ CFX_SizeF GetToolTipIconSize(IFWL_Widget *pWidget);
+ CFX_RectF GetAnchor();
+ CFX_WideString m_wsCaption;
+ FX_INT32 m_nInitDelayTime;
+ FX_INT32 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
new file mode 100644
index 0000000000..af5bddb5e7
--- /dev/null
+++ b/xfa/include/fwl/lightwidget/widget.h
@@ -0,0 +1,101 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_WIDGET_LIGHT_H
+#define _FWL_WIDGET_LIGHT_H
+class CFWL_WidgetMgr;
+class CFWL_Message;
+class CFWL_Event;
+class IFWL_WidgetDelegate;
+class IFWL_Widget;
+class CFWL_Widget;
+class CFWL_WidgetDelegate;
+class CFWL_WidgetProperties : public CFX_Object
+{
+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 CFX_Object
+{
+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(FX_WSTR 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(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);
+ FX_LPVOID GetPrivateData(FX_LPVOID 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, FX_INT32 iLineWidth = -1);
+ IFWL_Widget *m_pImp;
+ IFWL_WidgetDelegate *m_pDelegate;
+ CFWL_WidgetMgr *m_pWidgetMgr;
+ CFWL_WidgetProperties *m_pProperties;
+};
+class CFWL_WidgetDelegate : public CFX_Object, public IFWL_WidgetDelegate
+{
+public:
+ CFWL_WidgetDelegate();
+ virtual ~CFWL_WidgetDelegate();
+ virtual FX_INT32 OnProcessMessage(CFWL_Message *pMessage);
+ virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
+ virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
+};
+#endif
diff --git a/xfa/include/fwl/theme/barcodetp.h b/xfa/include/fwl/theme/barcodetp.h
new file mode 100644
index 0000000000..803e06bd04
--- /dev/null
+++ b/xfa/include/fwl/theme/barcodetp.h
@@ -0,0 +1,19 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_BARCODETP_H
+#define _FWL_BARCODETP_H
+class CFWL_WidgetTP;
+class CFWL_BarcodeTP;
+class CFWL_BarcodeTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_BarcodeTP();
+ virtual ~CFWL_BarcodeTP();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+};
+#endif
diff --git a/xfa/include/fwl/theme/carettp.h b/xfa/include/fwl/theme/carettp.h
new file mode 100644
index 0000000000..57ea85b708
--- /dev/null
+++ b/xfa/include/fwl/theme/carettp.h
@@ -0,0 +1,21 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_CARETTP_H
+#define _FWL_CARETTP_H
+class CFWL_WidgetTP;
+class CFWL_CaretTP;
+class CFWL_CaretTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_CaretTP();
+ virtual ~CFWL_CaretTP();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+protected:
+ void DrawCaretBK(CFX_Graphics *pGraphics, FX_DWORD dwStates, const CFX_RectF *pRect, CFX_Color *crFill, CFX_Matrix *pMatrix = NULL);
+};
+#endif
diff --git a/xfa/include/fwl/theme/checkboxtp.h b/xfa/include/fwl/theme/checkboxtp.h
new file mode 100644
index 0000000000..384effe732
--- /dev/null
+++ b/xfa/include/fwl/theme/checkboxtp.h
@@ -0,0 +1,48 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_CHECKBOXTP_H
+#define _FWL_CHECKBOXTP_H
+class CFWL_WidgetTP;
+class CFWL_CheckBoxTP;
+class CFWL_CheckBoxTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_CheckBoxTP();
+ virtual ~CFWL_CheckBoxTP();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);
+ virtual FX_BOOL DrawText(CFWL_ThemeText *pParams);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+ virtual FWL_ERR Initialize();
+ virtual FWL_ERR Finalize();
+protected:
+ void DrawBoxBk(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_RectF *pRect, FX_DWORD dwStates, CFX_Matrix *pMatrix = NULL);
+ void DrawSign(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_RectF *pRtBox, FX_DWORD dwStates, CFX_Matrix *pMatrix = NULL);
+ void DrawSignNeutral(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, CFX_Matrix *pMatrix = NULL);
+ void DrawSignCheck(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);
+ void DrawSignCircle(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);
+ void DrawSignCross(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);
+ void DrawSignDiamond(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);
+ void DrawSignSquare(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);
+ void DrawSignStar(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);
+ void DrawSignBorder(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_RectF *pRtBox, FX_BOOL bDisable = FALSE, CFX_Matrix *pMatrix = NULL);
+ void SetThemeData(FX_DWORD dwID);
+ void initCheckPath(FX_FLOAT fCheckLen);
+ struct CKBThemeData : public CFX_Object {
+ public:
+ FX_ARGB clrBoxBk[13][2];
+ FX_ARGB clrSignBorderNormal;
+ FX_ARGB clrSignBorderDisable;
+ FX_ARGB clrSignCheck;
+ FX_ARGB clrSignNeutral;
+ FX_ARGB clrSignNeutralNormal;
+ FX_ARGB clrSignNeutralHover;
+ FX_ARGB clrSignNeutralPressed;
+ } *m_pThemeData;
+ CFX_Path *m_pCheckPath;
+};
+#endif
diff --git a/xfa/include/fwl/theme/comboboxtp.h b/xfa/include/fwl/theme/comboboxtp.h
new file mode 100644
index 0000000000..1ed39742e6
--- /dev/null
+++ b/xfa/include/fwl/theme/comboboxtp.h
@@ -0,0 +1,23 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_COMBOBOXTP_H
+#define _FWL_COMBOBOXTP_H
+class CFWL_WidgetTP;
+class CFWL_ComboBoxTP;
+class CFWL_ComboBoxTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_ComboBoxTP();
+ virtual ~CFWL_ComboBoxTP();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+ virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+protected:
+ void DrawDropDownButton(CFWL_ThemeBackground *pParams, FX_DWORD dwStates, CFX_Matrix *pMatrix);
+ void DrawStrethHandler(CFWL_ThemeBackground *pParams, FX_DWORD dwStates, CFX_Matrix *pMatrix);
+};
+#endif
diff --git a/xfa/include/fwl/theme/datetimepickertp.h b/xfa/include/fwl/theme/datetimepickertp.h
new file mode 100644
index 0000000000..01a775a6f1
--- /dev/null
+++ b/xfa/include/fwl/theme/datetimepickertp.h
@@ -0,0 +1,26 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_DATETIMEPICKERTP_H
+#define _FWL_DATETIMEPICKERTP_H
+class CFWL_WidgetTP;
+class CFWL_DateTimePickerTP;
+class CFWL_DateTimePickerTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_DateTimePickerTP();
+ virtual ~CFWL_DateTimePickerTP();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+protected:
+ void DrawDropDownButton(CFWL_ThemeBackground *pParams, CFX_Matrix *pMatrix);
+ void initThemeData();
+ struct DTPThemeData : public CFX_Object {
+ public:
+ FX_ARGB BoxBkColor[13][2];
+ } *m_pThemeData;
+};
+#endif
diff --git a/xfa/include/fwl/theme/edittp.h b/xfa/include/fwl/theme/edittp.h
new file mode 100644
index 0000000000..307382e343
--- /dev/null
+++ b/xfa/include/fwl/theme/edittp.h
@@ -0,0 +1,21 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_EDITTP_H
+#define _FWL_EDITTP_H
+class CFWL_WidgetTP;
+class CFWL_EditTP;
+class CFWL_EditTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_EditTP();
+ virtual ~CFWL_EditTP();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+ virtual FWL_ERR Initialize();
+ virtual FWL_ERR Finalize();
+};
+#endif
diff --git a/xfa/include/fwl/theme/formtp.h b/xfa/include/fwl/theme/formtp.h
new file mode 100644
index 0000000000..b7e68e2d5b
--- /dev/null
+++ b/xfa/include/fwl/theme/formtp.h
@@ -0,0 +1,74 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_FORM_THEMEPROVIDER_H
+#define _FWL_FORM_THEMEPROVIDER_H
+class CFWL_WidgetTP;
+class CFWL_FormTP;
+class CFWL_FormTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_FormTP();
+ virtual ~CFWL_FormTP();
+
+ virtual FWL_ERR Initialize();
+ virtual FWL_ERR Finalize();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+ virtual FX_BOOL DrawText(CFWL_ThemeText *pParams);
+ virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+ virtual FWL_ERR GetPartRect(CFWL_ThemePart *pThemePart, CFX_RectF& rtPart);
+protected:
+
+ void CalCloseBox(IFWL_Widget *pWidget, CFX_RectF &rect);
+ void CalMaxBox(IFWL_Widget *pWidget, CFX_RectF &rect);
+ void CalMinBox(IFWL_Widget *pWidget, CFX_RectF &rect);
+ void CalCaption(IFWL_Widget *pWidget, CFX_RectF &rect);
+ void CalIcon(IFWL_Widget *pWidget, CFX_RectF &rect);
+
+ void DrawFormBorder(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_STATE eState, CFX_Matrix *pMatrix, FX_INT32 iActive = 0);
+ void DrawCaption(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_STATE eState, CFX_Matrix *pMatrix, FX_INT32 iActive = 0);
+ void DrawNarrowCaption(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_STATE eState, CFX_Matrix *pMatrix, FX_INT32 iActive = 0);
+ void DrawCloseBox(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_STATE eState, CFX_Matrix *pMatrix, FX_INT32 iActive = 0);
+ void DrawMinMaxBoxCommon(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_STATE eState, CFX_Matrix *pMatrix, FX_INT32 iActive = 0);
+ void DrawMinimizeBox(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_STATE eState, CFX_Matrix *pMatrix, FX_INT32 iActive = 0);
+ void DrawMaximizeBox(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_STATE eState, FX_BOOL bMax, CFX_Matrix *pMatrix, FX_INT32 iActive = 0);
+ void DrawIconImage(CFX_Graphics *pGraphics, CFX_DIBitmap *pDIBitmap, const CFX_RectF *pRect, FWLTHEME_STATE eState, CFX_Matrix *pMatrix, FX_INT32 iActive = 0);
+ void SetThemeData(FX_DWORD dwID);
+ void TransModeColor(FX_ARGB clrFore, FX_ARGB &clrBack);
+ void DeactiveForm();
+ void InitCaption(FX_BOOL bActive);
+ CFX_DIBitmap *m_pActiveBitmap;
+ CFX_DIBitmap *m_pDeactivebitmap;
+ CFX_RectF m_rtDisCaption;
+ CFX_RectF m_rtDisLBorder;
+ CFX_RectF m_rtDisRBorder;
+ CFX_RectF m_rtDisBBorder;
+ struct SBThemeData : public CFX_Object {
+ public:
+ FX_ARGB clrHeadBK[2][4];
+ FX_ARGB clrHeadEdgeLeft[2][3];
+ FX_ARGB clrHeadEdgeRight[2][3];
+ FX_ARGB clrHeadEdgeTop[2][3];
+ FX_ARGB clrHeadEdgeBottom[2][3];
+ FX_ARGB clrCloseBtBKStart[2][3];
+ FX_ARGB clrCloseBtBKEnd[2][3];
+ FX_ARGB clrCloseBtEdgeLight[2][3];
+ FX_ARGB clrCloseBtEdgeDark[2][3];
+ FX_ARGB clrNormalBtBKStart[2][3];
+ FX_ARGB clrNormalBtBKEnd[2][3];
+ FX_ARGB clrNormalBtEdgeLight[2][3];
+ FX_ARGB clrNormalBtEdgeDark[2][3];
+ FX_ARGB clrBtnEdgeOut[2];
+ FX_ARGB clrBtnCornerLight[2][3];
+ FX_ARGB clrHeadText[2];
+ FX_ARGB clrFormBorder[2][5];
+ FX_ARGB clrFormBorderLight[2];
+ FX_ARGB clrTransWhite;
+ } *m_pThemeData;
+};
+#endif
diff --git a/xfa/include/fwl/theme/listboxtp.h b/xfa/include/fwl/theme/listboxtp.h
new file mode 100644
index 0000000000..aaae2eba38
--- /dev/null
+++ b/xfa/include/fwl/theme/listboxtp.h
@@ -0,0 +1,24 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_LISTBOXTP_H
+#define _FWL_LISTBOXTP_H
+class CFWL_WidgetTP;
+class CFWL_ScrollBarTP;
+class CFWL_ListBoxTP;
+class CFWL_ListBoxTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_ListBoxTP();
+ virtual ~CFWL_ListBoxTP();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+ virtual FWL_ERR Initialize();
+ virtual FWL_ERR Finalize();
+protected:
+ void DrawListBoxItem(CFX_Graphics *pGraphics, FX_DWORD dwStates, const CFX_RectF *prtItem, FX_LPVOID pData = NULL, CFX_Matrix *pMatrix = NULL);
+};
+#endif
diff --git a/xfa/include/fwl/theme/monthcalendartp.h b/xfa/include/fwl/theme/monthcalendartp.h
new file mode 100644
index 0000000000..55d991d404
--- /dev/null
+++ b/xfa/include/fwl/theme/monthcalendartp.h
@@ -0,0 +1,48 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_MONTHCALENDARTP_H
+#define _FWL_MONTHCALENDARTP_H
+class CFWL_WidgetTP;
+class CFWL_MonthCalendarTP;
+class CFWL_MonthCalendarTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_MonthCalendarTP();
+ virtual ~CFWL_MonthCalendarTP();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+ virtual FX_BOOL DrawText(CFWL_ThemeText *pParams);
+ virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+ virtual FWL_ERR Initialize();
+ virtual FWL_ERR Finalize();
+protected:
+ FX_BOOL DrawTotalBK(CFWL_ThemeBackground *pParams, CFX_Matrix *pMatrix);
+ FX_BOOL DrawHeadBk(CFWL_ThemeBackground *pParams, CFX_Matrix *pMatrix);
+ FX_BOOL DrawLButton(CFWL_ThemeBackground *pParams, CFX_Matrix *pMatrix);
+ FX_BOOL DrawRButton(CFWL_ThemeBackground *pParams, CFX_Matrix *pMatrix);
+ FX_BOOL DrawDatesInBK(CFWL_ThemeBackground *pParams, CFX_Matrix *pMatrix);
+ FX_BOOL DrawDatesInCircle(CFWL_ThemeBackground *pParams, CFX_Matrix *pMatrix);
+ FX_BOOL DrawTodayCircle(CFWL_ThemeBackground *pParams, CFX_Matrix *pMatrix);
+ FX_BOOL DrawHSeperator(CFWL_ThemeBackground *pParams, CFX_Matrix *pMatrix);
+ FX_BOOL DrawWeekNumSep(CFWL_ThemeBackground *pParams, CFX_Matrix *pMatrix);
+ FWLTHEME_STATE GetState(FX_DWORD dwFWLStates);
+ void SetThemeData(FX_DWORD dwThemeID);
+ class MCThemeData : public CFX_Object
+ {
+ public:
+ FX_ARGB clrCaption;
+ FX_ARGB clrSeperator;
+ FX_ARGB clrDatesHoverBK;
+ FX_ARGB clrDatesSelectedBK;
+ FX_ARGB clrDatesCircle;
+ FX_ARGB clrToday;
+ FX_ARGB clrBK;
+ } *m_pThemeData;
+ CFX_WideString wsResource;
+};
+#endif
diff --git a/xfa/include/fwl/theme/pictureboxtp.h b/xfa/include/fwl/theme/pictureboxtp.h
new file mode 100644
index 0000000000..938ac07b1d
--- /dev/null
+++ b/xfa/include/fwl/theme/pictureboxtp.h
@@ -0,0 +1,19 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_PICTUREBOXTP_H
+#define _FWL_PICTUREBOXTP_H
+class CFWL_WidgetTP;
+class CFWL_PictureBoxTP;
+class CFWL_PictureBoxTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_PictureBoxTP();
+ virtual ~CFWL_PictureBoxTP();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+};
+#endif
diff --git a/xfa/include/fwl/theme/pushbuttontp.h b/xfa/include/fwl/theme/pushbuttontp.h
new file mode 100644
index 0000000000..676a5fce50
--- /dev/null
+++ b/xfa/include/fwl/theme/pushbuttontp.h
@@ -0,0 +1,41 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_PUSHBUTTONTP_H
+#define _FWL_PUSHBUTTONTP_H
+class CFWL_WidgetTP;
+class CFWL_PushButtonTP;
+class CFWL_PushButtonTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_PushButtonTP();
+ virtual ~CFWL_PushButtonTP();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+ virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+ virtual FWL_ERR Initialize();
+ virtual FWL_ERR Finalize();
+protected:
+ void SetThemeData(FX_DWORD dwID);
+ void SetTopLineColor(FX_DWORD *pData);
+ void SetLeftLineColor(FX_DWORD *pData);
+ void SetRightLineColor(FX_DWORD *pData);
+ void SetBottomLineColor(FX_DWORD *pData);
+ void SetBackgroudColor(FX_DWORD *pData);
+ void SetCaptionColor(FX_DWORD *pData);
+ void SetCornerColor(FX_DWORD *pData);
+ FX_INT32 GetColorID(FX_DWORD dwStates);
+
+ struct PBThemeData : CFX_Object {
+ public:
+ FX_ARGB clrBorder[5];
+ FX_ARGB clrStart[5];
+ FX_ARGB clrEnd[5];
+ FX_ARGB clrFill[5];
+ } *m_pThemeData;
+};
+#endif
diff --git a/xfa/include/fwl/theme/scrollbartp.h b/xfa/include/fwl/theme/scrollbartp.h
new file mode 100644
index 0000000000..b7f1926029
--- /dev/null
+++ b/xfa/include/fwl/theme/scrollbartp.h
@@ -0,0 +1,36 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_SCROLLBARTP_H
+#define _FWL_SCROLLBARTP_H
+class CFWL_WidgetTP;
+class CFWL_ScrollBarTP;
+class CFWL_ScrollBarTP : public CFWL_WidgetTP
+{
+public:
+ CFWL_ScrollBarTP();
+ virtual ~CFWL_ScrollBarTP();
+ virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
+ virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);
+ virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
+ virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+protected:
+ void DrawThumbBtn(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FX_BOOL bVert, FWLTHEME_STATE eState, FX_BOOL bPawButton = TRUE, CFX_Matrix *pMatrix = NULL);
+ void DrawTrack(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FX_BOOL bVert, FWLTHEME_STATE eState, FX_BOOL bLowerTrack, CFX_Matrix *pMatrix = NULL);
+ void DrawMaxMinBtn(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_DIRECTION eDict, FWLTHEME_STATE eState, CFX_Matrix *pMatrix = NULL);
+ void DrawPaw(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FX_BOOL bVert, FWLTHEME_STATE eState, CFX_Matrix *pMatrix = NULL);
+ void SetThemeData(FX_DWORD dwID);
+ struct SBThemeData : public CFX_Object {
+ public:
+ FX_ARGB clrPawColorLight[4];
+ FX_ARGB clrPawColorDark[4];
+ FX_ARGB clrBtnBK[4][2];
+ FX_ARGB clrBtnBorder[4];
+ FX_ARGB clrTrackBKStart;
+ FX_ARGB clrTrackBKEnd;
+ } *m_pThemeData;
+};
+#endif
diff --git a/xfa/include/fwl/theme/utils.h b/xfa/include/fwl/theme/utils.h
new file mode 100644
index 0000000000..f1b6b55876
--- /dev/null
+++ b/xfa/include/fwl/theme/utils.h
@@ -0,0 +1,87 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_THEME_UTILS_H
+#define _FWL_THEME_UTILS_H
+#define THEME_XPSimilar
+enum FWLTHEME_EDGE {
+ FWLTHEME_EDGE_Flat = 0,
+ FWLTHEME_EDGE_Raised,
+ FWLTHEME_EDGE_Sunken
+};
+enum FWLTHEME_STATE {
+ FWLTHEME_STATE_Normal = 1,
+ FWLTHEME_STATE_Hover,
+ FWLTHEME_STATE_Pressed,
+ FWLTHEME_STATE_Disabale
+};
+enum FWLTHEME_DIRECTION {
+ FWLTHEME_DIRECTION_Up = 0,
+ FWLTHEME_DIRECTION_Down,
+ FWLTHEME_DIRECTION_Left,
+ FWLTHEME_DIRECTION_Right
+};
+typedef struct _FWLCOLOR {
+ union {
+ FX_DWORD color;
+ struct {
+ FX_BYTE b;
+ FX_BYTE g;
+ FX_BYTE r;
+ FX_BYTE a;
+ };
+ };
+
+ _FWLCOLOR()
+ {
+ color = 0;
+ }
+ _FWLCOLOR(FX_DWORD c)
+ {
+ color = c;
+ }
+ _FWLCOLOR(const _FWLCOLOR &c)
+ {
+ color = c.color;
+ }
+
+ bool operator == (const _FWLCOLOR &frColor)
+ {
+ return color == frColor.color;
+ }
+
+ operator FX_DWORD()
+ {
+ return color;
+ }
+} FWLCOLOR;
+#define FWLTHEME_BEZIER 0.5522847498308f
+#define FWLTHEME_PI 3.141592f
+#define FWLTHEME_PI_2_1 1.570796f
+#define FWLTHEME_PI_2_3 4.712388f
+#define FWLTHEME_COLOR_EDGELT1 (ArgbEncode(255, 172, 168, 153))
+#define FWLTHEME_COLOR_EDGELT2 (ArgbEncode(255, 113, 111, 100))
+#define FWLTHEME_COLOR_EDGERB1 (ArgbEncode(255, 241, 239, 226))
+#define FWLTHEME_COLOR_EDGERB2 (ArgbEncode(255, 255, 255, 255))
+#define FWLTHEME_COLOR_Background (ArgbEncode(255, 236, 233, 216))
+#define FWLTHEME_COLOR_BKSelected (ArgbEncode(255, 153, 193, 218))
+#define FWLTHEME_COLOR_Green_BKSelected (ArgbEncode(255, 147, 160, 112))
+#ifdef THEME_XPSimilar
+#define FWLTHEME_CAPACITY_EdgeFlat 2.0f
+#else
+#define FWLTHEME_CAPACITY_EdgeFlat 0.0f
+#endif
+#define FWLTHEME_CAPACITY_EdgeRaised 2.0f
+#define FWLTHEME_CAPACITY_EdgeSunken 2.0f
+#define FWLTHEME_CAPACITY_FontSize 12.0f
+#define FWLTHEME_CAPACITY_LineHeight 12.0f
+#define FWLTHEME_CAPACITY_TextColor (ArgbEncode(255, 0, 0, 0))
+#define FWLTHEME_CAPACITY_TextSelColor (ArgbEncode(255, 153, 193, 218))
+#define FWLTHEME_CAPACITY_TextDisColor (ArgbEncode(255, 172, 168, 153))
+#define FWLTHEME_CAPACITY_ScrollBarWidth 17.0f
+#define FWLTHEME_CAPACITY_CXBorder 1.0f
+#define FWLTHEME_CAPACITY_CYBorder 1.0f
+#endif
diff --git a/xfa/include/fwl/theme/widgettp.h b/xfa/include/fwl/theme/widgettp.h
new file mode 100644
index 0000000000..3ede92f5d7
--- /dev/null
+++ b/xfa/include/fwl/theme/widgettp.h
@@ -0,0 +1,126 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_WIDGETTP_H
+#define _FWL_WIDGETTP_H
+class CFX_Object;
+class IFWL_ThemeProvider;
+class IFWL_Widget;
+class IFDE_TextOut;
+class IFX_Font;
+class IFX_FontMgr;
+#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+class IFX_FontSourceEnum;
+#endif
+class CFWL_WidgetTP;
+class CFWL_ArrowData;
+class CFWL_WidgetTP : public CFX_Object
+{
+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 FX_LPVOID 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();
+ virtual ~CFWL_WidgetTP();
+ FWL_ERR SetFont(IFWL_Widget *pWidget, FX_LPCWSTR strFont, FX_FLOAT fFontSize, FX_ARGB rgbFont);
+ FWL_ERR SetFont(IFWL_Widget *pWidget, IFX_Font *pFont, FX_FLOAT fFontSize, FX_ARGB rgbFont);
+ IFX_Font* GetFont(IFWL_Widget *pWidget);
+protected:
+ CFWL_WidgetTP();
+ FX_ERR InitTTO();
+ FX_ERR FinalizeTTO();
+ void DrawEdge(CFX_Graphics *pGraphics, FX_DWORD dwStyles, const CFX_RectF *pRect, CFX_Matrix *pMatrix = NULL);
+ void Draw3DRect(CFX_Graphics *pGraphics, FWLTHEME_EDGE eType, FX_FLOAT fWidth, const CFX_RectF *pRect, FX_ARGB cr1, FX_ARGB cr2, FX_ARGB cr3, FX_ARGB cr4, CFX_Matrix *pMatrix = NULL);
+ void Draw3DCircle(CFX_Graphics *pGraphics, FWLTHEME_EDGE eType, FX_FLOAT fWidth, const CFX_RectF *pRect, FX_ARGB cr1, FX_ARGB cr2, FX_ARGB cr3, FX_ARGB cr4, CFX_Matrix *pMatrix = NULL);
+ void DrawBorder(CFX_Graphics *pGraphics, const CFX_RectF *pRect, CFX_Matrix *pMatrix = NULL);
+ void FillBackground(CFX_Graphics *pGraphics, const CFX_RectF *pRect, CFX_Matrix *pMatrix = NULL);
+ void FillSoildRect(CFX_Graphics *pGraphics, FX_ARGB fillColor, const CFX_RectF *pRect, CFX_Matrix *pMatrix = NULL);
+ void DrawAxialShading(CFX_Graphics *pGraphics, FX_FLOAT fx1, FX_FLOAT fy1, FX_FLOAT fx2, FX_FLOAT fy2, FX_ARGB beginColor, FX_ARGB endColor, CFX_Path *path, FX_INT32 fillMode = FXFILL_WINDING, CFX_Matrix *pMatrix = NULL);
+ void DrawAnnulusRect(CFX_Graphics *pGraphics, FX_ARGB fillColor, const CFX_RectF *pRect, FX_FLOAT fRingWidth = 1, CFX_Matrix *pMatrix = NULL);
+ void DrawAnnulusCircle(CFX_Graphics *pGraphics, FX_ARGB fillColor, const CFX_RectF *pRect, FX_FLOAT fWidth = 1, CFX_Matrix *pMatrix = NULL);
+ void DrawFocus(CFX_Graphics *pGraphics, const CFX_RectF *pRect, CFX_Matrix *pMatrix = NULL);
+ void DrawArrow(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_DIRECTION eDict, FX_ARGB argbFill, FX_BOOL bPressed, CFX_Matrix *pMatrix = NULL);
+ void DrawArrow(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_DIRECTION eDict, FX_ARGB argSign, CFX_Matrix *pMatrix = NULL);
+ void DrawBtn(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_STATE eState, CFX_Matrix *pMatrix = NULL);
+ void DrawArrowBtn(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FWLTHEME_DIRECTION eDict, FWLTHEME_STATE eState, CFX_Matrix *pMatrix = NULL);
+ FWLCOLOR BlendColor(FWLCOLOR srcColor, FWLCOLOR renderColor, FX_BYTE scale);
+ FX_DWORD m_dwRefCount;
+ IFDE_TextOut *m_pTextOut;
+ IFX_Font *m_pFDEFont;
+ FX_FLOAT m_fValue;
+ FX_DWORD m_dwValue;
+ CFX_RectF m_rtMargin;
+ FX_DWORD m_dwThemeID;
+ CFX_Matrix _ctm;
+};
+FX_BOOL FWLTHEME_Init();
+void FWLTHEME_Release();
+FX_DWORD FWL_GetThemeLayout(FX_DWORD dwThemeID);
+FX_DWORD FWL_GetThemeColor(FX_DWORD dwThemeID);
+FX_DWORD FWL_MakeThemeID(FX_DWORD dwLayout, FX_DWORD dwColor);
+class CFWL_ArrowData : public CFX_Object
+{
+public:
+ static CFWL_ArrowData* GetInstance();
+ static FX_BOOL IsInstance();
+ static void DestroyInstance();
+ virtual ~CFWL_ArrowData();
+ void SetColorData(FX_DWORD dwID);
+
+ class CColorData : public CFX_Object
+ {
+ public:
+ FX_ARGB clrBorder[4];
+ FX_ARGB clrStart[4];
+ FX_ARGB clrEnd[4];
+ FX_ARGB clrSign[4];
+ } *m_pColorData;
+protected:
+ CFWL_ArrowData();
+ static CFWL_ArrowData *m_pInstance;
+};
+class CFWL_FontData : public CFX_Object
+{
+public:
+ CFWL_FontData();
+ virtual ~CFWL_FontData();
+ FX_BOOL Equal(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
+ FX_BOOL LoadFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
+ IFX_Font* GetFont() const
+ {
+ return m_pFont;
+ }
+protected:
+ CFX_WideString m_wsFamily;
+ FX_DWORD m_dwStyles;
+ FX_DWORD m_dwCodePage;
+ IFX_Font *m_pFont;
+ IFX_FontMgr *m_pFontMgr;
+#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+ IFX_FontSourceEnum *m_pFontSource;
+#endif
+};
+class CFWL_FontManager : public CFX_Object
+{
+public:
+ CFWL_FontManager();
+ virtual ~CFWL_FontManager();
+ IFX_Font* FindFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD dwCodePage);
+protected:
+ CFX_PtrArray m_arrFonts;
+};
+CFWL_FontManager *FWL_GetFontManager();
+#endif
diff --git a/xfa/include/fxbarcode/BC_BarCode.h b/xfa/include/fxbarcode/BC_BarCode.h
new file mode 100644
index 0000000000..9ace5e0451
--- /dev/null
+++ b/xfa/include/fxbarcode/BC_BarCode.h
@@ -0,0 +1,249 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _BC_CODEBASE_H_
+#define _BC_CODEBASE_H_
+void BC_Library_Init();
+void BC_Library_Destory();
+class CBC_CodeBase;
+class CBC_Writer;
+class CBC_Reader;
+enum BC_TEXT_LOC {
+ BC_TEXT_LOC_NONE = 0,
+ BC_TEXT_LOC_ABOVE,
+ BC_TEXT_LOC_BELOW,
+ BC_TEXT_LOC_ABOVEEMBED,
+ BC_TEXT_LOC_BELOWEMBED
+};
+enum BC_CHAR_ENCODING {
+ CHAR_ENCODING_UTF8 = 0,
+ CHAR_ENCODING_UNICODE
+};
+enum BC_TYPE {
+ BC_UNKNOWN = -1,
+ BC_CODE39 = 0,
+ BC_CODABAR,
+ BC_CODE128,
+ BC_CODE128_B,
+ BC_CODE128_C,
+ BC_EAN8,
+ BC_UPCA,
+ BC_EAN13,
+ BC_QR_CODE,
+ BC_PDF417,
+ BC_DATAMATRIX
+};
+class CBC_CodeBase : public CFX_Object
+{
+public:
+ CBC_CodeBase();
+ virtual ~CBC_CodeBase();
+ virtual BC_TYPE GetType() = 0;
+ virtual FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e) = 0;
+ virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e) = 0;
+ virtual FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e) = 0;
+ virtual CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 hight, FX_INT32 &e) = 0;
+ virtual CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e) = 0;
+
+ virtual FX_BOOL SetCharEncoding(FX_INT32 encoding);
+ virtual FX_BOOL SetModuleHeight(FX_INT32 moduleHeight);
+ virtual FX_BOOL SetModuleWidth(FX_INT32 moduleWidth);
+
+ virtual FX_BOOL SetHeight(FX_INT32 height);
+ virtual FX_BOOL SetWidth(FX_INT32 width);
+ virtual void SetBackgroundColor(FX_ARGB backgroundColor);
+ virtual void SetBarcodeColor(FX_ARGB foregroundColor);
+protected:
+ CBC_Writer * m_pBCWriter;
+ CBC_Reader * m_pBCReader;
+};
+class CBC_OneCode : public CBC_CodeBase
+{
+public:
+ CBC_OneCode();
+ virtual ~CBC_OneCode();
+ virtual BC_TYPE GetType() = 0;
+ virtual FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e) = 0;
+ virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e) = 0;
+ virtual FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e) = 0;
+ virtual CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 hight, FX_INT32 &e) = 0;
+ virtual CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e) = 0;
+ virtual FX_BOOL CheckContentValidity(FX_WSTR contents);
+ virtual CFX_WideString FilterContents(FX_WSTR contents);
+ virtual void SetPrintChecksum(FX_BOOL checksum);
+ virtual void SetDataLength(FX_INT32 length);
+ virtual void SetCalChecksum(FX_BOOL calc);
+ virtual FX_BOOL SetFont(CFX_Font * cFont);
+ virtual void SetFontSize(FX_FLOAT size);
+ virtual void SetFontStyle(FX_INT32 style);
+ virtual void SetFontColor(FX_ARGB color);
+};
+class CBC_Code39 : public CBC_OneCode
+{
+public:
+ CBC_Code39();
+ CBC_Code39(FX_BOOL usingCheckDigit);
+ CBC_Code39(FX_BOOL usingCheckDigit, FX_BOOL extendedMode);
+ virtual ~CBC_Code39();
+ FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e);
+ FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e);
+ FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e);
+ CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 hight, FX_INT32 &e);
+ CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e);
+ BC_TYPE GetType()
+ {
+ return BC_CODE39;
+ }
+ FX_BOOL SetTextLocation(BC_TEXT_LOC location);
+ FX_BOOL SetWideNarrowRatio(FX_INT32 ratio);
+private:
+ CFX_WideString m_renderContents;
+};
+class CBC_Codabar : public CBC_OneCode
+{
+public:
+ CBC_Codabar();
+ virtual ~CBC_Codabar();
+ FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e);
+ FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e);
+ FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e);
+ CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 hight, FX_INT32 &e);
+ CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e);
+ BC_TYPE GetType()
+ {
+ return BC_CODABAR;
+ }
+ FX_BOOL SetStartChar(FX_CHAR start);
+ FX_BOOL SetEndChar(FX_CHAR end);
+ FX_BOOL SetTextLocation(BC_TEXT_LOC location);
+ FX_BOOL SetWideNarrowRatio(FX_INT32 ratio);
+private:
+ CFX_WideString m_renderContents;
+};
+class CBC_Code128 : public CBC_OneCode
+{
+private:
+ BC_TYPE m_type;
+public:
+ CBC_Code128(BC_TYPE type);
+ virtual ~CBC_Code128();
+ FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e);
+ FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e);
+ FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e);
+ CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 hight, FX_INT32 &e);
+ CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e);
+ BC_TYPE GetType()
+ {
+ return BC_CODE128;
+ }
+ FX_BOOL SetTextLocation(BC_TEXT_LOC loction);
+private:
+ CFX_WideString m_renderContents;
+};
+class CBC_EAN8 : public CBC_OneCode
+{
+public:
+ CBC_EAN8();
+ virtual ~CBC_EAN8();
+ FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e);
+ FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e);
+ FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e);
+ CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 hight, FX_INT32 &e);
+ CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e);
+ BC_TYPE GetType()
+ {
+ return BC_EAN8;
+ }
+private:
+ CFX_WideString Preprocess(FX_WSTR contents);
+ CFX_WideString m_renderContents;
+};
+class CBC_EAN13 : public CBC_OneCode
+{
+public:
+ CBC_EAN13();
+ virtual ~CBC_EAN13();
+ FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e);
+ FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e);
+ FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e);
+ CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 hight, FX_INT32 &e);
+ CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e);
+ BC_TYPE GetType()
+ {
+ return BC_EAN13;
+ }
+private:
+ CFX_WideString Preprocess(FX_WSTR contents);
+ CFX_WideString m_renderContents;
+};
+class CBC_UPCA : public CBC_OneCode
+{
+public:
+ CBC_UPCA();
+ virtual ~CBC_UPCA();
+ FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e);
+ FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e);
+ FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e);
+ CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 hight, FX_INT32 &e);
+ CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e);
+ BC_TYPE GetType()
+ {
+ return BC_UPCA;
+ }
+private:
+ CFX_WideString Preprocess(FX_WSTR contents);
+ CFX_WideString m_renderContents;
+};
+class CBC_QRCode : public CBC_CodeBase
+{
+public:
+ CBC_QRCode();
+ virtual ~CBC_QRCode();
+ FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e);
+ FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e);
+ FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e);
+ CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 hight, FX_INT32 &e);
+ CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e);
+ BC_TYPE GetType()
+ {
+ return BC_QR_CODE;
+ }
+ FX_BOOL SetVersion(FX_INT32 version);
+ FX_BOOL SetErrorCorrectionLevel (FX_INT32 level);
+};
+class CBC_PDF417I : public CBC_CodeBase
+{
+public:
+ CBC_PDF417I();
+ virtual ~CBC_PDF417I();
+ FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e);
+ FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e);
+ FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e);
+ CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 hight, FX_INT32 &e);
+ CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e);
+ BC_TYPE GetType()
+ {
+ return BC_PDF417;
+ }
+ FX_BOOL SetErrorCorrectionLevel (FX_INT32 level);
+ void SetTruncated(FX_BOOL truncated);
+};
+class CBC_DataMatrix : public CBC_CodeBase
+{
+public:
+ CBC_DataMatrix();
+ virtual ~CBC_DataMatrix();
+ FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e);
+ FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e);
+ FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e);
+ CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 hight, FX_INT32 &e);
+ CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e);
+ BC_TYPE GetType()
+ {
+ return BC_DATAMATRIX;
+ }
+};
+#endif
diff --git a/xfa/include/fxfa/fxfa.h b/xfa/include/fxfa/fxfa.h
new file mode 100644
index 0000000000..a3c3a73e68
--- /dev/null
+++ b/xfa/include/fxfa/fxfa.h
@@ -0,0 +1,622 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FXFA
+#define _FXFA
+class IFDE_XMLElement;
+class CXFA_Node;
+class CXFA_NodeList;
+class CXFA_WidgetAcc;
+class IFWL_AdapterTimerMgr;
+class IFX_Font;
+class CFX_Graphics;
+class IXFA_AppProvider;
+class IXFA_App;
+class IXFA_FontMgr;
+class IXFA_DocProvider;
+class IXFA_DocHandler;
+class IXFA_DocView;
+class IXFA_PageViewRender;
+class IXFA_PageView;
+class IXFA_WidgetHandler;
+class IXFA_WidgetIterator;
+class IXFA_MenuHandler;
+class IXFA_ChecksumContext;
+class IXFA_WidgetAccIterator;
+typedef struct _XFA_HDOC {
+ FX_LPVOID pData;
+}* XFA_HDOC;
+typedef struct _XFA_HWIDGET {
+ FX_LPVOID pData;
+}* XFA_HWIDGET;
+#include "fxfa_basic.h"
+#include "fxfa_widget.h"
+#define XFA_MBICON_Error 0
+#define XFA_MBICON_Warning 1
+#define XFA_MBICON_Question 2
+#define XFA_MBICON_Status 3
+#define XFA_MB_OK 0
+#define XFA_MB_OKCancel 1
+#define XFA_MB_YesNo 2
+#define XFA_MB_YesNoCancel 3
+#define XFA_IDOK 1
+#define XFA_IDCancel 2
+#define XFA_IDNo 3
+#define XFA_IDYes 4
+#define XFA_IDS_ValidateFailed 1
+#define XFA_IDS_CalcOverride 2
+#define XFA_IDS_ModifyField 3
+#define XFA_IDS_NotModifyField 4
+#define XFA_IDS_AppName 5
+#define XFA_IDS_ImageFilter 6
+#define XFA_IDS_UNKNOW_CATCHED 7
+#define XFA_IDS_Unable_TO_SET 8
+#define XFA_IDS_VALUE_EXCALMATORY 9
+#define XFA_IDS_INVALID_ENUM_VALUE 10
+#define XFA_IDS_UNSUPPORT_METHOD 11
+#define XFA_IDS_UNSUPPORT_PROP 12
+#define XFA_IDS_INVAlID_PROP_SET 13
+#define XFA_IDS_NOT_DEFAUL_VALUE 14
+#define XFA_IDS_UNABLE_SET_LANGUAGE 15
+#define XFA_IDS_UNABLE_SET_NUMPAGES 16
+#define XFA_IDS_UNABLE_SET_PLATFORM 17
+#define XFA_IDS_UNABLE_SET_VALIDATIONENABLE 18
+#define XFA_IDS_UNABLE_SET_VARIATION 19
+#define XFA_IDS_UNABLE_SET_VERSION 20
+#define XFA_IDS_UNABLE_SET_READY 21
+#define XFA_IDS_NUMBER_OF_OCCUR 22
+#define XFA_IDS_UNABLE_SET_CLASS_NAME 23
+#define XFA_IDS_UNABLE_SET_LENGTH_VALUE 24
+#define XFA_IDS_UNSUPPORT_CHAR 25
+#define XFA_IDS_BAD_SUFFIX 26
+#define XFA_IDS_EXPECTED_IDENT 27
+#define XFA_IDS_EXPECTED_STRING 28
+#define XFA_IDS_INVALIDATE_CHAR 29
+#define XFA_IDS_REDEFINITION 30
+#define XFA_IDS_INVALIDATE_TOKEN 31
+#define XFA_IDS_INVALIDATE_EXPRESSION 32
+#define XFA_IDS_UNDEFINE_IDENTIFIER 33
+#define XFA_IDS_INVALIDATE_LEFTVALUE 34
+#define XFA_IDS_COMPILER_ERROR 35
+#define XFA_IDS_CANNOT_MODIFY_VALUE 36
+#define XFA_IDS_ERROR_PARAMETERS 37
+#define XFA_IDS_EXPECT_ENDIF 38
+#define XFA_IDS_UNEXPECTED_EXPRESSION 39
+#define XFA_IDS_CONDITION_IS_NULL 40
+#define XFA_IDS_ILLEGALBREAK 41
+#define XFA_IDS_ILLEGALCONTINUE 42
+#define XFA_IDS_EXPECTED_OPERATOR 43
+#define XFA_IDS_DIVIDE_ZERO 44
+#define XFA_IDS_CANNOT_COVERT_OBJECT 45
+#define XFA_IDS_NOT_FOUND_CONTAINER 46
+#define XFA_IDS_NOT_FOUND_PROPERTY 47
+#define XFA_IDS_NOT_FOUND_METHOD 48
+#define XFA_IDS_NOT_FOUND_CONST 49
+#define XFA_IDS_NOT_ASSIGN_OBJECT 50
+#define XFA_IDS_IVALIDATE_INSTRUCTION 51
+#define XFA_IDS_EXPECT_NUMBER 52
+#define XFA_IDS_VALIDATE_OUT_ARRAY 53
+#define XFA_IDS_CANNOT_ASSIGN_IDENT 54
+#define XFA_IDS_NOT_FOUNT_FUNCTION 55
+#define XFA_IDS_NOT_ARRAY 56
+#define XFA_IDS_OUT_ARRAY 57
+#define XFA_IDS_NOT_SUPPORT_CALC 58
+#define XFA_IDS_ARGUMENT_NOT_ARRAY 59
+#define XFA_IDS_ARGUMENT_EXPECT_CONTAINER 60
+#define XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT 61
+#define XFA_IDS_FUNCTION_IS_BUILDIN 62
+#define XFA_IDS_ERROR_MSG 63
+#define XFA_IDS_INDEX_OUT_OF_BOUNDS 64
+#define XFA_IDS_INCORRECT_NUMBER_OF_METHOD 65
+#define XFA_IDS_ARGUMENT_MISMATCH 66
+#define XFA_IDS_INVALID_ENUMERATE 67
+#define XFA_IDS_INVALID_APPEND 68
+#define XFA_IDS_SOM_EXPECTED_LIST 69
+#define XFA_IDS_NOT_HAVE_PROPERTY 70
+#define XFA_IDS_INVALID_NODE_TYPE 71
+#define XFA_IDS_VIOLATE_BOUNDARY 72
+#define XFA_IDS_SERVER_DENY 73
+#define XFA_IDS_StringWeekDay_Sun 74
+#define XFA_IDS_StringWeekDay_Mon 75
+#define XFA_IDS_StringWeekDay_Tue 76
+#define XFA_IDS_StringWeekDay_Wed 77
+#define XFA_IDS_StringWeekDay_Thu 78
+#define XFA_IDS_StringWeekDay_Fri 79
+#define XFA_IDS_StringWeekDay_Sat 80
+#define XFA_IDS_StringMonth_Jan 81
+#define XFA_IDS_StringMonth_Feb 82
+#define XFA_IDS_StringMonth_March 83
+#define XFA_IDS_StringMonth_April 84
+#define XFA_IDS_StringMonth_May 85
+#define XFA_IDS_StringMonth_June 86
+#define XFA_IDS_StringMonth_July 87
+#define XFA_IDS_StringMonth_Aug 88
+#define XFA_IDS_StringMonth_Sept 89
+#define XFA_IDS_StringMonth_Oct 90
+#define XFA_IDS_StringMonth_Nov 91
+#define XFA_IDS_StringMonth_Dec 92
+#define XFA_IDS_String_Today 93
+#define XFA_IDS_ValidateLimit 94
+#define XFA_IDS_ValidateNullWarning 95
+#define XFA_IDS_ValidateNullError 96
+#define XFA_IDS_ValidateWarning 97
+#define XFA_IDS_ValidateError 98
+class IXFA_AppProvider
+{
+public:
+
+ virtual void SetAppType(FX_WSTR wsAppType) = 0;
+ virtual void GetAppType(CFX_WideString &wsAppType) = 0;
+
+ virtual void SetFoxitAppType(FX_WSTR wsFoxitAppType)
+ {
+ return;
+ }
+ virtual void GetFoxitAppType(CFX_WideString &wsFoxitAppType)
+ {
+ return;
+ }
+
+ virtual void GetLanguage(CFX_WideString &wsLanguage) = 0;
+
+ virtual void GetPlatform(CFX_WideString &wsPlatform) = 0;
+
+ virtual void GetVariation(CFX_WideString &wsVariation) = 0;
+
+ virtual void GetVersion(CFX_WideString &wsVersion) = 0;
+
+ virtual void GetFoxitVersion(CFX_WideString &wsFoxitVersion)
+ {
+ return;
+ }
+
+ virtual void GetAppName(CFX_WideString& wsName) = 0;
+
+ virtual void GetFoxitAppName(CFX_WideString& wsFoxitName)
+ {
+ return;
+ }
+
+ virtual void Beep(FX_DWORD dwType) = 0;
+
+ virtual FX_INT32 MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle = FX_WSTRC(L""), FX_DWORD dwIconType = 0, FX_DWORD dwButtonType = 0) = 0;
+ virtual void Response(CFX_WideString &wsAnswer, FX_WSTR wsQuestion, FX_WSTR wsTitle = FX_WSTRC(L""), FX_WSTR wsDefaultAnswer = FX_WSTRC(L""), FX_BOOL bMark = TRUE) = 0;
+ virtual FX_INT32 GetDocumentCountInBatch() = 0;
+ virtual FX_INT32 GetCurDocumentInBatch() = 0;
+ virtual IFX_FileRead* DownloadURL(FX_WSTR wsURL) = 0;
+
+ virtual FX_BOOL PostRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsContentType,
+ FX_WSTR wsEncode, FX_WSTR wsHeader, CFX_WideString &wsResponse) = 0;
+
+ virtual FX_BOOL PutRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsEncode) = 0;
+ virtual void LoadString(FX_INT32 iStringID, CFX_WideString &wsString) = 0;
+ virtual FX_BOOL ShowFileDialog(FX_WSTR wsTitle, FX_WSTR wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen = TRUE) = 0;
+ virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0;;
+};
+class IXFA_FontMgr
+{
+public:
+ virtual void Release() = 0;
+ virtual IFX_Font* GetFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;
+ virtual IFX_Font* GetDefaultFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;
+};
+IXFA_FontMgr* XFA_GetDefaultFontMgr();
+class IXFA_App
+{
+public:
+ static IXFA_App* Create(IXFA_AppProvider* pProvider);
+ virtual void Release() = 0;
+ virtual IXFA_DocHandler* GetDocHandler() = 0;
+ virtual XFA_HDOC CreateDoc(IXFA_DocProvider* pProvider, IFX_FileRead* pStream, FX_BOOL bTakeOverFile = TRUE) = 0;
+ virtual XFA_HDOC CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc) = 0;
+ virtual IXFA_AppProvider* GetAppProvider() = 0;
+ virtual void SetDefaultFontMgr(IXFA_FontMgr* pFontMgr) = 0;
+ virtual IXFA_MenuHandler* GetMenuHandler() = 0;
+};
+class IXFA_MenuHandler
+{
+public:
+ virtual FX_BOOL CanCopy(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL CanCut(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL CanPaste(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL CanSelectAll(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL CanDelete(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL CanDeSelect(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL Copy(XFA_HWIDGET hWidget, CFX_WideString &wsText) = 0;
+ virtual FX_BOOL Cut(XFA_HWIDGET hWidget, CFX_WideString &wsText) = 0;
+ virtual FX_BOOL Paste(XFA_HWIDGET hWidget, const CFX_WideString &wsText) = 0;
+ virtual FX_BOOL SelectAll(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL Delete(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL DeSelect(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL CanUndo(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL CanRedo(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL Undo(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL Redo(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL GetSuggestWords(XFA_HWIDGET hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest) = 0;
+ virtual FX_BOOL ReplaceSpellCheckWord(XFA_HWIDGET hWidget, CFX_PointF pointf, FX_BSTR bsReplace) = 0;
+};
+#define XFA_INVALIDATE_AllPages 0x00000000
+#define XFA_INVALIDATE_CurrentPage 0x00000001
+#define XFA_PRINTOPT_ShowDialog 0x00000001
+#define XFA_PRINTOPT_CanCancel 0x00000002
+#define XFA_PRINTOPT_ShrinkPage 0x00000004
+#define XFA_PRINTOPT_AsImage 0x00000008
+#define XFA_PRINTOPT_ReverseOrder 0x00000010
+#define XFA_PRINTOPT_PrintAnnot 0x00000020
+#define XFA_PAGEVIEWEVENT_PostAdded 1
+#define XFA_PAGEVIEWEVENT_PostRemoved 3
+#define XFA_WIDGETEVENT_PostAdded 2
+#define XFA_WIDGETEVENT_PreRemoved 3
+#define XFA_WIDGETEVENT_PostContentChanged 6
+#define XFA_WIDGETEVENT_ListItemRemoved 7
+#define XFA_WIDGETEVENT_ListItemAdded 8
+#define XFA_WIDGETEVENT_AccessChanged 9
+class IXFA_DocProvider
+{
+public:
+ virtual void SetChangeMark(XFA_HDOC hDoc) = 0;
+ virtual void InvalidateRect(IXFA_PageView* pPageView, const CFX_RectF& rt, FX_DWORD dwFlags = 0) = 0;
+ virtual void DisplayCaret(XFA_HWIDGET hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor) = 0;
+ virtual FX_BOOL GetPopupPos(XFA_HWIDGET hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup,
+ const CFX_RectF &rtAnchor, CFX_RectF &rtPopup) = 0;
+ virtual FX_BOOL PopupMenu(XFA_HWIDGET hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude = NULL) = 0;
+ virtual void PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags) = 0;
+ virtual void WidgetEvent(XFA_HWIDGET hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL) = 0;
+ virtual FX_BOOL RenderCustomWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI)
+ {
+ return FALSE;
+ }
+ virtual FX_INT32 CountPages(XFA_HDOC hDoc) = 0;
+ virtual FX_INT32 GetCurrentPage(XFA_HDOC hDoc) = 0;
+ virtual void SetCurrentPage(XFA_HDOC hDoc, FX_INT32 iCurPage) = 0;
+ virtual FX_BOOL IsCalculationsEnabled(XFA_HDOC hDoc) = 0;
+ virtual void SetCalculationsEnabled(XFA_HDOC hDoc, FX_BOOL bEnabled) = 0;
+ virtual void GetTitle(XFA_HDOC hDoc, CFX_WideString &wsTitle) = 0;
+ virtual void SetTitle(XFA_HDOC hDoc, FX_WSTR wsTitle) = 0;
+ virtual void ExportData(XFA_HDOC hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP = TRUE) = 0;
+ virtual void ImportData(XFA_HDOC hDoc, FX_WSTR wsFilePath) = 0;
+ virtual void GotoURL(XFA_HDOC hDoc, FX_WSTR bsURL, FX_BOOL bAppend = TRUE) = 0;
+ virtual FX_BOOL IsValidationsEnabled(XFA_HDOC hDoc) = 0;
+ virtual void SetValidationsEnabled(XFA_HDOC hDoc, FX_BOOL bEnabled) = 0;
+ virtual void SetFocusWidget(XFA_HDOC hDoc, XFA_HWIDGET hWidget) = 0;
+ virtual void Print(XFA_HDOC hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions) = 0;
+ virtual FX_INT32 AbsPageCountInBatch(XFA_HDOC hDoc) = 0;
+ virtual FX_INT32 AbsPageInBatch(XFA_HDOC hDoc, XFA_HWIDGET hWidget) = 0;
+ virtual FX_INT32 SheetCountInBatch(XFA_HDOC hDoc) = 0;
+ virtual FX_INT32 SheetInBatch(XFA_HDOC hDoc, XFA_HWIDGET hWidget) = 0;
+ virtual FX_INT32 Verify(XFA_HDOC hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE)
+ {
+ return 0;
+ }
+ virtual FX_BOOL Sign(XFA_HDOC hDoc, CXFA_NodeList* pNodeList, FX_WSTR wsExpression, FX_WSTR wsXMLIdent, FX_WSTR wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE)
+ {
+ return 0;
+ }
+ virtual CXFA_NodeList* Enumerate(XFA_HDOC hDoc)
+ {
+ return 0;
+ }
+ virtual FX_BOOL Clear(XFA_HDOC hDoc, CXFA_Node* pSigNode, FX_BOOL bCleared = TRUE)
+ {
+ return 0;
+ }
+ virtual void GetURL(XFA_HDOC hDoc, CFX_WideString &wsDocURL) = 0;
+ virtual FX_ARGB GetHighlightColor(XFA_HDOC hDoc) = 0;
+ virtual void AddDoRecord(XFA_HWIDGET hWidget) = 0;
+
+ virtual FX_BOOL SubmitData(XFA_HDOC hDoc, CXFA_Submit submit) = 0;
+ virtual FX_BOOL CheckWord(XFA_HDOC hDoc, FX_BSTR sWord) = 0;
+ virtual FX_BOOL GetSuggestWords(XFA_HDOC hDoc, FX_BSTR sWord, CFX_ByteStringArray& sSuggest) = 0;
+ virtual FX_BOOL GetPDFScriptObject(XFA_HDOC hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;
+ virtual FX_BOOL GetGlobalProperty(XFA_HDOC hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue) = 0;
+ virtual FX_BOOL SetGlobalProperty(XFA_HDOC hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue) = 0;
+ virtual CPDF_Document* OpenPDF(XFA_HDOC hDoc, IFX_FileRead* pFile, FX_BOOL bTakeOverFile) = 0;
+ virtual IFX_FileRead* OpenLinkedFile(XFA_HDOC hDoc, const CFX_WideString& wsLink) = 0;
+};
+#define XFA_DOCVIEW_View 0x00000000
+#define XFA_DOCVIEW_MasterPage 0x00000001
+#define XFA_DOCVIEW_Design 0x00000002
+#define XFA_DOCTYPE_Dynamic 0
+#define XFA_DOCTYPE_Static 1
+#define XFA_DOCTYPE_XDP 2
+#define XFA_PARSESTATUS_StatusErr -3
+#define XFA_PARSESTATUS_StreamErr -2
+#define XFA_PARSESTATUS_SyntaxErr -1
+#define XFA_PARSESTATUS_Ready 0
+#define XFA_PARSESTATUS_Done 100
+class IXFA_DocHandler
+{
+public:
+ virtual void ReleaseDoc(XFA_HDOC hDoc) = 0;
+ virtual IXFA_DocProvider* GetDocProvider(XFA_HDOC hDoc) = 0;
+
+ virtual FX_DWORD GetDocType(XFA_HDOC hDoc) = 0;
+ virtual FX_INT32 StartLoad(XFA_HDOC hDoc) = 0;
+ virtual FX_INT32 DoLoad(XFA_HDOC hDoc, IFX_Pause *pPause = NULL) = 0;
+ virtual void StopLoad(XFA_HDOC hDoc) = 0;
+
+ virtual IXFA_DocView* CreateDocView(XFA_HDOC hDoc, FX_DWORD dwView = 0) = 0;
+
+ virtual FX_INT32 CountPackages(XFA_HDOC hDoc) = 0;
+ virtual void GetPackageName(XFA_HDOC hDoc, FX_INT32 iPackage, CFX_WideStringC &wsPackage) = 0;
+
+ virtual FX_BOOL SavePackage(XFA_HDOC hDoc, FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL) = 0;
+ virtual FX_BOOL CloseDoc(XFA_HDOC hDoc) = 0;
+
+ virtual FX_BOOL ImportData(XFA_HDOC hDoc, IFX_FileRead* pStream, FX_BOOL bXDP = TRUE) = 0;
+ virtual void SetJSERuntime(XFA_HDOC hDoc, FXJSE_HRUNTIME hRuntime) = 0;
+ virtual FXJSE_HVALUE GetXFAScriptObject(XFA_HDOC hDoc) = 0;
+ virtual XFA_ATTRIBUTEENUM GetRestoreState(XFA_HDOC hDoc) = 0;
+ virtual FX_BOOL RunDocScript(XFA_HDOC hDoc, XFA_SCRIPTTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject) = 0;
+};
+enum XFA_EVENTTYPE {
+ XFA_EVENT_Click,
+ XFA_EVENT_Change,
+ XFA_EVENT_DocClose,
+ XFA_EVENT_DocReady,
+ XFA_EVENT_Enter,
+ XFA_EVENT_Exit,
+ XFA_EVENT_Full,
+ XFA_EVENT_IndexChange,
+ XFA_EVENT_Initialize,
+ XFA_EVENT_MouseDown,
+ XFA_EVENT_MouseEnter,
+ XFA_EVENT_MouseExit,
+ XFA_EVENT_MouseUp,
+ XFA_EVENT_PostExecute,
+ XFA_EVENT_PostOpen,
+ XFA_EVENT_PostPrint,
+ XFA_EVENT_PostSave,
+ XFA_EVENT_PostSign,
+ XFA_EVENT_PostSubmit,
+ XFA_EVENT_PreExecute,
+ XFA_EVENT_PreOpen,
+ XFA_EVENT_PrePrint,
+ XFA_EVENT_PreSave,
+ XFA_EVENT_PreSign,
+ XFA_EVENT_PreSubmit,
+ XFA_EVENT_Ready,
+ XFA_EVENT_InitCalculate,
+ XFA_EVENT_InitVariables,
+ XFA_EVENT_Calculate,
+ XFA_EVENT_Validate,
+ XFA_EVENT_Unknown,
+};
+#define XFA_VALIDATE_preSubmit 1
+#define XFA_VALIDATE_prePrint 2
+#define XFA_VALIDATE_preExecute 3
+#define XFA_VALIDATE_preSave 4
+class CXFA_EventParam : public CFX_Object
+{
+public:
+ CXFA_EventParam()
+ {
+ m_pTarget = NULL;
+ m_eType = XFA_EVENT_Unknown;
+ m_wsResult.Empty();
+ Reset();
+ }
+ void Reset()
+ {
+ m_wsChange.Empty();
+ m_iCommitKey = 0;
+ m_wsFullText.Empty();
+ m_bKeyDown = FALSE;
+ m_bModifier = FALSE;
+ m_wsNewContentType.Empty();
+ m_wsNewText.Empty();
+ m_wsPrevContentType.Empty();
+ m_wsPrevText.Empty();
+ m_bReenter = FALSE;
+ m_iSelEnd = 0;
+ m_iSelStart = 0;
+ m_bShift = FALSE;
+ m_wsSoapFaultCode.Empty();
+ m_wsSoapFaultString.Empty();
+ m_bIsFormReady = FALSE;
+ m_iValidateActivities = XFA_VALIDATE_preSubmit;
+ }
+ CXFA_WidgetAcc* m_pTarget;
+ XFA_EVENTTYPE m_eType;
+ CFX_WideString m_wsResult;
+ FX_BOOL m_bCancelAction;
+ FX_INT32 m_iCommitKey;
+ FX_BOOL m_bKeyDown;
+ FX_BOOL m_bModifier;
+ FX_BOOL m_bReenter;
+ FX_INT32 m_iSelEnd;
+ FX_INT32 m_iSelStart;
+ FX_BOOL m_bShift;
+ CFX_WideString m_wsChange;
+ CFX_WideString m_wsFullText;
+ CFX_WideString m_wsNewContentType;
+ CFX_WideString m_wsNewText;
+ CFX_WideString m_wsPrevContentType;
+ CFX_WideString m_wsPrevText;
+ CFX_WideString m_wsSoapFaultCode;
+ CFX_WideString m_wsSoapFaultString;
+ FX_BOOL m_bIsFormReady;
+ FX_INT32 m_iValidateActivities;
+};
+#define XFA_EVENTERROR_Sucess 1
+#define XFA_EVENTERROR_Error -1
+#define XFA_EVENTERROR_NotExist 0
+#define XFA_EVENTERROR_Disabled 2
+enum XFA_WIDGETORDER {
+ XFA_WIDGETORDER_PreOrder,
+};
+class IXFA_DocView
+{
+public:
+ virtual XFA_HDOC GetDoc() = 0;
+ virtual FX_INT32 StartLayout(FX_INT32 iStartPage = 0) = 0;
+ virtual FX_INT32 DoLayout(IFX_Pause *pPause = NULL) = 0;
+ virtual void StopLayout() = 0;
+
+ virtual FX_INT32 GetLayoutStatus() = 0;
+ virtual void UpdateDocView() = 0;
+ virtual FX_INT32 CountPageViews() = 0;
+ virtual IXFA_PageView* GetPageView(FX_INT32 nIndex) = 0;
+ virtual XFA_HWIDGET GetWidgetByName(FX_WSTR wsName) = 0;
+ virtual CXFA_WidgetAcc* GetWidgetAccByName(FX_WSTR wsName) = 0;
+ virtual void ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc = NULL) = 0;
+ virtual FX_INT32 ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc = NULL) = 0;
+ virtual IXFA_WidgetHandler* GetWidgetHandler() = 0;
+ virtual IXFA_WidgetIterator* CreateWidgetIterator() = 0;
+ virtual IXFA_WidgetAccIterator* CreateWidgetAccIterator(XFA_WIDGETORDER eOrder = XFA_WIDGETORDER_PreOrder) = 0;
+ virtual XFA_HWIDGET GetFocusWidget() = 0;
+ virtual void KillFocus() = 0;
+ virtual FX_BOOL SetFocus(XFA_HWIDGET hWidget) = 0;
+};
+#define XFA_TRAVERSEWAY_Tranvalse 0x0001
+#define XFA_TRAVERSEWAY_Form 0x0002
+#define XFA_WIDGETFILTER_Visible 0x0001
+#define XFA_WIDGETFILTER_Viewable 0x0010
+#define XFA_WIDGETFILTER_Printable 0x0020
+#define XFA_WIDGETFILTER_Field 0x0100
+#define XFA_WIDGETFILTER_AllType 0x0F00
+class IXFA_PageView
+{
+public:
+ virtual IXFA_DocView* GetDocView() = 0;
+ virtual FX_INT32 GetPageViewIndex() = 0;
+ virtual void GetPageViewRect(CFX_RectF &rtPage) = 0;
+
+ virtual void GetDisplayMatrix(CFX_Matrix &mt, const CFX_Rect &rtDisp, FX_INT32 iRotate) = 0;
+
+ virtual FX_INT32 LoadPageView(IFX_Pause *pPause = NULL) = 0;
+ virtual void UnloadPageView() = 0;
+ virtual XFA_HWIDGET GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual IXFA_WidgetIterator* CreateWidgetIterator(FX_DWORD dwTraverseWay = XFA_TRAVERSEWAY_Form, FX_DWORD dwWidgetFilter = XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_Viewable | XFA_WIDGETFILTER_AllType) = 0;
+};
+class CXFA_RenderOptions : public CFX_Object
+{
+public:
+ CXFA_RenderOptions()
+ : m_bPrint(FALSE)
+ , m_bHighlight(TRUE)
+ {
+ }
+ FX_BOOL m_bPrint;
+ FX_BOOL m_bHighlight;
+};
+#define XFA_RENDERSTATUS_Ready 1
+#define XFA_RENDERSTATUS_ToBeContinued 2
+#define XFA_RENDERSTATUS_Done 3
+#define XFA_RENDERSTATUS_Failed -1
+class IXFA_RenderContext
+{
+public:
+ virtual void Release() = 0;
+ virtual FX_INT32 StartRender(IXFA_PageView* pPageView, CFX_Graphics* pGS, const CFX_Matrix& pMatrix, const CXFA_RenderOptions& options) = 0;
+ virtual FX_INT32 DoRender(IFX_Pause* pPause = NULL) = 0;
+ virtual void StopRender() = 0;
+};
+IXFA_RenderContext* XFA_RenderContext_Create();
+enum XFA_WIDGETTYPE {
+ XFA_WIDGETTYPE_Barcode,
+ XFA_WIDGETTYPE_PushButton,
+ XFA_WIDGETTYPE_CheckButton,
+ XFA_WIDGETTYPE_RadioButton,
+ XFA_WIDGETTYPE_DatetimeEdit,
+ XFA_WIDGETTYPE_DecimalField,
+ XFA_WIDGETTYPE_NumericField,
+ XFA_WIDGETTYPE_Signature,
+ XFA_WIDGETTYPE_TextEdit,
+ XFA_WIDGETTYPE_DropdownList,
+ XFA_WIDGETTYPE_ListBox,
+ XFA_WIDGETTYPE_ImageField,
+ XFA_WIDGETTYPE_PasswordEdit,
+ XFA_WIDGETTYPE_Arc,
+ XFA_WIDGETTYPE_Rectangle,
+ XFA_WIDGETTYPE_Image,
+ XFA_WIDGETTYPE_Line,
+ XFA_WIDGETTYPE_Text,
+ XFA_WIDGETTYPE_ExcludeGroup,
+ XFA_WIDGETTYPE_Subform,
+ XFA_WIDGETTYPE_Unknown,
+};
+#define XFA_WIDGETSTATUS_Visible 0x00000001
+#define XFA_WIDGETSTATUS_Invisible 0x00000002
+#define XFA_WIDGETSTATUS_Hidden 0x00000004
+#define XFA_WIDGETSTATUS_Viewable 0x00000010
+#define XFA_WIDGETSTATUS_Printable 0x00000020
+#define XFA_WIDGETSTATUS_Focused 0x00000100
+class IXFA_WidgetHandler
+{
+public:
+
+ virtual XFA_HWIDGET CreateWidget(XFA_HWIDGET hParent, XFA_WIDGETTYPE eType, XFA_HWIDGET hBefore = NULL) = 0;
+ virtual IXFA_PageView* GetPageView(XFA_HWIDGET hWidget) = 0;
+ virtual void GetRect(XFA_HWIDGET hWidget, CFX_RectF &rt) = 0;
+ virtual FX_DWORD GetStatus(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL GetBBox(XFA_HWIDGET hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE) = 0;
+ virtual CXFA_WidgetAcc* GetDataAcc(XFA_HWIDGET hWidget) = 0;
+
+ virtual void GetName(XFA_HWIDGET hWidget, CFX_WideString &wsName, FX_INT32 iNameType = 0) = 0;
+ virtual FX_BOOL GetToolTip(XFA_HWIDGET hWidget, CFX_WideString &wsToolTip) = 0;
+ virtual void SetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback) = 0;
+ virtual FX_LPVOID GetPrivateData(XFA_HWIDGET hWidget, FX_LPVOID module_id) = 0;
+ virtual FX_BOOL OnMouseEnter(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL OnMouseExit(XFA_HWIDGET hWidget) = 0;
+ virtual FX_BOOL OnLButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnLButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnLButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnMouseMove(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnMouseWheel(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnRButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnRButtonUp(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnRButtonDblClk(XFA_HWIDGET hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
+
+ virtual FX_BOOL OnKeyDown(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags) = 0;
+ virtual FX_BOOL OnKeyUp(XFA_HWIDGET hWidget, FX_DWORD dwKeyCode, FX_DWORD dwFlags) = 0;
+ virtual FX_BOOL OnChar(XFA_HWIDGET hWidget, FX_DWORD dwChar, FX_DWORD dwFlags) = 0;
+ virtual FX_DWORD OnHitTest(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;
+ virtual FX_BOOL OnSetCursor(XFA_HWIDGET hWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;
+
+ virtual void RenderWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_BOOL bHighlight = FALSE) = 0;
+ virtual FX_BOOL HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE eEventType) = 0;
+ virtual FX_INT32 ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam) = 0;
+};
+class IXFA_WidgetIterator
+{
+public:
+ virtual void Release() = 0;
+ virtual void Reset() = 0;
+ virtual XFA_HWIDGET MoveToFirst() = 0;
+ virtual XFA_HWIDGET MoveToLast() = 0;
+ virtual XFA_HWIDGET MoveToNext() = 0;
+ virtual XFA_HWIDGET MoveToPrevious() = 0;
+ virtual XFA_HWIDGET GetCurrentWidget() = 0;
+ virtual FX_BOOL SetCurrentWidget(XFA_HWIDGET hWidget) = 0;
+};
+class IXFA_WidgetAccIterator
+{
+public:
+ virtual void Release() = 0;
+
+ virtual void Reset() = 0;
+ virtual CXFA_WidgetAcc* MoveToFirst() = 0;
+ virtual CXFA_WidgetAcc* MoveToLast() = 0;
+ virtual CXFA_WidgetAcc* MoveToNext() = 0;
+ virtual CXFA_WidgetAcc* MoveToPrevious() = 0;
+ virtual CXFA_WidgetAcc* GetCurrentWidgetAcc() = 0;
+ virtual FX_BOOL SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) = 0;
+ virtual void SkipTree() = 0;
+};
+IXFA_WidgetAccIterator* XFA_WidgetAccIterator_Create(CXFA_WidgetAcc* pTravelRoot, XFA_WIDGETORDER eOrder = XFA_WIDGETORDER_PreOrder);
+class IXFA_ChecksumContext
+{
+public:
+ virtual void Release() = 0;
+
+ virtual FX_BOOL StartChecksum() = 0;
+ virtual FX_BOOL UpdateChecksum(IFX_FileRead* pSrcFile, FX_FILESIZE offset = 0, size_t size = 0) = 0;
+ virtual void FinishChecksum() = 0;
+ virtual void GetChecksum(CFX_ByteString &bsChecksum) = 0;
+};
+IXFA_ChecksumContext* XFA_Checksum_Create();
+#endif
diff --git a/xfa/include/fxfa/fxfa_basic.h b/xfa/include/fxfa/fxfa_basic.h
new file mode 100644
index 0000000000..6e45060b19
--- /dev/null
+++ b/xfa/include/fxfa/fxfa_basic.h
@@ -0,0 +1,1073 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FXFA_BASIC_H
+#define _FXFA_BASIC_H
+class CXFA_Measurement;
+#define XFA_HASHCODE_Xfa 0xc56b9ff
+#define XFA_HASHCODE_Config 0x4e1e39b6
+#define XFA_HASHCODE_Template 0x803550fc
+#define XFA_HASHCODE_Datasets 0x99b95079
+#define XFA_HASHCODE_Data 0xbde9abda
+#define XFA_HASHCODE_Form 0xcd309ff4
+#define XFA_HASHCODE_LocaleSet 0x5473b6dc
+#define XFA_HASHCODE_ConnectionSet 0xe14c801c
+#define XFA_HASHCODE_SourceSet 0x811929d
+#define XFA_HASHCODE_Xdc 0xc56afbf
+#define XFA_HASHCODE_Pdf 0xb843dba
+#define XFA_HASHCODE_Xfdf 0x48d004a8
+#define XFA_HASHCODE_Xmpmeta 0x132a8fbc
+#define XFA_HASHCODE_Signature 0x8b036f32
+#define XFA_HASHCODE_Stylesheet 0x6038580a
+#define XFA_HASHCODE_XDP 0xc56afcc
+#define XFA_HASHCODE_Record 0x5779d65f
+#define XFA_HASHCODE_DataWindow 0x83a550d2
+#define XFA_HASHCODE_Host 0xdb075bde
+#define XFA_HASHCODE_Log 0x0b1b3d22
+#define XFA_HASHCODE_Event 0x185e41e2
+#define XFA_HASHCODE_Layout 0x7e7e845e
+#define XFA_HASHCODE_Occur 0xf7eebe1c
+#define XFA_HASHCODE_This 0x2d574d58
+#define XFA_HASHCODE_DataDescription 0x2b5df51e
+#define XFA_HASHCODE_Name 0x31b19c1
+enum XFA_PACKET {
+ XFA_PACKET_USER,
+ XFA_PACKET_SourceSet,
+ XFA_PACKET_Pdf,
+ XFA_PACKET_Xdc,
+ XFA_PACKET_XDP,
+ XFA_PACKET_Xmpmeta,
+ XFA_PACKET_Xfdf,
+ XFA_PACKET_Config,
+ XFA_PACKET_LocaleSet,
+ XFA_PACKET_Stylesheet,
+ XFA_PACKET_Template,
+ XFA_PACKET_Signature,
+ XFA_PACKET_Datasets,
+ XFA_PACKET_Form,
+ XFA_PACKET_ConnectionSet,
+};
+enum XFA_XDPPACKET {
+ XFA_XDPPACKET_UNKNOWN = 0,
+ XFA_XDPPACKET_Config = 1 << XFA_PACKET_Config ,
+ XFA_XDPPACKET_Template = 1 << XFA_PACKET_Template ,
+ XFA_XDPPACKET_Datasets = 1 << XFA_PACKET_Datasets ,
+ XFA_XDPPACKET_Form = 1 << XFA_PACKET_Form ,
+ XFA_XDPPACKET_LocaleSet = 1 << XFA_PACKET_LocaleSet ,
+ XFA_XDPPACKET_ConnectionSet = 1 << XFA_PACKET_ConnectionSet ,
+ XFA_XDPPACKET_SourceSet = 1 << XFA_PACKET_SourceSet ,
+ XFA_XDPPACKET_Xdc = 1 << XFA_PACKET_Xdc ,
+ XFA_XDPPACKET_Pdf = 1 << XFA_PACKET_Pdf ,
+ XFA_XDPPACKET_Xfdf = 1 << XFA_PACKET_Xfdf ,
+ XFA_XDPPACKET_Xmpmeta = 1 << XFA_PACKET_Xmpmeta ,
+ XFA_XDPPACKET_Signature = 1 << XFA_PACKET_Signature ,
+ XFA_XDPPACKET_Stylesheet = 1 << XFA_PACKET_Stylesheet ,
+ XFA_XDPPACKET_USER = 1 << XFA_PACKET_USER ,
+ XFA_XDPPACKET_XDP = 1 << XFA_PACKET_XDP ,
+};
+enum XFA_XDPPACKET_FLAGS {
+ XFA_XDPPACKET_FLAGS_COMPLETEMATCH = 1,
+ XFA_XDPPACKET_FLAGS_PREFIXMATCH = 2,
+ XFA_XDPPACKET_FLAGS_NOMATCH = 4,
+ XFA_XDPPACKET_FLAGS_SUPPORTONE = 8,
+ XFA_XDPPACKET_FLAGS_SUPPORTMANY = 16,
+};
+typedef struct _XFA_PACKETINFO {
+ FX_UINT32 uHash;
+ FX_LPCWSTR pName;
+ XFA_XDPPACKET eName;
+ FX_LPCWSTR pURI;
+ FX_DWORD eFlags;
+} XFA_PACKETINFO, * XFA_LPPACKETINFO;
+typedef XFA_PACKETINFO const * XFA_LPCPACKETINFO;
+XFA_LPCPACKETINFO XFA_GetPacketByName(FX_WSTR wsName);
+XFA_LPCPACKETINFO XFA_GetPacketByID(FX_DWORD dwPacket);
+extern const XFA_PACKETINFO g_XFAPacketData[];
+inline XFA_LPCPACKETINFO XFA_GetPacketByIndex(XFA_PACKET ePacket)
+{
+ return g_XFAPacketData + ePacket;
+}
+enum XFA_ATTRIBUTEENUM {
+ XFA_ATTRIBUTEENUM_Asterisk,
+ XFA_ATTRIBUTEENUM_Slash,
+ XFA_ATTRIBUTEENUM_Backslash,
+ XFA_ATTRIBUTEENUM_On,
+ XFA_ATTRIBUTEENUM_Tb,
+ XFA_ATTRIBUTEENUM_Up,
+ XFA_ATTRIBUTEENUM_MetaData,
+ XFA_ATTRIBUTEENUM_Delegate,
+ XFA_ATTRIBUTEENUM_PostSubmit,
+ XFA_ATTRIBUTEENUM_Name,
+ XFA_ATTRIBUTEENUM_Cross,
+ XFA_ATTRIBUTEENUM_Next,
+ XFA_ATTRIBUTEENUM_None,
+ XFA_ATTRIBUTEENUM_ShortEdge,
+ XFA_ATTRIBUTEENUM_1mod10_1mod11,
+ XFA_ATTRIBUTEENUM_Height,
+ XFA_ATTRIBUTEENUM_CrossDiagonal,
+ XFA_ATTRIBUTEENUM_All,
+ XFA_ATTRIBUTEENUM_Any,
+ XFA_ATTRIBUTEENUM_ToRight,
+ XFA_ATTRIBUTEENUM_MatchTemplate,
+ XFA_ATTRIBUTEENUM_Dpl,
+ XFA_ATTRIBUTEENUM_Invisible,
+ XFA_ATTRIBUTEENUM_Fit,
+ XFA_ATTRIBUTEENUM_Width,
+ XFA_ATTRIBUTEENUM_PreSubmit,
+ XFA_ATTRIBUTEENUM_Ipl,
+ XFA_ATTRIBUTEENUM_FlateCompress,
+ XFA_ATTRIBUTEENUM_Med,
+ XFA_ATTRIBUTEENUM_Odd,
+ XFA_ATTRIBUTEENUM_Off,
+ XFA_ATTRIBUTEENUM_Pdf,
+ XFA_ATTRIBUTEENUM_Row,
+ XFA_ATTRIBUTEENUM_Top,
+ XFA_ATTRIBUTEENUM_Xdp,
+ XFA_ATTRIBUTEENUM_Xfd,
+ XFA_ATTRIBUTEENUM_Xml,
+ XFA_ATTRIBUTEENUM_Zip,
+ XFA_ATTRIBUTEENUM_Zpl,
+ XFA_ATTRIBUTEENUM_Visible,
+ XFA_ATTRIBUTEENUM_Exclude,
+ XFA_ATTRIBUTEENUM_MouseEnter,
+ XFA_ATTRIBUTEENUM_Pair,
+ XFA_ATTRIBUTEENUM_Filter,
+ XFA_ATTRIBUTEENUM_MoveLast,
+ XFA_ATTRIBUTEENUM_ExportAndImport,
+ XFA_ATTRIBUTEENUM_Push,
+ XFA_ATTRIBUTEENUM_Portrait,
+ XFA_ATTRIBUTEENUM_Default,
+ XFA_ATTRIBUTEENUM_StoredProc,
+ XFA_ATTRIBUTEENUM_StayBOF,
+ XFA_ATTRIBUTEENUM_StayEOF,
+ XFA_ATTRIBUTEENUM_PostPrint,
+ XFA_ATTRIBUTEENUM_UsCarrier,
+ XFA_ATTRIBUTEENUM_Right,
+ XFA_ATTRIBUTEENUM_PreOpen,
+ XFA_ATTRIBUTEENUM_Actual,
+ XFA_ATTRIBUTEENUM_Rest,
+ XFA_ATTRIBUTEENUM_TopCenter,
+ XFA_ATTRIBUTEENUM_StandardSymbol,
+ XFA_ATTRIBUTEENUM_Initialize,
+ XFA_ATTRIBUTEENUM_JustifyAll,
+ XFA_ATTRIBUTEENUM_Normal,
+ XFA_ATTRIBUTEENUM_Landscape,
+ XFA_ATTRIBUTEENUM_NonInteractive,
+ XFA_ATTRIBUTEENUM_MouseExit,
+ XFA_ATTRIBUTEENUM_Minus,
+ XFA_ATTRIBUTEENUM_DiagonalLeft,
+ XFA_ATTRIBUTEENUM_SimplexPaginated,
+ XFA_ATTRIBUTEENUM_Document,
+ XFA_ATTRIBUTEENUM_Warning,
+ XFA_ATTRIBUTEENUM_Auto,
+ XFA_ATTRIBUTEENUM_Below,
+ XFA_ATTRIBUTEENUM_BottomLeft,
+ XFA_ATTRIBUTEENUM_BottomCenter,
+ XFA_ATTRIBUTEENUM_Tcpl,
+ XFA_ATTRIBUTEENUM_Text,
+ XFA_ATTRIBUTEENUM_Grouping,
+ XFA_ATTRIBUTEENUM_SecureSymbol,
+ XFA_ATTRIBUTEENUM_PreExecute,
+ XFA_ATTRIBUTEENUM_DocClose,
+ XFA_ATTRIBUTEENUM_Keyset,
+ XFA_ATTRIBUTEENUM_Vertical,
+ XFA_ATTRIBUTEENUM_PreSave,
+ XFA_ATTRIBUTEENUM_PreSign,
+ XFA_ATTRIBUTEENUM_Bottom,
+ XFA_ATTRIBUTEENUM_ToTop,
+ XFA_ATTRIBUTEENUM_Verify,
+ XFA_ATTRIBUTEENUM_First,
+ XFA_ATTRIBUTEENUM_ContentArea,
+ XFA_ATTRIBUTEENUM_Solid,
+ XFA_ATTRIBUTEENUM_Pessimistic,
+ XFA_ATTRIBUTEENUM_DuplexPaginated,
+ XFA_ATTRIBUTEENUM_Round,
+ XFA_ATTRIBUTEENUM_Remerge,
+ XFA_ATTRIBUTEENUM_Ordered,
+ XFA_ATTRIBUTEENUM_Percent,
+ XFA_ATTRIBUTEENUM_Even,
+ XFA_ATTRIBUTEENUM_Exit,
+ XFA_ATTRIBUTEENUM_ToolTip,
+ XFA_ATTRIBUTEENUM_OrderedOccurrence,
+ XFA_ATTRIBUTEENUM_ReadOnly,
+ XFA_ATTRIBUTEENUM_Currency,
+ XFA_ATTRIBUTEENUM_Concat,
+ XFA_ATTRIBUTEENUM_Thai,
+ XFA_ATTRIBUTEENUM_Embossed,
+ XFA_ATTRIBUTEENUM_Formdata,
+ XFA_ATTRIBUTEENUM_Greek,
+ XFA_ATTRIBUTEENUM_Decimal,
+ XFA_ATTRIBUTEENUM_Select,
+ XFA_ATTRIBUTEENUM_LongEdge,
+ XFA_ATTRIBUTEENUM_Protected,
+ XFA_ATTRIBUTEENUM_BottomRight,
+ XFA_ATTRIBUTEENUM_Zero,
+ XFA_ATTRIBUTEENUM_ForwardOnly,
+ XFA_ATTRIBUTEENUM_DocReady,
+ XFA_ATTRIBUTEENUM_Hidden,
+ XFA_ATTRIBUTEENUM_Include,
+ XFA_ATTRIBUTEENUM_Dashed,
+ XFA_ATTRIBUTEENUM_MultiSelect,
+ XFA_ATTRIBUTEENUM_Inactive,
+ XFA_ATTRIBUTEENUM_Embed,
+ XFA_ATTRIBUTEENUM_Static,
+ XFA_ATTRIBUTEENUM_OnEntry,
+ XFA_ATTRIBUTEENUM_Cyrillic,
+ XFA_ATTRIBUTEENUM_NonBlank,
+ XFA_ATTRIBUTEENUM_TopRight,
+ XFA_ATTRIBUTEENUM_Hebrew,
+ XFA_ATTRIBUTEENUM_TopLeft,
+ XFA_ATTRIBUTEENUM_Center,
+ XFA_ATTRIBUTEENUM_MoveFirst,
+ XFA_ATTRIBUTEENUM_Diamond,
+ XFA_ATTRIBUTEENUM_PageOdd,
+ XFA_ATTRIBUTEENUM_1mod10,
+ XFA_ATTRIBUTEENUM_Korean,
+ XFA_ATTRIBUTEENUM_AboveEmbedded,
+ XFA_ATTRIBUTEENUM_ZipCompress,
+ XFA_ATTRIBUTEENUM_Numeric,
+ XFA_ATTRIBUTEENUM_Circle,
+ XFA_ATTRIBUTEENUM_ToBottom,
+ XFA_ATTRIBUTEENUM_Inverted,
+ XFA_ATTRIBUTEENUM_Update,
+ XFA_ATTRIBUTEENUM_Isoname,
+ XFA_ATTRIBUTEENUM_Server,
+ XFA_ATTRIBUTEENUM_Position,
+ XFA_ATTRIBUTEENUM_MiddleCenter,
+ XFA_ATTRIBUTEENUM_Optional,
+ XFA_ATTRIBUTEENUM_UsePrinterSetting,
+ XFA_ATTRIBUTEENUM_Outline,
+ XFA_ATTRIBUTEENUM_IndexChange,
+ XFA_ATTRIBUTEENUM_Change,
+ XFA_ATTRIBUTEENUM_PageArea,
+ XFA_ATTRIBUTEENUM_Once,
+ XFA_ATTRIBUTEENUM_Only,
+ XFA_ATTRIBUTEENUM_Open,
+ XFA_ATTRIBUTEENUM_Caption,
+ XFA_ATTRIBUTEENUM_Raised,
+ XFA_ATTRIBUTEENUM_Justify,
+ XFA_ATTRIBUTEENUM_RefAndDescendants,
+ XFA_ATTRIBUTEENUM_Short,
+ XFA_ATTRIBUTEENUM_PageFront,
+ XFA_ATTRIBUTEENUM_Monospace,
+ XFA_ATTRIBUTEENUM_Middle,
+ XFA_ATTRIBUTEENUM_PrePrint,
+ XFA_ATTRIBUTEENUM_Always,
+ XFA_ATTRIBUTEENUM_Unknown,
+ XFA_ATTRIBUTEENUM_ToLeft,
+ XFA_ATTRIBUTEENUM_Above,
+ XFA_ATTRIBUTEENUM_DashDot,
+ XFA_ATTRIBUTEENUM_Gregorian,
+ XFA_ATTRIBUTEENUM_Roman,
+ XFA_ATTRIBUTEENUM_MouseDown,
+ XFA_ATTRIBUTEENUM_Symbol,
+ XFA_ATTRIBUTEENUM_PageEven,
+ XFA_ATTRIBUTEENUM_Sign,
+ XFA_ATTRIBUTEENUM_AddNew,
+ XFA_ATTRIBUTEENUM_Star,
+ XFA_ATTRIBUTEENUM_Optimistic,
+ XFA_ATTRIBUTEENUM_Rl_tb,
+ XFA_ATTRIBUTEENUM_MiddleRight,
+ XFA_ATTRIBUTEENUM_Maintain,
+ XFA_ATTRIBUTEENUM_Package,
+ XFA_ATTRIBUTEENUM_SimplifiedChinese,
+ XFA_ATTRIBUTEENUM_ToCenter,
+ XFA_ATTRIBUTEENUM_Back,
+ XFA_ATTRIBUTEENUM_Unspecified,
+ XFA_ATTRIBUTEENUM_BatchOptimistic,
+ XFA_ATTRIBUTEENUM_Bold,
+ XFA_ATTRIBUTEENUM_Both,
+ XFA_ATTRIBUTEENUM_Butt,
+ XFA_ATTRIBUTEENUM_Client,
+ XFA_ATTRIBUTEENUM_2mod10,
+ XFA_ATTRIBUTEENUM_ImageOnly,
+ XFA_ATTRIBUTEENUM_Horizontal,
+ XFA_ATTRIBUTEENUM_Dotted,
+ XFA_ATTRIBUTEENUM_UserControl,
+ XFA_ATTRIBUTEENUM_DiagonalRight,
+ XFA_ATTRIBUTEENUM_ConsumeData,
+ XFA_ATTRIBUTEENUM_Check,
+ XFA_ATTRIBUTEENUM_Data,
+ XFA_ATTRIBUTEENUM_Down,
+ XFA_ATTRIBUTEENUM_SansSerif,
+ XFA_ATTRIBUTEENUM_Inline,
+ XFA_ATTRIBUTEENUM_TraditionalChinese,
+ XFA_ATTRIBUTEENUM_Warn,
+ XFA_ATTRIBUTEENUM_RefOnly,
+ XFA_ATTRIBUTEENUM_InteractiveForms,
+ XFA_ATTRIBUTEENUM_Word,
+ XFA_ATTRIBUTEENUM_Unordered,
+ XFA_ATTRIBUTEENUM_Required,
+ XFA_ATTRIBUTEENUM_ImportOnly,
+ XFA_ATTRIBUTEENUM_BelowEmbedded,
+ XFA_ATTRIBUTEENUM_Japanese,
+ XFA_ATTRIBUTEENUM_Full,
+ XFA_ATTRIBUTEENUM_Rl_row,
+ XFA_ATTRIBUTEENUM_Vietnamese,
+ XFA_ATTRIBUTEENUM_EastEuropeanRoman,
+ XFA_ATTRIBUTEENUM_MouseUp,
+ XFA_ATTRIBUTEENUM_ExportOnly,
+ XFA_ATTRIBUTEENUM_Clear,
+ XFA_ATTRIBUTEENUM_Click,
+ XFA_ATTRIBUTEENUM_Base64,
+ XFA_ATTRIBUTEENUM_Close,
+ XFA_ATTRIBUTEENUM_Host,
+ XFA_ATTRIBUTEENUM_Global,
+ XFA_ATTRIBUTEENUM_Blank,
+ XFA_ATTRIBUTEENUM_Table,
+ XFA_ATTRIBUTEENUM_Import,
+ XFA_ATTRIBUTEENUM_Custom,
+ XFA_ATTRIBUTEENUM_MiddleLeft,
+ XFA_ATTRIBUTEENUM_PostExecute,
+ XFA_ATTRIBUTEENUM_Radix,
+ XFA_ATTRIBUTEENUM_PostOpen,
+ XFA_ATTRIBUTEENUM_Enter,
+ XFA_ATTRIBUTEENUM_Ignore,
+ XFA_ATTRIBUTEENUM_Lr_tb,
+ XFA_ATTRIBUTEENUM_Fantasy,
+ XFA_ATTRIBUTEENUM_Italic,
+ XFA_ATTRIBUTEENUM_Author,
+ XFA_ATTRIBUTEENUM_ToEdge,
+ XFA_ATTRIBUTEENUM_Choice,
+ XFA_ATTRIBUTEENUM_Disabled,
+ XFA_ATTRIBUTEENUM_CrossHatch,
+ XFA_ATTRIBUTEENUM_DataRef,
+ XFA_ATTRIBUTEENUM_DashDotDot,
+ XFA_ATTRIBUTEENUM_Square,
+ XFA_ATTRIBUTEENUM_Dynamic,
+ XFA_ATTRIBUTEENUM_Manual,
+ XFA_ATTRIBUTEENUM_Etched,
+ XFA_ATTRIBUTEENUM_ValidationState,
+ XFA_ATTRIBUTEENUM_Cursive,
+ XFA_ATTRIBUTEENUM_Last,
+ XFA_ATTRIBUTEENUM_Left,
+ XFA_ATTRIBUTEENUM_Link,
+ XFA_ATTRIBUTEENUM_Long,
+ XFA_ATTRIBUTEENUM_InternationalCarrier,
+ XFA_ATTRIBUTEENUM_PDF1_3,
+ XFA_ATTRIBUTEENUM_PDF1_6,
+ XFA_ATTRIBUTEENUM_Serif,
+ XFA_ATTRIBUTEENUM_PostSave,
+ XFA_ATTRIBUTEENUM_Ready,
+ XFA_ATTRIBUTEENUM_PostSign,
+ XFA_ATTRIBUTEENUM_Arabic,
+ XFA_ATTRIBUTEENUM_Error,
+ XFA_ATTRIBUTEENUM_Urlencoded,
+ XFA_ATTRIBUTEENUM_Lowered,
+};
+enum XFA_ATTRIBUTE {
+ XFA_ATTRIBUTE_H,
+ XFA_ATTRIBUTE_W,
+ XFA_ATTRIBUTE_X,
+ XFA_ATTRIBUTE_Y,
+ XFA_ATTRIBUTE_Id,
+ XFA_ATTRIBUTE_To,
+ XFA_ATTRIBUTE_LineThrough,
+ XFA_ATTRIBUTE_HAlign,
+ XFA_ATTRIBUTE_Typeface,
+ XFA_ATTRIBUTE_BeforeTarget,
+ XFA_ATTRIBUTE_Name,
+ XFA_ATTRIBUTE_Next,
+ XFA_ATTRIBUTE_DataRowCount,
+ XFA_ATTRIBUTE_Break,
+ XFA_ATTRIBUTE_VScrollPolicy,
+ XFA_ATTRIBUTE_FontHorizontalScale,
+ XFA_ATTRIBUTE_TextIndent,
+ XFA_ATTRIBUTE_Context,
+ XFA_ATTRIBUTE_TrayOut,
+ XFA_ATTRIBUTE_Cap,
+ XFA_ATTRIBUTE_Max,
+ XFA_ATTRIBUTE_Min,
+ XFA_ATTRIBUTE_Ref,
+ XFA_ATTRIBUTE_Rid,
+ XFA_ATTRIBUTE_Url,
+ XFA_ATTRIBUTE_Use,
+ XFA_ATTRIBUTE_LeftInset,
+ XFA_ATTRIBUTE_Widows,
+ XFA_ATTRIBUTE_Level,
+ XFA_ATTRIBUTE_BottomInset,
+ XFA_ATTRIBUTE_OverflowTarget,
+ XFA_ATTRIBUTE_AllowMacro,
+ XFA_ATTRIBUTE_PagePosition,
+ XFA_ATTRIBUTE_ColumnWidths,
+ XFA_ATTRIBUTE_OverflowLeader,
+ XFA_ATTRIBUTE_Action,
+ XFA_ATTRIBUTE_NonRepudiation,
+ XFA_ATTRIBUTE_Rate,
+ XFA_ATTRIBUTE_AllowRichText,
+ XFA_ATTRIBUTE_Role,
+ XFA_ATTRIBUTE_OverflowTrailer,
+ XFA_ATTRIBUTE_Operation,
+ XFA_ATTRIBUTE_Timeout,
+ XFA_ATTRIBUTE_TopInset,
+ XFA_ATTRIBUTE_Access,
+ XFA_ATTRIBUTE_CommandType,
+ XFA_ATTRIBUTE_Format,
+ XFA_ATTRIBUTE_DataPrep,
+ XFA_ATTRIBUTE_WidgetData,
+ XFA_ATTRIBUTE_Abbr,
+ XFA_ATTRIBUTE_MarginRight,
+ XFA_ATTRIBUTE_DataDescription,
+ XFA_ATTRIBUTE_EncipherOnly,
+ XFA_ATTRIBUTE_KerningMode,
+ XFA_ATTRIBUTE_Rotate,
+ XFA_ATTRIBUTE_WordCharacterCount,
+ XFA_ATTRIBUTE_Type,
+ XFA_ATTRIBUTE_Reserve,
+ XFA_ATTRIBUTE_TextLocation,
+ XFA_ATTRIBUTE_Priority,
+ XFA_ATTRIBUTE_Underline,
+ XFA_ATTRIBUTE_ModuleWidth,
+ XFA_ATTRIBUTE_Hyphenate,
+ XFA_ATTRIBUTE_Listen,
+ XFA_ATTRIBUTE_Delimiter,
+ XFA_ATTRIBUTE_ContentType,
+ XFA_ATTRIBUTE_StartNew,
+ XFA_ATTRIBUTE_EofAction,
+ XFA_ATTRIBUTE_AllowNeutral,
+ XFA_ATTRIBUTE_Connection,
+ XFA_ATTRIBUTE_BaselineShift,
+ XFA_ATTRIBUTE_OverlinePeriod,
+ XFA_ATTRIBUTE_FracDigits,
+ XFA_ATTRIBUTE_Orientation,
+ XFA_ATTRIBUTE_TimeStamp,
+ XFA_ATTRIBUTE_PrintCheckDigit,
+ XFA_ATTRIBUTE_MarginLeft,
+ XFA_ATTRIBUTE_Stroke,
+ XFA_ATTRIBUTE_ModuleHeight,
+ XFA_ATTRIBUTE_TransferEncoding,
+ XFA_ATTRIBUTE_Usage,
+ XFA_ATTRIBUTE_Presence,
+ XFA_ATTRIBUTE_RadixOffset,
+ XFA_ATTRIBUTE_Preserve,
+ XFA_ATTRIBUTE_AliasNode,
+ XFA_ATTRIBUTE_MultiLine,
+ XFA_ATTRIBUTE_Version,
+ XFA_ATTRIBUTE_StartChar,
+ XFA_ATTRIBUTE_ScriptTest,
+ XFA_ATTRIBUTE_StartAngle,
+ XFA_ATTRIBUTE_CursorType,
+ XFA_ATTRIBUTE_DigitalSignature,
+ XFA_ATTRIBUTE_CodeType,
+ XFA_ATTRIBUTE_Output,
+ XFA_ATTRIBUTE_BookendTrailer,
+ XFA_ATTRIBUTE_ImagingBBox,
+ XFA_ATTRIBUTE_ExcludeInitialCap,
+ XFA_ATTRIBUTE_Force,
+ XFA_ATTRIBUTE_CrlSign,
+ XFA_ATTRIBUTE_Previous,
+ XFA_ATTRIBUTE_PushCharacterCount,
+ XFA_ATTRIBUTE_NullTest,
+ XFA_ATTRIBUTE_RunAt,
+ XFA_ATTRIBUTE_SpaceBelow,
+ XFA_ATTRIBUTE_SweepAngle,
+ XFA_ATTRIBUTE_NumberOfCells,
+ XFA_ATTRIBUTE_LetterSpacing,
+ XFA_ATTRIBUTE_LockType,
+ XFA_ATTRIBUTE_PasswordChar,
+ XFA_ATTRIBUTE_VAlign,
+ XFA_ATTRIBUTE_SourceBelow,
+ XFA_ATTRIBUTE_Inverted,
+ XFA_ATTRIBUTE_Mark,
+ XFA_ATTRIBUTE_MaxH,
+ XFA_ATTRIBUTE_MaxW,
+ XFA_ATTRIBUTE_Truncate,
+ XFA_ATTRIBUTE_MinH,
+ XFA_ATTRIBUTE_MinW,
+ XFA_ATTRIBUTE_Initial,
+ XFA_ATTRIBUTE_Mode,
+ XFA_ATTRIBUTE_Layout,
+ XFA_ATTRIBUTE_Server,
+ XFA_ATTRIBUTE_EmbedPDF,
+ XFA_ATTRIBUTE_OddOrEven,
+ XFA_ATTRIBUTE_TabDefault,
+ XFA_ATTRIBUTE_Contains,
+ XFA_ATTRIBUTE_RightInset,
+ XFA_ATTRIBUTE_MaxChars,
+ XFA_ATTRIBUTE_Open,
+ XFA_ATTRIBUTE_Relation,
+ XFA_ATTRIBUTE_WideNarrowRatio,
+ XFA_ATTRIBUTE_Relevant,
+ XFA_ATTRIBUTE_SignatureType,
+ XFA_ATTRIBUTE_LineThroughPeriod,
+ XFA_ATTRIBUTE_Shape,
+ XFA_ATTRIBUTE_TabStops,
+ XFA_ATTRIBUTE_OutputBelow,
+ XFA_ATTRIBUTE_Short,
+ XFA_ATTRIBUTE_FontVerticalScale,
+ XFA_ATTRIBUTE_Thickness,
+ XFA_ATTRIBUTE_CommitOn,
+ XFA_ATTRIBUTE_RemainCharacterCount,
+ XFA_ATTRIBUTE_KeyAgreement,
+ XFA_ATTRIBUTE_ErrorCorrectionLevel,
+ XFA_ATTRIBUTE_UpsMode,
+ XFA_ATTRIBUTE_MergeMode,
+ XFA_ATTRIBUTE_Circular,
+ XFA_ATTRIBUTE_PsName,
+ XFA_ATTRIBUTE_Trailer,
+ XFA_ATTRIBUTE_UnicodeRange,
+ XFA_ATTRIBUTE_ExecuteType,
+ XFA_ATTRIBUTE_DuplexImposition,
+ XFA_ATTRIBUTE_TrayIn,
+ XFA_ATTRIBUTE_BindingNode,
+ XFA_ATTRIBUTE_BofAction,
+ XFA_ATTRIBUTE_Save,
+ XFA_ATTRIBUTE_TargetType,
+ XFA_ATTRIBUTE_KeyEncipherment,
+ XFA_ATTRIBUTE_CredentialServerPolicy,
+ XFA_ATTRIBUTE_Size,
+ XFA_ATTRIBUTE_InitialNumber,
+ XFA_ATTRIBUTE_Slope,
+ XFA_ATTRIBUTE_CSpace,
+ XFA_ATTRIBUTE_ColSpan,
+ XFA_ATTRIBUTE_Binding,
+ XFA_ATTRIBUTE_Checksum,
+ XFA_ATTRIBUTE_CharEncoding,
+ XFA_ATTRIBUTE_Bind,
+ XFA_ATTRIBUTE_TextEntry,
+ XFA_ATTRIBUTE_Archive,
+ XFA_ATTRIBUTE_Uuid,
+ XFA_ATTRIBUTE_Posture,
+ XFA_ATTRIBUTE_After,
+ XFA_ATTRIBUTE_Orphans,
+ XFA_ATTRIBUTE_QualifiedName,
+ XFA_ATTRIBUTE_Usehref,
+ XFA_ATTRIBUTE_Locale,
+ XFA_ATTRIBUTE_Weight,
+ XFA_ATTRIBUTE_UnderlinePeriod,
+ XFA_ATTRIBUTE_Data,
+ XFA_ATTRIBUTE_Desc,
+ XFA_ATTRIBUTE_Numbered,
+ XFA_ATTRIBUTE_DataColumnCount,
+ XFA_ATTRIBUTE_Overline,
+ XFA_ATTRIBUTE_UrlPolicy,
+ XFA_ATTRIBUTE_AnchorType,
+ XFA_ATTRIBUTE_LabelRef,
+ XFA_ATTRIBUTE_BookendLeader,
+ XFA_ATTRIBUTE_MaxLength,
+ XFA_ATTRIBUTE_AccessKey,
+ XFA_ATTRIBUTE_CursorLocation,
+ XFA_ATTRIBUTE_DelayedOpen,
+ XFA_ATTRIBUTE_Target,
+ XFA_ATTRIBUTE_DataEncipherment,
+ XFA_ATTRIBUTE_AfterTarget,
+ XFA_ATTRIBUTE_Leader,
+ XFA_ATTRIBUTE_Picker,
+ XFA_ATTRIBUTE_From,
+ XFA_ATTRIBUTE_BaseProfile,
+ XFA_ATTRIBUTE_Aspect,
+ XFA_ATTRIBUTE_RowColumnRatio,
+ XFA_ATTRIBUTE_LineHeight,
+ XFA_ATTRIBUTE_Highlight,
+ XFA_ATTRIBUTE_ValueRef,
+ XFA_ATTRIBUTE_MaxEntries,
+ XFA_ATTRIBUTE_DataLength,
+ XFA_ATTRIBUTE_Activity,
+ XFA_ATTRIBUTE_Input,
+ XFA_ATTRIBUTE_Value,
+ XFA_ATTRIBUTE_BlankOrNotBlank,
+ XFA_ATTRIBUTE_AddRevocationInfo,
+ XFA_ATTRIBUTE_GenericFamily,
+ XFA_ATTRIBUTE_Hand,
+ XFA_ATTRIBUTE_Href,
+ XFA_ATTRIBUTE_TextEncoding,
+ XFA_ATTRIBUTE_LeadDigits,
+ XFA_ATTRIBUTE_Permissions,
+ XFA_ATTRIBUTE_SpaceAbove,
+ XFA_ATTRIBUTE_CodeBase,
+ XFA_ATTRIBUTE_Stock,
+ XFA_ATTRIBUTE_IsNull,
+ XFA_ATTRIBUTE_RestoreState,
+ XFA_ATTRIBUTE_ExcludeAllCaps,
+ XFA_ATTRIBUTE_FormatTest,
+ XFA_ATTRIBUTE_HScrollPolicy,
+ XFA_ATTRIBUTE_Join,
+ XFA_ATTRIBUTE_KeyCertSign,
+ XFA_ATTRIBUTE_Radius,
+ XFA_ATTRIBUTE_SourceAbove,
+ XFA_ATTRIBUTE_Override,
+ XFA_ATTRIBUTE_ClassId,
+ XFA_ATTRIBUTE_Disable,
+ XFA_ATTRIBUTE_Scope,
+ XFA_ATTRIBUTE_Match,
+ XFA_ATTRIBUTE_Placement,
+ XFA_ATTRIBUTE_Before,
+ XFA_ATTRIBUTE_WritingScript,
+ XFA_ATTRIBUTE_EndChar,
+ XFA_ATTRIBUTE_Lock,
+ XFA_ATTRIBUTE_Long,
+ XFA_ATTRIBUTE_Intact,
+ XFA_ATTRIBUTE_XdpContent,
+ XFA_ATTRIBUTE_DecipherOnly,
+};
+enum XFA_ELEMENT {
+ XFA_ELEMENT_Ps,
+ XFA_ELEMENT_To,
+ XFA_ELEMENT_Ui,
+ XFA_ELEMENT_RecordSet,
+ XFA_ELEMENT_SubsetBelow,
+ XFA_ELEMENT_SubformSet,
+ XFA_ELEMENT_AdobeExtensionLevel,
+ XFA_ELEMENT_Typeface,
+ XFA_ELEMENT_Break,
+ XFA_ELEMENT_FontInfo,
+ XFA_ELEMENT_NumberPattern,
+ XFA_ELEMENT_DynamicRender,
+ XFA_ELEMENT_PrintScaling,
+ XFA_ELEMENT_CheckButton,
+ XFA_ELEMENT_DatePatterns,
+ XFA_ELEMENT_SourceSet,
+ XFA_ELEMENT_Amd,
+ XFA_ELEMENT_Arc,
+ XFA_ELEMENT_Day,
+ XFA_ELEMENT_Era,
+ XFA_ELEMENT_Jog,
+ XFA_ELEMENT_Log,
+ XFA_ELEMENT_Map,
+ XFA_ELEMENT_Mdp,
+ XFA_ELEMENT_BreakBefore,
+ XFA_ELEMENT_Oid,
+ XFA_ELEMENT_Pcl,
+ XFA_ELEMENT_Pdf,
+ XFA_ELEMENT_Ref,
+ XFA_ELEMENT_Uri,
+ XFA_ELEMENT_Xdc,
+ XFA_ELEMENT_Xdp,
+ XFA_ELEMENT_Xfa,
+ XFA_ELEMENT_Xsl,
+ XFA_ELEMENT_Zpl,
+ XFA_ELEMENT_Cache,
+ XFA_ELEMENT_Margin,
+ XFA_ELEMENT_KeyUsage,
+ XFA_ELEMENT_Exclude,
+ XFA_ELEMENT_ChoiceList,
+ XFA_ELEMENT_Level,
+ XFA_ELEMENT_LabelPrinter,
+ XFA_ELEMENT_CalendarSymbols,
+ XFA_ELEMENT_Para,
+ XFA_ELEMENT_Part,
+ XFA_ELEMENT_Pdfa,
+ XFA_ELEMENT_Filter,
+ XFA_ELEMENT_Present,
+ XFA_ELEMENT_Pagination,
+ XFA_ELEMENT_Encoding,
+ XFA_ELEMENT_Event,
+ XFA_ELEMENT_Whitespace,
+ XFA_ELEMENT_DefaultUi,
+ XFA_ELEMENT_DataModel,
+ XFA_ELEMENT_Barcode,
+ XFA_ELEMENT_TimePattern,
+ XFA_ELEMENT_BatchOutput,
+ XFA_ELEMENT_Enforce,
+ XFA_ELEMENT_CurrencySymbols,
+ XFA_ELEMENT_AddSilentPrint,
+ XFA_ELEMENT_Rename,
+ XFA_ELEMENT_Operation,
+ XFA_ELEMENT_Typefaces,
+ XFA_ELEMENT_SubjectDNs,
+ XFA_ELEMENT_Issuers,
+ XFA_ELEMENT_SignaturePseudoModel,
+ XFA_ELEMENT_WsdlConnection,
+ XFA_ELEMENT_Debug,
+ XFA_ELEMENT_Delta,
+ XFA_ELEMENT_EraNames,
+ XFA_ELEMENT_ModifyAnnots,
+ XFA_ELEMENT_StartNode,
+ XFA_ELEMENT_Button,
+ XFA_ELEMENT_Format,
+ XFA_ELEMENT_Border,
+ XFA_ELEMENT_Area,
+ XFA_ELEMENT_Hyphenation,
+ XFA_ELEMENT_Text,
+ XFA_ELEMENT_Time,
+ XFA_ELEMENT_Type,
+ XFA_ELEMENT_Overprint,
+ XFA_ELEMENT_Certificates,
+ XFA_ELEMENT_EncryptionMethods,
+ XFA_ELEMENT_SetProperty,
+ XFA_ELEMENT_PrinterName,
+ XFA_ELEMENT_StartPage,
+ XFA_ELEMENT_PageOffset,
+ XFA_ELEMENT_DateTime,
+ XFA_ELEMENT_Comb,
+ XFA_ELEMENT_Pattern,
+ XFA_ELEMENT_IfEmpty,
+ XFA_ELEMENT_SuppressBanner,
+ XFA_ELEMENT_OutputBin,
+ XFA_ELEMENT_Field,
+ XFA_ELEMENT_Agent,
+ XFA_ELEMENT_OutputXSL,
+ XFA_ELEMENT_AdjustData,
+ XFA_ELEMENT_AutoSave,
+ XFA_ELEMENT_ContentArea,
+ XFA_ELEMENT_EventPseudoModel,
+ XFA_ELEMENT_WsdlAddress,
+ XFA_ELEMENT_Solid,
+ XFA_ELEMENT_DateTimeSymbols,
+ XFA_ELEMENT_EncryptionLevel,
+ XFA_ELEMENT_Edge,
+ XFA_ELEMENT_Stipple,
+ XFA_ELEMENT_Attributes,
+ XFA_ELEMENT_VersionControl,
+ XFA_ELEMENT_Meridiem,
+ XFA_ELEMENT_ExclGroup,
+ XFA_ELEMENT_ToolTip,
+ XFA_ELEMENT_Compress,
+ XFA_ELEMENT_Reason,
+ XFA_ELEMENT_Execute,
+ XFA_ELEMENT_ContentCopy,
+ XFA_ELEMENT_DateTimeEdit,
+ XFA_ELEMENT_Config,
+ XFA_ELEMENT_Image,
+ XFA_ELEMENT_SharpxHTML,
+ XFA_ELEMENT_NumberOfCopies,
+ XFA_ELEMENT_BehaviorOverride,
+ XFA_ELEMENT_TimeStamp,
+ XFA_ELEMENT_Month,
+ XFA_ELEMENT_ViewerPreferences,
+ XFA_ELEMENT_ScriptModel,
+ XFA_ELEMENT_Decimal,
+ XFA_ELEMENT_Subform,
+ XFA_ELEMENT_Select,
+ XFA_ELEMENT_Window,
+ XFA_ELEMENT_LocaleSet,
+ XFA_ELEMENT_Handler,
+ XFA_ELEMENT_HostPseudoModel,
+ XFA_ELEMENT_Presence,
+ XFA_ELEMENT_Record,
+ XFA_ELEMENT_Embed,
+ XFA_ELEMENT_Version,
+ XFA_ELEMENT_Command,
+ XFA_ELEMENT_Copies,
+ XFA_ELEMENT_Staple,
+ XFA_ELEMENT_SubmitFormat,
+ XFA_ELEMENT_Boolean,
+ XFA_ELEMENT_Message,
+ XFA_ELEMENT_Output,
+ XFA_ELEMENT_PsMap,
+ XFA_ELEMENT_ExcludeNS,
+ XFA_ELEMENT_Assist,
+ XFA_ELEMENT_Picture,
+ XFA_ELEMENT_Traversal,
+ XFA_ELEMENT_SilentPrint,
+ XFA_ELEMENT_WebClient,
+ XFA_ELEMENT_LayoutPseudoModel,
+ XFA_ELEMENT_Producer,
+ XFA_ELEMENT_Corner,
+ XFA_ELEMENT_MsgId,
+ XFA_ELEMENT_Color,
+ XFA_ELEMENT_Keep,
+ XFA_ELEMENT_Query,
+ XFA_ELEMENT_Insert,
+ XFA_ELEMENT_ImageEdit,
+ XFA_ELEMENT_Validate,
+ XFA_ELEMENT_DigestMethods,
+ XFA_ELEMENT_NumberPatterns,
+ XFA_ELEMENT_PageSet,
+ XFA_ELEMENT_Integer,
+ XFA_ELEMENT_SoapAddress,
+ XFA_ELEMENT_Equate,
+ XFA_ELEMENT_FormFieldFilling,
+ XFA_ELEMENT_PageRange,
+ XFA_ELEMENT_Update,
+ XFA_ELEMENT_ConnectString,
+ XFA_ELEMENT_Mode,
+ XFA_ELEMENT_Layout,
+ XFA_ELEMENT_Sharpxml,
+ XFA_ELEMENT_XsdConnection,
+ XFA_ELEMENT_Traverse,
+ XFA_ELEMENT_Encodings,
+ XFA_ELEMENT_Template,
+ XFA_ELEMENT_Acrobat,
+ XFA_ELEMENT_ValidationMessaging,
+ XFA_ELEMENT_Signing,
+ XFA_ELEMENT_DataWindow,
+ XFA_ELEMENT_Script,
+ XFA_ELEMENT_AddViewerPreferences,
+ XFA_ELEMENT_AlwaysEmbed,
+ XFA_ELEMENT_PasswordEdit,
+ XFA_ELEMENT_NumericEdit,
+ XFA_ELEMENT_EncryptionMethod,
+ XFA_ELEMENT_Change,
+ XFA_ELEMENT_PageArea,
+ XFA_ELEMENT_SubmitUrl,
+ XFA_ELEMENT_Oids,
+ XFA_ELEMENT_Signature,
+ XFA_ELEMENT_ADBE_JSConsole,
+ XFA_ELEMENT_Caption,
+ XFA_ELEMENT_Relevant,
+ XFA_ELEMENT_FlipLabel,
+ XFA_ELEMENT_ExData,
+ XFA_ELEMENT_DayNames,
+ XFA_ELEMENT_SoapAction,
+ XFA_ELEMENT_DefaultTypeface,
+ XFA_ELEMENT_Manifest,
+ XFA_ELEMENT_Overflow,
+ XFA_ELEMENT_Linear,
+ XFA_ELEMENT_CurrencySymbol,
+ XFA_ELEMENT_Delete,
+ XFA_ELEMENT_Deltas,
+ XFA_ELEMENT_DigestMethod,
+ XFA_ELEMENT_InstanceManager,
+ XFA_ELEMENT_EquateRange,
+ XFA_ELEMENT_Medium,
+ XFA_ELEMENT_TextEdit,
+ XFA_ELEMENT_TemplateCache,
+ XFA_ELEMENT_CompressObjectStream,
+ XFA_ELEMENT_DataValue,
+ XFA_ELEMENT_AccessibleContent,
+ XFA_ELEMENT_NodeList,
+ XFA_ELEMENT_IncludeXDPContent,
+ XFA_ELEMENT_XmlConnection,
+ XFA_ELEMENT_ValidateApprovalSignatures,
+ XFA_ELEMENT_SignData,
+ XFA_ELEMENT_Packets,
+ XFA_ELEMENT_DatePattern,
+ XFA_ELEMENT_DuplexOption,
+ XFA_ELEMENT_Base,
+ XFA_ELEMENT_Bind,
+ XFA_ELEMENT_Compression,
+ XFA_ELEMENT_User,
+ XFA_ELEMENT_Rectangle,
+ XFA_ELEMENT_EffectiveOutputPolicy,
+ XFA_ELEMENT_ADBE_JSDebugger,
+ XFA_ELEMENT_Acrobat7,
+ XFA_ELEMENT_Interactive,
+ XFA_ELEMENT_Locale,
+ XFA_ELEMENT_CurrentPage,
+ XFA_ELEMENT_Data,
+ XFA_ELEMENT_Date,
+ XFA_ELEMENT_Desc,
+ XFA_ELEMENT_Encrypt,
+ XFA_ELEMENT_Draw,
+ XFA_ELEMENT_Encryption,
+ XFA_ELEMENT_MeridiemNames,
+ XFA_ELEMENT_Messaging,
+ XFA_ELEMENT_Speak,
+ XFA_ELEMENT_DataGroup,
+ XFA_ELEMENT_Common,
+ XFA_ELEMENT_Sharptext,
+ XFA_ELEMENT_PaginationOverride,
+ XFA_ELEMENT_Reasons,
+ XFA_ELEMENT_SignatureProperties,
+ XFA_ELEMENT_Threshold,
+ XFA_ELEMENT_AppearanceFilter,
+ XFA_ELEMENT_Fill,
+ XFA_ELEMENT_Font,
+ XFA_ELEMENT_Form,
+ XFA_ELEMENT_MediumInfo,
+ XFA_ELEMENT_Certificate,
+ XFA_ELEMENT_Password,
+ XFA_ELEMENT_RunScripts,
+ XFA_ELEMENT_Trace,
+ XFA_ELEMENT_Float,
+ XFA_ELEMENT_RenderPolicy,
+ XFA_ELEMENT_LogPseudoModel,
+ XFA_ELEMENT_Destination,
+ XFA_ELEMENT_Value,
+ XFA_ELEMENT_Bookend,
+ XFA_ELEMENT_ExObject,
+ XFA_ELEMENT_OpenAction,
+ XFA_ELEMENT_NeverEmbed,
+ XFA_ELEMENT_BindItems,
+ XFA_ELEMENT_Calculate,
+ XFA_ELEMENT_Print,
+ XFA_ELEMENT_Extras,
+ XFA_ELEMENT_Proto,
+ XFA_ELEMENT_DSigData,
+ XFA_ELEMENT_Creator,
+ XFA_ELEMENT_Connect,
+ XFA_ELEMENT_Permissions,
+ XFA_ELEMENT_ConnectionSet,
+ XFA_ELEMENT_Submit,
+ XFA_ELEMENT_Range,
+ XFA_ELEMENT_Linearized,
+ XFA_ELEMENT_Packet,
+ XFA_ELEMENT_RootElement,
+ XFA_ELEMENT_PlaintextMetadata,
+ XFA_ELEMENT_NumberSymbols,
+ XFA_ELEMENT_PrintHighQuality,
+ XFA_ELEMENT_Driver,
+ XFA_ELEMENT_IncrementalLoad,
+ XFA_ELEMENT_SubjectDN,
+ XFA_ELEMENT_CompressLogicalStructure,
+ XFA_ELEMENT_IncrementalMerge,
+ XFA_ELEMENT_Radial,
+ XFA_ELEMENT_Variables,
+ XFA_ELEMENT_TimePatterns,
+ XFA_ELEMENT_EffectiveInputPolicy,
+ XFA_ELEMENT_NameAttr,
+ XFA_ELEMENT_Conformance,
+ XFA_ELEMENT_Transform,
+ XFA_ELEMENT_LockDocument,
+ XFA_ELEMENT_BreakAfter,
+ XFA_ELEMENT_Line,
+ XFA_ELEMENT_List,
+ XFA_ELEMENT_Source,
+ XFA_ELEMENT_Occur,
+ XFA_ELEMENT_PickTrayByPDFSize,
+ XFA_ELEMENT_MonthNames,
+ XFA_ELEMENT_Severity,
+ XFA_ELEMENT_GroupParent,
+ XFA_ELEMENT_DocumentAssembly,
+ XFA_ELEMENT_NumberSymbol,
+ XFA_ELEMENT_Tagged,
+ XFA_ELEMENT_Items,
+};
+#define XFA_ELEMENT_UNKNOWN ((XFA_ELEMENT)-1)
+typedef struct _XFA_ELEMENTINFO {
+ FX_UINT32 uHash;
+ FX_LPCWSTR pName;
+ XFA_ELEMENT eName;
+ FX_DWORD dwPackets;
+ FX_DWORD eObjectType;
+} XFA_ELEMENTINFO, * XFA_LPELEMENTINFO;
+typedef XFA_ELEMENTINFO const * XFA_LPCELEMENTINFO;
+FX_INT32 XFA_GetElementCount();
+XFA_LPCELEMENTINFO XFA_GetElementByName(FX_WSTR wsName);
+XFA_LPCELEMENTINFO XFA_GetElementByID(XFA_ELEMENT eName);
+enum XFA_ATTRIBUTETYPE {
+ XFA_ATTRIBUTETYPE_NOTSURE,
+ XFA_ATTRIBUTETYPE_Enum,
+ XFA_ATTRIBUTETYPE_Cdata,
+ XFA_ATTRIBUTETYPE_Boolean,
+ XFA_ATTRIBUTETYPE_Integer,
+ XFA_ATTRIBUTETYPE_Measure,
+};
+typedef struct _XFA_ATTRIBUTEINFO {
+ FX_UINT32 uHash;
+ FX_LPCWSTR pName;
+ XFA_ATTRIBUTE eName;
+ XFA_ATTRIBUTETYPE eType;
+ FX_DWORD dwPackets;
+ FX_LPVOID pDefValue;
+} XFA_ATTRIBUTEINFO, * XFA_LPATTRIBUTEINFO;
+typedef XFA_ATTRIBUTEINFO const * XFA_LPCATTRIBUTEINFO;
+FX_INT32 XFA_GetAttributeCount();
+XFA_LPCATTRIBUTEINFO XFA_GetAttributeByName(FX_WSTR wsName);
+XFA_LPCATTRIBUTEINFO XFA_GetAttributeByID(XFA_ATTRIBUTE eName);
+FX_BOOL XFA_GetAttributeDefaultValue(FX_LPVOID &pValue, XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType, FX_DWORD dwPacket);
+XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket);
+CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket);
+FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket);
+FX_INT32 XFA_GetAttributeDefaultValue_Integer(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket);
+CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket);
+typedef struct _XFA_ELEMENTHIERARCHY {
+ FX_WORD wStart;
+ FX_WORD wCount;
+ FX_WORD wParentIndex;
+} XFA_ELEMENTHIERARCHY, * XFA_LPELEMENTHIERARCHY;
+typedef XFA_ELEMENTHIERARCHY const * XFA_LPCELEMENTHIERARCHY;
+typedef struct _XFA_SCRIPTHIERARCHY {
+ FX_WORD wMethodStart;
+ FX_WORD wMethodCount;
+ FX_WORD wAttributeStart;
+ FX_WORD wAttributeCount;
+ FX_SHORT wParentIndex;
+} XFA_SCRIPTHIERARCHY, * XFA_LPSCRIPTHIERARCHY;
+typedef XFA_SCRIPTHIERARCHY const * XFA_LPCSCRIPTHIERARCHY;
+FX_LPCWORD XFA_GetElementChildren(XFA_ELEMENT eElement, FX_INT32 &iCount);
+FX_LPCBYTE XFA_GetElementAttributes(XFA_ELEMENT eElement, FX_INT32 &iCount);
+XFA_LPCELEMENTINFO XFA_GetChildOfElement(XFA_ELEMENT eElement, XFA_ELEMENT eChild, FX_DWORD dwPacket);
+XFA_LPCATTRIBUTEINFO XFA_GetAttributeOfElement(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket);
+#define XFA_PROPERTYFLAG_OneOf 0x01
+#define XFA_PROPERTYFLAG_DefaultOneOf 0x02
+typedef struct _XFA_PROPERTY {
+ FX_WORD eName;
+ FX_BYTE uOccur;
+ FX_BYTE uFlags;
+} XFA_PROPERTY, * XFA_LPPROPERTY;
+typedef XFA_PROPERTY const * XFA_LPCPROPERTY;
+XFA_LPCPROPERTY XFA_GetElementProperties(XFA_ELEMENT eElement, FX_INT32 &iCount);
+XFA_LPCPROPERTY XFA_GetPropertyOfElement(XFA_ELEMENT eElement, XFA_ELEMENT eProperty, FX_DWORD dwPacket);
+typedef struct _XFA_ATTRIBUTEENUMINFO {
+ FX_UINT32 uHash;
+ FX_LPCWSTR pName;
+ XFA_ATTRIBUTEENUM eName;
+} XFA_ATTRIBUTEENUMINFO, * XFA_LPATTRIBUTEENUMINFO;
+typedef XFA_ATTRIBUTEENUMINFO const * XFA_LPCATTRIBUTEENUMINFO;
+XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByName(FX_WSTR wsName);
+XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByID(XFA_ATTRIBUTEENUM eName);
+enum XFA_UNIT {
+ XFA_UNIT_Unknown,
+ XFA_UNIT_Percent,
+ XFA_UNIT_Angle,
+ XFA_UNIT_Em,
+ XFA_UNIT_Pt,
+ XFA_UNIT_In,
+ XFA_UNIT_Pc,
+ XFA_UNIT_Cm,
+ XFA_UNIT_Mm,
+ XFA_UNIT_Mp,
+};
+class CXFA_Measurement
+{
+public:
+ void Set(FX_WSTR wsMeasure);
+ void Set(FX_FLOAT fValue, XFA_UNIT eUnit)
+ {
+ m_fValue = fValue;
+ m_eUnit = eUnit;
+ }
+
+ XFA_UNIT GetUnit() const
+ {
+ return m_eUnit;
+ }
+ FX_FLOAT GetValue() const
+ {
+ return m_fValue;
+ }
+ FX_BOOL ToString(CFX_WideString &wsMeasure) const;
+ FX_BOOL ToUnit(XFA_UNIT eUnit, FX_FLOAT &fValue) const;
+ FX_FLOAT ToUnit(XFA_UNIT eUnit) const
+ {
+ FX_FLOAT f;
+ return ToUnit(eUnit, f) ? f : 0;
+ }
+ CXFA_Measurement()
+ {
+ Set(-1, XFA_UNIT_Unknown);
+ }
+ CXFA_Measurement(FX_WSTR wsMeasure)
+ {
+ Set(wsMeasure);
+ }
+ CXFA_Measurement(FX_FLOAT fValue, XFA_UNIT eUnit)
+ {
+ Set(fValue, eUnit);
+ }
+ static XFA_UNIT GetUnit(FX_WSTR wsUnit);
+protected:
+ FX_FLOAT m_fValue;
+ XFA_UNIT m_eUnit;
+};
+class CFXJSE_Arguments;
+class CXFA_Object;
+typedef void (CXFA_Object::*XFA_METHOD_CALLBACK) (CFXJSE_Arguments* pArguments);
+typedef struct _XFA_METHODINFO {
+ FX_UINT32 uHash;
+ FX_LPCWSTR pName;
+ XFA_METHOD_CALLBACK lpfnCallback;
+} XFA_METHODINFO, * XFA_LPMETHODINFO;
+typedef XFA_METHODINFO const * XFA_LPCMETHODINFO;
+FX_INT32 XFA_GetMethodCount();
+XFA_LPCMETHODINFO XFA_GetMethodByName(XFA_ELEMENT eElement, FX_WSTR wsMethodName);
+typedef void (CXFA_Object::*XFA_ATTRIBUTE_CALLBACK) (FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
+enum XFA_SCRIPT_TYPE {
+ XFA_SCRIPT_Basic,
+ XFA_SCRIPT_Object,
+};
+typedef struct _XFA_SCRIPTATTRIBUTEINFO {
+ FX_UINT32 uHash;
+ FX_LPCWSTR pName;
+ XFA_ATTRIBUTE_CALLBACK lpfnCallback;
+ FX_INT32 eAttribute;
+ FX_WORD eValueType;
+} XFA_SCRIPTATTRIBUTEINFO, * XFA_LPSCRIPTATTRIBUTEINFO;
+typedef XFA_SCRIPTATTRIBUTEINFO const * XFA_LPCSCRIPTATTRIBUTEINFO;
+XFA_LPCSCRIPTATTRIBUTEINFO XFA_GetScriptAttributeByName(XFA_ELEMENT eElement, FX_WSTR wsAttributeName);
+#endif
diff --git a/xfa/include/fxfa/fxfa_objectacc.h b/xfa/include/fxfa/fxfa_objectacc.h
new file mode 100644
index 0000000000..14bd1ed69d
--- /dev/null
+++ b/xfa/include/fxfa/fxfa_objectacc.h
@@ -0,0 +1,931 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FXFA_NODEACC_H
+#define _FXFA_NODEACC_H
+class CXFA_Node;
+class IFX_Locale;
+class CXFA_Data;
+class CXFA_Font;
+class CXFA_Fill;
+class CXFA_Margin;
+class CXFA_Caption;
+class CXFA_Para;
+class CXFA_Event;
+class CXFA_Script;
+class CXFA_Value;
+class CXFA_Calculate;
+class CXFA_Line;
+class CXFA_Text;
+class CXFA_ExData;
+class CXFA_Image;
+class CXFA_Validate;
+class CXFA_Variables;
+class CXFA_Bind;
+class CXFA_Assist;
+class CXFA_ToolTip;
+class CXFA_Keep;
+class CXFA_Submit;
+class CXFA_BindItems;
+class CXFA_Stroke;
+class CXFA_Corner;
+class CXFA_Edge;
+class CXFA_Box;
+class CXFA_Arc;
+class CXFA_Border;
+class CXFA_Rectangle;
+class CXFA_WidgetData;
+class CXFA_Occur;
+class CXFA_Filter;
+class CXFA_Certificate;
+class CXFA_WrapCertificate;
+class CXFA_Oids;
+class CXFA_SubjectDNs;
+class CXFA_DigestMethods;
+class CXFA_Encodings;
+class CXFA_EncryptionMethods;
+class CXFA_Reasons;
+class CXFA_Manifest;
+inline FX_BOOL XFA_IsSpace(FX_WCHAR c)
+{
+ return (c == 0x20) || (c == 0x0d) || (c == 0x0a) || (c == 0x09);
+}
+inline FX_BOOL XFA_IsDigit(FX_WCHAR c)
+{
+ return c >= '0' && c <= '9';
+}
+typedef CFX_ArrayTemplate<CXFA_Node*> CXFA_NodeArray;
+typedef CFX_ArrayTemplate<CXFA_Object*> CXFA_ObjArray;
+class CXFA_Data : public CFX_Object
+{
+public:
+ CXFA_Data(CXFA_Node* pNode) : m_pNode(pNode) {}
+ operator CXFA_Node*() const
+ {
+ return m_pNode;
+ }
+ CXFA_Node* GetNode()
+ {
+ return m_pNode;
+ }
+
+ FX_BOOL IsExistInXML() const
+ {
+ return m_pNode != NULL;
+ }
+
+ XFA_ELEMENT GetClassID() const;
+protected:
+ FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT &fValue, FX_BOOL bUseDefault = FALSE) const;
+ FX_BOOL SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue);
+ CXFA_Node* m_pNode;
+};
+class CXFA_Fill : public CXFA_Data
+{
+public:
+ CXFA_Fill(CXFA_Node* pNode);
+ ~CXFA_Fill();
+
+ FX_INT32 GetPresence();
+
+ FX_ARGB GetColor(FX_BOOL bText = FALSE);
+
+ void SetColor(FX_ARGB color);
+
+
+ FX_INT32 GetFillType();
+
+ FX_INT32 GetPattern(FX_ARGB& foreColor);
+
+ FX_INT32 GetStipple(FX_ARGB& stippleColor);
+
+ FX_INT32 GetLinear(FX_ARGB& endColor);
+
+ FX_INT32 GetRadial(FX_ARGB& endColor);
+ FX_BOOL SetPresence(FX_INT32 iPresence);
+ FX_BOOL SetFillType(FX_INT32 iType);
+ FX_BOOL SetPattern(FX_INT32 iPattern, FX_ARGB foreColor);
+ FX_BOOL SetStipple(FX_INT32 iStipple, FX_ARGB stippleColor);
+ FX_BOOL SetLinear(FX_INT32 iLinear, FX_ARGB endColor);
+ FX_BOOL SetRadial(FX_INT32 iRadial, FX_ARGB endColor);
+};
+class CXFA_Margin : public CXFA_Data
+{
+public:
+ CXFA_Margin(CXFA_Node* pNode);
+ FX_BOOL GetLeftInset(FX_FLOAT &fInset, FX_FLOAT fDefInset = 0) const;
+ FX_BOOL GetTopInset(FX_FLOAT &fInset, FX_FLOAT fDefInset = 0) const;
+ FX_BOOL GetRightInset(FX_FLOAT &fInset, FX_FLOAT fDefInset = 0) const;
+ FX_BOOL GetBottomInset(FX_FLOAT &fInset, FX_FLOAT fDefInset = 0) const;
+ FX_BOOL SetLeftInset(FX_FLOAT fInset);
+ FX_BOOL SetTopInset(FX_FLOAT fInset);
+ FX_BOOL SetRightInset(FX_FLOAT fInset);
+ FX_BOOL SetBottomInset(FX_FLOAT fInset);
+};
+class CXFA_Font : public CXFA_Data
+{
+public:
+ CXFA_Font(CXFA_Node* pNode);
+
+ FX_FLOAT GetBaselineShift();
+
+ FX_FLOAT GetHorizontalScale();
+
+ FX_FLOAT GetVerticalScale();
+
+ FX_FLOAT GetLetterSpacing();
+
+ FX_INT32 GetLineThrough();
+
+ FX_INT32 GetLineThroughPeriod();
+
+ FX_INT32 GetOverline();
+
+ FX_INT32 GetOverlinePeriod();
+
+ FX_INT32 GetUnderline();
+
+ FX_INT32 GetUnderlinePeriod();
+
+ FX_FLOAT GetFontSize();
+
+ void GetTypeface(CFX_WideStringC &wsTypeFace);
+
+ FX_BOOL IsBold();
+
+ FX_BOOL IsItalic();
+
+ FX_BOOL IsUseKerning();
+
+ FX_ARGB GetColor();
+
+ void SetColor(FX_ARGB color);
+ FX_BOOL SetBaselineShift(FX_FLOAT fBaselineShift);
+ FX_BOOL SetHorizontalScale(FX_FLOAT fHorizontalScale);
+ FX_BOOL SetVerticalScale(FX_FLOAT fVerticalScale);
+ FX_BOOL SetLetterSpacing(FX_FLOAT fLetterSpacing, XFA_UNIT eUnit);
+ FX_BOOL SetLineThrough(FX_INT32 iLineThrough);
+ FX_BOOL SetLineThroughPeriod(FX_INT32 iLineThroughPeriod);
+ FX_BOOL SetOverline(FX_INT32 iOverline);
+ FX_BOOL SetOverlinePeriod(FX_INT32 iOverlinePeriod);
+ FX_BOOL SetUnderline(FX_INT32 iUnderline);
+ FX_BOOL SetUnderlinePeriod(FX_INT32 iUnderlinePeriod);
+};
+class CXFA_Caption : public CXFA_Data
+{
+public:
+ CXFA_Caption(CXFA_Node* pNode);
+
+ FX_INT32 GetPresence();
+
+ FX_INT32 GetPlacementType();
+
+ FX_FLOAT GetReserve();
+
+ CXFA_Margin GetMargin();
+
+ CXFA_Font GetFont();
+
+ CXFA_Value GetValue();
+
+ CXFA_Para GetPara();
+ FX_BOOL SetPresence(FX_INT32 iPresence);
+ FX_BOOL SetPlacementType(FX_INT32 iType);
+ FX_BOOL SetReserve(FX_FLOAT fReserve);
+};
+class CXFA_Para : public CXFA_Data
+{
+public:
+ CXFA_Para(CXFA_Node* pNode);
+
+ FX_INT32 GetHorizontalAlign();
+
+ FX_INT32 GetVerticalAlign();
+
+ FX_FLOAT GetLineHeight();
+ FX_FLOAT GetMarginLeft();
+ FX_FLOAT GetMarginRight();
+ FX_INT32 GetOrphans();
+ FX_FLOAT GetRadixOffset();
+ FX_FLOAT GetSpaceAbove();
+ FX_FLOAT GetSpaceBelow();
+ FX_FLOAT GetTextIndent();
+ FX_INT32 GetWidows();
+ FX_BOOL SetHorizontalAlign(FX_INT32 iHorizontalAlign);
+ FX_BOOL SetVerticalAlign(FX_INT32 iVerticalAlign);
+ FX_BOOL SetLineHeight(FX_FLOAT fLineHeight);
+ FX_BOOL SetMarginLeft(FX_FLOAT fMarginLeft);
+ FX_BOOL SetMarginRight(FX_FLOAT fMarginRight);
+ FX_BOOL SetOrphans(FX_INT32 iOrphans);
+ FX_BOOL SetRadixOffset(FX_FLOAT fRadixOffset);
+ FX_BOOL SetSpaceAbove(FX_FLOAT fSpaceAbove);
+ FX_BOOL SetSpaceBelow(FX_FLOAT fSpaceBelow);
+ FX_BOOL SetTextIndent(FX_FLOAT fTextIndent);
+ FX_BOOL SetWidows(FX_INT32 iWidows);
+};
+class CXFA_Keep : public CXFA_Data
+{
+public:
+ CXFA_Keep(CXFA_Node *pNode, CXFA_Node *pParent);
+
+ FX_INT32 GetIntact();
+ FX_INT32 GetNext();
+ FX_INT32 GetPrevious();
+ FX_BOOL SetIntact(FX_INT32 iIntact);
+ FX_BOOL SetNext(FX_INT32 iNext);
+ FX_BOOL SetPrevious(FX_INT32 iPrevious);
+private:
+ CXFA_Node *m_pParent;
+};
+enum XFA_TEXTENCODING {
+ XFA_TEXTENCODING_None,
+ XFA_TEXTENCODING_Big5,
+ XFA_TEXTENCODING_FontSpecific,
+ XFA_TEXTENCODING_GBK,
+ XFA_TEXTENCODING_GB18030,
+ XFA_TEXTENCODING_GB2312,
+ XFA_TEXTENCODING_ISO8859NN,
+ XFA_TEXTENCODING_KSC5601,
+ XFA_TEXTENCODING_ShiftJIS,
+ XFA_TEXTENCODING_UCS2,
+ XFA_TEXTENCODING_UTF16,
+ XFA_TEXTENCODING_UTF8
+};
+class CXFA_Event : public CXFA_Data
+{
+public:
+ CXFA_Event(CXFA_Node* pNode);
+
+
+ FX_INT32 GetActivity();
+
+ FX_INT32 GetEventType();
+ void GetRef(CFX_WideStringC &wsRef);
+
+ FX_INT32 GetExecuteRunAt();
+ FX_INT32 GetExecuteType();
+ void GetExecuteConnection(CFX_WideString &wsConnection);
+
+
+ CXFA_Script GetScript();
+
+
+ CXFA_Submit GetSubmit();
+
+
+ FX_INT32 GetSignDataOperation();
+ void GetSignDataTarget(CFX_WideString &wsTarget);
+ FX_BOOL SetActivity(FX_INT32 iActivity);
+ FX_BOOL SetEventType(FX_INT32 iEventType);
+ FX_BOOL SetExecuteRunAt(FX_INT32 iExecuteRunAt);
+ FX_BOOL SetExecuteType(FX_INT32 iExecuteType);
+ FX_BOOL SetExecuteConnection(const CFX_WideString& wsConnection);
+ FX_BOOL SetSignDataOperation(FX_INT32 iOperation);
+ FX_BOOL SetSignDataTarget(const CFX_WideString& wsTarget);
+};
+enum XFA_SCRIPTTYPE {
+ XFA_SCRIPTTYPE_Formcalc = 0,
+ XFA_SCRIPTTYPE_Javascript,
+ XFA_SCRIPTTYPE_Unkown,
+};
+class CXFA_Script : public CXFA_Data
+{
+public:
+ CXFA_Script(CXFA_Node* pNode);
+ void GetBinding(CFX_WideString &wsBinding);
+
+ XFA_SCRIPTTYPE GetContentType();
+ FX_INT32 GetRunAt();
+ void GetExpression(CFX_WideString &wsExpression);
+ FX_BOOL SetBinding(const CFX_WideString& wsBinding);
+ FX_BOOL SetContentType(XFA_SCRIPTTYPE eType);
+ FX_BOOL SetRunAt(FX_INT32 iRunAt);
+ FX_BOOL SetExpression(const CFX_WideString& wsExpression);
+};
+class CXFA_Submit : public CXFA_Data
+{
+public:
+ CXFA_Submit(CXFA_Node* pNode);
+ FX_BOOL IsSubmitEmbedPDF();
+ FX_INT32 GetSubmitFormat();
+ void GetSubmitTarget(CFX_WideStringC &wsTarget);
+ XFA_TEXTENCODING GetSubmitTextEncoding();
+ void GetSubmitXDPContent(CFX_WideStringC &wsContent);
+ FX_BOOL SetSubmitFormat(FX_INT32 iSubmitFormat);
+ FX_BOOL SetSubmitTarget(const CFX_WideString& wsTarget);
+ FX_BOOL SetSubmitTextEncoding(XFA_TEXTENCODING eTextEncoding);
+ FX_BOOL SetSubmitXDPContent(const CFX_WideString& wsContent);
+};
+class CXFA_Value : public CXFA_Data
+{
+public:
+ CXFA_Value(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+
+ XFA_ELEMENT GetChildValueClassID();
+
+ FX_BOOL GetChildValueContent(CFX_WideString &wsContent);
+ CXFA_Arc GetArc();
+ CXFA_Line GetLine();
+ CXFA_Rectangle GetRectangle();
+ CXFA_Text GetText();
+ CXFA_ExData GetExData();
+ CXFA_Image GetImage();
+ FX_BOOL SetChildValueContent(const CFX_WideString& wsContent, FX_BOOL bNotify = FALSE, XFA_ELEMENT iType = XFA_ELEMENT_UNKNOWN);
+};
+class CXFA_Line : public CXFA_Data
+{
+public:
+ CXFA_Line(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ FX_INT32 GetHand();
+ FX_BOOL GetSlop();
+ CXFA_Edge GetEdge();
+ FX_BOOL SetHand(FX_INT32 iHand);
+ FX_BOOL SetSlop(FX_INT32 iSlop);
+};
+class CXFA_Text : public CXFA_Data
+{
+public:
+ CXFA_Text(CXFA_Node* pNode);
+ void GetName(CFX_WideStringC &wsName);
+ FX_INT32 GetMaxChars();
+ void GetRid(CFX_WideStringC &wsRid);
+ void GetContent(CFX_WideString &wsText);
+ void SetContent(CFX_WideString wsText, FX_BOOL bNotify = TRUE);
+ FX_BOOL SetName(const CFX_WideString& wsName);
+ FX_BOOL SetMaxChars(FX_INT32 iMaxChars);
+ FX_BOOL SetRid(const CFX_WideString& wsRid);
+};
+class CXFA_ExData : public CXFA_Data
+{
+public:
+ CXFA_ExData(CXFA_Node* pNode);
+ void GetContentType(CFX_WideStringC &wsContentType);
+ void GetHref(CFX_WideStringC &wsHref);
+ FX_INT32 GetMaxLength();
+ void GetRid(CFX_WideStringC &wsRid);
+ FX_INT32 GetTransferEncoding();
+ void GetContent(CFX_WideString &wsText);
+ FX_BOOL SetContentType(const CFX_WideString& wsContentType);
+ FX_BOOL SetHref(const CFX_WideString& wsHref);
+ FX_BOOL SetMaxLength(FX_INT32 iMaxLength);
+ FX_BOOL SetRid(const CFX_WideString& wsRid);
+ FX_BOOL SetTransferEncoding(FX_INT32 iTransferEncoding);
+ FX_BOOL SetContent(const CFX_WideString& wsText, FX_BOOL bNotify = FALSE, FX_BOOL bScriptModify = FALSE, FX_BOOL bSyncData = TRUE);
+};
+class CXFA_Image : public CXFA_Data
+{
+public:
+ CXFA_Image(CXFA_Node* pNode, FX_BOOL bDefValue);
+ FX_INT32 GetAspect();
+ FX_BOOL GetContentType(CFX_WideString &wsContentType);
+ FX_BOOL GetHref(CFX_WideString &wsHref);
+ FX_INT32 GetTransferEncoding();
+ FX_BOOL GetContent(CFX_WideString &wsText);
+ FX_BOOL SetAspect(FX_INT32 iAspect);
+ FX_BOOL SetContentType(const CFX_WideString& wsContentType);
+ FX_BOOL SetHref(const CFX_WideString& wsHref);
+ FX_BOOL SetTransferEncoding(FX_INT32 iTransferEncoding);
+ FX_BOOL SetContent(const CFX_WideString& wsText);
+protected:
+ FX_BOOL m_bDefValue;
+};
+class CXFA_Calculate : public CXFA_Data
+{
+public:
+ CXFA_Calculate(CXFA_Node* pNode);
+
+ FX_INT32 GetOverride();
+ CXFA_Script GetScript();
+ void GetMessageText(CFX_WideString &wsMessage);
+ FX_BOOL SetOverride(FX_INT32 iOverride);
+ FX_BOOL SetMessageText(const CFX_WideString& wsMessage);
+};
+class CXFA_Validate : public CXFA_Data
+{
+public:
+ CXFA_Validate(CXFA_Node* pNode);
+ FX_INT32 GetFormatTest();
+ FX_BOOL SetFormatTest(CFX_WideString wsValue);
+ FX_INT32 GetNullTest();
+ FX_BOOL SetNullTest(CFX_WideString wsValue);
+ FX_INT32 GetScriptTest();
+ void GetFormatMessageText(CFX_WideString &wsMessage);
+ void SetFormatMessageText(CFX_WideString wsMessage);
+ void GetNullMessageText(CFX_WideString &wsMessage);
+ void SetNullMessageText(CFX_WideString wsMessage);
+ void GetScriptMessageText(CFX_WideString &wsMessage);
+ void SetScriptMessageText(CFX_WideString wsMessage);
+ void GetPicture(CFX_WideString &wsPicture);
+ CXFA_Script GetScript();
+protected:
+ void GetMessageText(CFX_WideString &wsMessage, FX_WSTR wsMessageType);
+ void SetMessageText(CFX_WideString &wsMessage, FX_WSTR wsMessageType);
+ FX_BOOL SetTestValue(FX_INT32 iType, CFX_WideString &wsValue, XFA_ATTRIBUTEENUM eName);
+};
+class CXFA_Variables : public CXFA_Data
+{
+public:
+ CXFA_Variables(CXFA_Node* pNode);
+
+ FX_INT32 CountScripts();
+ CXFA_Script GetScript(FX_INT32 nIndex);
+};
+class CXFA_Bind : public CXFA_Data
+{
+public:
+ CXFA_Bind(CXFA_Node* pNode);
+ FX_INT32 GetMatch();
+ void GetRef(CFX_WideStringC &wsRef);
+ void GetPicture(CFX_WideString &wsPicture);
+ FX_BOOL SetMatch(FX_INT32 iMatch);
+ FX_BOOL SetRef(const CFX_WideString& wsRef);
+ FX_BOOL SetPicture(const CFX_WideString& wsPicture);
+};
+class CXFA_Assist : public CXFA_Data
+{
+public:
+ CXFA_Assist(CXFA_Node* pNode);
+
+ CXFA_ToolTip GetToolTip();
+};
+class CXFA_ToolTip : public CXFA_Data
+{
+public:
+ CXFA_ToolTip(CXFA_Node* pNode);
+ FX_BOOL GetTip(CFX_WideString &wsTip);
+ FX_BOOL SetTip(const CFX_WideString& wsTip);
+};
+class CXFA_BindItems : public CXFA_Data
+{
+public:
+ CXFA_BindItems(CXFA_Node* pNode);
+ void GetConnection(CFX_WideStringC &wsConnection);
+ void GetLabelRef(CFX_WideStringC &wsLabelRef);
+ void GetValueRef(CFX_WideStringC &wsValueRef);
+ void GetRef(CFX_WideStringC &wsRef);
+ FX_BOOL SetConnection(const CFX_WideString& wsConnection);
+ FX_BOOL SetLabelRef(const CFX_WideString& wsLabelRef);
+ FX_BOOL SetValueRef(const CFX_WideString& wsValueRef);
+ FX_BOOL SetRef(const CFX_WideString& wsRef);
+};
+#define XFA_STROKE_SAMESTYLE_NoPresence 1
+#define XFA_STROKE_SAMESTYLE_Corner 2
+class CXFA_Stroke : public CXFA_Data
+{
+public:
+
+ CXFA_Stroke(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+
+ FX_BOOL IsCorner() const
+ {
+ return GetClassID() == XFA_ELEMENT_Corner;
+ }
+
+ FX_BOOL IsEdge() const
+ {
+ return GetClassID() == XFA_ELEMENT_Edge;
+ }
+
+ FX_INT32 GetPresence() const;
+ FX_BOOL IsVisible() const
+ {
+ return GetPresence() == XFA_ATTRIBUTEENUM_Visible;
+ }
+
+ FX_INT32 GetCapType() const;
+
+ FX_INT32 GetStrokeType() const;
+
+ FX_FLOAT GetThickness() const;
+ CXFA_Measurement GetMSThickness() const;
+
+ void SetThickness(FX_FLOAT fThickness);
+ void SetMSThickness(CXFA_Measurement msThinkness);
+
+ FX_ARGB GetColor() const;
+
+ void SetColor(FX_ARGB argb);
+
+ FX_INT32 GetJoinType() const;
+
+ FX_BOOL IsInverted() const;
+
+ FX_FLOAT GetRadius() const;
+
+ FX_BOOL SameStyles(CXFA_Stroke stroke, FX_DWORD dwFlags = 0) const;
+};
+class CXFA_Corner : public CXFA_Stroke
+{
+public:
+ CXFA_Corner(CXFA_Node* pNode) : CXFA_Stroke(pNode) {}
+};
+class CXFA_Edge : public CXFA_Stroke
+{
+public:
+ CXFA_Edge(CXFA_Node* pNode) : CXFA_Stroke(pNode) {}
+};
+typedef CFX_ArrayTemplate<CXFA_Stroke> CXFA_StrokeArray;
+typedef CFX_ArrayTemplate<CXFA_Edge> CXFA_EdgeArray;
+typedef CFX_ArrayTemplate<CXFA_Corner> CXFA_CornerArray;
+class CXFA_Box : public CXFA_Data
+{
+public:
+
+ CXFA_Box(CXFA_Node *pNode) : CXFA_Data(pNode) {}
+
+ FX_BOOL IsArc() const
+ {
+ return GetClassID() == XFA_ELEMENT_Arc;
+ }
+
+ FX_BOOL IsBorder() const
+ {
+ return GetClassID() == XFA_ELEMENT_Border;
+ }
+
+ FX_BOOL IsRectangle() const
+ {
+ return GetClassID() == XFA_ELEMENT_Rectangle;
+ }
+
+ FX_INT32 GetBreak() const;
+
+ FX_INT32 GetHand() const;
+
+ FX_INT32 GetPresence() const;
+
+ FX_INT32 CountCorners() const;
+
+ CXFA_Corner GetCorner(FX_INT32 nIndex) const;
+
+ FX_INT32 CountEdges() const;
+
+ CXFA_Edge GetEdge(FX_INT32 nIndex = 0) const;
+
+ void GetStrokes(CXFA_StrokeArray &strokes) const;
+
+ FX_BOOL IsCircular() const;
+
+ FX_BOOL GetStartAngle(FX_FLOAT &fStartAngle) const;
+ FX_FLOAT GetStartAngle() const
+ {
+ FX_FLOAT fStartAngle;
+ GetStartAngle(fStartAngle);
+ return fStartAngle;
+ }
+
+ FX_BOOL GetSweepAngle(FX_FLOAT &fSweepAngle) const;
+ FX_FLOAT GetSweepAngle() const
+ {
+ FX_FLOAT fSweepAngle;
+ GetSweepAngle(fSweepAngle);
+ return fSweepAngle;
+ }
+
+ CXFA_Fill GetFill(FX_BOOL bModified = FALSE) const;
+
+ CXFA_Margin GetMargin() const;
+
+ FX_BOOL SameStyles() const;
+
+ FX_INT32 Get3DStyle(FX_BOOL &bVisible, FX_FLOAT &fThickness) const;
+};
+class CXFA_Arc : public CXFA_Box
+{
+public:
+ CXFA_Arc(CXFA_Node *pNode) : CXFA_Box(pNode) {}
+};
+class CXFA_Border : public CXFA_Box
+{
+public:
+ CXFA_Border(CXFA_Node *pNode) : CXFA_Box(pNode) {}
+};
+class CXFA_Rectangle : public CXFA_Box
+{
+public:
+ CXFA_Rectangle(CXFA_Node *pNode) : CXFA_Box(pNode) {}
+};
+enum XFA_CHECKSTATE {
+ XFA_CHECKSTATE_On = 0,
+ XFA_CHECKSTATE_Off = 1,
+ XFA_CHECKSTATE_Neutral = 2,
+};
+enum XFA_VALUEPICTURE {
+ XFA_VALUEPICTURE_Raw = 0,
+ XFA_VALUEPICTURE_Display,
+ XFA_VALUEPICTURE_Edit,
+ XFA_VALUEPICTURE_DataBind,
+};
+class CXFA_WidgetData : public CXFA_Data
+{
+public:
+ CXFA_WidgetData(CXFA_Node *pNode);
+ CXFA_Node* GetUIChild();
+
+ XFA_ELEMENT GetUIType();
+ CFX_WideString GetRawValue();
+
+ FX_INT32 GetAccess(FX_BOOL bTemplate = FALSE);
+
+ FX_BOOL GetAccessKey(CFX_WideStringC &wsAccessKey);
+
+ FX_INT32 GetAnchorType();
+
+ FX_INT32 GetColSpan();
+
+ FX_INT32 GetPresence();
+
+ FX_INT32 GetRotate();
+
+ CXFA_Border GetBorder(FX_BOOL bModified = FALSE);
+
+ CXFA_Caption GetCaption(FX_BOOL bModified = FALSE);
+
+ CXFA_Font GetFont(FX_BOOL bModified = FALSE);
+
+ CXFA_Margin GetMargin(FX_BOOL bModified = FALSE);
+
+ CXFA_Para GetPara(FX_BOOL bModified = FALSE);
+
+ CXFA_Keep GetKeep(FX_BOOL bModified = FALSE);
+
+ void GetEventList(CXFA_NodeArray &events);
+ FX_INT32 GetEventByActivity(FX_INT32 iActivity, CXFA_NodeArray &events, FX_BOOL bIsFormReady = FALSE);
+
+ CXFA_Value GetDefaultValue(FX_BOOL bModified = FALSE);
+
+ CXFA_Value GetFormValue(FX_BOOL bModified = FALSE);
+
+ CXFA_Calculate GetCalculate(FX_BOOL bModified = FALSE);
+
+ CXFA_Validate GetValidate(FX_BOOL bModified = FALSE);
+
+ CXFA_Variables GetVariables(FX_BOOL bModified = FALSE);
+
+ CXFA_Bind GetBind(FX_BOOL bModified = FALSE);
+
+ CXFA_Assist GetAssist(FX_BOOL bModified = FALSE);
+
+ void GetRelevant(CFX_WideStringC &wsRelevant);
+ FX_DWORD GetRelevantStatus();
+
+ FX_BOOL GetWidth(FX_FLOAT &fWidth);
+ FX_BOOL GetHeight(FX_FLOAT &fHeight);
+
+ FX_BOOL GetMinWidth(FX_FLOAT &fMinWidth);
+ FX_BOOL GetMinHeight(FX_FLOAT &fMinHeight);
+
+ FX_BOOL GetMaxWidth(FX_FLOAT &fMaxWidth);
+ FX_BOOL GetMaxHeight(FX_FLOAT &fMaxHeight);
+
+ CXFA_BindItems GetBindItems();
+ FX_BOOL SetAccess(FX_INT32 iAccess, FX_BOOL bNotify = TRUE);
+ FX_BOOL SetAccessKey(const CFX_WideString& wsAccessKey);
+ FX_BOOL SetAnchorType(FX_INT32 iType);
+ FX_BOOL SetColSpan(FX_INT32 iColSpan);
+ FX_BOOL SetPresence(FX_INT32 iPresence);
+ FX_BOOL SetRotate(FX_INT32 iRotate);
+ FX_BOOL SetRelevant(const CFX_WideString& wsRelevant);
+ FX_BOOL SetStatus(FX_DWORD dwStatus);
+ FX_BOOL SetWidth(FX_FLOAT fWidth);
+ FX_BOOL SetHeight(FX_FLOAT fHeight);
+ FX_BOOL SetMinWidth(FX_FLOAT fMinWidth);
+ FX_BOOL SetMinHeight(FX_FLOAT fMinHeight);
+ FX_BOOL SetMaxWidth(FX_FLOAT fMaxWidth);
+ FX_BOOL SetMaxHeight(FX_FLOAT fMaxHeight);
+ FX_BOOL SetPos(FX_FLOAT x, FX_FLOAT y);
+ FX_BOOL SetName(const CFX_WideString& wsName);
+ FX_BOOL SetButtonHighlight(FX_INT32 iButtonHighlight);
+ FX_BOOL SetButtonRollover(const CFX_WideString &wsRollover, FX_BOOL bRichText);
+ FX_BOOL SetButtonDown(const CFX_WideString& wsDown, FX_BOOL bRichText);
+ FX_BOOL SetCheckButtonShape(FX_INT32 iCheckButtonShape);
+ FX_BOOL SetCheckButtonMark(FX_INT32 iCheckButtonMark);
+ FX_BOOL SetCheckButtonSize(FX_FLOAT fCheckButtonMark);
+
+ CXFA_Border GetUIBorder(FX_BOOL bModified = FALSE);
+
+ CXFA_Margin GetUIMargin(FX_BOOL bModified = FALSE);
+ void GetUIMargin(CFX_RectF &rtUIMargin);
+
+ FX_INT32 GetButtonHighlight();
+ FX_BOOL GetButtonRollover(CFX_WideString &wsRollover, FX_BOOL &bRichText);
+ FX_BOOL GetButtonDown(CFX_WideString &wsDown, FX_BOOL &bRichText);
+
+
+ FX_INT32 GetCheckButtonShape();
+
+ FX_INT32 GetCheckButtonMark();
+
+ FX_FLOAT GetCheckButtonSize();
+
+ FX_BOOL IsAllowNeutral();
+ FX_BOOL IsRadioButton();
+ XFA_CHECKSTATE GetCheckState();
+ void SetCheckState(XFA_CHECKSTATE eCheckState, FX_BOOL bNotify = TRUE);
+
+ CXFA_Node* GetExclGroupNode();
+
+ CXFA_Node* GetSelectedMember();
+
+ CXFA_Node* SetSelectedMember(FX_WSTR wsName, FX_BOOL bNotify = TRUE);
+
+ void SetSelectedMemberByValue(FX_WSTR wsValue, FX_BOOL bNotify = TRUE, FX_BOOL bScriptModify = FALSE, FX_BOOL bSyncData = TRUE);
+ CXFA_Node* GetExclGroupFirstMember();
+ CXFA_Node* GetExclGroupNextMember(CXFA_Node* pNode);
+
+ FX_INT32 GetChoiceListCommitOn();
+
+ FX_BOOL IsChoiceListAllowTextEntry();
+
+ FX_INT32 GetChoiceListOpen();
+ FX_BOOL IsListBox();
+ FX_INT32 CountChoiceListItems(FX_BOOL bSaveValue = FALSE);
+
+ FX_BOOL GetChoiceListItem(CFX_WideString &wsText, FX_INT32 nIndex, FX_BOOL bSaveValue = FALSE);
+ void GetChoiceListItems(CFX_WideStringArray &wsTextArray, FX_BOOL bSaveValue = FALSE);
+
+ FX_INT32 CountSelectedItems();
+
+ FX_INT32 GetSelectedItem(FX_INT32 nIndex = 0);
+ void GetSelectedItems(CFX_Int32Array &iSelArray);
+ void GetSelectedItemsValue(CFX_WideStringArray &wsSelTextArray);
+
+ FX_BOOL GetItemState(FX_INT32 nIndex);
+
+ void SetItemState(FX_INT32 nIndex, FX_BOOL bSelected, FX_BOOL bNotify = FALSE, FX_BOOL bScriptModify = FALSE, FX_BOOL bSyncData = TRUE);
+ void SetSelectdItems(CFX_Int32Array &iSelArray, FX_BOOL bNotify = FALSE, FX_BOOL bScriptModify = FALSE, FX_BOOL bSyncData = TRUE);
+ void ClearAllSelections();
+ void InsertItem(const CFX_WideString &wsLabel, const CFX_WideString &wsValue, FX_INT32 nIndex = -1, FX_BOOL bNotify = FALSE);
+ void GetItemLabel(FX_WSTR wsValue, CFX_WideString &wsLabel);
+ void GetItemValue(FX_WSTR wsLabel, CFX_WideString &wsValue);
+ FX_BOOL DeleteItem(FX_INT32 nIndex, FX_BOOL bNotify = FALSE, FX_BOOL bScriptModify = FALSE, FX_BOOL bSyncData = TRUE);
+
+ FX_INT32 GetHorizontalScrollPolicy();
+
+ FX_INT32 GetNumberOfCells();
+
+ FX_BOOL IsDateTimeEditUsePicker();
+
+ FX_BOOL SetValue(const CFX_WideString& wsValue, XFA_VALUEPICTURE eValueType);
+ FX_BOOL GetPictureContent(CFX_WideString &wsPicture, XFA_VALUEPICTURE ePicture);
+ IFX_Locale* GetLocal();
+ FX_BOOL GetValue(CFX_WideString &wsValue, XFA_VALUEPICTURE eValueType);
+ FX_BOOL GetNormalizeDataValue(FX_WSTR wsValue, CFX_WideString &wsNormalizeValue);
+ FX_BOOL GetFormatDataValue(FX_WSTR wsValue, CFX_WideString &wsFormatedValue);
+ void NormalizeNumStr(const CFX_WideString& wsValue, CFX_WideString& wsOutput);
+
+ CFX_WideString GetBarcodeType();
+ FX_BOOL GetBarcodeAttribute_CharEncoding(FX_INT32& val);
+ FX_BOOL GetBarcodeAttribute_Checksum(FX_INT32& val);
+ FX_BOOL GetBarcodeAttribute_DataLength(FX_INT32& val);
+ FX_BOOL GetBarcodeAttribute_StartChar(FX_CHAR& val);
+ FX_BOOL GetBarcodeAttribute_EndChar(FX_CHAR& val);
+ FX_BOOL GetBarcodeAttribute_ECLevel(FX_INT32& val);
+ FX_BOOL GetBarcodeAttribute_ModuleWidth(FX_INT32& val);
+ FX_BOOL GetBarcodeAttribute_ModuleHeight(FX_INT32& val);
+ FX_BOOL GetBarcodeAttribute_PrintChecksum(FX_BOOL& val);
+ FX_BOOL GetBarcodeAttribute_TextLocation(FX_INT32& val);
+ FX_BOOL GetBarcodeAttribute_Truncate(FX_BOOL& val);
+ FX_BOOL GetBarcodeAttribute_WideNarrowRatio(FX_FLOAT& val);
+
+ void GetPasswordChar(CFX_WideString &wsPassWord);
+
+ FX_BOOL IsAllowRichText();
+
+ FX_BOOL IsMultiLine();
+
+ FX_INT32 GetVerticalScrollPolicy();
+
+ FX_INT32 GetMaxChars(XFA_ELEMENT& eType);
+
+ FX_BOOL GetFracDigits(FX_INT32 &iFracDigits);
+
+ FX_BOOL GetLeadDigits(FX_INT32 &iLeadDigits);
+
+ CXFA_Filter GetFilter(FX_BOOL bModified = FALSE);
+ CXFA_Manifest GetManifest(FX_BOOL bModified = FALSE);
+ FX_BOOL m_bIsNull;
+ FX_BOOL m_bPreNull;
+protected:
+ void SyncValue(const CFX_WideString& wsValue, FX_BOOL bNotify);
+ void InsertListTextItem(CXFA_Node* pItems, FX_WSTR wsText, FX_INT32 nIndex = -1);
+ void FormatNumStr(const CFX_WideString& wsValue, IFX_Locale* pLocale, CFX_WideString& wsOutput);
+ CXFA_Node* m_pUiChildNode;
+ XFA_ELEMENT m_eUIType;
+};
+class CXFA_Occur : public CXFA_Data
+{
+public:
+ CXFA_Occur(CXFA_Node* pNode);
+ FX_INT32 GetMax();
+ FX_INT32 GetMin();
+ FX_INT32 GetInitial();
+ FX_BOOL GetOccurInfo(FX_INT32& iMin, FX_INT32& iMax, FX_INT32& iInit);
+ void SetMax(FX_INT32 iMax);
+ void SetMin(FX_INT32 iMin);
+};
+class CXFA_Filter : public CXFA_Data
+{
+public:
+ CXFA_Filter(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ CFX_WideString GetFilterString(XFA_ATTRIBUTE eAttribute);
+ XFA_ATTRIBUTEENUM GetAppearanceFilterType();
+ CFX_WideString GetAppearanceFilterContent();
+ XFA_ATTRIBUTEENUM GetCertificatesCredentialServerPolicy();
+ CFX_WideString GetCertificatesURL();
+ CFX_WideString GetCertificatesURLPolicy();
+ CXFA_WrapCertificate GetCertificatesEncryption(FX_BOOL bModified = FALSE);
+ CXFA_WrapCertificate GetCertificatesIssuers(FX_BOOL bModified = FALSE);
+ CFX_WideString GetCertificatesKeyUsageString(XFA_ATTRIBUTE eAttribute);
+ CXFA_Oids GetCertificatesOids();
+ CXFA_WrapCertificate GetCertificatesSigning(FX_BOOL bModified = FALSE);
+ CXFA_DigestMethods GetDigestMethods(FX_BOOL bModified = FALSE);
+ CXFA_Encodings GetEncodings(FX_BOOL bModified = FALSE);
+ CXFA_EncryptionMethods GetEncryptionMethods(FX_BOOL bModified = FALSE);
+ XFA_ATTRIBUTEENUM GetHandlerType();
+ CFX_WideString GetHandlerContent();
+ XFA_ATTRIBUTEENUM GetlockDocumentType();
+ CFX_WideString GetlockDocumentContent();
+ FX_INT32 GetMDPPermissions();
+ XFA_ATTRIBUTEENUM GetMDPSignatureType();
+
+ CXFA_Reasons GetReasons(FX_BOOL bModified = FALSE);
+ CFX_WideString GetTimeStampServer();
+ XFA_ATTRIBUTEENUM GetTimeStampType();
+};
+class CXFA_Certificate : public CXFA_Data
+{
+public:
+ CXFA_Certificate(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ CFX_WideString GetCertificateName();
+ CFX_WideString GetCertificateContent();
+};
+class CXFA_WrapCertificate : public CXFA_Data
+{
+public:
+ CXFA_WrapCertificate(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ XFA_ATTRIBUTEENUM GetType();
+ FX_INT32 CountCertificates();
+ CXFA_Certificate GetCertificate(FX_INT32 nIndex);
+};
+class CXFA_Oids : public CXFA_Data
+{
+public:
+ CXFA_Oids(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ XFA_ATTRIBUTEENUM GetOidsType();
+ FX_INT32 CountOids();
+ CFX_WideString GetOidContent(FX_INT32 nIndex);
+};
+class CXFA_SubjectDNs : public CXFA_Data
+{
+public:
+ CXFA_SubjectDNs(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ XFA_ATTRIBUTEENUM GetSubjectDNsType();
+ FX_INT32 CountSubjectDNs();
+ CFX_WideString GetSubjectDNString(FX_INT32 nIndex, XFA_ATTRIBUTE eAttribute);
+ CFX_WideString GetSubjectDNContent(FX_INT32 nIndex);
+};
+class CXFA_DigestMethods : public CXFA_Data
+{
+public:
+ CXFA_DigestMethods(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ XFA_ATTRIBUTEENUM GetDigestMethodsType();
+ FX_INT32 CountDigestMethods();
+ CFX_WideString GetDigestMethodContent(FX_INT32 nIndex);
+};
+class CXFA_Encodings : public CXFA_Data
+{
+public:
+ CXFA_Encodings(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ XFA_ATTRIBUTEENUM GetEncodingsType();
+ FX_INT32 CountEncodings();
+ CFX_WideString GetEncodingContent(FX_INT32 nIndex);
+};
+class CXFA_EncryptionMethods : public CXFA_Data
+{
+public:
+ CXFA_EncryptionMethods(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ XFA_ATTRIBUTEENUM GetEncryptionMethodsType();
+ FX_INT32 CountEncryptionMethods();
+ CFX_WideString GetEncryptionMethodContent(FX_INT32 nIndex);
+};
+class CXFA_Reasons : public CXFA_Data
+{
+public:
+ CXFA_Reasons(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ XFA_ATTRIBUTEENUM GetReasonsType();
+ FX_INT32 CountReasons();
+ CFX_WideString GetReasonContent(FX_INT32 nIndex);
+};
+class CXFA_Manifest : public CXFA_Data
+{
+public:
+ CXFA_Manifest(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ XFA_ATTRIBUTEENUM GetAction();
+ FX_INT32 CountReives();
+ CFX_WideString GetRefContent(FX_INT32 nIndex);
+};
+#endif
diff --git a/xfa/include/fxfa/fxfa_widget.h b/xfa/include/fxfa/fxfa_widget.h
new file mode 100644
index 0000000000..4488502bf7
--- /dev/null
+++ b/xfa/include/fxfa/fxfa_widget.h
@@ -0,0 +1,101 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FXFA_WIDGET_H
+#define _FXFA_WIDGET_H
+class CXFA_Node;
+class CXFA_FFDocView;
+class CXFA_FFDoc;
+class CXFA_FFApp;
+class CXFA_Node;
+class CXFA_EventParam;
+class CXFA_FFWidget;
+class CXFA_TextLayout;
+class CXFA_TextProvider;
+class CXFA_WidgetLayoutData;
+class IFX_Font;
+class CXFA_WidgetAcc;
+#include "fxfa_objectacc.h"
+class CXFA_WidgetAcc : public CXFA_WidgetData
+{
+public:
+ CXFA_WidgetAcc(CXFA_FFDocView* pDocView, CXFA_Node* pNode);
+ ~CXFA_WidgetAcc();
+
+ FX_BOOL GetName(CFX_WideString &wsName, FX_INT32 iNameType = 0);
+ FX_BOOL ProcessValueChanged();
+
+public:
+
+ void ResetData();
+
+
+ void SetImageEdit(FX_WSTR wsContentType, FX_WSTR wsHref, FX_WSTR wsData);
+
+ CXFA_WidgetAcc* GetExclGroup();
+ CXFA_FFDocView* GetDocView();
+ CXFA_FFDoc* GetDoc();
+ CXFA_FFApp* GetApp();
+ IXFA_AppProvider* GetAppProvider();
+
+ FX_INT32 ProcessEvent(FX_INT32 iActivity, CXFA_EventParam* pEventParam);
+ FX_INT32 ProcessEvent(CXFA_Event& event, CXFA_EventParam* pEventParam);
+ FX_INT32 ProcessCalculate();
+ FX_INT32 ProcessValidate(FX_INT32 iFlags = 0);
+ FX_INT32 ExecuteScript(CXFA_Script script, CXFA_EventParam* pEventParam, FXJSE_HVALUE* pRetValue = NULL);
+
+ CXFA_FFWidget* GetNextWidget(CXFA_FFWidget* pWidget);
+ void StartWidgetLayout(FX_FLOAT &fCalcWidth, FX_FLOAT& fCalcHeight);
+ FX_BOOL FindSplitPos(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight);
+ FX_BOOL LoadCaption();
+ FX_BOOL LoadText();
+ FX_BOOL LoadImageImage();
+ FX_BOOL LoadImageEditImage();
+ void GetImageDpi(FX_INT32 &iImageXDpi, FX_INT32 &iImageYDpi);
+ void GetImageEditDpi(FX_INT32 &iImageXDpi, FX_INT32 &iImageYDpi);
+ CXFA_TextLayout* GetCaptionTextLayout();
+ CXFA_TextLayout* GetTextLayout();
+ CFX_DIBitmap* GetImageImage();
+ CFX_DIBitmap* GetImageEditImage();
+ void SetImageImage(CFX_DIBitmap* newImage);
+ void SetImageEditImage(CFX_DIBitmap* newImage);
+ void UpdateUIDisplay(CXFA_FFWidget* pExcept = NULL);
+ void NotifyEvent(FX_DWORD dwEvent, CXFA_FFWidget* pWidget = NULL, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL);
+
+
+ CXFA_Node* GetDatasets();
+ IFX_Font* GetFDEFont();
+ FX_FLOAT GetFontSize();
+ FX_ARGB GetTextColor();
+ FX_FLOAT GetLineHeight();
+ CXFA_WidgetLayoutData* GetWidgetLayoutData();
+protected:
+ void ProcessScriptTestValidate(CXFA_Validate validate, FX_INT32 iRet, FXJSE_HVALUE pRetValue, FX_BOOL bVersionFlag);
+ FX_INT32 ProcessFormatTestValidate(CXFA_Validate validate, FX_BOOL bVersionFlag);
+ FX_INT32 ProcessNullTestValidate(CXFA_Validate validate, FX_INT32 iFlags, FX_BOOL bVersionFlag);
+ void GetValidateCaptionName(CFX_WideString& wsCaptionName, FX_BOOL bVersionFlag);
+ void GetValidateMessage(IXFA_AppProvider* pAppProvider, CFX_WideString& wsMessage, FX_BOOL bError, FX_BOOL bVersionFlag);
+ void CalcCaptionSize(CFX_SizeF &szCap);
+ FX_BOOL CalculateFieldAutoSize(CFX_SizeF &size);
+ FX_BOOL CalculateWidgetAutoSize(CFX_SizeF &size);
+ FX_BOOL CalculateTextEditAutoSize(CFX_SizeF &size);
+ FX_BOOL CalculateCheckButtonAutoSize(CFX_SizeF &size);
+ FX_BOOL CalculatePushButtonAutoSize(CFX_SizeF &size);
+ FX_BOOL CalculateImageEditAutoSize(CFX_SizeF &size);
+ FX_BOOL CalculateImageAutoSize(CFX_SizeF &size);
+ FX_BOOL CalculateTextAutoSize(CFX_SizeF &size);
+ FX_FLOAT CalculateWidgetAutoHeight(FX_FLOAT fHeightCalc);
+ FX_FLOAT CalculateWidgetAutoWidth(FX_FLOAT fWidthCalc);
+ FX_FLOAT GetWidthWithoutMargin(FX_FLOAT fWidthCalc);
+ FX_FLOAT GetHeightWithoutMargin(FX_FLOAT fHeightCalc);
+ void CalculateTextContentSize(CFX_SizeF &size);
+ void CalculateAccWidthAndHeight(XFA_ELEMENT eUIType, FX_FLOAT& fWidth, FX_FLOAT& fCalcHeight);
+ void InitLayoutData();
+ void StartTextLayout(FX_FLOAT& fCalcWidth, FX_FLOAT& fCalcHeight);
+ CXFA_FFDocView* m_pDocView;
+ CXFA_WidgetLayoutData* m_pLayoutData;
+};
+#endif
diff --git a/xfa/include/fxgraphics/fx_graphics.h b/xfa/include/fxgraphics/fx_graphics.h
new file mode 100644
index 0000000000..ddec9605b7
--- /dev/null
+++ b/xfa/include/fxgraphics/fx_graphics.h
@@ -0,0 +1,511 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef __H_FX_GRAPHICS__
+#define __H_FX_GRAPHICS__
+#define FX_ERR_Succeeded 0
+#define FX_ERR_Indefinite -1
+#define FX_ERR_Parameter_Invalid -100
+#define FX_ERR_Property_Invalid -200
+#define FX_ERR_Intermediate_Value_Invalid -300
+#define FX_ERR_Method_Not_Supported -400
+#define FX_ERR_Out_Of_Memory -500
+#define _FX_RETURN_IF_FAIL(arg) {if (!(arg)) return;}
+#define _FX_RETURN_VALUE_IF_FAIL(arg, val) {if (!(arg)) return val;}
+#define _FX_GOTO_POSITION_IF_FAIL(arg, pos) {if (!(arg)) goto pos;}
+#define _FX_ERR_CHECK_RETURN_IF_FAIL(arg) {if ((arg) != FX_ERR_Succeeded) return;}
+#define _FX_ERR_CHECK_RETURN_VALUE_IF_FAIL(arg, val) {if ((arg) != FX_ERR_Succeeded) return val;}
+#define _FX_ERR_CHECK_GOTO_POSITION_IF_FAIL(arg, pos) {if ((arg) != FX_ERR_Succeeded) goto pos;}
+#define FX_SHADING_Steps 256
+typedef FX_INT32 FX_DashStyle;
+enum {
+ FX_DASHSTYLE_Solid = 0,
+ FX_DASHSTYLE_Dash = 1,
+ FX_DASHSTYLE_Dot = 2,
+ FX_DASHSTYLE_DashDot = 3,
+ FX_DASHSTYLE_DashDotDot = 4
+};
+typedef FX_INT32 FX_StrokeAlignment;
+enum {
+ FX_STROKEALIGNMENT_Center = 0,
+ FX_STROKEALIGNMENT_Inset = 1,
+ FX_STROKEALIGNMENT_Outset = 2,
+ FX_STROKEALIGNMENT_Left = 3,
+ FX_STROKEALIGNMENT_Right = 4
+};
+typedef FX_INT32 FX_HatchStyle;
+enum {
+ FX_HATCHSTYLE_Horizontal = 0,
+ FX_HATCHSTYLE_Vertical = 1,
+ FX_HATCHSTYLE_ForwardDiagonal = 2,
+ FX_HATCHSTYLE_BackwardDiagonal = 3,
+ FX_HATCHSTYLE_Cross = 4,
+ FX_HATCHSTYLE_DiagonalCross = 5,
+ FX_HATCHSTYLE_05Percent = 6,
+ FX_HATCHSTYLE_10Percent = 7,
+ FX_HATCHSTYLE_20Percent = 8,
+ FX_HATCHSTYLE_25Percent = 9,
+ FX_HATCHSTYLE_30Percent = 10,
+ FX_HATCHSTYLE_40Percent = 11,
+ FX_HATCHSTYLE_50Percent = 12,
+ FX_HATCHSTYLE_60Percent = 13,
+ FX_HATCHSTYLE_70Percent = 14,
+ FX_HATCHSTYLE_75Percent = 15,
+ FX_HATCHSTYLE_80Percent = 16,
+ FX_HATCHSTYLE_90Percent = 17,
+ FX_HATCHSTYLE_LightDownwardDiagonal = 18,
+ FX_HATCHSTYLE_LightUpwardDiagonal = 19,
+ FX_HATCHSTYLE_DarkDownwardDiagonal = 20,
+ FX_HATCHSTYLE_DarkUpwardDiagonal = 21,
+ FX_HATCHSTYLE_WideDownwardDiagonal = 22,
+ FX_HATCHSTYLE_WideUpwardDiagonal = 23,
+ FX_HATCHSTYLE_LightVertical = 24,
+ FX_HATCHSTYLE_LightHorizontal = 25,
+ FX_HATCHSTYLE_NarrowVertical = 26,
+ FX_HATCHSTYLE_NarrowHorizontal = 27,
+ FX_HATCHSTYLE_DarkVertical = 28,
+ FX_HATCHSTYLE_DarkHorizontal = 29,
+ FX_HATCHSTYLE_DashedDownwardDiagonal = 30,
+ FX_HATCHSTYLE_DashedUpwardDiagonal = 31,
+ FX_HATCHSTYLE_DashedHorizontal = 32,
+ FX_HATCHSTYLE_DashedVertical = 33,
+ FX_HATCHSTYLE_SmallConfetti = 34,
+ FX_HATCHSTYLE_LargeConfetti = 35,
+ FX_HATCHSTYLE_ZigZag = 36,
+ FX_HATCHSTYLE_Wave = 37,
+ FX_HATCHSTYLE_DiagonalBrick = 38,
+ FX_HATCHSTYLE_HorizontalBrick = 39,
+ FX_HATCHSTYLE_Weave = 40,
+ FX_HATCHSTYLE_Plaid = 41,
+ FX_HATCHSTYLE_Divot = 42,
+ FX_HATCHSTYLE_DottedGrid = 43,
+ FX_HATCHSTYLE_DottedDiamond = 44,
+ FX_HATCHSTYLE_Shingle = 45,
+ FX_HATCHSTYLE_Trellis = 46,
+ FX_HATCHSTYLE_Sphere = 47,
+ FX_HATCHSTYLE_SmallGrid = 48,
+ FX_HATCHSTYLE_SmallCheckerBoard = 49,
+ FX_HATCHSTYLE_LargeCheckerBoard = 50,
+ FX_HATCHSTYLE_OutlinedDiamond = 51,
+ FX_HATCHSTYLE_SolidDiamond = 52
+};
+typedef FX_INT32 FX_DeviceCap;
+typedef FX_INT32 FX_FillMode;
+class CFX_Object;
+class CFX_RenderDevice;
+class CFX_GraphStateData;
+class CFX_Matrix;
+class CFX_DIBSource;
+class CFX_DIBitmap;
+class CFX_Font;
+class CFX_WideString;
+class IFX_FileRead;
+class CFX_PathGenerator;
+class CAGG_Graphics;
+class CFX_Graphics;
+class CFX_Color;
+class CFX_Path;
+class CFX_Pattern;
+class CFX_Shading;
+class CFX_Graphics : public CFX_Object
+{
+public:
+
+
+ CFX_Graphics();
+
+ FX_ERR Create(CFX_RenderDevice * renderDevice, FX_BOOL isAntialiasing = TRUE);
+
+ FX_ERR Create(FX_INT32 width,
+ FX_INT32 height,
+ FXDIB_Format format,
+ FX_BOOL isNative = TRUE,
+ FX_BOOL isAntialiasing = TRUE);
+
+
+ virtual ~CFX_Graphics();
+
+
+
+ FX_ERR GetDeviceCap(const FX_INT32 capID, FX_DeviceCap & capVal);
+ FX_ERR IsPrinterDevice(FX_BOOL & isPrinter);
+ FX_ERR EnableAntialiasing(FX_BOOL isAntialiasing);
+
+
+
+ FX_ERR SaveGraphState();
+
+ FX_ERR RestoreGraphState();
+
+
+
+ FX_ERR GetLineCap(CFX_GraphStateData::LineCap & lineCap);
+
+ FX_ERR SetLineCap(CFX_GraphStateData::LineCap lineCap);
+
+ FX_ERR GetDashCount(FX_INT32 & dashCount);
+
+ FX_ERR GetLineDash(FX_FLOAT & dashPhase, FX_FLOAT * dashArray);
+
+ FX_ERR SetLineDash(FX_FLOAT dashPhase, FX_FLOAT * dashArray, FX_INT32 dashCount);
+
+ FX_ERR SetLineDash(FX_DashStyle dashStyle);
+
+ FX_ERR GetLineJoin(CFX_GraphStateData::LineJoin & lineJoin);
+
+ FX_ERR SetLineJoin(CFX_GraphStateData::LineJoin lineJoin);
+
+ FX_ERR GetMiterLimit(FX_FLOAT & miterLimit);
+
+ FX_ERR SetMiterLimit(FX_FLOAT miterLimit);
+
+ FX_ERR GetLineWidth(FX_FLOAT & lineWidth);
+
+ FX_ERR SetLineWidth(FX_FLOAT lineWidth, FX_BOOL isActOnDash = FALSE);
+
+ FX_ERR GetStrokeAlignment(FX_StrokeAlignment & strokeAlignment);
+
+ FX_ERR SetStrokeAlignment(FX_StrokeAlignment strokeAlignment);
+
+
+
+ FX_ERR SetStrokeColor(CFX_Color * color);
+
+ FX_ERR SetFillColor(CFX_Color * color);
+
+
+
+ FX_ERR StrokePath(CFX_Path * path, CFX_Matrix * matrix = NULL);
+
+ FX_ERR FillPath(CFX_Path * path,
+ FX_FillMode fillMode = FXFILL_WINDING,
+ CFX_Matrix * matrix = NULL);
+
+ FX_ERR ClipPath(CFX_Path * path,
+ FX_FillMode fillMode = FXFILL_WINDING,
+ CFX_Matrix * matrix = NULL);
+
+
+
+ FX_ERR DrawImage(CFX_DIBSource * source,
+ const CFX_PointF & point,
+ CFX_Matrix * matrix = NULL);
+
+ FX_ERR StretchImage(CFX_DIBSource * source,
+ const CFX_RectF & rect,
+ CFX_Matrix * matrix = NULL);
+
+
+
+ FX_ERR ConcatMatrix(CFX_Matrix * matrix);
+
+ CFX_Matrix * GetMatrix();
+
+
+
+ FX_ERR GetClipRect(CFX_RectF & rect);
+
+ FX_ERR SetClipRect(const CFX_RectF & rect);
+
+ FX_ERR ClearClip();
+
+
+
+ FX_ERR SetFont(CFX_Font * font);
+
+ FX_ERR SetFontSize(const FX_FLOAT size);
+
+ FX_ERR SetFontHScale(const FX_FLOAT scale);
+
+ FX_ERR SetCharSpacing(const FX_FLOAT spacing);
+
+ FX_ERR SetTextDrawingMode(const FX_INT32 mode);
+
+
+ FX_ERR ShowText(const CFX_PointF & point,
+ const CFX_WideString & text,
+ CFX_Matrix * matrix = NULL);
+
+
+ FX_ERR CalcTextRect(CFX_RectF & rect,
+ const CFX_WideString & text,
+ FX_BOOL isMultiline = FALSE,
+ CFX_Matrix * matrix = NULL);
+
+
+
+ FX_ERR Transfer(CFX_Graphics * graphics, CFX_Matrix * matrix = NULL);
+
+
+ FX_ERR Transfer(CFX_Graphics * graphics,
+ FX_FLOAT srcLeft,
+ FX_FLOAT srcTop,
+ const CFX_RectF & dstRect,
+ CFX_Matrix * matrix = NULL);
+
+
+
+
+ CFX_RenderDevice * GetRenderDevice();
+
+ FX_ERR InverseRect(const CFX_RectF & rect);
+ FX_ERR XorDIBitmap(const CFX_DIBitmap * srcBitmap, const CFX_RectF & rect);
+ FX_ERR EqvDIBitmap(const CFX_DIBitmap * srcBitmap, const CFX_RectF & rect);
+private:
+
+ FX_ERR RenderDeviceSetLineDash(FX_DashStyle dashStyle);
+
+ FX_ERR RenderDeviceStrokePath(CFX_Path * path, CFX_Matrix * matrix);
+
+ FX_ERR RenderDeviceFillPath(CFX_Path * path,
+ FX_FillMode fillMode,
+ CFX_Matrix * matrix);
+
+
+ FX_ERR RenderDeviceDrawImage(CFX_DIBSource * source,
+ const CFX_PointF & point,
+ CFX_Matrix * matrix);
+
+ FX_ERR RenderDeviceStretchImage(CFX_DIBSource * source,
+ const CFX_RectF & rect,
+ CFX_Matrix * matrix);
+
+ FX_ERR RenderDeviceShowText(const CFX_PointF & point,
+ const CFX_WideString & text,
+ CFX_Matrix * matrix);
+
+ FX_ERR StrokePathWithPattern(CFX_Path * path, CFX_Matrix * matrix);
+
+ FX_ERR StrokePathWithShading(CFX_Path * path, CFX_Matrix * matrix);
+
+ FX_ERR FillPathWithPattern(CFX_Path * path,
+ FX_FillMode fillMode,
+ CFX_Matrix * matrix);
+
+ FX_ERR FillPathWithShading(CFX_Path * path,
+ FX_FillMode fillMode,
+ CFX_Matrix * matrix);
+ FX_ERR SetDIBitsWithMatrix(CFX_DIBSource * source, CFX_Matrix * matrix);
+ FX_ERR CalcTextInfo(const CFX_WideString & text, FX_DWORD * charCodes, FXTEXT_CHARPOS * charPos, CFX_RectF & rect);
+
+
+protected:
+ FX_INT32 _type;
+private:
+ struct TInfo : public CFX_Object {
+ CFX_GraphStateData _graphState;
+ FX_BOOL _isAntialiasing;
+ FX_StrokeAlignment _strokeAlignment;
+ CFX_Matrix _CTM;
+ FX_BOOL _isActOnDash;
+ CFX_Color * _strokeColor;
+ CFX_Color * _fillColor;
+ CFX_Font * _font;
+ FX_FLOAT _fontSize;
+ FX_FLOAT _fontHScale;
+ FX_FLOAT _fontSpacing;
+ } _info;
+ CFX_RenderDevice * _renderDevice;
+ CFX_PtrArray _infoStack;
+ CAGG_Graphics * _aggGraphics;
+ friend class CAGG_Graphics;
+
+};
+class CFX_Path : public CFX_Object
+{
+public:
+
+
+ CFX_Path();
+
+ FX_ERR Create();
+
+ virtual ~CFX_Path();
+
+
+ FX_ERR MoveTo(FX_FLOAT x, FX_FLOAT y);
+
+ FX_ERR LineTo(FX_FLOAT x, FX_FLOAT y);
+
+ FX_ERR BezierTo(FX_FLOAT ctrlX1,
+ FX_FLOAT ctrlY1,
+ FX_FLOAT ctrlX2,
+ FX_FLOAT ctrlY2,
+ FX_FLOAT toX,
+ FX_FLOAT toY);
+
+ FX_ERR ArcTo(FX_FLOAT left,
+ FX_FLOAT top,
+ FX_FLOAT width,
+ FX_FLOAT height,
+ FX_FLOAT startAngle,
+ FX_FLOAT sweepAngle);
+
+ FX_ERR Close();
+
+
+ FX_ERR AddLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2);
+
+ FX_ERR AddBezier(FX_FLOAT startX,
+ FX_FLOAT startY,
+ FX_FLOAT ctrlX1,
+ FX_FLOAT ctrlY1,
+ FX_FLOAT ctrlX2,
+ FX_FLOAT ctrlY2,
+ FX_FLOAT endX,
+ FX_FLOAT endY);
+
+ FX_ERR AddRectangle(FX_FLOAT left, FX_FLOAT top, FX_FLOAT width, FX_FLOAT height);
+
+ FX_ERR AddEllipse(FX_FLOAT left, FX_FLOAT top, FX_FLOAT width, FX_FLOAT height);
+
+ FX_ERR AddEllipse(const CFX_RectF & rect);
+
+ FX_ERR AddArc(FX_FLOAT left,
+ FX_FLOAT top,
+ FX_FLOAT width,
+ FX_FLOAT height,
+ FX_FLOAT startAngle,
+ FX_FLOAT sweepAngle);
+
+ FX_ERR AddPie(FX_FLOAT left,
+ FX_FLOAT top,
+ FX_FLOAT width,
+ FX_FLOAT height,
+ FX_FLOAT startAngle,
+ FX_FLOAT sweepAngle);
+
+ FX_ERR AddSubpath(CFX_Path * path);
+
+ FX_ERR Clear();
+
+ FX_BOOL IsEmpty();
+
+ CFX_PathData * GetPathData();
+private:
+ CFX_PathGenerator * _generator;
+};
+class CFX_Color : public CFX_Object
+{
+public:
+
+ CFX_Color();
+
+ CFX_Color(const FX_ARGB argb);
+
+
+ CFX_Color(CFX_Pattern * pattern, const FX_ARGB argb = 0x0);
+
+
+ CFX_Color(CFX_Shading * shading);
+
+
+ virtual ~CFX_Color();
+
+
+ FX_ERR Set(const FX_ARGB argb);
+
+
+ FX_ERR Set(CFX_Pattern * pattern, const FX_ARGB argb = 0x0);
+
+
+ FX_ERR Set(CFX_Shading * shading);
+
+private:
+ FX_INT32 _type;
+ union {
+ struct {
+ FX_ARGB _argb;
+ CFX_Pattern * _pattern;
+ };
+ CFX_Shading * _shading;
+ };
+
+ friend class CFX_Graphics;
+};
+class CFX_Pattern : public CFX_Object
+{
+public:
+
+
+ CFX_Pattern();
+
+ FX_ERR Create(CFX_DIBitmap * bitmap,
+ const FX_FLOAT xStep,
+ const FX_FLOAT yStep,
+ CFX_Matrix * matrix = NULL);
+
+ FX_ERR Create(FX_HatchStyle hatchStyle,
+ const FX_ARGB foreArgb,
+ const FX_ARGB backArgb,
+ CFX_Matrix * matrix = NULL);
+
+ virtual ~CFX_Pattern();
+
+private:
+ FX_INT32 _type;
+ CFX_Matrix _matrix;
+ union {
+ struct {
+ CFX_RectF _rect;
+ FX_FLOAT _xStep;
+ FX_FLOAT _yStep;
+ FX_BOOL _isColored;
+ };
+ struct {
+ CFX_DIBitmap * _bitmap;
+ FX_FLOAT _x1Step;
+ FX_FLOAT _y1Step;
+ };
+ struct {
+ FX_HatchStyle _hatchStyle;
+ FX_ARGB _foreArgb;
+ FX_ARGB _backArgb;
+ };
+ };
+ friend class CFX_Graphics;
+};
+class CFX_Shading : public CFX_Object
+{
+public:
+
+
+ CFX_Shading();
+
+ FX_ERR CreateAxial(const CFX_PointF & beginPoint,
+ const CFX_PointF & endPoint,
+ FX_BOOL isExtendedBegin,
+ FX_BOOL isExtendedEnd,
+ const FX_ARGB beginArgb,
+ const FX_ARGB endArgb);
+
+ FX_ERR CreateRadial(const CFX_PointF & beginPoint,
+ const CFX_PointF & endPoint,
+ const FX_FLOAT beginRadius,
+ const FX_FLOAT endRadius,
+ FX_BOOL isExtendedBegin,
+ FX_BOOL isExtendedEnd,
+ const FX_ARGB beginArgb,
+ const FX_ARGB endArgb);
+
+ virtual ~CFX_Shading();
+
+private:
+ FX_ERR InitArgbArray();
+private:
+ FX_INT32 _type;
+ CFX_PointF _beginPoint;
+ CFX_PointF _endPoint;
+ FX_FLOAT _beginRadius;
+ FX_FLOAT _endRadius;
+ FX_BOOL _isExtendedBegin;
+ FX_BOOL _isExtendedEnd;
+ FX_ARGB _beginArgb;
+ FX_ARGB _endArgb;
+ FX_ARGB _argbArray[FX_SHADING_Steps];
+ friend class CFX_Graphics;
+};
+#endif
diff --git a/xfa/include/fxjse/fxjse.h b/xfa/include/fxjse/fxjse.h
new file mode 100644
index 0000000000..0bd44347a4
--- /dev/null
+++ b/xfa/include/fxjse/fxjse.h
@@ -0,0 +1,125 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FXJSE_H_
+#define _FXJSE_H_
+#ifdef __cplusplus
+#define FXJSE_DEFINEINHERITHANDLE(name, subtypename) typedef struct _##subtypename : public _##name {} * subtypename;
+#else
+#define FXJSE_DEFINEINHERITHANDLE(name, subtypename) typedef name subtypename;
+#endif
+FX_DEFINEHANDLE(FXJSE_HRUNTIME);
+FX_DEFINEHANDLE(FXJSE_HCONTEXT);
+FX_DEFINEHANDLE(FXJSE_HCLASS);
+FX_DEFINEHANDLE(FXJSE_HVALUE);
+FXJSE_DEFINEINHERITHANDLE(FXJSE_HVALUE, FXJSE_HOBJECT);
+typedef double FXJSE_DOUBLE;
+void FXJSE_Initialize();
+void FXJSE_Finalize();
+FXJSE_HRUNTIME FXJSE_Runtime_Create();
+void FXJSE_Runtime_Release(FXJSE_HRUNTIME hRuntime);
+typedef struct _FXJSE_CLASS FXJSE_CLASS;
+FXJSE_HCONTEXT FXJSE_Context_Create (FXJSE_HRUNTIME hRuntime, const FXJSE_CLASS* lpGlobalClass = NULL, FX_LPVOID lpGlobalObject = NULL);
+void FXJSE_Context_Release (FXJSE_HCONTEXT hContext);
+FXJSE_HVALUE FXJSE_Context_GetGlobalObject(FXJSE_HCONTEXT hContext);
+FXJSE_HRUNTIME FXJSE_Context_GetRuntime(FXJSE_HCONTEXT hContext);
+enum FXJSE_CompatibleModeFlags {
+ FXJSE_COMPATIBLEMODEFLAG_CONSTRUCTOREXTRAMETHODS = (1 << 0),
+ FXJSE_COMPATIBLEMODEFLAGCOUNT = 1,
+};
+void FXJSE_Context_EnableCompatibleMode(FXJSE_HCONTEXT hContext, FX_DWORD dwCompatibleFlags);
+class CFXJSE_Arguments
+{
+public:
+ FXJSE_HRUNTIME GetRuntime() const;
+ FX_INT32 GetLength() const;
+ FXJSE_HVALUE GetValue(FX_INT32 index) const;
+ FX_BOOL GetBoolean(FX_INT32 index) const;
+ FX_INT32 GetInt32(FX_INT32 index) const;
+ FX_FLOAT GetFloat(FX_INT32 index) const;
+ CFX_ByteString GetUTF8String(FX_INT32 index) const;
+ FX_LPVOID GetObject(FX_INT32 index, FXJSE_HCLASS hClass = NULL) const;
+ FXJSE_HVALUE GetReturnValue();
+};
+typedef void (*FXJSE_FuncCallback) (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
+typedef void (*FXJSE_PropAccessor) (FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue);
+typedef FX_INT32(*FXJSE_PropTypeGetter) (FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn);
+typedef FX_BOOL (*FXJSE_PropDeleter) (FXJSE_HOBJECT hObject, FX_BSTR szPropName);
+typedef struct _FXJSE_FUNCTION {
+ FX_LPCSTR name;
+ FXJSE_FuncCallback callbackProc;
+} FXJSE_FUNCTION;
+#define FXJSE_DEF_FUNCTION(functionName, functionCallback) {functionName, functionCallback}
+void FXJSE_DefineFunctions(FXJSE_HCONTEXT hContext, const FXJSE_FUNCTION* lpFunctions, int nNum);
+typedef struct _FXJSE_PROPERTY {
+ FX_LPCSTR name;
+ FXJSE_PropAccessor getProc;
+ FXJSE_PropAccessor setProc;
+} FXJSE_PROPERTY;
+enum FXJSE_ClassPropTypes {
+ FXJSE_ClassPropType_None,
+ FXJSE_ClassPropType_Property,
+ FXJSE_ClassPropType_Method
+};
+typedef struct _FXJSE_CLASS {
+ FX_LPCSTR name;
+ FXJSE_FuncCallback constructor;
+ FXJSE_PROPERTY* properties;
+ FXJSE_FUNCTION* methods;
+ FX_INT32 propNum;
+ FX_INT32 methNum;
+ FXJSE_PropTypeGetter dynPropTypeGetter;
+ FXJSE_PropAccessor dynPropGetter;
+ FXJSE_PropAccessor dynPropSetter;
+ FXJSE_PropDeleter dynPropDeleter;
+ FXJSE_FuncCallback dynMethodCall;
+} FXJSE_CLASS;
+FXJSE_HCLASS FXJSE_DefineClass(FXJSE_HCONTEXT hContext, const FXJSE_CLASS* lpClass);
+FXJSE_HCLASS FXJSE_GetClass(FXJSE_HCONTEXT hContext, FX_BSTR szName);
+FXJSE_HVALUE FXJSE_Value_Create(FXJSE_HRUNTIME hRuntime);
+void FXJSE_Value_Release(FXJSE_HVALUE hValue);
+FXJSE_HRUNTIME FXJSE_Value_GetRuntime(FXJSE_HVALUE hValue);
+FX_BOOL FXJSE_Value_IsUndefined (FXJSE_HVALUE hValue);
+FX_BOOL FXJSE_Value_IsNull (FXJSE_HVALUE hValue);
+FX_BOOL FXJSE_Value_IsBoolean (FXJSE_HVALUE hValue);
+FX_BOOL FXJSE_Value_IsUTF8String (FXJSE_HVALUE hValue);
+FX_BOOL FXJSE_Value_IsNumber (FXJSE_HVALUE hValue);
+FX_BOOL FXJSE_Value_IsInteger (FXJSE_HVALUE hValue);
+FX_BOOL FXJSE_Value_IsObject (FXJSE_HVALUE hValue);
+FX_BOOL FXJSE_Value_IsArray (FXJSE_HVALUE hValue);
+FX_BOOL FXJSE_Value_IsFunction (FXJSE_HVALUE hValue);
+FX_BOOL FXJSE_Value_IsDate (FXJSE_HVALUE hValue);
+FX_BOOL FXJSE_Value_ToBoolean (FXJSE_HVALUE hValue);
+FX_FLOAT FXJSE_Value_ToFloat (FXJSE_HVALUE hValue);
+FXJSE_DOUBLE FXJSE_Value_ToDouble (FXJSE_HVALUE hValue);
+FX_INT32 FXJSE_Value_ToInteger (FXJSE_HVALUE hValue);
+void FXJSE_Value_ToUTF8String (FXJSE_HVALUE hValue, CFX_ByteString& szStrOutput);
+FX_LPVOID FXJSE_Value_ToObject (FXJSE_HVALUE hValue, FXJSE_HCLASS hClass);
+void FXJSE_Value_SetUndefined (FXJSE_HVALUE hValue);
+void FXJSE_Value_SetNull (FXJSE_HVALUE hValue);
+void FXJSE_Value_SetBoolean (FXJSE_HVALUE hValue, FX_BOOL bBoolean);
+void FXJSE_Value_SetUTF8String (FXJSE_HVALUE hValue, FX_BSTR szString);
+void FXJSE_Value_SetInteger (FXJSE_HVALUE hValue, FX_INT32 nInteger);
+void FXJSE_Value_SetFloat (FXJSE_HVALUE hValue, FX_FLOAT fFloat);
+void FXJSE_Value_SetDouble (FXJSE_HVALUE hValue, FXJSE_DOUBLE dDouble);
+void FXJSE_Value_SetObject (FXJSE_HVALUE hValue, FX_LPVOID lpObject, FXJSE_HCLASS hClass);
+void FXJSE_Value_SetArray (FXJSE_HVALUE hValue, FX_UINT32 uValueCount, FXJSE_HVALUE* rgValues);
+void FXJSE_Value_SetDate (FXJSE_HVALUE hValue, FXJSE_DOUBLE dDouble);
+void FXJSE_Value_Set (FXJSE_HVALUE hValue, FXJSE_HVALUE hOriginalValue);
+FX_BOOL FXJSE_Value_GetObjectProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FXJSE_HVALUE hPropValue);
+FX_BOOL FXJSE_Value_SetObjectProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FXJSE_HVALUE hPropValue);
+FX_BOOL FXJSE_Value_GetObjectPropByIdx (FXJSE_HVALUE hValue, FX_UINT32 uPropIdx, FXJSE_HVALUE hPropValue);
+FX_BOOL FXJSE_Value_SetObjectPropByIdx (FXJSE_HVALUE hValue, FX_UINT32 uPropIdx, FXJSE_HVALUE hPropValue);
+FX_BOOL FXJSE_Value_DeleteObjectProp (FXJSE_HVALUE hValue, FX_BSTR szPropName);
+FX_BOOL FXJSE_Value_ObjectHasOwnProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FX_BOOL bUseTypeGetter);
+FX_BOOL FXJSE_Value_SetObjectOwnProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FXJSE_HVALUE hPropValue);
+FX_BOOL FXJSE_Value_CallFunction (FXJSE_HVALUE hFunction, FXJSE_HVALUE hThis, FXJSE_HVALUE hRetValue, FX_UINT32 nArgCount, FXJSE_HVALUE* lpArgs);
+FX_BOOL FXJSE_Value_SetFunctionBind (FXJSE_HVALUE hValue, FXJSE_HVALUE hOldFunction, FXJSE_HVALUE hNewThis);
+FX_BOOL FXJSE_ExecuteScript(FXJSE_HCONTEXT hContext, FX_LPCSTR szScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hNewThisObject = NULL);
+void FXJSE_ThrowMessage(FX_BSTR utf8Name, FX_BSTR utf8Message);
+FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue, CFX_ByteString& utf8Name, CFX_ByteString& utf8Message);
+FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue, FX_INT32& nLine, FX_INT32& nCol);
+#endif