diff options
Diffstat (limited to 'xfa/include')
74 files changed, 8425 insertions, 8425 deletions
diff --git a/xfa/include/foxitxfa.h b/xfa/include/foxitxfa.h index c5730b7069..2c8af137ea 100644 --- a/xfa/include/foxitxfa.h +++ b/xfa/include/foxitxfa.h @@ -1,21 +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
-
-// TODO(thestig): Remove this file and do IWYU.
-
-#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/fdrm/fx_crypt.h"
-#include "core/include/fpdfdoc/fpdf_doc.h"
-#include "xfa/include/fxbarcode/BC_BarCode.h"
-#include "xfa/include/fxgraphics/fx_graphics.h"
-#include "xfa/include/fwl/fwl.h"
-#include "xfa/include/fxjse/fxjse.h"
-#include "xfa/include/fxfa/fxfa.h"
-#endif
+// 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 + +// TODO(thestig): Remove this file and do IWYU. + +#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/fdrm/fx_crypt.h" +#include "core/include/fpdfdoc/fpdf_doc.h" +#include "xfa/include/fxbarcode/BC_BarCode.h" +#include "xfa/include/fxgraphics/fx_graphics.h" +#include "xfa/include/fwl/fwl.h" +#include "xfa/include/fxjse/fxjse.h" +#include "xfa/include/fxfa/fxfa.h" +#endif diff --git a/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h b/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h index 6fb6292ad0..52cd7b8ff8 100644 --- a/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h +++ b/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h @@ -1,34 +1,34 @@ -// 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
-
-enum FWL_CLIPBOARDFORMAT {
- FWL_CLIPBOARDFORMAT_Dib,
- FWL_CLIPBOARDFORMAT_Text,
- FWL_CLIPBOARDFORMAT_UncodeText,
-};
-typedef struct _FWL_HCLIPBOARDDATA { void* pData; } * FWL_HCLIPBOARDDATA;
-
-class IFWL_AdapterClipboardMgr {
- public:
- virtual ~IFWL_AdapterClipboardMgr() {}
- 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, uint8_t* pBuf, int32_t iSize) = 0;
- virtual int32_t GetDataSize(FWL_HCLIPBOARDDATA hData) = 0;
- virtual void* LockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0;
- virtual FX_BOOL UnLockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0;
- virtual FWL_ERR SetStringData(const CFX_WideStringC& ws) = 0;
- virtual FWL_ERR SetStringData(const CFX_ByteStringC& 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(const CFX_WideStringC& wsFormat) = 0;
-};
-#endif
+// 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 + +enum FWL_CLIPBOARDFORMAT { + FWL_CLIPBOARDFORMAT_Dib, + FWL_CLIPBOARDFORMAT_Text, + FWL_CLIPBOARDFORMAT_UncodeText, +}; +typedef struct _FWL_HCLIPBOARDDATA { void* pData; } * FWL_HCLIPBOARDDATA; + +class IFWL_AdapterClipboardMgr { + public: + virtual ~IFWL_AdapterClipboardMgr() {} + 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, uint8_t* pBuf, int32_t iSize) = 0; + virtual int32_t GetDataSize(FWL_HCLIPBOARDDATA hData) = 0; + virtual void* LockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0; + virtual FX_BOOL UnLockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0; + virtual FWL_ERR SetStringData(const CFX_WideStringC& ws) = 0; + virtual FWL_ERR SetStringData(const CFX_ByteStringC& 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(const CFX_WideStringC& wsFormat) = 0; +}; +#endif diff --git a/xfa/include/fwl/adapter/fwl_adaptercursormgr.h b/xfa/include/fwl/adapter/fwl_adaptercursormgr.h index de3a533647..cc8b8ecc10 100644 --- a/xfa/include/fwl/adapter/fwl_adaptercursormgr.h +++ b/xfa/include/fwl/adapter/fwl_adaptercursormgr.h @@ -1,38 +1,38 @@ -// 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 { void* pData; } * FWL_HCURSOR;
-
-class IFWL_AdapterCursorMgr {
- public:
- virtual ~IFWL_AdapterCursorMgr() {}
- 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
+// 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 { void* pData; } * FWL_HCURSOR; + +class IFWL_AdapterCursorMgr { + public: + virtual ~IFWL_AdapterCursorMgr() {} + 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 index 36c9d9267a..666f06cd6c 100644 --- a/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h +++ b/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h @@ -1,24 +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_ADAPTER_MONITORMGR_H
-#define _FWL_ADAPTER_MONITORMGR_H
-
-typedef struct _FWL_HMONITOR { void* pData; } * FWL_HMONITOR;
-
-class IFWL_AdapterMonitorMgr {
- public:
- virtual ~IFWL_AdapterMonitorMgr() {}
- virtual int32_t CountMonitors() = 0;
- virtual FWL_HMONITOR GetMonitor(int32_t 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
+// 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 + +typedef struct _FWL_HMONITOR { void* pData; } * FWL_HMONITOR; + +class IFWL_AdapterMonitorMgr { + public: + virtual ~IFWL_AdapterMonitorMgr() {} + virtual int32_t CountMonitors() = 0; + virtual FWL_HMONITOR GetMonitor(int32_t 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 index c1973e4288..6d02610337 100644 --- a/xfa/include/fwl/adapter/fwl_adapternative.h +++ b/xfa/include/fwl/adapter/fwl_adapternative.h @@ -1,30 +1,30 @@ -// 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 {
- public:
- virtual ~IFWL_AdapterNative() {}
- 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
+// 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 { + public: + virtual ~IFWL_AdapterNative() {} + 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 index 570e53349a..d45b82a8e6 100644 --- a/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h +++ b/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h @@ -1,24 +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_ADAPTERTHREADMGR_H_
-#define FWL_ADAPTERTHREADMGR_H_
-
-class IFWL_Thread;
-
-class IFWL_AdapterThreadMgr {
- public:
- virtual ~IFWL_AdapterThreadMgr() {}
- 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, int32_t iExitCode) = 0;
- virtual FWL_ERR Stop(FWL_HTHREAD hThread, int32_t iExitCode) = 0;
- virtual IFWL_Thread* GetCurrentThread() = 0;
-};
-#endif // FWL_ADAPTERTHREADMGR_H_
+// 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_ADAPTERTHREADMGR_H_ +#define FWL_ADAPTERTHREADMGR_H_ + +class IFWL_Thread; + +class IFWL_AdapterThreadMgr { + public: + virtual ~IFWL_AdapterThreadMgr() {} + 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, int32_t iExitCode) = 0; + virtual FWL_ERR Stop(FWL_HTHREAD hThread, int32_t iExitCode) = 0; + virtual IFWL_Thread* GetCurrentThread() = 0; +}; +#endif // FWL_ADAPTERTHREADMGR_H_ diff --git a/xfa/include/fwl/adapter/fwl_adaptertimermgr.h b/xfa/include/fwl/adapter/fwl_adaptertimermgr.h index aed9241397..37cdf86f23 100644 --- a/xfa/include/fwl/adapter/fwl_adaptertimermgr.h +++ b/xfa/include/fwl/adapter/fwl_adaptertimermgr.h @@ -1,24 +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_ADAPTER_TIMERMGR_H
-#define _FWL_ADAPTER_TIMERMGR_H
-
-#include "xfa/include/fwl/core/fwl_error.h"
-#include "xfa/include/fwl/core/fwl_timer.h"
-
-class IFWL_Timer;
-
-class IFWL_AdapterTimerMgr {
- public:
- virtual ~IFWL_AdapterTimerMgr() {}
- 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
+// 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 + +#include "xfa/include/fwl/core/fwl_error.h" +#include "xfa/include/fwl/core/fwl_timer.h" + +class IFWL_Timer; + +class IFWL_AdapterTimerMgr { + public: + virtual ~IFWL_AdapterTimerMgr() {} + 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 index d3bdd6f68b..9edae0dfc2 100644 --- a/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h +++ b/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h @@ -1,76 +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_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_AdapterMessageHook;
-class IFWL_AppDelegate;
-
-class IFWL_AdapterWidgetMgr {
- public:
- virtual ~IFWL_AdapterWidgetMgr() {}
- 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,
- const CFX_WideStringC& 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(int32_t iExitCode) = 0;
- virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget* pWidget,
- void* UserData) = 0;
- virtual FWL_ERR GetWidgetDC(IFWL_Widget* pWidget, void*& pDC) = 0;
- virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget* pWidget,
- void* pDC,
- CFX_RectF* pClip = 0) = 0;
- virtual void* 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,
- const void* hItem,
- int32_t iType) = 0;
- virtual int32_t 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
+// 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_AdapterMessageHook; +class IFWL_AppDelegate; + +class IFWL_AdapterWidgetMgr { + public: + virtual ~IFWL_AdapterWidgetMgr() {} + 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, + const CFX_WideStringC& 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(int32_t iExitCode) = 0; + virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget* pWidget, + void* UserData) = 0; + virtual FWL_ERR GetWidgetDC(IFWL_Widget* pWidget, void*& pDC) = 0; + virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget* pWidget, + void* pDC, + CFX_RectF* pClip = 0) = 0; + virtual void* 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, + const void* hItem, + int32_t iType) = 0; + virtual int32_t 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 index 86a17286eb..29ed93edd5 100644 --- a/xfa/include/fwl/adapter/fwl_sdadapterimp.h +++ b/xfa/include/fwl/adapter/fwl_sdadapterimp.h @@ -1,91 +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_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:
- 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(int32_t 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,
- const CFX_WideStringC& 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, void*& pDC);
- virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget* pWidget,
- void* pDC,
- CFX_RectF* pClip = 0);
- virtual void* 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,
- const void* hItem,
- int32_t iType);
- virtual int32_t 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:
- 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, int32_t iExitCode);
- virtual FWL_ERR Stop(FWL_HTHREAD hThread, int32_t iExitCode);
- virtual IFWL_Thread* GetCurrentThread();
-};
-#endif
+// 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: + 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(int32_t 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, + const CFX_WideStringC& 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, void*& pDC); + virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget* pWidget, + void* pDC, + CFX_RectF* pClip = 0); + virtual void* 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, + const void* hItem, + int32_t iType); + virtual int32_t 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: + 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, int32_t iExitCode); + virtual FWL_ERR Stop(FWL_HTHREAD hThread, int32_t iExitCode); + virtual IFWL_Thread* GetCurrentThread(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_barcode.h b/xfa/include/fwl/basewidget/fwl_barcode.h index b55630f4e2..2b3654d7b2 100644 --- a/xfa/include/fwl/basewidget/fwl_barcode.h +++ b/xfa/include/fwl/basewidget/fwl_barcode.h @@ -1,60 +1,60 @@ -// 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 int32_t GetModuleHeight() = 0;
- virtual int32_t GetModuleWidth() = 0;
- virtual int32_t GetDataLength() = 0;
- virtual int32_t GetCalChecksum() = 0;
- virtual FX_BOOL GetPrintChecksum() = 0;
- virtual BC_TEXT_LOC GetTextLocation() = 0;
- virtual int32_t GetWideNarrowRatio() = 0;
- virtual FX_CHAR GetStartChar() = 0;
- virtual FX_CHAR GetEndChar() = 0;
- virtual int32_t GetVersion() = 0;
- virtual int32_t GetErrorCorrectionLevel() = 0;
- virtual FX_BOOL GetTruncated() = 0;
- virtual FX_DWORD GetBarcodeAttributeMask() = 0;
-};
-
-class IFWL_Barcode : public IFWL_Edit {
- public:
- static IFWL_Barcode* Create(const CFWL_WidgetImpProperties& properties);
- void SetType(BC_TYPE type);
- FX_BOOL IsProtectedType();
-
- protected:
- IFWL_Barcode();
-};
-#endif
+// 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 int32_t GetModuleHeight() = 0; + virtual int32_t GetModuleWidth() = 0; + virtual int32_t GetDataLength() = 0; + virtual int32_t GetCalChecksum() = 0; + virtual FX_BOOL GetPrintChecksum() = 0; + virtual BC_TEXT_LOC GetTextLocation() = 0; + virtual int32_t GetWideNarrowRatio() = 0; + virtual FX_CHAR GetStartChar() = 0; + virtual FX_CHAR GetEndChar() = 0; + virtual int32_t GetVersion() = 0; + virtual int32_t GetErrorCorrectionLevel() = 0; + virtual FX_BOOL GetTruncated() = 0; + virtual FX_DWORD GetBarcodeAttributeMask() = 0; +}; + +class IFWL_Barcode : public IFWL_Edit { + public: + static IFWL_Barcode* Create(const CFWL_WidgetImpProperties& properties); + void SetType(BC_TYPE type); + FX_BOOL IsProtectedType(); + + protected: + IFWL_Barcode(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_caret.h b/xfa/include/fwl/basewidget/fwl_caret.h index 0e5a0c2afe..f88dee601d 100644 --- a/xfa/include/fwl/basewidget/fwl_caret.h +++ b/xfa/include/fwl/basewidget/fwl_caret.h @@ -1,31 +1,31 @@ -// 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(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- FWL_ERR ShowCaret(FX_BOOL bFlag = TRUE);
- FWL_ERR GetFrequency(FX_DWORD& elapse);
- FWL_ERR SetFrequency(FX_DWORD elapse);
- FWL_ERR SetColor(CFX_Color crFill);
-
- protected:
- IFWL_Caret();
-};
-#endif
+// 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(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + FWL_ERR ShowCaret(FX_BOOL bFlag = TRUE); + FWL_ERR GetFrequency(FX_DWORD& elapse); + FWL_ERR SetFrequency(FX_DWORD elapse); + FWL_ERR SetColor(CFX_Color crFill); + + protected: + IFWL_Caret(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_checkbox.h b/xfa/include/fwl/basewidget/fwl_checkbox.h index f6102d6150..6e6cec5e76 100644 --- a/xfa/include/fwl/basewidget/fwl_checkbox.h +++ b/xfa/include/fwl/basewidget/fwl_checkbox.h @@ -1,81 +1,81 @@ -// 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_CLASSHASH_CheckBox 4107183823
-#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(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
- int32_t GetCheckState();
- FWL_ERR SetCheckState(int32_t iCheck);
-
- protected:
- IFWL_CheckBox();
-};
-
-#endif
+// 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_CLASSHASH_CheckBox 4107183823 +#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(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + int32_t GetCheckState(); + FWL_ERR SetCheckState(int32_t iCheck); + + protected: + IFWL_CheckBox(); +}; + +#endif diff --git a/xfa/include/fwl/basewidget/fwl_combobox.h b/xfa/include/fwl/basewidget/fwl_combobox.h index 7fa9bddc3d..db23d34f5c 100644 --- a/xfa/include/fwl/basewidget/fwl_combobox.h +++ b/xfa/include/fwl/basewidget/fwl_combobox.h @@ -1,139 +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)
-int32_t 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)
-int32_t m_iCurHover;
-END_FWL_EVENT_DEF
-BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbDrawItem, FWL_EVTHASH_CMB_DrawItem)
-CFX_Graphics* m_pGraphics;
-CFX_Matrix m_matrix;
-int32_t 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(const CFWL_WidgetImpProperties& properties);
-
- int32_t GetCurSel();
- FWL_ERR SetCurSel(int32_t iSel);
- FWL_ERR SetEditText(const CFX_WideString& wsText);
- int32_t GetEditTextLength() const;
- FWL_ERR GetEditText(CFX_WideString& wsText,
- int32_t nStart = 0,
- int32_t nCount = -1) const;
- FWL_ERR SetEditSelRange(int32_t nStart, int32_t nCount = -1);
- int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart);
- int32_t GetEditLimit();
- FWL_ERR SetEditLimit(int32_t nLimit);
- FWL_ERR EditDoClipboard(int32_t iCmd);
- FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord);
- FX_BOOL EditUndo(const CFX_ByteStringC& bsRecord);
- 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();
-};
-#endif
+// 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) +int32_t 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) +int32_t m_iCurHover; +END_FWL_EVENT_DEF +BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbDrawItem, FWL_EVTHASH_CMB_DrawItem) +CFX_Graphics* m_pGraphics; +CFX_Matrix m_matrix; +int32_t 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(const CFWL_WidgetImpProperties& properties); + + int32_t GetCurSel(); + FWL_ERR SetCurSel(int32_t iSel); + FWL_ERR SetEditText(const CFX_WideString& wsText); + int32_t GetEditTextLength() const; + FWL_ERR GetEditText(CFX_WideString& wsText, + int32_t nStart = 0, + int32_t nCount = -1) const; + FWL_ERR SetEditSelRange(int32_t nStart, int32_t nCount = -1); + int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart); + int32_t GetEditLimit(); + FWL_ERR SetEditLimit(int32_t nLimit); + FWL_ERR EditDoClipboard(int32_t iCmd); + FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord); + FX_BOOL EditUndo(const CFX_ByteStringC& bsRecord); + 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(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_datetimepicker.h b/xfa/include/fwl/basewidget/fwl_datetimepicker.h index 15ba0eaeff..79cb5f5fcb 100644 --- a/xfa/include/fwl/basewidget/fwl_datetimepicker.h +++ b/xfa/include/fwl/basewidget/fwl_datetimepicker.h @@ -1,105 +1,105 @@ -// 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)
-int32_t hoverday;
-END_FWL_EVENT_DEF
-BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpSelectChanged, FWL_EVTHASH_DTP_SelectChanged)
-int32_t iYear;
-int32_t iMonth;
-int32_t iDay;
-END_FWL_EVENT_DEF
-class IFWL_DateTimePickerDP : public IFWL_DataProvider {
- public:
- virtual FWL_ERR GetToday(IFWL_Widget* pWidget,
- int32_t& iYear,
- int32_t& iMonth,
- int32_t& iDay) = 0;
-};
-class IFWL_DateTimePicker : public IFWL_Widget {
- public:
- static IFWL_DateTimePicker* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- FWL_ERR GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay);
- FWL_ERR SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay);
- FWL_ERR SetEditText(const CFX_WideString& wsText);
- FWL_ERR GetEditText(CFX_WideString& wsText,
- int32_t nStart = 0,
- int32_t nCount = -1) const;
- int32_t CountSelRanges();
- int32_t GetSelRange(int32_t nIndex, int32_t& 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(int32_t nLimit);
- FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded,
- FX_DWORD dwStylesExRemoved);
-
- protected:
- IFWL_DateTimePicker();
-};
-#endif
+// 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) +int32_t hoverday; +END_FWL_EVENT_DEF +BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpSelectChanged, FWL_EVTHASH_DTP_SelectChanged) +int32_t iYear; +int32_t iMonth; +int32_t iDay; +END_FWL_EVENT_DEF +class IFWL_DateTimePickerDP : public IFWL_DataProvider { + public: + virtual FWL_ERR GetToday(IFWL_Widget* pWidget, + int32_t& iYear, + int32_t& iMonth, + int32_t& iDay) = 0; +}; +class IFWL_DateTimePicker : public IFWL_Widget { + public: + static IFWL_DateTimePicker* Create(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + FWL_ERR GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay); + FWL_ERR SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay); + FWL_ERR SetEditText(const CFX_WideString& wsText); + FWL_ERR GetEditText(CFX_WideString& wsText, + int32_t nStart = 0, + int32_t nCount = -1) const; + int32_t CountSelRanges(); + int32_t GetSelRange(int32_t nIndex, int32_t& 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(int32_t nLimit); + FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded, + FX_DWORD dwStylesExRemoved); + + protected: + IFWL_DateTimePicker(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_edit.h b/xfa/include/fwl/basewidget/fwl_edit.h index da7398a2ca..4a913e873d 100644 --- a/xfa/include/fwl/basewidget/fwl_edit.h +++ b/xfa/include/fwl/basewidget/fwl_edit.h @@ -1,167 +1,167 @@ -// 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)
-int32_t 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 { void* pData; } * FWL_HEDTFIND;
-class IFWL_Edit : public IFWL_Widget {
- public:
- static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
- static IFWL_Edit* CreateComboEdit(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- FWL_ERR SetText(const CFX_WideString& wsText);
- int32_t GetTextLength() const;
- FWL_ERR GetText(CFX_WideString& wsText,
- int32_t nStart = 0,
- int32_t nCount = -1) const;
- FWL_ERR ClearText();
- int32_t GetCaretPos() const;
- int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE);
- FWL_ERR AddSelRange(int32_t nStart, int32_t nCount = -1);
- int32_t CountSelRanges();
- int32_t GetSelRange(int32_t nIndex, int32_t& nStart);
- FWL_ERR ClearSelections();
- int32_t GetLimit();
- FWL_ERR SetLimit(int32_t nLimit);
- FWL_ERR SetAliasChar(FX_WCHAR wAlias);
- FWL_ERR SetFormatString(const CFX_WideString& wsFormat);
- FWL_ERR Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen);
- FWL_ERR DeleteSelections();
- FWL_ERR DeleteRange(int32_t nStart, int32_t nCount = -1);
- FWL_ERR ReplaceSelections(const CFX_WideStringC& wsReplace);
- FWL_ERR Replace(int32_t nStart,
- int32_t nLen,
- const CFX_WideStringC& wsReplace);
- FWL_ERR DoClipboard(int32_t iCmd);
- FX_BOOL Copy(CFX_WideString& wsCopy);
- FX_BOOL Cut(CFX_WideString& wsCut);
- FX_BOOL Paste(const CFX_WideString& wsPaste);
- FX_BOOL Delete();
- FX_BOOL Redo(const CFX_ByteStringC& bsRecord);
- FX_BOOL Undo(const CFX_ByteStringC& 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(int32_t iMin, int32_t 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,
- const CFX_ByteStringC& bsReplace);
-
- protected:
- IFWL_Edit();
-};
-#endif
+// 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) +int32_t 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 { void* pData; } * FWL_HEDTFIND; +class IFWL_Edit : public IFWL_Widget { + public: + static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + static IFWL_Edit* CreateComboEdit(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + FWL_ERR SetText(const CFX_WideString& wsText); + int32_t GetTextLength() const; + FWL_ERR GetText(CFX_WideString& wsText, + int32_t nStart = 0, + int32_t nCount = -1) const; + FWL_ERR ClearText(); + int32_t GetCaretPos() const; + int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE); + FWL_ERR AddSelRange(int32_t nStart, int32_t nCount = -1); + int32_t CountSelRanges(); + int32_t GetSelRange(int32_t nIndex, int32_t& nStart); + FWL_ERR ClearSelections(); + int32_t GetLimit(); + FWL_ERR SetLimit(int32_t nLimit); + FWL_ERR SetAliasChar(FX_WCHAR wAlias); + FWL_ERR SetFormatString(const CFX_WideString& wsFormat); + FWL_ERR Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen); + FWL_ERR DeleteSelections(); + FWL_ERR DeleteRange(int32_t nStart, int32_t nCount = -1); + FWL_ERR ReplaceSelections(const CFX_WideStringC& wsReplace); + FWL_ERR Replace(int32_t nStart, + int32_t nLen, + const CFX_WideStringC& wsReplace); + FWL_ERR DoClipboard(int32_t iCmd); + FX_BOOL Copy(CFX_WideString& wsCopy); + FX_BOOL Cut(CFX_WideString& wsCut); + FX_BOOL Paste(const CFX_WideString& wsPaste); + FX_BOOL Delete(); + FX_BOOL Redo(const CFX_ByteStringC& bsRecord); + FX_BOOL Undo(const CFX_ByteStringC& 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(int32_t iMin, int32_t 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, + const CFX_ByteStringC& bsReplace); + + protected: + IFWL_Edit(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_listbox.h b/xfa/include/fwl/basewidget/fwl_listbox.h index 1d585881d3..d28b8896f7 100644 --- a/xfa/include/fwl/basewidget/fwl_listbox.h +++ b/xfa/include/fwl/basewidget/fwl_listbox.h @@ -1,129 +1,129 @@ -// 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;
-int32_t m_index;
-CFX_RectF m_rect;
-END_FWL_EVENT_DEF
-typedef struct _FWL_HLISTITEM { void* pData; } * FWL_HLISTITEM;
-typedef struct _FWL_ListBoxItemData {
- IFWL_ListBoxDP* pDataProvider;
- int32_t iIndex;
-} FWL_ListBoxItemData;
-class IFWL_ListBoxDP : public IFWL_DataProvider {
- public:
- virtual int32_t CountItems(IFWL_Widget* pWidget) = 0;
- virtual FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex) = 0;
- virtual int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) = 0;
- virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- int32_t 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 void* 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,
- const FX_WCHAR* 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 ~IFWL_ListBoxCompare() {}
- virtual int32_t Compare(FWL_HLISTITEM hLeft, FWL_HLISTITEM hRight) = 0;
-};
-class IFWL_ListBox : public IFWL_Widget {
- public:
- static IFWL_ListBox* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
- static IFWL_ListBox* CreateComboList(
- const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- int32_t CountSelItems();
- FWL_HLISTITEM GetSelItem(int32_t nIndexSel);
- int32_t GetSelIndex(int32_t nIndex);
- FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE);
- FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText);
- FWL_ERR GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE);
- FWL_ERR* Sort(IFWL_ListBoxCompare* pCom);
-
- protected:
- IFWL_ListBox();
-};
-#endif
+// 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; +int32_t m_index; +CFX_RectF m_rect; +END_FWL_EVENT_DEF +typedef struct _FWL_HLISTITEM { void* pData; } * FWL_HLISTITEM; +typedef struct _FWL_ListBoxItemData { + IFWL_ListBoxDP* pDataProvider; + int32_t iIndex; +} FWL_ListBoxItemData; +class IFWL_ListBoxDP : public IFWL_DataProvider { + public: + virtual int32_t CountItems(IFWL_Widget* pWidget) = 0; + virtual FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex) = 0; + virtual int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) = 0; + virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + int32_t 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 void* 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, + const FX_WCHAR* 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 ~IFWL_ListBoxCompare() {} + virtual int32_t Compare(FWL_HLISTITEM hLeft, FWL_HLISTITEM hRight) = 0; +}; +class IFWL_ListBox : public IFWL_Widget { + public: + static IFWL_ListBox* Create(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + static IFWL_ListBox* CreateComboList( + const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + int32_t CountSelItems(); + FWL_HLISTITEM GetSelItem(int32_t nIndexSel); + int32_t GetSelIndex(int32_t nIndex); + FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE); + FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText); + FWL_ERR GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE); + FWL_ERR* Sort(IFWL_ListBoxCompare* pCom); + + protected: + IFWL_ListBox(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_menu.h b/xfa/include/fwl/basewidget/fwl_menu.h index d1ce7127ae..b2e7ec00ac 100644 --- a/xfa/include/fwl/basewidget/fwl_menu.h +++ b/xfa/include/fwl/basewidget/fwl_menu.h @@ -1,15 +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
+// 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 index c1c3001825..9c2a7df996 100644 --- a/xfa/include/fwl/basewidget/fwl_monthcalendar.h +++ b/xfa/include/fwl/basewidget/fwl_monthcalendar.h @@ -1,130 +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)
-int32_t m_iStartDay;
-int32_t m_iEndDay;
-END_FWL_EVENT_DEF
-BEGIN_FWL_EVENT_DEF(CFWL_EventMcdDateChanged, FWL_EVTHASH_MCD_DateChanged)
-int32_t m_iOldYear;
-int32_t m_iOldMonth;
-int32_t m_iStartDay;
-int32_t m_iEndDay;
-END_FWL_EVENT_DEF
-class IFWL_MonthCalendarDP : public IFWL_DataProvider {
- public:
- virtual int32_t GetCurDay(IFWL_Widget* pWidget) = 0;
- virtual int32_t GetCurMonth(IFWL_Widget* pWidget) = 0;
- virtual int32_t GetCurYear(IFWL_Widget* pWidget) = 0;
-};
-class IFWL_MonthCalendar : public IFWL_Widget {
- public:
- static IFWL_MonthCalendar* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- int32_t CountSelect();
- FX_BOOL GetSelect(int32_t& iYear,
- int32_t& iMonth,
- int32_t& iDay,
- int32_t nIndex = 0);
- FX_BOOL SetSelect(int32_t iYear, int32_t iMonth, int32_t iDay);
-
- protected:
- IFWL_MonthCalendar();
-};
-#endif
+// 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) +int32_t m_iStartDay; +int32_t m_iEndDay; +END_FWL_EVENT_DEF +BEGIN_FWL_EVENT_DEF(CFWL_EventMcdDateChanged, FWL_EVTHASH_MCD_DateChanged) +int32_t m_iOldYear; +int32_t m_iOldMonth; +int32_t m_iStartDay; +int32_t m_iEndDay; +END_FWL_EVENT_DEF +class IFWL_MonthCalendarDP : public IFWL_DataProvider { + public: + virtual int32_t GetCurDay(IFWL_Widget* pWidget) = 0; + virtual int32_t GetCurMonth(IFWL_Widget* pWidget) = 0; + virtual int32_t GetCurYear(IFWL_Widget* pWidget) = 0; +}; +class IFWL_MonthCalendar : public IFWL_Widget { + public: + static IFWL_MonthCalendar* Create(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + int32_t CountSelect(); + FX_BOOL GetSelect(int32_t& iYear, + int32_t& iMonth, + int32_t& iDay, + int32_t nIndex = 0); + FX_BOOL SetSelect(int32_t iYear, int32_t iMonth, int32_t iDay); + + protected: + IFWL_MonthCalendar(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_picturebox.h b/xfa/include/fwl/basewidget/fwl_picturebox.h index d0eefdea1d..bb7d911f90 100644 --- a/xfa/include/fwl/basewidget/fwl_picturebox.h +++ b/xfa/include/fwl/basewidget/fwl_picturebox.h @@ -1,52 +1,52 @@ -// 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 int32_t GetOpacity(IFWL_Widget* pWidget) = 0;
- virtual int32_t GetFlipMode(IFWL_Widget* pWidget) = 0;
- virtual FWL_ERR GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) = 0;
-};
-
-class IFWL_PictureBox : public IFWL_Widget {
- public:
- static IFWL_PictureBox* Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- protected:
- IFWL_PictureBox();
-};
-#endif
+// 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 int32_t GetOpacity(IFWL_Widget* pWidget) = 0; + virtual int32_t GetFlipMode(IFWL_Widget* pWidget) = 0; + virtual FWL_ERR GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) = 0; +}; + +class IFWL_PictureBox : public IFWL_Widget { + public: + static IFWL_PictureBox* Create(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + protected: + IFWL_PictureBox(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_pushbutton.h b/xfa/include/fwl/basewidget/fwl_pushbutton.h index 953fb01893..8e459d2f78 100644 --- a/xfa/include/fwl/basewidget/fwl_pushbutton.h +++ b/xfa/include/fwl/basewidget/fwl_pushbutton.h @@ -1,54 +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_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(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- protected:
- IFWL_PushButton();
-};
-#endif
+// 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(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + protected: + IFWL_PushButton(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_scrollbar.h b/xfa/include/fwl/basewidget/fwl_scrollbar.h index 04263a8967..c8a0d91446 100644 --- a/xfa/include/fwl/basewidget/fwl_scrollbar.h +++ b/xfa/include/fwl/basewidget/fwl_scrollbar.h @@ -1,69 +1,69 @@ -// 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(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- FX_BOOL IsVertical();
- FWL_ERR GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax);
- FWL_ERR SetRange(FX_FLOAT fMin, FX_FLOAT fMax);
- 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();
-};
-#endif
+// 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(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + FX_BOOL IsVertical(); + FWL_ERR GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax); + FWL_ERR SetRange(FX_FLOAT fMin, FX_FLOAT fMax); + 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(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_spinbutton.h b/xfa/include/fwl/basewidget/fwl_spinbutton.h index efcfa22a49..5e89e43b84 100644 --- a/xfa/include/fwl/basewidget/fwl_spinbutton.h +++ b/xfa/include/fwl/basewidget/fwl_spinbutton.h @@ -1,42 +1,42 @@ -// 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(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- FWL_ERR EnableButton(FX_BOOL bEnable, FX_BOOL bUp = TRUE);
- FX_BOOL IsButtonEnable(FX_BOOL bUp = TRUE);
-
- protected:
- IFWL_SpinButton();
-};
-#endif
+// 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(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + FWL_ERR EnableButton(FX_BOOL bEnable, FX_BOOL bUp = TRUE); + FX_BOOL IsButtonEnable(FX_BOOL bUp = TRUE); + + protected: + IFWL_SpinButton(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fwl_tooltipctrl.h b/xfa/include/fwl/basewidget/fwl_tooltipctrl.h index 7205c37cd7..1d63ba8096 100644 --- a/xfa/include/fwl/basewidget/fwl_tooltipctrl.h +++ b/xfa/include/fwl/basewidget/fwl_tooltipctrl.h @@ -1,44 +1,44 @@ -// 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 int32_t GetInitialDelay(IFWL_Widget* pWidget) = 0;
- virtual int32_t 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(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- FWL_ERR SetAnchor(const CFX_RectF& rtAnchor);
- FWL_ERR Show();
- FWL_ERR Hide();
-
- protected:
- IFWL_ToolTip();
-};
-#endif
+// 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 int32_t GetInitialDelay(IFWL_Widget* pWidget) = 0; + virtual int32_t 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(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + FWL_ERR SetAnchor(const CFX_RectF& rtAnchor); + FWL_ERR Show(); + FWL_ERR Hide(); + + protected: + IFWL_ToolTip(); +}; +#endif diff --git a/xfa/include/fwl/basewidget/fxmath_barcode.h b/xfa/include/fwl/basewidget/fxmath_barcode.h index 1e3650e40a..7fc6cd700b 100644 --- a/xfa/include/fwl/basewidget/fxmath_barcode.h +++ b/xfa/include/fwl/basewidget/fxmath_barcode.h @@ -1,48 +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 _FXMATH_BARCODE_H_
-#define _FXMATH_BARCODE_H_
-class IFX_Barcode {
- public:
- virtual ~IFX_Barcode() {}
- virtual void Release() = 0;
- virtual BC_TYPE GetType() = 0;
- virtual FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) = 0;
- virtual FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e) = 0;
- virtual FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) = 0;
- virtual CFX_WideString Decode(uint8_t* buf,
- int32_t width,
- int32_t height,
- int32_t& errorCode) = 0;
- virtual CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& errorCode) = 0;
- virtual FX_BOOL SetCharEncoding(BC_CHAR_ENCODING encoding) = 0;
- virtual FX_BOOL SetModuleHeight(int32_t moduleHeight) = 0;
- virtual FX_BOOL SetModuleWidth(int32_t moduleWidth) = 0;
- virtual FX_BOOL SetHeight(int32_t height) = 0;
- virtual FX_BOOL SetWidth(int32_t width) = 0;
- virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) = 0;
- virtual FX_BOOL SetPrintChecksum(FX_BOOL checksum) = 0;
- virtual FX_BOOL SetDataLength(int32_t length) = 0;
- virtual FX_BOOL SetCalChecksum(int32_t state) = 0;
- virtual FX_BOOL SetFont(CFX_Font* pFont) = 0;
- virtual FX_BOOL SetFontSize(FX_FLOAT size) = 0;
- virtual FX_BOOL SetFontStyle(int32_t style) = 0;
- virtual FX_BOOL SetFontColor(FX_ARGB color) = 0;
- virtual FX_BOOL SetTextLocation(BC_TEXT_LOC location) = 0;
- virtual FX_BOOL SetWideNarrowRatio(int32_t ratio) = 0;
- virtual FX_BOOL SetStartChar(FX_CHAR start) = 0;
- virtual FX_BOOL SetEndChar(FX_CHAR end) = 0;
- virtual FX_BOOL SetVersion(int32_t version) = 0;
- virtual FX_BOOL SetErrorCorrectionLevel(int32_t level) = 0;
- virtual FX_BOOL SetTruncated(FX_BOOL truncated) = 0;
-};
-IFX_Barcode* FX_Barcode_Create(BC_TYPE type);
-#endif
+// 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 ~IFX_Barcode() {} + virtual void Release() = 0; + virtual BC_TYPE GetType() = 0; + virtual FX_BOOL Encode(const CFX_WideStringC& contents, + FX_BOOL isDevice, + int32_t& e) = 0; + virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e) = 0; + virtual FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) = 0; + virtual CFX_WideString Decode(uint8_t* buf, + int32_t width, + int32_t height, + int32_t& errorCode) = 0; + virtual CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& errorCode) = 0; + virtual FX_BOOL SetCharEncoding(BC_CHAR_ENCODING encoding) = 0; + virtual FX_BOOL SetModuleHeight(int32_t moduleHeight) = 0; + virtual FX_BOOL SetModuleWidth(int32_t moduleWidth) = 0; + virtual FX_BOOL SetHeight(int32_t height) = 0; + virtual FX_BOOL SetWidth(int32_t width) = 0; + virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) = 0; + virtual FX_BOOL SetPrintChecksum(FX_BOOL checksum) = 0; + virtual FX_BOOL SetDataLength(int32_t length) = 0; + virtual FX_BOOL SetCalChecksum(int32_t state) = 0; + virtual FX_BOOL SetFont(CFX_Font* pFont) = 0; + virtual FX_BOOL SetFontSize(FX_FLOAT size) = 0; + virtual FX_BOOL SetFontStyle(int32_t style) = 0; + virtual FX_BOOL SetFontColor(FX_ARGB color) = 0; + virtual FX_BOOL SetTextLocation(BC_TEXT_LOC location) = 0; + virtual FX_BOOL SetWideNarrowRatio(int32_t ratio) = 0; + virtual FX_BOOL SetStartChar(FX_CHAR start) = 0; + virtual FX_BOOL SetEndChar(FX_CHAR end) = 0; + virtual FX_BOOL SetVersion(int32_t version) = 0; + virtual FX_BOOL SetErrorCorrectionLevel(int32_t 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 index 1817b72cfe..1c33d47908 100644 --- a/xfa/include/fwl/core/fwl_app.h +++ b/xfa/include/fwl/core/fwl_app.h @@ -1,40 +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_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 : public IFWL_NoteThread {
- public:
- static IFWL_App* Create(IFWL_AdapterNative* pAdapter);
-
- FWL_ERR Initialize();
- FWL_ERR Finalize();
- IFWL_AdapterNative* GetAdapterNative();
- IFWL_WidgetMgr* GetWidgetMgr();
- IFWL_ThemeProvider* GetThemeProvider();
- FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
- FWL_ERR Exit(int32_t iExitCode);
-
- private:
- IFWL_App() {}
-};
-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(const CFX_WideStringC& wsExecutable,
- const CFX_WideStringC& wsParameters);
-FWL_ERR FWL_SetFullScreen(IFWL_Widget* pWidget, FX_BOOL bFullScreen);
-FX_BOOL FWL_AppIsActived();
-#endif
+// 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 : public IFWL_NoteThread { + public: + static IFWL_App* Create(IFWL_AdapterNative* pAdapter); + + FWL_ERR Initialize(); + FWL_ERR Finalize(); + IFWL_AdapterNative* GetAdapterNative(); + IFWL_WidgetMgr* GetWidgetMgr(); + IFWL_ThemeProvider* GetThemeProvider(); + FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); + FWL_ERR Exit(int32_t iExitCode); + + private: + IFWL_App() {} +}; +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(const CFX_WideStringC& wsExecutable, + const CFX_WideStringC& wsParameters); +FWL_ERR FWL_SetFullScreen(IFWL_Widget* pWidget, FX_BOOL bFullScreen); +FX_BOOL FWL_AppIsActived(); +#endif diff --git a/xfa/include/fwl/core/fwl_content.h b/xfa/include/fwl/core/fwl_content.h index 64c4887053..3050f8724d 100644 --- a/xfa/include/fwl/core/fwl_content.h +++ b/xfa/include/fwl/core/fwl_content.h @@ -1,25 +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_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 InsertWidget(IFWL_Widget* pChild, int32_t nIndex = -1);
- FWL_ERR RemoveWidget(IFWL_Widget* pWidget);
- FWL_ERR RemoveAllWidgets();
- FWL_ERR GetMinSize(FX_FLOAT& fWidth, FX_FLOAT& fHeight);
- FWL_ERR SetMinSize(FX_FLOAT fWidth, FX_FLOAT fHeight);
- FWL_ERR GetMaxSize(FX_FLOAT& fWidth, FX_FLOAT& fHeight);
- FWL_ERR SetMaxSize(FX_FLOAT fWidth, FX_FLOAT fHeight);
-
- protected:
- IFWL_Content();
-};
-#endif
+// 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 InsertWidget(IFWL_Widget* pChild, int32_t nIndex = -1); + FWL_ERR RemoveWidget(IFWL_Widget* pWidget); + FWL_ERR RemoveAllWidgets(); + FWL_ERR GetMinSize(FX_FLOAT& fWidth, FX_FLOAT& fHeight); + FWL_ERR SetMinSize(FX_FLOAT fWidth, FX_FLOAT fHeight); + FWL_ERR GetMaxSize(FX_FLOAT& fWidth, FX_FLOAT& fHeight); + FWL_ERR SetMaxSize(FX_FLOAT fWidth, FX_FLOAT fHeight); + + protected: + IFWL_Content(); +}; +#endif diff --git a/xfa/include/fwl/core/fwl_error.h b/xfa/include/fwl/core/fwl_error.h index 5c92945289..8b4c8f4bc6 100644 --- a/xfa/include/fwl/core/fwl_error.h +++ b/xfa/include/fwl/core/fwl_error.h @@ -1,22 +1,22 @@ -// 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 XFA_INCLUDE_FWL_CORE_FWL_ERROR_H_
-#define XFA_INCLUDE_FWL_CORE_FWL_ERROR_H_
-
-#include <stdint.h>
-
-typedef int32_t FWL_ERR;
-
-#define FWL_ERR_Succeeded 0
-#define FWL_ERR_Indefinite -1
-#define FWL_ERR_Parameter_Invalid -100
-#define FWL_ERR_Property_Invalid -200
-#define FWL_ERR_Intermediate_Value__Invalid -300
-#define FWL_ERR_Method_Not_Supported -400
-#define FWL_ERR_Out_Of_Memory -500
-
-#endif // XFA_INCLUDE_FWL_CORE_FWL_ERROR_H_
+// 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 XFA_INCLUDE_FWL_CORE_FWL_ERROR_H_ +#define XFA_INCLUDE_FWL_CORE_FWL_ERROR_H_ + +#include <stdint.h> + +typedef int32_t FWL_ERR; + +#define FWL_ERR_Succeeded 0 +#define FWL_ERR_Indefinite -1 +#define FWL_ERR_Parameter_Invalid -100 +#define FWL_ERR_Property_Invalid -200 +#define FWL_ERR_Intermediate_Value__Invalid -300 +#define FWL_ERR_Method_Not_Supported -400 +#define FWL_ERR_Out_Of_Memory -500 + +#endif // XFA_INCLUDE_FWL_CORE_FWL_ERROR_H_ diff --git a/xfa/include/fwl/core/fwl_form.h b/xfa/include/fwl/core/fwl_form.h index 52a2f5c479..23a6cdd6ce 100644 --- a/xfa/include/fwl/core/fwl_form.h +++ b/xfa/include/fwl/core/fwl_form.h @@ -1,83 +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* CreateFormProxy(CFWL_WidgetImpProperties& properties,
- CFX_WideString* classname,
- IFWL_Widget* pOuter);
-
- 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();
-};
-#endif
+// 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* CreateFormProxy(CFWL_WidgetImpProperties& properties, + CFX_WideString* classname, + IFWL_Widget* pOuter); + + 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(); +}; +#endif diff --git a/xfa/include/fwl/core/fwl_grid.h b/xfa/include/fwl/core/fwl_grid.h index 168de913ba..64142cdb6a 100644 --- a/xfa/include/fwl/core/fwl_grid.h +++ b/xfa/include/fwl/core/fwl_grid.h @@ -1,83 +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_GRID_H
-#define _FWL_GRID_H
-class IFWL_Widget;
-class IFWL_Content;
-#define FWL_CLASS_Grid L"FWL_GRID"
-#define FWL_CLASSHASH_Grid 3150298670
-#define FWL_GRIDSTYLEEXT_ShowGridLines (1L << 0)
-struct FWL_LAYOUTDATA {
- FX_FLOAT fWidth;
- FX_FLOAT fHeight;
-};
-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 { void* pData; } * FWL_HGRIDCOLROW;
-class IFWL_Grid : public IFWL_Content {
- public:
- static IFWL_Grid* Create(const CFWL_WidgetImpProperties& properties);
-
- FWL_HGRIDCOLROW InsertColRow(FX_BOOL bColumn, int32_t nIndex = -1);
- int32_t CountColRows(FX_BOOL bColumn);
- FWL_HGRIDCOLROW GetColRow(FX_BOOL bColumn, int32_t nIndex);
- int32_t GetIndex(FWL_HGRIDCOLROW hColRow);
- FX_FLOAT GetSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit);
- FWL_ERR SetSize(FWL_HGRIDCOLROW hColRow, FX_FLOAT fSize, FWL_GRIDUNIT eUnit);
- FX_FLOAT GetMinSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit);
- FWL_ERR SetMinSize(FWL_HGRIDCOLROW hColRow,
- FX_FLOAT fSize,
- FWL_GRIDUNIT eUnit);
- FX_FLOAT GetMaxSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit);
- FWL_ERR SetMaxSize(FWL_HGRIDCOLROW hColRow,
- FX_FLOAT fSize,
- FWL_GRIDUNIT eUnit);
- FX_BOOL DeleteColRow(FWL_HGRIDCOLROW hColRow);
- FX_BOOL IsColumn(FWL_HGRIDCOLROW hColRow);
- int32_t GetWidgetPos(IFWL_Widget* pWidget, FX_BOOL bColumn);
- FWL_ERR SetWidgetPos(IFWL_Widget* pWidget, int32_t iPos, FX_BOOL bColumn);
- int32_t GetWidgetSpan(IFWL_Widget* pWidget, FX_BOOL bColumn);
- FWL_ERR SetWidgetSpan(IFWL_Widget* pWidget, int32_t iSpan, FX_BOOL bColumn);
- FX_FLOAT GetWidgetSize(IFWL_Widget* pWidget,
- FWL_GRIDSIZE eSize,
- FWL_GRIDUNIT& eUnit);
- FWL_ERR SetWidgetSize(IFWL_Widget* pWidget,
- FWL_GRIDSIZE eSize,
- FX_FLOAT fSize,
- FWL_GRIDUNIT eUit);
- FX_BOOL GetWidgetMargin(IFWL_Widget* pWidget,
- FWL_GRIDMARGIN eMargin,
- FX_FLOAT& fMargin);
- FWL_ERR SetWidgetMargin(IFWL_Widget* pWidget,
- FWL_GRIDMARGIN eMargin,
- FX_FLOAT fMargin);
- FWL_ERR RemoveWidgetMargin(IFWL_Widget* pWidget, FWL_GRIDMARGIN eMargin);
- FX_FLOAT GetGridSize(FWL_GRIDSIZE eSize, FWL_GRIDUNIT& eUnit);
- FWL_ERR SetGridSize(FWL_GRIDSIZE eSize, FX_FLOAT fSize, FWL_GRIDUNIT eUit);
-
- protected:
- IFWL_Grid();
-};
-#endif
+// 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; +#define FWL_CLASS_Grid L"FWL_GRID" +#define FWL_CLASSHASH_Grid 3150298670 +#define FWL_GRIDSTYLEEXT_ShowGridLines (1L << 0) +struct FWL_LAYOUTDATA { + FX_FLOAT fWidth; + FX_FLOAT fHeight; +}; +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 { void* pData; } * FWL_HGRIDCOLROW; +class IFWL_Grid : public IFWL_Content { + public: + static IFWL_Grid* Create(const CFWL_WidgetImpProperties& properties); + + FWL_HGRIDCOLROW InsertColRow(FX_BOOL bColumn, int32_t nIndex = -1); + int32_t CountColRows(FX_BOOL bColumn); + FWL_HGRIDCOLROW GetColRow(FX_BOOL bColumn, int32_t nIndex); + int32_t GetIndex(FWL_HGRIDCOLROW hColRow); + FX_FLOAT GetSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit); + FWL_ERR SetSize(FWL_HGRIDCOLROW hColRow, FX_FLOAT fSize, FWL_GRIDUNIT eUnit); + FX_FLOAT GetMinSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit); + FWL_ERR SetMinSize(FWL_HGRIDCOLROW hColRow, + FX_FLOAT fSize, + FWL_GRIDUNIT eUnit); + FX_FLOAT GetMaxSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit); + FWL_ERR SetMaxSize(FWL_HGRIDCOLROW hColRow, + FX_FLOAT fSize, + FWL_GRIDUNIT eUnit); + FX_BOOL DeleteColRow(FWL_HGRIDCOLROW hColRow); + FX_BOOL IsColumn(FWL_HGRIDCOLROW hColRow); + int32_t GetWidgetPos(IFWL_Widget* pWidget, FX_BOOL bColumn); + FWL_ERR SetWidgetPos(IFWL_Widget* pWidget, int32_t iPos, FX_BOOL bColumn); + int32_t GetWidgetSpan(IFWL_Widget* pWidget, FX_BOOL bColumn); + FWL_ERR SetWidgetSpan(IFWL_Widget* pWidget, int32_t iSpan, FX_BOOL bColumn); + FX_FLOAT GetWidgetSize(IFWL_Widget* pWidget, + FWL_GRIDSIZE eSize, + FWL_GRIDUNIT& eUnit); + FWL_ERR SetWidgetSize(IFWL_Widget* pWidget, + FWL_GRIDSIZE eSize, + FX_FLOAT fSize, + FWL_GRIDUNIT eUit); + FX_BOOL GetWidgetMargin(IFWL_Widget* pWidget, + FWL_GRIDMARGIN eMargin, + FX_FLOAT& fMargin); + FWL_ERR SetWidgetMargin(IFWL_Widget* pWidget, + FWL_GRIDMARGIN eMargin, + FX_FLOAT fMargin); + FWL_ERR RemoveWidgetMargin(IFWL_Widget* pWidget, FWL_GRIDMARGIN eMargin); + FX_FLOAT GetGridSize(FWL_GRIDSIZE eSize, FWL_GRIDUNIT& eUnit); + FWL_ERR SetGridSize(FWL_GRIDSIZE eSize, FX_FLOAT fSize, FWL_GRIDUNIT eUit); + + protected: + IFWL_Grid(); +}; +#endif diff --git a/xfa/include/fwl/core/fwl_note.h b/xfa/include/fwl/core/fwl_note.h index bd230d28cc..ef86927263 100644 --- a/xfa/include/fwl/core/fwl_note.h +++ b/xfa/include/fwl/core/fwl_note.h @@ -1,376 +1,376 @@ -// 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)
-
-// Separate hierarchy not related to IFWL_* hierarchy. These should not
-// get cast to IFWL_* types.
-class CFWL_Note {
- public:
- virtual FX_DWORD Release() {
- m_dwRefCount--;
- FX_DWORD dwRefCount = m_dwRefCount;
- if (!m_dwRefCount) {
- delete this;
- }
- return dwRefCount;
- }
- virtual CFWL_Note* Retain() {
- m_dwRefCount++;
- return this;
- }
- virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const {
- wsClass = L"CFWL_Note";
- return FWL_ERR_Succeeded;
- }
- virtual FX_DWORD GetClassID() const { return 0; }
- virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const {
- return TRUE;
- }
- virtual CFWL_Note* Clone() { return NULL; }
- FX_BOOL IsEvent() const { return m_bIsEvent; }
- IFWL_Widget* m_pSrcTarget;
- IFWL_Widget* m_pDstTarget;
-
- protected:
- CFWL_Note(FX_BOOL bIsEvent)
- : m_pSrcTarget(NULL),
- m_pDstTarget(NULL),
- m_dwRefCount(1),
- m_bIsEvent(bIsEvent),
- m_dwExtend(0) {}
- virtual ~CFWL_Note() {}
- virtual FX_BOOL Initialize() { return TRUE; }
- virtual int32_t Finalize() { return 0; }
- FX_DWORD m_dwRefCount;
- FX_BOOL m_bIsEvent;
-
- public:
- FX_DWORD m_dwExtend;
-};
-class CFWL_Message : public CFWL_Note {
- public:
- CFWL_Message() : CFWL_Note(FALSE) {}
- virtual ~CFWL_Message() {}
-};
-#define BEGIN_FWL_MESSAGE_DEF(classname, msghashcode) \
- class classname : public CFWL_Message { \
- public: \
- classname() : CFWL_Message() {} \
- virtual CFWL_Note* Clone() { return 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; }
-#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)
-int32_t m_iWidth;
-int32_t m_iHeight;
-END_FWL_MESSAGE_DEF
-BEGIN_FWL_MESSAGE_DEF(CFWL_MsgWindowMove, FWL_MSGHASH_WindowMove)
-FX_FLOAT m_fx;
-FX_FLOAT m_fy;
-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)
-int32_t m_iCommand;
-void* m_pData;
-END_FWL_EVENT_DEF
-BEGIN_FWL_EVENT_DEF(CFWL_EvtSizeChanged, FWL_EVTHASH_SizeChanged)
-IFWL_Widget* m_pWidget;
-CFX_RectF m_rtOld;
-CFX_RectF m_rtNew;
-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 ~IFWL_NoteDriver() {}
- virtual FX_BOOL SendNote(CFWL_Note* pNote) = 0;
- virtual FX_BOOL PostMessage(CFWL_Message* pMessage) = 0;
- virtual FWL_ERR RegisterEventTarget(
- IFWL_Widget* pListener,
- IFWL_Widget* pEventSource = NULL,
- FX_DWORD dwFilter = FWL_EVENT_ALL_MASK) = 0;
- virtual FWL_ERR UnregisterEventTarget(IFWL_Widget* pListener) = 0;
- virtual void ClearEventTargets(FX_BOOL bRemoveAll) = 0;
- virtual int32_t GetQueueMaxSize() const = 0;
- virtual FWL_ERR SetQueueMaxSize(const int32_t size) = 0;
- virtual IFWL_NoteThread* GetOwnerThread() const = 0;
- virtual FWL_ERR PushNoteLoop(IFWL_NoteLoop* pNoteLoop) = 0;
- virtual IFWL_NoteLoop* PopNoteLoop() = 0;
- virtual IFWL_Widget* GetFocus() = 0;
- virtual FX_BOOL SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify = FALSE) = 0;
- virtual void SetGrab(IFWL_Widget* pGrab, FX_BOOL bSet) = 0;
- virtual FWL_ERR Run() = 0;
-};
-IFWL_Widget* FWL_GetCurrentThreadModalWidget(IFWL_NoteThread* pNoteThread);
-class IFWL_NoteLoop {
- public:
- virtual ~IFWL_NoteLoop() {}
- virtual FX_BOOL PreProcessMessage(CFWL_Message* pMessage) = 0;
- virtual FWL_ERR Idle(int32_t count) = 0;
-};
-class IFWL_ToolTipTarget {
- public:
- virtual ~IFWL_ToolTipTarget() {}
- virtual IFWL_Widget* GetWidget() = 0;
- virtual FX_BOOL IsShowed() = 0;
- virtual FWL_ERR DrawToolTip(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix,
- IFWL_Widget* pToolTip) = 0;
- virtual FX_BOOL UseDefaultTheme() = 0;
- virtual FWL_ERR GetCaption(CFX_WideString& wsCaption) = 0;
- virtual FWL_ERR GetToolTipSize(CFX_SizeF& sz) = 0;
- virtual FWL_ERR GetToolTipPos(CFX_PointF& pt) { return FWL_ERR_Indefinite; }
-};
-FWL_ERR FWL_AddToolTipTarget(IFWL_ToolTipTarget* pTarget);
-FWL_ERR FWL_RemoveToolTipTarget(IFWL_ToolTipTarget* pTarget);
-FWL_ERR FWL_SetToolTipInitialDelay(int32_t iDelayTime);
-FWL_ERR FWL_SetToolTipAutoPopDelay(int32_t iDelayTime);
-typedef FX_BOOL (*FWLMessageHookCallback)(CFWL_Message* msg, void* info);
-FWL_ERR FWL_SetHook(IFWL_NoteDriver* driver,
- FWLMessageHookCallback callback,
- void* info);
-#endif
+// 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) + +// Separate hierarchy not related to IFWL_* hierarchy. These should not +// get cast to IFWL_* types. +class CFWL_Note { + public: + virtual FX_DWORD Release() { + m_dwRefCount--; + FX_DWORD dwRefCount = m_dwRefCount; + if (!m_dwRefCount) { + delete this; + } + return dwRefCount; + } + virtual CFWL_Note* Retain() { + m_dwRefCount++; + return this; + } + virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const { + wsClass = L"CFWL_Note"; + return FWL_ERR_Succeeded; + } + virtual FX_DWORD GetClassID() const { return 0; } + virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const { + return TRUE; + } + virtual CFWL_Note* Clone() { return NULL; } + FX_BOOL IsEvent() const { return m_bIsEvent; } + IFWL_Widget* m_pSrcTarget; + IFWL_Widget* m_pDstTarget; + + protected: + CFWL_Note(FX_BOOL bIsEvent) + : m_pSrcTarget(NULL), + m_pDstTarget(NULL), + m_dwRefCount(1), + m_bIsEvent(bIsEvent), + m_dwExtend(0) {} + virtual ~CFWL_Note() {} + virtual FX_BOOL Initialize() { return TRUE; } + virtual int32_t Finalize() { return 0; } + FX_DWORD m_dwRefCount; + FX_BOOL m_bIsEvent; + + public: + FX_DWORD m_dwExtend; +}; +class CFWL_Message : public CFWL_Note { + public: + CFWL_Message() : CFWL_Note(FALSE) {} + virtual ~CFWL_Message() {} +}; +#define BEGIN_FWL_MESSAGE_DEF(classname, msghashcode) \ + class classname : public CFWL_Message { \ + public: \ + classname() : CFWL_Message() {} \ + virtual CFWL_Note* Clone() { return 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; } +#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) +int32_t m_iWidth; +int32_t m_iHeight; +END_FWL_MESSAGE_DEF +BEGIN_FWL_MESSAGE_DEF(CFWL_MsgWindowMove, FWL_MSGHASH_WindowMove) +FX_FLOAT m_fx; +FX_FLOAT m_fy; +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) +int32_t m_iCommand; +void* m_pData; +END_FWL_EVENT_DEF +BEGIN_FWL_EVENT_DEF(CFWL_EvtSizeChanged, FWL_EVTHASH_SizeChanged) +IFWL_Widget* m_pWidget; +CFX_RectF m_rtOld; +CFX_RectF m_rtNew; +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 ~IFWL_NoteDriver() {} + virtual FX_BOOL SendNote(CFWL_Note* pNote) = 0; + virtual FX_BOOL PostMessage(CFWL_Message* pMessage) = 0; + virtual FWL_ERR RegisterEventTarget( + IFWL_Widget* pListener, + IFWL_Widget* pEventSource = NULL, + FX_DWORD dwFilter = FWL_EVENT_ALL_MASK) = 0; + virtual FWL_ERR UnregisterEventTarget(IFWL_Widget* pListener) = 0; + virtual void ClearEventTargets(FX_BOOL bRemoveAll) = 0; + virtual int32_t GetQueueMaxSize() const = 0; + virtual FWL_ERR SetQueueMaxSize(const int32_t size) = 0; + virtual IFWL_NoteThread* GetOwnerThread() const = 0; + virtual FWL_ERR PushNoteLoop(IFWL_NoteLoop* pNoteLoop) = 0; + virtual IFWL_NoteLoop* PopNoteLoop() = 0; + virtual IFWL_Widget* GetFocus() = 0; + virtual FX_BOOL SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify = FALSE) = 0; + virtual void SetGrab(IFWL_Widget* pGrab, FX_BOOL bSet) = 0; + virtual FWL_ERR Run() = 0; +}; +IFWL_Widget* FWL_GetCurrentThreadModalWidget(IFWL_NoteThread* pNoteThread); +class IFWL_NoteLoop { + public: + virtual ~IFWL_NoteLoop() {} + virtual FX_BOOL PreProcessMessage(CFWL_Message* pMessage) = 0; + virtual FWL_ERR Idle(int32_t count) = 0; +}; +class IFWL_ToolTipTarget { + public: + virtual ~IFWL_ToolTipTarget() {} + virtual IFWL_Widget* GetWidget() = 0; + virtual FX_BOOL IsShowed() = 0; + virtual FWL_ERR DrawToolTip(CFX_Graphics* pGraphics, + const CFX_Matrix* pMatrix, + IFWL_Widget* pToolTip) = 0; + virtual FX_BOOL UseDefaultTheme() = 0; + virtual FWL_ERR GetCaption(CFX_WideString& wsCaption) = 0; + virtual FWL_ERR GetToolTipSize(CFX_SizeF& sz) = 0; + virtual FWL_ERR GetToolTipPos(CFX_PointF& pt) { return FWL_ERR_Indefinite; } +}; +FWL_ERR FWL_AddToolTipTarget(IFWL_ToolTipTarget* pTarget); +FWL_ERR FWL_RemoveToolTipTarget(IFWL_ToolTipTarget* pTarget); +FWL_ERR FWL_SetToolTipInitialDelay(int32_t iDelayTime); +FWL_ERR FWL_SetToolTipAutoPopDelay(int32_t iDelayTime); +typedef FX_BOOL (*FWLMessageHookCallback)(CFWL_Message* msg, void* info); +FWL_ERR FWL_SetHook(IFWL_NoteDriver* driver, + FWLMessageHookCallback callback, + void* info); +#endif diff --git a/xfa/include/fwl/core/fwl_panel.h b/xfa/include/fwl/core/fwl_panel.h index 351055def7..b528ff52f2 100644 --- a/xfa/include/fwl/core/fwl_panel.h +++ b/xfa/include/fwl/core/fwl_panel.h @@ -1,40 +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(CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- IFWL_Content* GetContent();
- FWL_ERR SetContent(IFWL_Content* pContent);
-
- protected:
- IFWL_Panel();
-};
-
-class IFWL_CustomPanel : public IFWL_Widget {
- public:
- static IFWL_CustomPanel* Create(CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- IFWL_Content* GetContent();
- FWL_ERR SetContent(IFWL_Content* pContent);
- FWL_ERR SetProxy(IFWL_Proxy* pProxy);
-
- protected:
- IFWL_CustomPanel();
-};
-#endif
+// 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(CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + IFWL_Content* GetContent(); + FWL_ERR SetContent(IFWL_Content* pContent); + + protected: + IFWL_Panel(); +}; + +class IFWL_CustomPanel : public IFWL_Widget { + public: + static IFWL_CustomPanel* Create(CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + IFWL_Content* GetContent(); + FWL_ERR SetContent(IFWL_Content* pContent); + FWL_ERR SetProxy(IFWL_Proxy* pProxy); + + protected: + IFWL_CustomPanel(); +}; +#endif diff --git a/xfa/include/fwl/core/fwl_target.h b/xfa/include/fwl/core/fwl_target.h index d7be7519b5..141b296b4c 100644 --- a/xfa/include/fwl/core/fwl_target.h +++ b/xfa/include/fwl/core/fwl_target.h @@ -1,51 +1,51 @@ -// 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_
-
-#include "core/include/fxcrt/fx_basic.h"
-
-// FWL contains three parallel inheritance hierarchies, which reference each
-// other via pointers as follows:
-//
-// m_pImpl
-// (nonesuch) IFWL_Target ----------> CFWL_TargetImp
-// | |
-// A A
-// m_pIface | |
-// CFWL_Widget ----------> IFWL_Widget CFWL_WidgetImp
-// | | |
-// A A A
-// | | |
-// CFWL_... IFWL_... CFWL_...Imp
-//
-
-class CFWL_TargetImp;
-
-class IFWL_Target {
- public:
- IFWL_Target() : m_pImpl(nullptr) {}
- virtual ~IFWL_Target();
-
- // These call into equivalent polymorphic methods of m_pImpl. There
- // should be no need to override these in subclasses.
- FWL_ERR GetClassName(CFX_WideString& wsClass) const;
- FX_DWORD GetClassID() const;
- FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
- FWL_ERR Initialize();
- FWL_ERR Finalize();
-
- CFWL_TargetImp* GetImpl() const { return m_pImpl; }
-
- protected:
- void SetImpl(CFWL_TargetImp* pImpl) { m_pImpl = pImpl; }
-
- private:
- CFWL_TargetImp* m_pImpl;
-};
-
-#endif // FWL_TARGET_H_
+// 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_ + +#include "core/include/fxcrt/fx_basic.h" + +// FWL contains three parallel inheritance hierarchies, which reference each +// other via pointers as follows: +// +// m_pImpl +// (nonesuch) IFWL_Target ----------> CFWL_TargetImp +// | | +// A A +// m_pIface | | +// CFWL_Widget ----------> IFWL_Widget CFWL_WidgetImp +// | | | +// A A A +// | | | +// CFWL_... IFWL_... CFWL_...Imp +// + +class CFWL_TargetImp; + +class IFWL_Target { + public: + IFWL_Target() : m_pImpl(nullptr) {} + virtual ~IFWL_Target(); + + // These call into equivalent polymorphic methods of m_pImpl. There + // should be no need to override these in subclasses. + FWL_ERR GetClassName(CFX_WideString& wsClass) const; + FX_DWORD GetClassID() const; + FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const; + FWL_ERR Initialize(); + FWL_ERR Finalize(); + + CFWL_TargetImp* GetImpl() const { return m_pImpl; } + + protected: + void SetImpl(CFWL_TargetImp* pImpl) { m_pImpl = pImpl; } + + private: + CFWL_TargetImp* m_pImpl; +}; + +#endif // FWL_TARGET_H_ diff --git a/xfa/include/fwl/core/fwl_theme.h b/xfa/include/fwl/core/fwl_theme.h index d3704c89d1..aba5f7892e 100644 --- a/xfa/include/fwl/core/fwl_theme.h +++ b/xfa/include/fwl/core/fwl_theme.h @@ -1,82 +1,82 @@ -// 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:
- CFWL_ThemePart()
- : m_pWidget(NULL), m_iPart(0), m_dwStates(0), m_dwData(0), m_pData(NULL) {
- m_rtPart.Reset();
- m_matrix.SetIdentity();
- }
- CFX_Matrix m_matrix;
- CFX_RectF m_rtPart;
- IFWL_Widget* m_pWidget;
- int32_t m_iPart;
- FX_DWORD m_dwStates;
- FX_DWORD m_dwData;
- void* m_pData;
-};
-class CFWL_ThemeBackground : public CFWL_ThemePart {
- public:
- CFWL_ThemeBackground() : m_pGraphics(NULL), m_pImage(NULL), m_pPath(NULL) {}
- CFX_Graphics* m_pGraphics;
- CFX_DIBitmap* m_pImage;
- CFX_Path* m_pPath;
-};
-class CFWL_ThemeText : public CFWL_ThemePart {
- public:
- CFWL_ThemeText() : m_pGraphics(NULL) {}
- CFX_WideString m_wsText;
- FX_DWORD m_dwTTOStyles;
- int32_t m_iTTOAlign;
- CFX_Graphics* m_pGraphics;
-};
-class IFWL_ThemeProvider {
- public:
- virtual ~IFWL_ThemeProvider() {}
- virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget) = 0;
- virtual FX_DWORD GetThemeID(IFWL_Widget* pWidget) = 0;
- virtual FX_DWORD SetThemeID(IFWL_Widget* pWidget,
- FX_DWORD dwThemeID,
- FX_BOOL bChildren = TRUE) = 0;
- virtual FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) = 0;
- virtual FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget,
- const CFX_Matrix& matrix) = 0;
- virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) = 0;
- virtual FX_BOOL DrawText(CFWL_ThemeText* pParams) = 0;
- virtual void* GetCapacity(CFWL_ThemePart* pThemePart,
- FX_DWORD dwCapacity) = 0;
- virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) = 0;
- virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart,
- CFX_RectF& rtPart) = 0;
- virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
- virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) = 0;
-};
-#endif
+// 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: + CFWL_ThemePart() + : m_pWidget(NULL), m_iPart(0), m_dwStates(0), m_dwData(0), m_pData(NULL) { + m_rtPart.Reset(); + m_matrix.SetIdentity(); + } + CFX_Matrix m_matrix; + CFX_RectF m_rtPart; + IFWL_Widget* m_pWidget; + int32_t m_iPart; + FX_DWORD m_dwStates; + FX_DWORD m_dwData; + void* m_pData; +}; +class CFWL_ThemeBackground : public CFWL_ThemePart { + public: + CFWL_ThemeBackground() : m_pGraphics(NULL), m_pImage(NULL), m_pPath(NULL) {} + CFX_Graphics* m_pGraphics; + CFX_DIBitmap* m_pImage; + CFX_Path* m_pPath; +}; +class CFWL_ThemeText : public CFWL_ThemePart { + public: + CFWL_ThemeText() : m_pGraphics(NULL) {} + CFX_WideString m_wsText; + FX_DWORD m_dwTTOStyles; + int32_t m_iTTOAlign; + CFX_Graphics* m_pGraphics; +}; +class IFWL_ThemeProvider { + public: + virtual ~IFWL_ThemeProvider() {} + virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget) = 0; + virtual FX_DWORD GetThemeID(IFWL_Widget* pWidget) = 0; + virtual FX_DWORD SetThemeID(IFWL_Widget* pWidget, + FX_DWORD dwThemeID, + FX_BOOL bChildren = TRUE) = 0; + virtual FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) = 0; + virtual FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget, + const CFX_Matrix& matrix) = 0; + virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) = 0; + virtual FX_BOOL DrawText(CFWL_ThemeText* pParams) = 0; + virtual void* GetCapacity(CFWL_ThemePart* pThemePart, + FX_DWORD dwCapacity) = 0; + virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) = 0; + virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, + CFX_RectF& rtPart) = 0; + virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, + FX_FLOAT fx, + FX_FLOAT fy) = 0; + virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) = 0; +}; +#endif diff --git a/xfa/include/fwl/core/fwl_thread.h b/xfa/include/fwl/core/fwl_thread.h index ed1fd9fc43..0db473c062 100644 --- a/xfa/include/fwl/core/fwl_thread.h +++ b/xfa/include/fwl/core/fwl_thread.h @@ -1,51 +1,51 @@ -// 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_
-
-// The FWL thread/app code contains three parallel inheritance hierarchies,
-// which reference each other via pointers as follows:
-//
-// m_pImpl
-// (nonesuch) IFWL_Thread ----------> CFWL_ThreadImp
-// | <---------- |
-// A m_pIface A
-// | |
-// (nonesuch) IFWL_NoteThread CFWL_NoteThreadImp
-// | |
-// A A
-// m_pIface | |
-// CFWL_App --------------> IFWL_App CFWL_AppImp
-//
-
-class CFWL_ThreadImp;
-class IFWL_NoteDriver;
-
-typedef struct _FWL_HTHREAD { void* pData; } * FWL_HTHREAD;
-
-class IFWL_Thread {
- public:
- // These call into polymorphic methods in the impl; no need to override.
- void Release();
- FWL_ERR Run(FWL_HTHREAD hThread);
-
- CFWL_ThreadImp* GetImpl() const { return m_pImpl; }
- void SetImpl(CFWL_ThreadImp* pImpl) { m_pImpl = pImpl; }
-
- protected:
- virtual ~IFWL_Thread() {}
-
- private:
- CFWL_ThreadImp* m_pImpl;
-};
-
-class IFWL_NoteThread : public IFWL_Thread {
- public:
- IFWL_NoteDriver* GetNoteDriver();
-};
-
-#endif // FWL_THREAD_H_
+// 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_ + +// The FWL thread/app code contains three parallel inheritance hierarchies, +// which reference each other via pointers as follows: +// +// m_pImpl +// (nonesuch) IFWL_Thread ----------> CFWL_ThreadImp +// | <---------- | +// A m_pIface A +// | | +// (nonesuch) IFWL_NoteThread CFWL_NoteThreadImp +// | | +// A A +// m_pIface | | +// CFWL_App --------------> IFWL_App CFWL_AppImp +// + +class CFWL_ThreadImp; +class IFWL_NoteDriver; + +typedef struct _FWL_HTHREAD { void* pData; } * FWL_HTHREAD; + +class IFWL_Thread { + public: + // These call into polymorphic methods in the impl; no need to override. + void Release(); + FWL_ERR Run(FWL_HTHREAD hThread); + + CFWL_ThreadImp* GetImpl() const { return m_pImpl; } + void SetImpl(CFWL_ThreadImp* pImpl) { m_pImpl = pImpl; } + + protected: + virtual ~IFWL_Thread() {} + + private: + CFWL_ThreadImp* m_pImpl; +}; + +class IFWL_NoteThread : public IFWL_Thread { + public: + IFWL_NoteDriver* GetNoteDriver(); +}; + +#endif // FWL_THREAD_H_ diff --git a/xfa/include/fwl/core/fwl_timer.h b/xfa/include/fwl/core/fwl_timer.h index 8ed4da618c..27b2a48c5d 100644 --- a/xfa/include/fwl/core/fwl_timer.h +++ b/xfa/include/fwl/core/fwl_timer.h @@ -1,24 +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 XFA_INCLUDE_FWL_CORE_FWL_TIMER_H_
-#define XFA_INCLUDE_FWL_CORE_FWL_TIMER_H_
-
-#include "core/include/fxcrt/fx_system.h"
-
-typedef struct _FWL_HTIMER { void* pData; } * FWL_HTIMER;
-
-class IFWL_Timer {
- public:
- virtual ~IFWL_Timer() {}
- virtual int32_t Run(FWL_HTIMER hTimer) = 0;
-};
-FWL_HTIMER FWL_StartTimer(IFWL_Timer* pTimer,
- FX_DWORD dwElapse,
- FX_BOOL bImmediately = TRUE);
-int32_t FWL_StopTimer(FWL_HTIMER hTimer);
-
-#endif // XFA_INCLUDE_FWL_CORE_FWL_TIMER_H_
+// 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 XFA_INCLUDE_FWL_CORE_FWL_TIMER_H_ +#define XFA_INCLUDE_FWL_CORE_FWL_TIMER_H_ + +#include "core/include/fxcrt/fx_system.h" + +typedef struct _FWL_HTIMER { void* pData; } * FWL_HTIMER; + +class IFWL_Timer { + public: + virtual ~IFWL_Timer() {} + virtual int32_t Run(FWL_HTIMER hTimer) = 0; +}; +FWL_HTIMER FWL_StartTimer(IFWL_Timer* pTimer, + FX_DWORD dwElapse, + FX_BOOL bImmediately = TRUE); +int32_t FWL_StopTimer(FWL_HTIMER hTimer); + +#endif // XFA_INCLUDE_FWL_CORE_FWL_TIMER_H_ diff --git a/xfa/include/fwl/core/fwl_widget.h b/xfa/include/fwl/core/fwl_widget.h index 6338be9ee6..9eb8994763 100644 --- a/xfa/include/fwl/core/fwl_widget.h +++ b/xfa/include/fwl/core/fwl_widget.h @@ -1,123 +1,123 @@ -// 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 ~IFWL_DataProvider() {}
- virtual FWL_ERR GetCaption(IFWL_Widget* pWidget,
- CFX_WideString& wsCaption) = 0;
-};
-class IFWL_Widget : public IFWL_Target {
- public:
- FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
- FWL_ERR GetGlobalRect(CFX_RectF& rect);
- FWL_ERR SetWidgetRect(const CFX_RectF& rect);
- FWL_ERR GetClientRect(CFX_RectF& rect);
- IFWL_Widget* GetParent();
- FWL_ERR SetParent(IFWL_Widget* pParent);
- IFWL_Widget* GetOwner();
- FWL_ERR SetOwner(IFWL_Widget* pOwner);
- IFWL_Widget* GetOuter();
- FX_DWORD GetStyles();
- FWL_ERR ModifyStyles(FX_DWORD dwStylesAdded, FX_DWORD dwStylesRemoved);
- FX_DWORD GetStylesEx();
- FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
- FX_DWORD GetStates();
- FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE);
- FWL_ERR SetPrivateData(void* module_id,
- void* pData,
- PD_CALLBACK_FREEDATA callback);
- void* GetPrivateData(void* module_id);
- FWL_ERR Update();
- FWL_ERR LockUpdate();
- FWL_ERR UnlockUpdate();
- FX_DWORD HitTest(FX_FLOAT fx, FX_FLOAT fy);
- FWL_ERR TransformTo(IFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy);
- FWL_ERR TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt);
- FWL_ERR GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE);
- FWL_ERR SetMatrix(const CFX_Matrix& matrix);
- FWL_ERR DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix = NULL);
- IFWL_ThemeProvider* GetThemeProvider();
- FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
- FWL_ERR SetDataProvider(IFWL_DataProvider* pDataProvider);
- IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate);
- IFWL_NoteThread* GetOwnerThread() const;
- CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent);
-};
-class IFWL_WidgetDelegate {
- public:
- virtual ~IFWL_WidgetDelegate() {}
- virtual int32_t OnProcessMessage(CFWL_Message* pMessage) = 0;
- virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent) = 0;
- virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix = NULL) = 0;
-};
-class CFWL_WidgetImpProperties {
- public:
- CFWL_WidgetImpProperties() {
- m_ctmOnParent.SetIdentity();
- 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(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
-
- FWL_ERR SetProxy(IFWL_Proxy* pProxy);
-
- protected:
- IFWL_Custom();
-};
-class IFWL_Proxy {
- public:
- virtual ~IFWL_Proxy() {}
- virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) = 0;
- virtual FWL_ERR Update() = 0;
-};
-#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
+// 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 ~IFWL_DataProvider() {} + virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, + CFX_WideString& wsCaption) = 0; +}; +class IFWL_Widget : public IFWL_Target { + public: + FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); + FWL_ERR GetGlobalRect(CFX_RectF& rect); + FWL_ERR SetWidgetRect(const CFX_RectF& rect); + FWL_ERR GetClientRect(CFX_RectF& rect); + IFWL_Widget* GetParent(); + FWL_ERR SetParent(IFWL_Widget* pParent); + IFWL_Widget* GetOwner(); + FWL_ERR SetOwner(IFWL_Widget* pOwner); + IFWL_Widget* GetOuter(); + FX_DWORD GetStyles(); + FWL_ERR ModifyStyles(FX_DWORD dwStylesAdded, FX_DWORD dwStylesRemoved); + FX_DWORD GetStylesEx(); + FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved); + FX_DWORD GetStates(); + FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE); + FWL_ERR SetPrivateData(void* module_id, + void* pData, + PD_CALLBACK_FREEDATA callback); + void* GetPrivateData(void* module_id); + FWL_ERR Update(); + FWL_ERR LockUpdate(); + FWL_ERR UnlockUpdate(); + FX_DWORD HitTest(FX_FLOAT fx, FX_FLOAT fy); + FWL_ERR TransformTo(IFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy); + FWL_ERR TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt); + FWL_ERR GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE); + FWL_ERR SetMatrix(const CFX_Matrix& matrix); + FWL_ERR DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix = NULL); + IFWL_ThemeProvider* GetThemeProvider(); + FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); + FWL_ERR SetDataProvider(IFWL_DataProvider* pDataProvider); + IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); + IFWL_NoteThread* GetOwnerThread() const; + CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent); +}; +class IFWL_WidgetDelegate { + public: + virtual ~IFWL_WidgetDelegate() {} + virtual int32_t OnProcessMessage(CFWL_Message* pMessage) = 0; + virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent) = 0; + virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics, + const CFX_Matrix* pMatrix = NULL) = 0; +}; +class CFWL_WidgetImpProperties { + public: + CFWL_WidgetImpProperties() { + m_ctmOnParent.SetIdentity(); + 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(const CFWL_WidgetImpProperties& properties, + IFWL_Widget* pOuter); + + FWL_ERR SetProxy(IFWL_Proxy* pProxy); + + protected: + IFWL_Custom(); +}; +class IFWL_Proxy { + public: + virtual ~IFWL_Proxy() {} + virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) = 0; + virtual FWL_ERR Update() = 0; +}; +#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 index 6bb63b56c4..9b1eefb0fa 100644 --- a/xfa/include/fwl/core/fwl_widgetdef.h +++ b/xfa/include/fwl/core/fwl_widgetdef.h @@ -1,247 +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_HyperLink 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
+// 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_HyperLink 20 +#define FWL_WGTHITTEST_MAX 21 +#define FWL_VKEY_LButton 0x01 +#define FWL_VKEY_RButton 0x02 +#define FWL_VKEY_MButton 0x04 +#define FWL_VKEY_Back 0x08 +#define FWL_VKEY_Tab 0x09 +#define FWL_VKEY_Clear 0x0C +#define FWL_VKEY_Return 0x0D +#define FWL_VKEY_Shift 0x10 +#define FWL_VKEY_Control 0x11 +#define FWL_VKEY_Menu 0x12 +#define FWL_VKEY_Pause 0x13 +#define FWL_VKEY_Capital 0x14 +#define FWL_VKEY_Kana 0x15 +#define FWL_VKEY_Hangul 0x15 +#define FWL_VKEY_Junja 0x17 +#define FWL_VKEY_Final 0x18 +#define FWL_VKEY_Hanja 0x19 +#define FWL_VKEY_Kanji 0x19 +#define FWL_VKEY_Escape 0x1B +#define FWL_VKEY_Convert 0x1C +#define FWL_VKEY_NonConvert 0x1D +#define FWL_VKEY_Accept 0x1E +#define FWL_VKEY_ModeChange 0x1F +#define FWL_VKEY_Space 0x20 +#define FWL_VKEY_Prior 0x21 +#define FWL_VKEY_Next 0x22 +#define FWL_VKEY_End 0x23 +#define FWL_VKEY_Home 0x24 +#define FWL_VKEY_Left 0x25 +#define FWL_VKEY_Up 0x26 +#define FWL_VKEY_Right 0x27 +#define FWL_VKEY_Down 0x28 +#define FWL_VKEY_Select 0x29 +#define FWL_VKEY_Print 0x2A +#define FWL_VKEY_Execute 0x2B +#define FWL_VKEY_Snapshot 0x2C +#define FWL_VKEY_Insert 0x2D +#define FWL_VKEY_Delete 0x2E +#define FWL_VKEY_Help 0x2F +#define FWL_VKEY_0 0x30 +#define FWL_VKEY_1 0x31 +#define FWL_VKEY_2 0x32 +#define FWL_VKEY_3 0x33 +#define FWL_VKEY_4 0x34 +#define FWL_VKEY_5 0x35 +#define FWL_VKEY_6 0x36 +#define FWL_VKEY_7 0x37 +#define FWL_VKEY_8 0x38 +#define FWL_VKEY_9 0x39 +#define FWL_VKEY_A 0x41 +#define FWL_VKEY_B 0x42 +#define FWL_VKEY_C 0x43 +#define FWL_VKEY_D 0x44 +#define FWL_VKEY_E 0x45 +#define FWL_VKEY_F 0x46 +#define FWL_VKEY_G 0x47 +#define FWL_VKEY_H 0x48 +#define FWL_VKEY_I 0x49 +#define FWL_VKEY_J 0x4A +#define FWL_VKEY_K 0x4B +#define FWL_VKEY_L 0x4C +#define FWL_VKEY_M 0x4D +#define FWL_VKEY_N 0x4E +#define FWL_VKEY_O 0x4F +#define FWL_VKEY_P 0x50 +#define FWL_VKEY_Q 0x51 +#define FWL_VKEY_R 0x52 +#define FWL_VKEY_S 0x53 +#define FWL_VKEY_T 0x54 +#define FWL_VKEY_U 0x55 +#define FWL_VKEY_V 0x56 +#define FWL_VKEY_W 0x57 +#define FWL_VKEY_X 0x58 +#define FWL_VKEY_Y 0x59 +#define FWL_VKEY_Z 0x5A +#define FWL_VKEY_LWin 0x5B +#define FWL_VKEY_Command 0x5B +#define FWL_VKEY_RWin 0x5C +#define FWL_VKEY_Apps 0x5D +#define FWL_VKEY_Sleep 0x5F +#define FWL_VKEY_NumPad0 0x60 +#define FWL_VKEY_NumPad1 0x61 +#define FWL_VKEY_NumPad2 0x62 +#define FWL_VKEY_NumPad3 0x63 +#define FWL_VKEY_NumPad4 0x64 +#define FWL_VKEY_NumPad5 0x65 +#define FWL_VKEY_NumPad6 0x66 +#define FWL_VKEY_NumPad7 0x67 +#define FWL_VKEY_NumPad8 0x68 +#define FWL_VKEY_NumPad9 0x69 +#define FWL_VKEY_Multiply 0x6A +#define FWL_VKEY_Add 0x6B +#define FWL_VKEY_Separator 0x6C +#define FWL_VKEY_Subtract 0x6D +#define FWL_VKEY_Decimal 0x6E +#define FWL_VKEY_Divide 0x6F +#define FWL_VKEY_F1 0x70 +#define FWL_VKEY_F2 0x71 +#define FWL_VKEY_F3 0x72 +#define FWL_VKEY_F4 0x73 +#define FWL_VKEY_F5 0x74 +#define FWL_VKEY_F6 0x75 +#define FWL_VKEY_F7 0x76 +#define FWL_VKEY_F8 0x77 +#define FWL_VKEY_F9 0x78 +#define FWL_VKEY_F10 0x79 +#define FWL_VKEY_F11 0x7A +#define FWL_VKEY_F12 0x7B +#define FWL_VKEY_F13 0x7C +#define FWL_VKEY_F14 0x7D +#define FWL_VKEY_F15 0x7E +#define FWL_VKEY_F16 0x7F +#define FWL_VKEY_F17 0x80 +#define FWL_VKEY_F18 0x81 +#define FWL_VKEY_F19 0x82 +#define FWL_VKEY_F20 0x83 +#define FWL_VKEY_F21 0x84 +#define FWL_VKEY_F22 0x85 +#define FWL_VKEY_F23 0x86 +#define FWL_VKEY_F24 0x87 +#define FWL_VKEY_NunLock 0x90 +#define FWL_VKEY_Scroll 0x91 +#define FWL_VKEY_LShift 0xA0 +#define FWL_VKEY_RShift 0xA1 +#define FWL_VKEY_LControl 0xA2 +#define FWL_VKEY_RControl 0xA3 +#define FWL_VKEY_LMenu 0xA4 +#define FWL_VKEY_RMenu 0xA5 +#define FWL_VKEY_BROWSER_Back 0xA6 +#define FWL_VKEY_BROWSER_Forward 0xA7 +#define FWL_VKEY_BROWSER_Refresh 0xA8 +#define FWL_VKEY_BROWSER_Stop 0xA9 +#define FWL_VKEY_BROWSER_Search 0xAA +#define FWL_VKEY_BROWSER_Favorites 0xAB +#define FWL_VKEY_BROWSER_Home 0xAC +#define FWL_VKEY_VOLUME_Mute 0xAD +#define FWL_VKEY_VOLUME_Down 0xAE +#define FWL_VKEY_VOLUME_Up 0xAF +#define FWL_VKEY_MEDIA_NEXT_Track 0xB0 +#define FWL_VKEY_MEDIA_PREV_Track 0xB1 +#define FWL_VKEY_MEDIA_Stop 0xB2 +#define FWL_VKEY_MEDIA_PLAY_Pause 0xB3 +#define FWL_VKEY_MEDIA_LAUNCH_Mail 0xB4 +#define FWL_VKEY_MEDIA_LAUNCH_MEDIA_Select 0xB5 +#define FWL_VKEY_MEDIA_LAUNCH_APP1 0xB6 +#define FWL_VKEY_MEDIA_LAUNCH_APP2 0xB7 +#define FWL_VKEY_OEM_1 0xBA +#define FWL_VKEY_OEM_Plus 0xBB +#define FWL_VKEY_OEM_Comma 0xBC +#define FWL_VKEY_OEM_Minus 0xBD +#define FWL_VKEY_OEM_Period 0xBE +#define FWL_VKEY_OEM_2 0xBF +#define FWL_VKEY_OEM_3 0xC0 +#define FWL_VKEY_OEM_4 0xDB +#define FWL_VKEY_OEM_5 0xDC +#define FWL_VKEY_OEM_6 0xDD +#define FWL_VKEY_OEM_7 0xDE +#define FWL_VKEY_OEM_8 0xDF +#define FWL_VKEY_OEM_102 0xE2 +#define FWL_VKEY_ProcessKey 0xE5 +#define FWL_VKEY_Packet 0xE7 +#define FWL_VKEY_Attn 0xF6 +#define FWL_VKEY_Crsel 0xF7 +#define FWL_VKEY_Exsel 0xF8 +#define FWL_VKEY_Ereof 0xF9 +#define FWL_VKEY_Play 0xFA +#define FWL_VKEY_Zoom 0xFB +#define FWL_VKEY_NoName 0xFC +#define FWL_VKEY_PA1 0xFD +#define FWL_VKEY_OEM_Clear 0xFE +#define FWL_VKEY_Unknown 0 +#define FWL_VKEYSTATE_Toggled 0x0001 +#define FWL_VKEYSTATE_Down 0x0100 +#endif diff --git a/xfa/include/fwl/core/fwl_widgetmgr.h b/xfa/include/fwl/core/fwl_widgetmgr.h index b4d03e0ca4..c2dfefa36a 100644 --- a/xfa/include/fwl/core/fwl_widgetmgr.h +++ b/xfa/include/fwl/core/fwl_widgetmgr.h @@ -1,54 +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_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 ~IFWL_WidgetMgr() {}
- virtual int32_t CountWidgets(IFWL_Widget* pParent = NULL) = 0;
- virtual IFWL_Widget* GetWidget(int32_t nIndex,
- IFWL_Widget* pParent = NULL) = 0;
- virtual IFWL_Widget* GetWidget(IFWL_Widget* pWidget,
- FWL_WGTRELATION eRelation) = 0;
- virtual int32_t GetWidgetIndex(IFWL_Widget* pWidget) = 0;
- virtual FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex) = 0;
- virtual FWL_ERR RepaintWidget(IFWL_Widget* pWidget,
- const CFX_RectF* pRect = NULL) = 0;
- virtual FX_DWORD GetCapability() = 0;
-};
-IFWL_WidgetMgr* FWL_GetWidgetMgr();
-FX_BOOL FWL_WidgetIsChild(IFWL_Widget* parent, IFWL_Widget* find);
-#define FWL_WGTMGR_DisableThread 0x00000001
-#define FWL_WGTMGR_DisableForm 0x00000002
-class IFWL_WidgetMgrDelegate {
- public:
- virtual ~IFWL_WidgetMgrDelegate() {}
- virtual FWL_ERR OnSetCapability(
- FX_DWORD dwCapability = FWL_WGTMGR_DisableThread) = 0;
- virtual int32_t OnProcessMessageToForm(CFWL_Message* pMessage) = 0;
- virtual FWL_ERR OnDrawWidget(IFWL_Widget* pWidget,
- CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix = NULL) = 0;
-};
-FWL_ERR FWL_WidgetMgrSnapshot(IFWL_Widget* pWidget,
- const CFX_WideString* saveFile,
- const CFX_Matrix* pMatrix = NULL);
-#endif
+// 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 ~IFWL_WidgetMgr() {} + virtual int32_t CountWidgets(IFWL_Widget* pParent = NULL) = 0; + virtual IFWL_Widget* GetWidget(int32_t nIndex, + IFWL_Widget* pParent = NULL) = 0; + virtual IFWL_Widget* GetWidget(IFWL_Widget* pWidget, + FWL_WGTRELATION eRelation) = 0; + virtual int32_t GetWidgetIndex(IFWL_Widget* pWidget) = 0; + virtual FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex) = 0; + virtual FWL_ERR RepaintWidget(IFWL_Widget* pWidget, + const CFX_RectF* pRect = NULL) = 0; + virtual FX_DWORD GetCapability() = 0; +}; +IFWL_WidgetMgr* FWL_GetWidgetMgr(); +FX_BOOL FWL_WidgetIsChild(IFWL_Widget* parent, IFWL_Widget* find); +#define FWL_WGTMGR_DisableThread 0x00000001 +#define FWL_WGTMGR_DisableForm 0x00000002 +class IFWL_WidgetMgrDelegate { + public: + virtual ~IFWL_WidgetMgrDelegate() {} + virtual FWL_ERR OnSetCapability( + FX_DWORD dwCapability = FWL_WGTMGR_DisableThread) = 0; + virtual int32_t OnProcessMessageToForm(CFWL_Message* pMessage) = 0; + virtual FWL_ERR OnDrawWidget(IFWL_Widget* pWidget, + CFX_Graphics* pGraphics, + const CFX_Matrix* pMatrix = NULL) = 0; +}; +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 index 8b99cc116f..f0b4b1519a 100644 --- a/xfa/include/fwl/fwl.h +++ b/xfa/include/fwl/fwl.h @@ -1,78 +1,78 @@ -// 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
-
-// TODO(thestig): Remove this file and do IWYU.
-
-#ifndef _FWL_H
-#define _FWL_H
-#include "xfa/include/fwl/core/fwl_error.h"
-#include "xfa/include/fwl/core/fwl_target.h"
-#include "xfa/include/fwl/core/fwl_thread.h"
-#include "xfa/include/fwl/core/fwl_note.h"
-#include "xfa/include/fwl/core/fwl_widgetdef.h"
-#include "xfa/include/fwl/core/fwl_theme.h"
-#include "xfa/include/fwl/core/fwl_widget.h"
-#include "xfa/include/fwl/core/fwl_content.h"
-#include "xfa/include/fwl/core/fwl_panel.h"
-#include "xfa/include/fwl/core/fwl_form.h"
-#include "xfa/include/fwl/core/fwl_widgetmgr.h"
-#include "xfa/include/fwl/core/fwl_timer.h"
-#include "xfa/include/fwl/core/fwl_app.h"
-#include "xfa/include/fwl/core/fwl_grid.h"
-#include "xfa/include/fwl/basewidget/fwl_pushbutton.h"
-#include "xfa/include/fwl/basewidget/fwl_checkbox.h"
-#include "xfa/include/fwl/basewidget/fwl_scrollbar.h"
-#include "xfa/include/fwl/basewidget/fwl_listbox.h"
-#include "xfa/include/fwl/basewidget/fwl_edit.h"
-#include "xfa/include/fwl/basewidget/fwl_picturebox.h"
-#include "xfa/include/fwl/basewidget/fwl_combobox.h"
-#include "xfa/include/fwl/basewidget/fwl_menu.h"
-#include "xfa/include/fwl/basewidget/fwl_monthcalendar.h"
-#include "xfa/include/fwl/basewidget/fwl_datetimepicker.h"
-#include "xfa/include/fwl/basewidget/fwl_spinbutton.h"
-#include "xfa/include/fwl/basewidget/fwl_barcode.h"
-#include "xfa/include/fwl/basewidget/fxmath_barcode.h"
-#include "xfa/include/fwl/basewidget/fwl_tooltipctrl.h"
-#include "xfa/include/fwl/basewidget/fwl_caret.h"
-#include "xfa/include/fwl/lightwidget/app.h"
-#include "xfa/include/fwl/lightwidget/widget.h"
-#include "xfa/include/fwl/lightwidget/pushbutton.h"
-#include "xfa/include/fwl/lightwidget/checkbox.h"
-#include "xfa/include/fwl/lightwidget/scrollbar.h"
-#include "xfa/include/fwl/lightwidget/listbox.h"
-#include "xfa/include/fwl/lightwidget/picturebox.h"
-#include "xfa/include/fwl/lightwidget/edit.h"
-#include "xfa/include/fwl/lightwidget/combobox.h"
-#include "xfa/include/fwl/lightwidget/datetimepicker.h"
-#include "xfa/include/fwl/lightwidget/barcode.h"
-#include "xfa/include/fwl/lightwidget/theme.h"
-#include "xfa/include/fwl/lightwidget/tooltipctrl.h"
-#include "xfa/include/fwl/lightwidget/caret.h"
-#include "xfa/include/fwl/theme/utils.h"
-#include "xfa/include/fwl/theme/widgettp.h"
-#include "xfa/include/fwl/theme/barcodetp.h"
-#include "xfa/include/fwl/theme/checkboxtp.h"
-#include "xfa/include/fwl/theme/comboboxtp.h"
-#include "xfa/include/fwl/theme/datetimepickertp.h"
-#include "xfa/include/fwl/theme/edittp.h"
-#include "xfa/include/fwl/theme/formtp.h"
-#include "xfa/include/fwl/theme/listboxtp.h"
-#include "xfa/include/fwl/theme/monthcalendartp.h"
-#include "xfa/include/fwl/theme/pictureboxtp.h"
-#include "xfa/include/fwl/theme/pushbuttontp.h"
-#include "xfa/include/fwl/theme/scrollbartp.h"
-#include "xfa/include/fwl/theme/widgettp.h"
-#include "xfa/include/fwl/theme/barcodetp.h"
-#include "xfa/include/fwl/theme/carettp.h"
-#include "xfa/include/fwl/adapter/fwl_adapternative.h"
-#include "xfa/include/fwl/adapter/fwl_adapterthreadmgr.h"
-#include "xfa/include/fwl/adapter/fwl_adaptertimermgr.h"
-#include "xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h"
-#include "xfa/include/fwl/adapter/fwl_adaptercursormgr.h"
-#include "xfa/include/fwl/adapter/fwl_adaptermonitormgr.h"
-#include "xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h"
-#include "xfa/include/fwl/adapter/fwl_sdadapterimp.h"
-#endif
+// 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 + +// TODO(thestig): Remove this file and do IWYU. + +#ifndef _FWL_H +#define _FWL_H +#include "xfa/include/fwl/core/fwl_error.h" +#include "xfa/include/fwl/core/fwl_target.h" +#include "xfa/include/fwl/core/fwl_thread.h" +#include "xfa/include/fwl/core/fwl_note.h" +#include "xfa/include/fwl/core/fwl_widgetdef.h" +#include "xfa/include/fwl/core/fwl_theme.h" +#include "xfa/include/fwl/core/fwl_widget.h" +#include "xfa/include/fwl/core/fwl_content.h" +#include "xfa/include/fwl/core/fwl_panel.h" +#include "xfa/include/fwl/core/fwl_form.h" +#include "xfa/include/fwl/core/fwl_widgetmgr.h" +#include "xfa/include/fwl/core/fwl_timer.h" +#include "xfa/include/fwl/core/fwl_app.h" +#include "xfa/include/fwl/core/fwl_grid.h" +#include "xfa/include/fwl/basewidget/fwl_pushbutton.h" +#include "xfa/include/fwl/basewidget/fwl_checkbox.h" +#include "xfa/include/fwl/basewidget/fwl_scrollbar.h" +#include "xfa/include/fwl/basewidget/fwl_listbox.h" +#include "xfa/include/fwl/basewidget/fwl_edit.h" +#include "xfa/include/fwl/basewidget/fwl_picturebox.h" +#include "xfa/include/fwl/basewidget/fwl_combobox.h" +#include "xfa/include/fwl/basewidget/fwl_menu.h" +#include "xfa/include/fwl/basewidget/fwl_monthcalendar.h" +#include "xfa/include/fwl/basewidget/fwl_datetimepicker.h" +#include "xfa/include/fwl/basewidget/fwl_spinbutton.h" +#include "xfa/include/fwl/basewidget/fwl_barcode.h" +#include "xfa/include/fwl/basewidget/fxmath_barcode.h" +#include "xfa/include/fwl/basewidget/fwl_tooltipctrl.h" +#include "xfa/include/fwl/basewidget/fwl_caret.h" +#include "xfa/include/fwl/lightwidget/app.h" +#include "xfa/include/fwl/lightwidget/widget.h" +#include "xfa/include/fwl/lightwidget/pushbutton.h" +#include "xfa/include/fwl/lightwidget/checkbox.h" +#include "xfa/include/fwl/lightwidget/scrollbar.h" +#include "xfa/include/fwl/lightwidget/listbox.h" +#include "xfa/include/fwl/lightwidget/picturebox.h" +#include "xfa/include/fwl/lightwidget/edit.h" +#include "xfa/include/fwl/lightwidget/combobox.h" +#include "xfa/include/fwl/lightwidget/datetimepicker.h" +#include "xfa/include/fwl/lightwidget/barcode.h" +#include "xfa/include/fwl/lightwidget/theme.h" +#include "xfa/include/fwl/lightwidget/tooltipctrl.h" +#include "xfa/include/fwl/lightwidget/caret.h" +#include "xfa/include/fwl/theme/utils.h" +#include "xfa/include/fwl/theme/widgettp.h" +#include "xfa/include/fwl/theme/barcodetp.h" +#include "xfa/include/fwl/theme/checkboxtp.h" +#include "xfa/include/fwl/theme/comboboxtp.h" +#include "xfa/include/fwl/theme/datetimepickertp.h" +#include "xfa/include/fwl/theme/edittp.h" +#include "xfa/include/fwl/theme/formtp.h" +#include "xfa/include/fwl/theme/listboxtp.h" +#include "xfa/include/fwl/theme/monthcalendartp.h" +#include "xfa/include/fwl/theme/pictureboxtp.h" +#include "xfa/include/fwl/theme/pushbuttontp.h" +#include "xfa/include/fwl/theme/scrollbartp.h" +#include "xfa/include/fwl/theme/widgettp.h" +#include "xfa/include/fwl/theme/barcodetp.h" +#include "xfa/include/fwl/theme/carettp.h" +#include "xfa/include/fwl/adapter/fwl_adapternative.h" +#include "xfa/include/fwl/adapter/fwl_adapterthreadmgr.h" +#include "xfa/include/fwl/adapter/fwl_adaptertimermgr.h" +#include "xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h" +#include "xfa/include/fwl/adapter/fwl_adaptercursormgr.h" +#include "xfa/include/fwl/adapter/fwl_adaptermonitormgr.h" +#include "xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h" +#include "xfa/include/fwl/adapter/fwl_sdadapterimp.h" +#endif diff --git a/xfa/include/fwl/lightwidget/app.h b/xfa/include/fwl/lightwidget/app.h index 053bc61c99..5a8cc89775 100644 --- a/xfa/include/fwl/lightwidget/app.h +++ b/xfa/include/fwl/lightwidget/app.h @@ -1,28 +1,28 @@ -// 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_LIGHTWIDGET_APP_H_
-#define FWL_LIGHTWIDGET_APP_H_
-
-class CFWL_Theme;
-class IFWL_App;
-
-class CFWL_App {
- public:
- CFWL_App();
- virtual ~CFWL_App();
-
- FWL_ERR Initialize();
- FWL_ERR Exit(int32_t iExitCode);
-
- CFWL_Theme* GetTheme() const { return m_pTheme; }
- IFWL_App* GetInterface() const { return m_pIface; }
-
- private:
- IFWL_App* m_pIface;
- CFWL_Theme* m_pTheme;
-};
-#endif // FWL_LIGHTWIDGET_APP_H_
+// 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_LIGHTWIDGET_APP_H_ +#define FWL_LIGHTWIDGET_APP_H_ + +class CFWL_Theme; +class IFWL_App; + +class CFWL_App { + public: + CFWL_App(); + virtual ~CFWL_App(); + + FWL_ERR Initialize(); + FWL_ERR Exit(int32_t iExitCode); + + CFWL_Theme* GetTheme() const { return m_pTheme; } + IFWL_App* GetInterface() const { return m_pIface; } + + private: + IFWL_App* m_pIface; + CFWL_Theme* m_pTheme; +}; +#endif // FWL_LIGHTWIDGET_APP_H_ diff --git a/xfa/include/fwl/lightwidget/barcode.h b/xfa/include/fwl/lightwidget/barcode.h index 40c767dff8..99a3713955 100644 --- a/xfa/include/fwl/lightwidget/barcode.h +++ b/xfa/include/fwl/lightwidget/barcode.h @@ -1,117 +1,117 @@ -// 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(int32_t height) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT;
- m_barcodeData.m_nModuleHeight = height;
- }
- void SetModuleWidth(int32_t width) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEWIDTH;
- m_barcodeData.m_nModuleWidth = width;
- }
- void SetDataLength(int32_t dataLength) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_DATALENGTH;
- m_barcodeData.m_nDataLength = dataLength;
- static_cast<IFWL_Barcode*>(m_pIface)->SetLimit(dataLength);
- }
- void SetCalChecksum(int32_t calChecksum) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CALCHECKSUM;
- m_barcodeData.m_nCalChecksum = calChecksum;
- }
- void SetPrintChecksum(FX_BOOL printChecksum) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_PRINTCHECKSUM;
- m_barcodeData.m_bPrintChecksum = printChecksum;
- }
- void SetTextLocation(BC_TEXT_LOC location) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TEXTLOCATION;
- m_barcodeData.m_eTextLocation = location;
- }
- void SetWideNarrowRatio(int32_t ratio) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_WIDENARROWRATIO;
- m_barcodeData.m_nWideNarrowRatio = ratio;
- }
- void SetStartChar(FX_CHAR startChar) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_STARTCHAR;
- m_barcodeData.m_cStartChar = startChar;
- }
- void SetEndChar(FX_CHAR endChar) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ENDCHAR;
- m_barcodeData.m_cEndChar = endChar;
- }
- void SetVersion(int32_t version) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_VERSION;
- m_barcodeData.m_nVersion = version;
- }
- void SetErrorCorrectionLevel(int32_t ecLevel) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ECLEVEL;
- m_barcodeData.m_nECLevel = ecLevel;
- }
- void SetTruncated(FX_BOOL truncated) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED;
- m_barcodeData.m_bTruncated = truncated;
- }
- void ResetBarcodeAttributes() { m_barcodeData.m_dwAttributeMask = 0; }
-
- protected:
- CFWL_Barcode();
- virtual ~CFWL_Barcode();
- class CFWL_BarcodeDP : public IFWL_BarcodeDP {
- public:
- virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
- BC_CHAR_ENCODING m_eCharEncoding;
- virtual BC_CHAR_ENCODING GetCharEncoding() { return m_eCharEncoding; }
- int32_t m_nModuleHeight, m_nModuleWidth;
- virtual int32_t GetModuleHeight() { return m_nModuleHeight; }
- virtual int32_t GetModuleWidth() { return m_nModuleWidth; }
- int32_t m_nDataLength;
- virtual int32_t GetDataLength() { return m_nDataLength; }
- int32_t m_nCalChecksum;
- virtual int32_t GetCalChecksum() { return m_nCalChecksum; }
- FX_BOOL m_bPrintChecksum;
- virtual FX_BOOL GetPrintChecksum() { return m_bPrintChecksum; }
-
- BC_TEXT_LOC m_eTextLocation;
- virtual BC_TEXT_LOC GetTextLocation() { return m_eTextLocation; }
- int32_t m_nWideNarrowRatio;
- virtual int32_t GetWideNarrowRatio() { return m_nWideNarrowRatio; }
- FX_CHAR m_cStartChar, m_cEndChar;
- virtual FX_CHAR GetStartChar() { return m_cStartChar; }
- virtual FX_CHAR GetEndChar() { return m_cEndChar; }
- int32_t m_nVersion;
- virtual int32_t GetVersion() { return m_nVersion; }
- int32_t m_nECLevel;
- virtual int32_t GetErrorCorrectionLevel() { return m_nECLevel; }
- FX_BOOL m_bTruncated;
- virtual FX_BOOL GetTruncated() { return m_bTruncated; }
- FX_DWORD m_dwAttributeMask;
- virtual FX_DWORD GetBarcodeAttributeMask() { return m_dwAttributeMask; }
-
- public:
- CFWL_BarcodeDP() : m_dwAttributeMask(0) {}
- };
- CFWL_BarcodeDP m_barcodeData;
-};
-#endif
+// 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(int32_t height) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT; + m_barcodeData.m_nModuleHeight = height; + } + void SetModuleWidth(int32_t width) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEWIDTH; + m_barcodeData.m_nModuleWidth = width; + } + void SetDataLength(int32_t dataLength) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_DATALENGTH; + m_barcodeData.m_nDataLength = dataLength; + static_cast<IFWL_Barcode*>(m_pIface)->SetLimit(dataLength); + } + void SetCalChecksum(int32_t calChecksum) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CALCHECKSUM; + m_barcodeData.m_nCalChecksum = calChecksum; + } + void SetPrintChecksum(FX_BOOL printChecksum) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_PRINTCHECKSUM; + m_barcodeData.m_bPrintChecksum = printChecksum; + } + void SetTextLocation(BC_TEXT_LOC location) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TEXTLOCATION; + m_barcodeData.m_eTextLocation = location; + } + void SetWideNarrowRatio(int32_t ratio) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_WIDENARROWRATIO; + m_barcodeData.m_nWideNarrowRatio = ratio; + } + void SetStartChar(FX_CHAR startChar) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_STARTCHAR; + m_barcodeData.m_cStartChar = startChar; + } + void SetEndChar(FX_CHAR endChar) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ENDCHAR; + m_barcodeData.m_cEndChar = endChar; + } + void SetVersion(int32_t version) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_VERSION; + m_barcodeData.m_nVersion = version; + } + void SetErrorCorrectionLevel(int32_t ecLevel) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ECLEVEL; + m_barcodeData.m_nECLevel = ecLevel; + } + void SetTruncated(FX_BOOL truncated) { + m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED; + m_barcodeData.m_bTruncated = truncated; + } + void ResetBarcodeAttributes() { m_barcodeData.m_dwAttributeMask = 0; } + + protected: + CFWL_Barcode(); + virtual ~CFWL_Barcode(); + class CFWL_BarcodeDP : public IFWL_BarcodeDP { + public: + virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption); + BC_CHAR_ENCODING m_eCharEncoding; + virtual BC_CHAR_ENCODING GetCharEncoding() { return m_eCharEncoding; } + int32_t m_nModuleHeight, m_nModuleWidth; + virtual int32_t GetModuleHeight() { return m_nModuleHeight; } + virtual int32_t GetModuleWidth() { return m_nModuleWidth; } + int32_t m_nDataLength; + virtual int32_t GetDataLength() { return m_nDataLength; } + int32_t m_nCalChecksum; + virtual int32_t GetCalChecksum() { return m_nCalChecksum; } + FX_BOOL m_bPrintChecksum; + virtual FX_BOOL GetPrintChecksum() { return m_bPrintChecksum; } + + BC_TEXT_LOC m_eTextLocation; + virtual BC_TEXT_LOC GetTextLocation() { return m_eTextLocation; } + int32_t m_nWideNarrowRatio; + virtual int32_t GetWideNarrowRatio() { return m_nWideNarrowRatio; } + FX_CHAR m_cStartChar, m_cEndChar; + virtual FX_CHAR GetStartChar() { return m_cStartChar; } + virtual FX_CHAR GetEndChar() { return m_cEndChar; } + int32_t m_nVersion; + virtual int32_t GetVersion() { return m_nVersion; } + int32_t m_nECLevel; + virtual int32_t GetErrorCorrectionLevel() { return m_nECLevel; } + FX_BOOL m_bTruncated; + virtual FX_BOOL GetTruncated() { return m_bTruncated; } + FX_DWORD m_dwAttributeMask; + virtual FX_DWORD GetBarcodeAttributeMask() { return m_dwAttributeMask; } + + public: + CFWL_BarcodeDP() : m_dwAttributeMask(0) {} + }; + CFWL_BarcodeDP m_barcodeData; +}; +#endif diff --git a/xfa/include/fwl/lightwidget/caret.h b/xfa/include/fwl/lightwidget/caret.h index 534dca5b01..d7284dff43 100644 --- a/xfa/include/fwl/lightwidget/caret.h +++ b/xfa/include/fwl/lightwidget/caret.h @@ -1,25 +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
+// 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 index 1365188ac3..c0d5aaaa55 100644 --- a/xfa/include/fwl/lightwidget/checkbox.h +++ b/xfa/include/fwl/lightwidget/checkbox.h @@ -1,38 +1,38 @@ -// 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(const CFX_WideStringC& wsCaption);
- FWL_ERR SetBoxSize(FX_FLOAT fHeight);
- int32_t GetCheckState();
- FWL_ERR SetCheckState(int32_t iCheck);
- CFWL_CheckBox();
- virtual ~CFWL_CheckBox();
-
- protected:
- class CFWL_CheckBoxDP : public IFWL_CheckBoxDP {
- public:
- CFWL_CheckBoxDP();
- virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
- virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget);
- FX_FLOAT m_fBoxHeight;
- CFX_WideString m_wsCaption;
- };
- CFWL_CheckBoxDP m_checkboxData;
-};
-#endif
+// 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(const CFX_WideStringC& wsCaption); + FWL_ERR SetBoxSize(FX_FLOAT fHeight); + int32_t GetCheckState(); + FWL_ERR SetCheckState(int32_t iCheck); + CFWL_CheckBox(); + virtual ~CFWL_CheckBox(); + + protected: + class CFWL_CheckBoxDP : public IFWL_CheckBoxDP { + public: + CFWL_CheckBoxDP(); + virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption); + virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget); + FX_FLOAT m_fBoxHeight; + CFX_WideString m_wsCaption; + }; + CFWL_CheckBoxDP m_checkboxData; +}; +#endif diff --git a/xfa/include/fwl/lightwidget/combobox.h b/xfa/include/fwl/lightwidget/combobox.h index cb8ef703dc..971c64b1bb 100644 --- a/xfa/include/fwl/lightwidget/combobox.h +++ b/xfa/include/fwl/lightwidget/combobox.h @@ -1,136 +1,136 @@ -// 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);
- int32_t AddString(const CFX_WideStringC& wsText);
- int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon);
- int32_t RemoveAt(int32_t iIndex);
- int32_t RemoveAll();
- int32_t CountItems();
- FWL_ERR GetTextByIndex(int32_t iIndex, CFX_WideString& wsText);
- int32_t GetCurSel();
- FWL_ERR SetCurSel(int32_t iSel);
- FWL_ERR SetEditText(const CFX_WideStringC& wsText);
- int32_t GetEditTextLength() const;
- FWL_ERR GetEditText(CFX_WideString& wsText,
- int32_t nStart = 0,
- int32_t nCount = -1) const;
- FWL_ERR SetEditSelRange(int32_t nStart, int32_t nCount = -1);
- int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart);
- int32_t GetEditLimit();
- FWL_ERR SetEditLimit(int32_t nLimit);
- FWL_ERR EditDoClipboard(int32_t iCmd);
- FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord);
- FX_BOOL EditUndo(const CFX_ByteStringC& bsRecord);
- FWL_ERR SetMaxListHeight(FX_FLOAT fMaxHeight);
- FWL_ERR SetItemData(int32_t iIndex, void* pData);
- void* GetItemData(int32_t iIndex);
- FWL_ERR SetListTheme(IFWL_ThemeProvider* pTheme);
- FX_BOOL AfterFocusShowDropList();
- FWL_ERR OpenDropDownList(FX_BOOL bActivate);
-
- public:
- FX_BOOL EditCanUndo();
- FX_BOOL EditCanRedo();
- FX_BOOL EditUndo();
- FX_BOOL EditRedo();
- FX_BOOL EditCanCopy();
- FX_BOOL EditCanCut();
- FX_BOOL EditCanSelectAll();
- FX_BOOL EditCopy(CFX_WideString& wsCopy);
- FX_BOOL EditCut(CFX_WideString& wsCut);
- FX_BOOL EditPaste(const CFX_WideString& wsPaste);
- FX_BOOL EditSelectAll();
- FX_BOOL EditDelete();
- FX_BOOL EditDeSelect();
- FWL_ERR GetBBox(CFX_RectF& rect);
- FWL_ERR EditModifyStylesEx(FX_DWORD dwStylesExAdded,
- FX_DWORD dwStylesExRemoved);
- CFWL_ComboBox();
- virtual ~CFWL_ComboBox();
-
- protected:
- class CFWL_ComboBoxDP : public IFWL_ComboBoxDP {
- public:
- CFWL_ComboBoxDP();
- ~CFWL_ComboBoxDP();
- virtual FWL_ERR GetCaption(IFWL_Widget* pWidget,
- CFX_WideString& wsCaption) {
- return FWL_ERR_Succeeded;
- }
-
- virtual int32_t CountItems(IFWL_Widget* pWidget);
- virtual FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex);
- virtual int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
- virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- int32_t nIndex);
-
- virtual FX_DWORD GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR GetItemText(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_WideString& wsText);
- virtual FWL_ERR GetItemRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_RectF& rtItem);
- virtual void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR SetItemStyles(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- FX_DWORD dwStyle);
- virtual FWL_ERR SetItemText(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const FX_WCHAR* pszText);
- virtual FWL_ERR SetItemRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const CFX_RectF& rtItem);
- virtual FX_FLOAT GetItemHeight(IFWL_Widget* pWidget);
- virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem);
- virtual FWL_ERR GetItemCheckRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_RectF& rtCheck);
- virtual FWL_ERR SetItemCheckRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const CFX_RectF& rtCheck);
- virtual FX_DWORD GetItemCheckState(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem);
- virtual FWL_ERR SetItemCheckState(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- FX_DWORD dwCheckState);
- virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget);
-
- CFX_PtrArray m_arrItem;
- FX_FLOAT m_fMaxListHeight;
- FX_FLOAT m_fItemHeight;
- };
- CFWL_ComboBoxDP m_comboBoxData;
-};
-class CFWL_ComboBoxItem {
- public:
- CFWL_ComboBoxItem() {
- m_pDIB = NULL;
- m_pData = NULL;
- }
- CFX_RectF m_rtItem;
- FX_DWORD m_dwStyles;
- CFX_WideString m_wsText;
- CFX_DIBitmap* m_pDIB;
- FX_DWORD m_dwCheckState;
- CFX_RectF m_rtCheckBox;
- void* m_pData;
-};
-#endif
+// 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); + int32_t AddString(const CFX_WideStringC& wsText); + int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon); + int32_t RemoveAt(int32_t iIndex); + int32_t RemoveAll(); + int32_t CountItems(); + FWL_ERR GetTextByIndex(int32_t iIndex, CFX_WideString& wsText); + int32_t GetCurSel(); + FWL_ERR SetCurSel(int32_t iSel); + FWL_ERR SetEditText(const CFX_WideStringC& wsText); + int32_t GetEditTextLength() const; + FWL_ERR GetEditText(CFX_WideString& wsText, + int32_t nStart = 0, + int32_t nCount = -1) const; + FWL_ERR SetEditSelRange(int32_t nStart, int32_t nCount = -1); + int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart); + int32_t GetEditLimit(); + FWL_ERR SetEditLimit(int32_t nLimit); + FWL_ERR EditDoClipboard(int32_t iCmd); + FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord); + FX_BOOL EditUndo(const CFX_ByteStringC& bsRecord); + FWL_ERR SetMaxListHeight(FX_FLOAT fMaxHeight); + FWL_ERR SetItemData(int32_t iIndex, void* pData); + void* GetItemData(int32_t iIndex); + FWL_ERR SetListTheme(IFWL_ThemeProvider* pTheme); + FX_BOOL AfterFocusShowDropList(); + FWL_ERR OpenDropDownList(FX_BOOL bActivate); + + public: + FX_BOOL EditCanUndo(); + FX_BOOL EditCanRedo(); + FX_BOOL EditUndo(); + FX_BOOL EditRedo(); + FX_BOOL EditCanCopy(); + FX_BOOL EditCanCut(); + FX_BOOL EditCanSelectAll(); + FX_BOOL EditCopy(CFX_WideString& wsCopy); + FX_BOOL EditCut(CFX_WideString& wsCut); + FX_BOOL EditPaste(const CFX_WideString& wsPaste); + FX_BOOL EditSelectAll(); + FX_BOOL EditDelete(); + FX_BOOL EditDeSelect(); + FWL_ERR GetBBox(CFX_RectF& rect); + FWL_ERR EditModifyStylesEx(FX_DWORD dwStylesExAdded, + FX_DWORD dwStylesExRemoved); + CFWL_ComboBox(); + virtual ~CFWL_ComboBox(); + + protected: + class CFWL_ComboBoxDP : public IFWL_ComboBoxDP { + public: + CFWL_ComboBoxDP(); + ~CFWL_ComboBoxDP(); + virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, + CFX_WideString& wsCaption) { + return FWL_ERR_Succeeded; + } + + virtual int32_t CountItems(IFWL_Widget* pWidget); + virtual FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex); + virtual int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem); + virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + int32_t nIndex); + + virtual FX_DWORD GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem); + virtual FWL_ERR GetItemText(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + CFX_WideString& wsText); + virtual FWL_ERR GetItemRect(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + CFX_RectF& rtItem); + virtual void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem); + virtual FWL_ERR SetItemStyles(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + FX_DWORD dwStyle); + virtual FWL_ERR SetItemText(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + const FX_WCHAR* pszText); + virtual FWL_ERR SetItemRect(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + const CFX_RectF& rtItem); + virtual FX_FLOAT GetItemHeight(IFWL_Widget* pWidget); + virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem); + virtual FWL_ERR GetItemCheckRect(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + CFX_RectF& rtCheck); + virtual FWL_ERR SetItemCheckRect(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + const CFX_RectF& rtCheck); + virtual FX_DWORD GetItemCheckState(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem); + virtual FWL_ERR SetItemCheckState(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + FX_DWORD dwCheckState); + virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget); + + CFX_PtrArray m_arrItem; + FX_FLOAT m_fMaxListHeight; + FX_FLOAT m_fItemHeight; + }; + CFWL_ComboBoxDP m_comboBoxData; +}; +class CFWL_ComboBoxItem { + public: + CFWL_ComboBoxItem() { + m_pDIB = NULL; + m_pData = NULL; + } + CFX_RectF m_rtItem; + FX_DWORD m_dwStyles; + CFX_WideString m_wsText; + CFX_DIBitmap* m_pDIB; + FX_DWORD m_dwCheckState; + CFX_RectF m_rtCheckBox; + void* m_pData; +}; +#endif diff --git a/xfa/include/fwl/lightwidget/datetimepicker.h b/xfa/include/fwl/lightwidget/datetimepicker.h index 21bdd612d0..6b7a6b017c 100644 --- a/xfa/include/fwl/lightwidget/datetimepicker.h +++ b/xfa/include/fwl/lightwidget/datetimepicker.h @@ -1,61 +1,61 @@ -// 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(int32_t iYear, int32_t iMonth, int32_t iDay);
- FWL_ERR GetEditText(CFX_WideString& wsText);
- FWL_ERR SetEditText(const CFX_WideStringC& wsText);
- int32_t CountSelRanges();
- int32_t GetSelRange(int32_t nIndex, int32_t& nStart);
- FWL_ERR GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay);
- FWL_ERR SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay);
- FX_BOOL CanUndo();
- FX_BOOL CanRedo();
- FX_BOOL Undo();
- FX_BOOL Redo();
- FX_BOOL CanCopy();
- FX_BOOL CanCut();
- FX_BOOL CanSelectAll();
- FX_BOOL Copy(CFX_WideString& wsCopy);
- FX_BOOL Cut(CFX_WideString& wsCut);
- FX_BOOL Paste(const CFX_WideString& wsPaste);
- FX_BOOL SelectAll();
- FX_BOOL Delete();
- FX_BOOL DeSelect();
- FWL_ERR GetBBox(CFX_RectF& rect);
- FWL_ERR SetEditLimit(int32_t nLimit);
- FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded,
- FX_DWORD dwStylesExRemoved);
-
- protected:
- CFWL_DateTimePicker();
- virtual ~CFWL_DateTimePicker();
- class CFWL_DateTimePickerDP : public IFWL_DateTimePickerDP {
- public:
- CFWL_DateTimePickerDP();
- virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
- virtual FWL_ERR GetToday(IFWL_Widget* pWidget,
- int32_t& iYear,
- int32_t& iMonth,
- int32_t& iDay);
- int32_t m_iYear;
- int32_t m_iMonth;
- int32_t m_iDay;
- CFX_WideString m_wsData;
- };
- CFWL_DateTimePickerDP m_DateTimePickerDP;
-};
-#endif
+// 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(int32_t iYear, int32_t iMonth, int32_t iDay); + FWL_ERR GetEditText(CFX_WideString& wsText); + FWL_ERR SetEditText(const CFX_WideStringC& wsText); + int32_t CountSelRanges(); + int32_t GetSelRange(int32_t nIndex, int32_t& nStart); + FWL_ERR GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay); + FWL_ERR SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay); + FX_BOOL CanUndo(); + FX_BOOL CanRedo(); + FX_BOOL Undo(); + FX_BOOL Redo(); + FX_BOOL CanCopy(); + FX_BOOL CanCut(); + FX_BOOL CanSelectAll(); + FX_BOOL Copy(CFX_WideString& wsCopy); + FX_BOOL Cut(CFX_WideString& wsCut); + FX_BOOL Paste(const CFX_WideString& wsPaste); + FX_BOOL SelectAll(); + FX_BOOL Delete(); + FX_BOOL DeSelect(); + FWL_ERR GetBBox(CFX_RectF& rect); + FWL_ERR SetEditLimit(int32_t nLimit); + FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded, + FX_DWORD dwStylesExRemoved); + + protected: + CFWL_DateTimePicker(); + virtual ~CFWL_DateTimePicker(); + class CFWL_DateTimePickerDP : public IFWL_DateTimePickerDP { + public: + CFWL_DateTimePickerDP(); + virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption); + virtual FWL_ERR GetToday(IFWL_Widget* pWidget, + int32_t& iYear, + int32_t& iMonth, + int32_t& iDay); + int32_t m_iYear; + int32_t m_iMonth; + int32_t m_iDay; + CFX_WideString m_wsData; + }; + CFWL_DateTimePickerDP m_DateTimePickerDP; +}; +#endif diff --git a/xfa/include/fwl/lightwidget/edit.h b/xfa/include/fwl/lightwidget/edit.h index a5406ec2bf..42bb5e374a 100644 --- a/xfa/include/fwl/lightwidget/edit.h +++ b/xfa/include/fwl/lightwidget/edit.h @@ -1,61 +1,61 @@ -// 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);
- int32_t GetTextLength() const;
- FWL_ERR GetText(CFX_WideString& wsText,
- int32_t nStart = 0,
- int32_t nCount = -1) const;
- FWL_ERR ClearText();
- int32_t GetCaretPos() const;
- int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE);
- FWL_ERR AddSelRange(int32_t nStart, int32_t nCount = -1);
- int32_t CountSelRanges();
- int32_t GetSelRange(int32_t nIndex, int32_t& nStart);
- FWL_ERR ClearSelections();
- int32_t GetLimit();
- FWL_ERR SetLimit(int32_t nLimit);
- FWL_ERR SetAliasChar(FX_WCHAR wAlias);
- FWL_ERR SetFormatString(const CFX_WideString& wsFormat);
- FWL_ERR Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen);
- FWL_ERR DeleteSelections();
- FWL_ERR DeleteRange(int32_t nStart, int32_t nCount = -1);
- FWL_ERR ReplaceSelections(const CFX_WideStringC& wsReplace);
- FWL_ERR Replace(int32_t nStart,
- int32_t nLen,
- const CFX_WideStringC& wsReplace);
- FWL_ERR DoClipboard(int32_t iCmd);
- FX_BOOL Redo(const CFX_ByteStringC& bsRecord);
- FX_BOOL Undo(const CFX_ByteStringC& bsRecord);
- FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
- FWL_ERR SetNumberRange(int32_t iMin, int32_t iMax);
- FWL_ERR SetBackColor(FX_DWORD dwColor);
- FWL_ERR SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize);
- FX_BOOL CanUndo();
- FX_BOOL CanRedo();
- FX_BOOL Undo();
- FX_BOOL Redo();
- FX_BOOL Copy(CFX_WideString& wsCopy);
- FX_BOOL Cut(CFX_WideString& wsCut);
- FX_BOOL Paste(const CFX_WideString& wsPaste);
- FX_BOOL Delete();
- void SetScrollOffset(FX_FLOAT fScrollOffset);
- FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray& sSuggest);
- FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf,
- const CFX_ByteStringC& bsReplace);
- CFWL_Edit();
- virtual ~CFWL_Edit();
-};
-#endif
+// 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); + int32_t GetTextLength() const; + FWL_ERR GetText(CFX_WideString& wsText, + int32_t nStart = 0, + int32_t nCount = -1) const; + FWL_ERR ClearText(); + int32_t GetCaretPos() const; + int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE); + FWL_ERR AddSelRange(int32_t nStart, int32_t nCount = -1); + int32_t CountSelRanges(); + int32_t GetSelRange(int32_t nIndex, int32_t& nStart); + FWL_ERR ClearSelections(); + int32_t GetLimit(); + FWL_ERR SetLimit(int32_t nLimit); + FWL_ERR SetAliasChar(FX_WCHAR wAlias); + FWL_ERR SetFormatString(const CFX_WideString& wsFormat); + FWL_ERR Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen); + FWL_ERR DeleteSelections(); + FWL_ERR DeleteRange(int32_t nStart, int32_t nCount = -1); + FWL_ERR ReplaceSelections(const CFX_WideStringC& wsReplace); + FWL_ERR Replace(int32_t nStart, + int32_t nLen, + const CFX_WideStringC& wsReplace); + FWL_ERR DoClipboard(int32_t iCmd); + FX_BOOL Redo(const CFX_ByteStringC& bsRecord); + FX_BOOL Undo(const CFX_ByteStringC& bsRecord); + FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant); + FWL_ERR SetNumberRange(int32_t iMin, int32_t iMax); + FWL_ERR SetBackColor(FX_DWORD dwColor); + FWL_ERR SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize); + FX_BOOL CanUndo(); + FX_BOOL CanRedo(); + FX_BOOL Undo(); + FX_BOOL Redo(); + FX_BOOL Copy(CFX_WideString& wsCopy); + FX_BOOL Cut(CFX_WideString& wsCut); + FX_BOOL Paste(const CFX_WideString& wsPaste); + FX_BOOL Delete(); + void SetScrollOffset(FX_FLOAT fScrollOffset); + FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray& sSuggest); + FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, + const CFX_ByteStringC& bsReplace); + CFWL_Edit(); + virtual ~CFWL_Edit(); +}; +#endif diff --git a/xfa/include/fwl/lightwidget/listbox.h b/xfa/include/fwl/lightwidget/listbox.h index e5f31bd901..70888f6007 100644 --- a/xfa/include/fwl/lightwidget/listbox.h +++ b/xfa/include/fwl/lightwidget/listbox.h @@ -1,116 +1,116 @@ -// 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(const CFX_WideStringC& wsAdd,
- FX_BOOL bSelect = FALSE);
- FX_BOOL DeleteString(FWL_HLISTITEM hItem);
- FX_BOOL DeleteAll();
- int32_t CountSelItems();
- FWL_HLISTITEM GetSelItem(int32_t nIndexSel);
- int32_t GetSelIndex(int32_t nIndex);
- FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE);
- FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText);
- FWL_ERR GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE);
- FWL_ERR SetItemHeight(FX_FLOAT fItemHeight);
- FWL_HLISTITEM GetFocusItem();
- FWL_ERR SetFocusItem(FWL_HLISTITEM hItem);
- FWL_ERR* Sort(IFWL_ListBoxCompare* pCom);
- int32_t CountItems();
- FWL_HLISTITEM GetItem(int32_t nIndex);
- FWL_ERR SetItemString(FWL_HLISTITEM hItem, const CFX_WideStringC& wsText);
- FWL_ERR GetItemString(FWL_HLISTITEM hItem, CFX_WideString& wsText);
- FWL_ERR SetItemData(FWL_HLISTITEM hItem, void* pData);
- void* GetItemData(FWL_HLISTITEM hItem);
- FWL_HLISTITEM GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy);
- FX_DWORD GetItemStates(FWL_HLISTITEM hItem);
- CFWL_ListBox();
- virtual ~CFWL_ListBox();
-
- protected:
- class CFWL_ListBoxDP : public IFWL_ListBoxDP {
- public:
- CFWL_ListBoxDP();
- ~CFWL_ListBoxDP();
- virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
-
- virtual int32_t CountItems(IFWL_Widget* pWidget);
- virtual FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex);
- virtual int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
- virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- int32_t nIndex);
-
- virtual FX_DWORD GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR GetItemText(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_WideString& wsText);
- virtual FWL_ERR GetItemRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_RectF& rtItem);
- virtual void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
-
- virtual FWL_ERR SetItemStyles(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- FX_DWORD dwStyle);
- virtual FWL_ERR SetItemText(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const FX_WCHAR* pszText);
- virtual FWL_ERR SetItemRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const CFX_RectF& rtItem);
- virtual FX_FLOAT GetItemHeight(IFWL_Widget* pWidget);
- virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem);
- virtual FWL_ERR GetItemCheckRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_RectF& rtCheck);
- virtual FWL_ERR SetItemCheckRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const CFX_RectF& rtCheck);
- virtual FX_DWORD GetItemCheckState(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem);
- virtual FWL_ERR SetItemCheckState(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- FX_DWORD dwCheckState);
-
- CFX_PtrArray m_arrItem;
- CFX_WideString m_wsData;
- FX_FLOAT m_fItemHeight;
- };
- CFWL_ListBoxDP m_ListBoxDP;
-};
-class CFWL_ListItem {
- public:
- CFWL_ListItem() {
- m_rtItem.Reset();
- m_dwStates = 0;
- m_wsText = L"";
- m_pDIB = NULL;
- m_pData = NULL;
- m_dwCheckState = 0;
- m_rtCheckBox.Reset();
- }
- CFX_RectF m_rtItem;
- FX_DWORD m_dwStates;
- CFX_WideString m_wsText;
- CFX_DIBitmap* m_pDIB;
- void* m_pData;
- FX_DWORD m_dwCheckState;
- CFX_RectF m_rtCheckBox;
-};
-#endif
+// 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(const CFX_WideStringC& wsAdd, + FX_BOOL bSelect = FALSE); + FX_BOOL DeleteString(FWL_HLISTITEM hItem); + FX_BOOL DeleteAll(); + int32_t CountSelItems(); + FWL_HLISTITEM GetSelItem(int32_t nIndexSel); + int32_t GetSelIndex(int32_t nIndex); + FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE); + FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText); + FWL_ERR GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE); + FWL_ERR SetItemHeight(FX_FLOAT fItemHeight); + FWL_HLISTITEM GetFocusItem(); + FWL_ERR SetFocusItem(FWL_HLISTITEM hItem); + FWL_ERR* Sort(IFWL_ListBoxCompare* pCom); + int32_t CountItems(); + FWL_HLISTITEM GetItem(int32_t nIndex); + FWL_ERR SetItemString(FWL_HLISTITEM hItem, const CFX_WideStringC& wsText); + FWL_ERR GetItemString(FWL_HLISTITEM hItem, CFX_WideString& wsText); + FWL_ERR SetItemData(FWL_HLISTITEM hItem, void* pData); + void* GetItemData(FWL_HLISTITEM hItem); + FWL_HLISTITEM GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy); + FX_DWORD GetItemStates(FWL_HLISTITEM hItem); + CFWL_ListBox(); + virtual ~CFWL_ListBox(); + + protected: + class CFWL_ListBoxDP : public IFWL_ListBoxDP { + public: + CFWL_ListBoxDP(); + ~CFWL_ListBoxDP(); + virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption); + + virtual int32_t CountItems(IFWL_Widget* pWidget); + virtual FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex); + virtual int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem); + virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + int32_t nIndex); + + virtual FX_DWORD GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem); + virtual FWL_ERR GetItemText(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + CFX_WideString& wsText); + virtual FWL_ERR GetItemRect(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + CFX_RectF& rtItem); + virtual void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem); + + virtual FWL_ERR SetItemStyles(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + FX_DWORD dwStyle); + virtual FWL_ERR SetItemText(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + const FX_WCHAR* pszText); + virtual FWL_ERR SetItemRect(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + const CFX_RectF& rtItem); + virtual FX_FLOAT GetItemHeight(IFWL_Widget* pWidget); + virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem); + virtual FWL_ERR GetItemCheckRect(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + CFX_RectF& rtCheck); + virtual FWL_ERR SetItemCheckRect(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + const CFX_RectF& rtCheck); + virtual FX_DWORD GetItemCheckState(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem); + virtual FWL_ERR SetItemCheckState(IFWL_Widget* pWidget, + FWL_HLISTITEM hItem, + FX_DWORD dwCheckState); + + CFX_PtrArray m_arrItem; + CFX_WideString m_wsData; + FX_FLOAT m_fItemHeight; + }; + CFWL_ListBoxDP m_ListBoxDP; +}; +class CFWL_ListItem { + public: + CFWL_ListItem() { + m_rtItem.Reset(); + m_dwStates = 0; + m_wsText = L""; + m_pDIB = NULL; + m_pData = NULL; + m_dwCheckState = 0; + m_rtCheckBox.Reset(); + } + CFX_RectF m_rtItem; + FX_DWORD m_dwStates; + CFX_WideString m_wsText; + CFX_DIBitmap* m_pDIB; + void* m_pData; + FX_DWORD m_dwCheckState; + CFX_RectF m_rtCheckBox; +}; +#endif diff --git a/xfa/include/fwl/lightwidget/picturebox.h b/xfa/include/fwl/lightwidget/picturebox.h index 63d681e71b..11c0e3badb 100644 --- a/xfa/include/fwl/lightwidget/picturebox.h +++ b/xfa/include/fwl/lightwidget/picturebox.h @@ -1,63 +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_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);
- int32_t GetFlipMode();
- FWL_ERR SetFlipMode(int32_t iFlipMode);
- int32_t GetOpacity();
- FWL_ERR SetOpacity(int32_t iOpacity);
- FWL_ERR GetScale(FX_FLOAT& fScaleX, FX_FLOAT& fScaleY);
- FWL_ERR SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY);
- FWL_ERR GetOffset(FX_FLOAT& fx, FX_FLOAT& fy);
- FWL_ERR SetOffset(FX_FLOAT fx, FX_FLOAT fy);
- CFWL_PictureBox();
- virtual ~CFWL_PictureBox();
-
- protected:
- class CFWL_PictureBoxDP : public IFWL_PictureBoxDP {
- public:
- CFWL_PictureBoxDP() {
- m_fRotation = 0.0f;
- m_fScaleX = 1.0f;
- m_fScaleY = 1.0f;
- m_fOffSetX = 0.0f;
- m_fOffSetY = 0.0f;
- m_pBitmap = NULL;
- };
- virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
- virtual CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget);
- virtual CFX_DIBitmap* GetErrorPicture(IFWL_Widget* pWidget);
- virtual CFX_DIBitmap* GetInitialPicture(IFWL_Widget* pWidget);
- virtual int32_t GetOpacity(IFWL_Widget* pWidget);
- virtual int32_t GetFlipMode(IFWL_Widget* pWidget);
- virtual FWL_ERR GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix);
- CFX_DIBitmap* m_pBitmap;
- int32_t m_iOpacity;
- int32_t m_iFlipMode;
- FX_FLOAT m_fRotation;
- FX_FLOAT m_fScaleX;
- FX_FLOAT m_fScaleY;
- FX_FLOAT m_fOffSetX;
- FX_FLOAT m_fOffSetY;
- CFX_WideString m_wsData;
- };
- CFWL_PictureBoxDP m_PictureBoxDP;
-};
-#endif
+// 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); + int32_t GetFlipMode(); + FWL_ERR SetFlipMode(int32_t iFlipMode); + int32_t GetOpacity(); + FWL_ERR SetOpacity(int32_t iOpacity); + FWL_ERR GetScale(FX_FLOAT& fScaleX, FX_FLOAT& fScaleY); + FWL_ERR SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY); + FWL_ERR GetOffset(FX_FLOAT& fx, FX_FLOAT& fy); + FWL_ERR SetOffset(FX_FLOAT fx, FX_FLOAT fy); + CFWL_PictureBox(); + virtual ~CFWL_PictureBox(); + + protected: + class CFWL_PictureBoxDP : public IFWL_PictureBoxDP { + public: + CFWL_PictureBoxDP() { + m_fRotation = 0.0f; + m_fScaleX = 1.0f; + m_fScaleY = 1.0f; + m_fOffSetX = 0.0f; + m_fOffSetY = 0.0f; + m_pBitmap = NULL; + }; + virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption); + virtual CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget); + virtual CFX_DIBitmap* GetErrorPicture(IFWL_Widget* pWidget); + virtual CFX_DIBitmap* GetInitialPicture(IFWL_Widget* pWidget); + virtual int32_t GetOpacity(IFWL_Widget* pWidget); + virtual int32_t GetFlipMode(IFWL_Widget* pWidget); + virtual FWL_ERR GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix); + CFX_DIBitmap* m_pBitmap; + int32_t m_iOpacity; + int32_t m_iFlipMode; + FX_FLOAT m_fRotation; + FX_FLOAT m_fScaleX; + FX_FLOAT m_fScaleY; + FX_FLOAT m_fOffSetX; + FX_FLOAT m_fOffSetY; + CFX_WideString m_wsData; + }; + CFWL_PictureBoxDP m_PictureBoxDP; +}; +#endif diff --git a/xfa/include/fwl/lightwidget/pushbutton.h b/xfa/include/fwl/lightwidget/pushbutton.h index e7023c70b6..3874289a02 100644 --- a/xfa/include/fwl/lightwidget/pushbutton.h +++ b/xfa/include/fwl/lightwidget/pushbutton.h @@ -1,36 +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_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(const CFX_WideStringC& wsCaption);
- CFX_DIBitmap* GetPicture();
- FWL_ERR SetPicture(CFX_DIBitmap* pBitmap);
- CFWL_PushButton();
- virtual ~CFWL_PushButton();
-
- protected:
- class CFWL_PushButtonDP : public IFWL_PushButtonDP {
- public:
- CFWL_PushButtonDP() : m_pBitmap(NULL) {}
- FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
- virtual CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget);
- CFX_WideString m_wsCaption;
- CFX_DIBitmap* m_pBitmap;
- };
- CFWL_PushButtonDP m_buttonData;
-};
-#endif
+// 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(const CFX_WideStringC& wsCaption); + CFX_DIBitmap* GetPicture(); + FWL_ERR SetPicture(CFX_DIBitmap* pBitmap); + CFWL_PushButton(); + virtual ~CFWL_PushButton(); + + protected: + class CFWL_PushButtonDP : public IFWL_PushButtonDP { + public: + CFWL_PushButtonDP() : m_pBitmap(NULL) {} + FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption); + virtual CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget); + CFX_WideString m_wsCaption; + CFX_DIBitmap* m_pBitmap; + }; + CFWL_PushButtonDP m_buttonData; +}; +#endif diff --git a/xfa/include/fwl/lightwidget/scrollbar.h b/xfa/include/fwl/lightwidget/scrollbar.h index 8a299a6462..e28bdaaae8 100644 --- a/xfa/include/fwl/lightwidget/scrollbar.h +++ b/xfa/include/fwl/lightwidget/scrollbar.h @@ -1,31 +1,31 @@ -// 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
+// 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 index c58f043a36..75a60dc9fe 100644 --- a/xfa/include/fwl/lightwidget/theme.h +++ b/xfa/include/fwl/lightwidget/theme.h @@ -1,50 +1,50 @@ -// 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
-
-#include "xfa/include/fwl/core/fwl_theme.h"
-
-class CFWL_WidgetTP;
-class IFWL_Widget;
-
-class CFWL_Theme : public IFWL_ThemeProvider {
- public:
- CFWL_Theme();
- ~CFWL_Theme() override;
-
- // IFWL_ThemeProvider:
- FX_BOOL IsValidWidget(IFWL_Widget* pWidget) override;
- FX_DWORD GetThemeID(IFWL_Widget* pWidget) override;
- FX_DWORD SetThemeID(IFWL_Widget* pWidget,
- FX_DWORD dwThemeID,
- FX_BOOL bChildren = TRUE) override;
- FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) override;
- FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget,
- const CFX_Matrix& matrix) override;
- FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override;
- FX_BOOL DrawText(CFWL_ThemeText* pParams) override;
- void* GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity) override;
- FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) override;
- FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart) override;
- FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
- FX_FLOAT fx,
- FX_FLOAT fy) override;
- FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) override;
-
- FWL_ERR Initialize();
- FWL_ERR Finalize();
- FWL_ERR SetFont(IFWL_Widget* pWidget,
- const FX_WCHAR* strFont,
- FX_FLOAT fFontSize,
- FX_ARGB rgbFont);
- CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget);
-
- protected:
- CFX_PtrArray m_arrThemes;
-};
-#endif
+// 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 + +#include "xfa/include/fwl/core/fwl_theme.h" + +class CFWL_WidgetTP; +class IFWL_Widget; + +class CFWL_Theme : public IFWL_ThemeProvider { + public: + CFWL_Theme(); + ~CFWL_Theme() override; + + // IFWL_ThemeProvider: + FX_BOOL IsValidWidget(IFWL_Widget* pWidget) override; + FX_DWORD GetThemeID(IFWL_Widget* pWidget) override; + FX_DWORD SetThemeID(IFWL_Widget* pWidget, + FX_DWORD dwThemeID, + FX_BOOL bChildren = TRUE) override; + FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) override; + FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget, + const CFX_Matrix& matrix) override; + FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override; + FX_BOOL DrawText(CFWL_ThemeText* pParams) override; + void* GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity) override; + FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) override; + FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart) override; + FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, + FX_FLOAT fx, + FX_FLOAT fy) override; + FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) override; + + FWL_ERR Initialize(); + FWL_ERR Finalize(); + FWL_ERR SetFont(IFWL_Widget* pWidget, + const FX_WCHAR* strFont, + FX_FLOAT fFontSize, + FX_ARGB rgbFont); + CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget); + + protected: + CFX_PtrArray m_arrThemes; +}; +#endif diff --git a/xfa/include/fwl/lightwidget/tooltipctrl.h b/xfa/include/fwl/lightwidget/tooltipctrl.h index cf2ed7b134..ed8396e7e6 100644 --- a/xfa/include/fwl/lightwidget/tooltipctrl.h +++ b/xfa/include/fwl/lightwidget/tooltipctrl.h @@ -1,53 +1,53 @@ -// 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(const CFX_WideStringC& wsCaption);
- int32_t GetInitialDelay();
- int32_t SetInitialDelay(int32_t nDelayTime);
- int32_t GetAutoPopDelay();
- int32_t SetAutoPopDelay(int32_t nDelayTime);
- CFX_DIBitmap* GetToolTipIcon();
- FWL_ERR SetToolTipIcon(CFX_DIBitmap* pBitmap);
- CFX_SizeF GetToolTipIconSize();
- FWL_ERR SetToolTipIconSize(CFX_SizeF fSize);
- FWL_ERR SetAnchor(const CFX_RectF& rtAnchor);
- FWL_ERR Show();
- FWL_ERR Hide();
- CFWL_ToolTip();
- virtual ~CFWL_ToolTip();
-
- protected:
- class CFWL_ToolTipDP : public IFWL_ToolTipDP {
- public:
- CFWL_ToolTipDP();
- FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
- int32_t GetInitialDelay(IFWL_Widget* pWidget);
- int32_t GetAutoPopDelay(IFWL_Widget* pWidget);
- CFX_DIBitmap* GetToolTipIcon(IFWL_Widget* pWidget);
- CFX_SizeF GetToolTipIconSize(IFWL_Widget* pWidget);
- CFX_RectF GetAnchor();
- CFX_WideString m_wsCaption;
- int32_t m_nInitDelayTime;
- int32_t m_nAutoPopDelayTime;
- CFX_DIBitmap* m_pBitmap;
- CFX_SizeF m_fIconSize;
- CFX_RectF m_fAnchor;
- };
- CFWL_ToolTipDP m_tooltipData;
-};
-#endif
+// 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(const CFX_WideStringC& wsCaption); + int32_t GetInitialDelay(); + int32_t SetInitialDelay(int32_t nDelayTime); + int32_t GetAutoPopDelay(); + int32_t SetAutoPopDelay(int32_t nDelayTime); + CFX_DIBitmap* GetToolTipIcon(); + FWL_ERR SetToolTipIcon(CFX_DIBitmap* pBitmap); + CFX_SizeF GetToolTipIconSize(); + FWL_ERR SetToolTipIconSize(CFX_SizeF fSize); + FWL_ERR SetAnchor(const CFX_RectF& rtAnchor); + FWL_ERR Show(); + FWL_ERR Hide(); + CFWL_ToolTip(); + virtual ~CFWL_ToolTip(); + + protected: + class CFWL_ToolTipDP : public IFWL_ToolTipDP { + public: + CFWL_ToolTipDP(); + FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption); + int32_t GetInitialDelay(IFWL_Widget* pWidget); + int32_t GetAutoPopDelay(IFWL_Widget* pWidget); + CFX_DIBitmap* GetToolTipIcon(IFWL_Widget* pWidget); + CFX_SizeF GetToolTipIconSize(IFWL_Widget* pWidget); + CFX_RectF GetAnchor(); + CFX_WideString m_wsCaption; + int32_t m_nInitDelayTime; + int32_t m_nAutoPopDelayTime; + CFX_DIBitmap* m_pBitmap; + CFX_SizeF m_fIconSize; + CFX_RectF m_fAnchor; + }; + CFWL_ToolTipDP m_tooltipData; +}; +#endif diff --git a/xfa/include/fwl/lightwidget/widget.h b/xfa/include/fwl/lightwidget/widget.h index e884db38ad..a375ee72fd 100644 --- a/xfa/include/fwl/lightwidget/widget.h +++ b/xfa/include/fwl/lightwidget/widget.h @@ -1,107 +1,107 @@ -// 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
-
-#include "xfa/include/fwl/core/fwl_widget.h"
-
-class CFWL_Event;
-class CFWL_Message;
-class CFWL_Widget;
-class CFWL_WidgetDelegate;
-class CFWL_WidgetMgr;
-
-class CFWL_WidgetProperties {
- public:
- CFWL_WidgetProperties() {
- m_ctmOnParent.SetIdentity();
- m_rtWidget.Set(0, 0, 0, 0);
- m_dwStyles = FWL_WGTSTYLE_Child;
- m_dwStyleExes = 0;
- m_dwStates = 0;
- m_pParent = NULL;
- m_pOwner = NULL;
- }
- CFWL_WidgetImpProperties MakeWidgetImpProperties(
- IFWL_DataProvider* pDataProvider) const;
-
- 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:
- virtual ~CFWL_Widget();
- IFWL_Widget* GetWidget();
- FWL_ERR GetClassName(CFX_WideString& wsClass) const;
- FX_DWORD GetClassID() const;
- virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
-
- protected:
- FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
-
- public:
- FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
- FWL_ERR GetGlobalRect(CFX_RectF& rect);
- FWL_ERR SetWidgetRect(const CFX_RectF& rect);
- FWL_ERR GetClientRect(CFX_RectF& rtClient);
- CFWL_Widget* GetParent();
- FWL_ERR SetParent(CFWL_Widget* pParent);
- CFWL_Widget* GetOwner();
- FWL_ERR SetOwner(CFWL_Widget* pOwner);
- FX_DWORD GetStyles();
- FWL_ERR ModifyStyles(FX_DWORD dwStylesAdded, FX_DWORD dwStylesRemoved);
- FX_DWORD GetStylesEx();
- FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
- FX_DWORD GetStates();
- FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE);
- FWL_ERR SetPrivateData(void* module_id,
- void* pData,
- PD_CALLBACK_FREEDATA callback);
- void* GetPrivateData(void* module_id);
- FWL_ERR Update();
- FWL_ERR LockUpdate();
- FWL_ERR UnlockUpdate();
- FX_DWORD HitTest(FX_FLOAT fx, FX_FLOAT fy);
- FWL_ERR TransformTo(CFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy);
- FWL_ERR TransformTo(CFWL_Widget* pWidget, CFX_RectF& rt);
- FWL_ERR GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE);
- FWL_ERR SetMatrix(const CFX_Matrix& matrix);
- FWL_ERR DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix = NULL);
- 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();
-
- void RegisterEventTarget(CFWL_Widget* pEventSource = NULL,
- FX_DWORD dwFilter = FWL_EVENT_ALL_MASK);
- void DispatchEvent(CFWL_Event* pEvent);
- CFX_SizeF CalcTextSize(const CFX_WideString& wsText,
- FX_BOOL bMultiLine = FALSE,
- int32_t iLineWidth = -1);
- IFWL_Widget* m_pIface;
- IFWL_WidgetDelegate* m_pDelegate;
- CFWL_WidgetMgr* m_pWidgetMgr;
- CFWL_WidgetProperties* m_pProperties;
-};
-class CFWL_WidgetDelegate {
- public:
- CFWL_WidgetDelegate();
- virtual ~CFWL_WidgetDelegate();
- virtual int32_t OnProcessMessage(CFWL_Message* pMessage);
- virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent);
- virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix = NULL);
-};
-#endif
+// 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 + +#include "xfa/include/fwl/core/fwl_widget.h" + +class CFWL_Event; +class CFWL_Message; +class CFWL_Widget; +class CFWL_WidgetDelegate; +class CFWL_WidgetMgr; + +class CFWL_WidgetProperties { + public: + CFWL_WidgetProperties() { + m_ctmOnParent.SetIdentity(); + m_rtWidget.Set(0, 0, 0, 0); + m_dwStyles = FWL_WGTSTYLE_Child; + m_dwStyleExes = 0; + m_dwStates = 0; + m_pParent = NULL; + m_pOwner = NULL; + } + CFWL_WidgetImpProperties MakeWidgetImpProperties( + IFWL_DataProvider* pDataProvider) const; + + 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: + virtual ~CFWL_Widget(); + IFWL_Widget* GetWidget(); + FWL_ERR GetClassName(CFX_WideString& wsClass) const; + FX_DWORD GetClassID() const; + virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const; + + protected: + FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL); + + public: + FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); + FWL_ERR GetGlobalRect(CFX_RectF& rect); + FWL_ERR SetWidgetRect(const CFX_RectF& rect); + FWL_ERR GetClientRect(CFX_RectF& rtClient); + CFWL_Widget* GetParent(); + FWL_ERR SetParent(CFWL_Widget* pParent); + CFWL_Widget* GetOwner(); + FWL_ERR SetOwner(CFWL_Widget* pOwner); + FX_DWORD GetStyles(); + FWL_ERR ModifyStyles(FX_DWORD dwStylesAdded, FX_DWORD dwStylesRemoved); + FX_DWORD GetStylesEx(); + FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved); + FX_DWORD GetStates(); + FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE); + FWL_ERR SetPrivateData(void* module_id, + void* pData, + PD_CALLBACK_FREEDATA callback); + void* GetPrivateData(void* module_id); + FWL_ERR Update(); + FWL_ERR LockUpdate(); + FWL_ERR UnlockUpdate(); + FX_DWORD HitTest(FX_FLOAT fx, FX_FLOAT fy); + FWL_ERR TransformTo(CFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy); + FWL_ERR TransformTo(CFWL_Widget* pWidget, CFX_RectF& rt); + FWL_ERR GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE); + FWL_ERR SetMatrix(const CFX_Matrix& matrix); + FWL_ERR DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix = NULL); + 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(); + + void RegisterEventTarget(CFWL_Widget* pEventSource = NULL, + FX_DWORD dwFilter = FWL_EVENT_ALL_MASK); + void DispatchEvent(CFWL_Event* pEvent); + CFX_SizeF CalcTextSize(const CFX_WideString& wsText, + FX_BOOL bMultiLine = FALSE, + int32_t iLineWidth = -1); + IFWL_Widget* m_pIface; + IFWL_WidgetDelegate* m_pDelegate; + CFWL_WidgetMgr* m_pWidgetMgr; + CFWL_WidgetProperties* m_pProperties; +}; +class CFWL_WidgetDelegate { + public: + CFWL_WidgetDelegate(); + virtual ~CFWL_WidgetDelegate(); + virtual int32_t OnProcessMessage(CFWL_Message* pMessage); + virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent); + virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics, + const CFX_Matrix* pMatrix = NULL); +}; +#endif diff --git a/xfa/include/fwl/theme/barcodetp.h b/xfa/include/fwl/theme/barcodetp.h index 6923909c92..7a16afcac3 100644 --- a/xfa/include/fwl/theme/barcodetp.h +++ b/xfa/include/fwl/theme/barcodetp.h @@ -1,18 +1,18 @@ -// 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
+// 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 index c291f8c8fa..f3f5992636 100644 --- a/xfa/include/fwl/theme/carettp.h +++ b/xfa/include/fwl/theme/carettp.h @@ -1,25 +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_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
+// 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 index 6d03cf199e..edc3f7170f 100644 --- a/xfa/include/fwl/theme/checkboxtp.h +++ b/xfa/include/fwl/theme/checkboxtp.h @@ -1,81 +1,81 @@ -// 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 {
- 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
+// 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 { + 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 index 7da5d661ca..84dbdbabf3 100644 --- a/xfa/include/fwl/theme/comboboxtp.h +++ b/xfa/include/fwl/theme/comboboxtp.h @@ -1,27 +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_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 void* 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
+// 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 void* 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 index b95cd0537d..5fe43f3d49 100644 --- a/xfa/include/fwl/theme/datetimepickertp.h +++ b/xfa/include/fwl/theme/datetimepickertp.h @@ -1,25 +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_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 {
- FX_ARGB BoxBkColor[13][2];
- } * m_pThemeData;
-};
-#endif
+// 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 { + FX_ARGB BoxBkColor[13][2]; + } * m_pThemeData; +}; +#endif diff --git a/xfa/include/fwl/theme/edittp.h b/xfa/include/fwl/theme/edittp.h index a6e1da816f..babea93807 100644 --- a/xfa/include/fwl/theme/edittp.h +++ b/xfa/include/fwl/theme/edittp.h @@ -1,20 +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_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
+// 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 index 0b7cb874ec..83085040b1 100644 --- a/xfa/include/fwl/theme/formtp.h +++ b/xfa/include/fwl/theme/formtp.h @@ -1,108 +1,108 @@ -// 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 void* 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,
- int32_t iActive = 0);
- void DrawCaption(CFX_Graphics* pGraphics,
- const CFX_RectF* pRect,
- FWLTHEME_STATE eState,
- CFX_Matrix* pMatrix,
- int32_t iActive = 0);
- void DrawNarrowCaption(CFX_Graphics* pGraphics,
- const CFX_RectF* pRect,
- FWLTHEME_STATE eState,
- CFX_Matrix* pMatrix,
- int32_t iActive = 0);
- void DrawCloseBox(CFX_Graphics* pGraphics,
- const CFX_RectF* pRect,
- FWLTHEME_STATE eState,
- CFX_Matrix* pMatrix,
- int32_t iActive = 0);
- void DrawMinMaxBoxCommon(CFX_Graphics* pGraphics,
- const CFX_RectF* pRect,
- FWLTHEME_STATE eState,
- CFX_Matrix* pMatrix,
- int32_t iActive = 0);
- void DrawMinimizeBox(CFX_Graphics* pGraphics,
- const CFX_RectF* pRect,
- FWLTHEME_STATE eState,
- CFX_Matrix* pMatrix,
- int32_t iActive = 0);
- void DrawMaximizeBox(CFX_Graphics* pGraphics,
- const CFX_RectF* pRect,
- FWLTHEME_STATE eState,
- FX_BOOL bMax,
- CFX_Matrix* pMatrix,
- int32_t iActive = 0);
- void DrawIconImage(CFX_Graphics* pGraphics,
- CFX_DIBitmap* pDIBitmap,
- const CFX_RectF* pRect,
- FWLTHEME_STATE eState,
- CFX_Matrix* pMatrix,
- int32_t 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 {
- 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
+// 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 void* 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, + int32_t iActive = 0); + void DrawCaption(CFX_Graphics* pGraphics, + const CFX_RectF* pRect, + FWLTHEME_STATE eState, + CFX_Matrix* pMatrix, + int32_t iActive = 0); + void DrawNarrowCaption(CFX_Graphics* pGraphics, + const CFX_RectF* pRect, + FWLTHEME_STATE eState, + CFX_Matrix* pMatrix, + int32_t iActive = 0); + void DrawCloseBox(CFX_Graphics* pGraphics, + const CFX_RectF* pRect, + FWLTHEME_STATE eState, + CFX_Matrix* pMatrix, + int32_t iActive = 0); + void DrawMinMaxBoxCommon(CFX_Graphics* pGraphics, + const CFX_RectF* pRect, + FWLTHEME_STATE eState, + CFX_Matrix* pMatrix, + int32_t iActive = 0); + void DrawMinimizeBox(CFX_Graphics* pGraphics, + const CFX_RectF* pRect, + FWLTHEME_STATE eState, + CFX_Matrix* pMatrix, + int32_t iActive = 0); + void DrawMaximizeBox(CFX_Graphics* pGraphics, + const CFX_RectF* pRect, + FWLTHEME_STATE eState, + FX_BOOL bMax, + CFX_Matrix* pMatrix, + int32_t iActive = 0); + void DrawIconImage(CFX_Graphics* pGraphics, + CFX_DIBitmap* pDIBitmap, + const CFX_RectF* pRect, + FWLTHEME_STATE eState, + CFX_Matrix* pMatrix, + int32_t 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 { + 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 index 5e4a6dc991..c44fcc72bc 100644 --- a/xfa/include/fwl/theme/listboxtp.h +++ b/xfa/include/fwl/theme/listboxtp.h @@ -1,28 +1,28 @@ -// 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,
- void* pData = NULL,
- CFX_Matrix* pMatrix = NULL);
-};
-#endif
+// 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, + void* pData = NULL, + CFX_Matrix* pMatrix = NULL); +}; +#endif diff --git a/xfa/include/fwl/theme/monthcalendartp.h b/xfa/include/fwl/theme/monthcalendartp.h index 903e3a0860..27773df1e0 100644 --- a/xfa/include/fwl/theme/monthcalendartp.h +++ b/xfa/include/fwl/theme/monthcalendartp.h @@ -1,49 +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_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 void* 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:
- 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
+// 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 void* 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: + 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 index f2ffd5edf5..f15b220093 100644 --- a/xfa/include/fwl/theme/pictureboxtp.h +++ b/xfa/include/fwl/theme/pictureboxtp.h @@ -1,18 +1,18 @@ -// 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
+// 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 index 59b9d2dc7b..632ded96c7 100644 --- a/xfa/include/fwl/theme/pushbuttontp.h +++ b/xfa/include/fwl/theme/pushbuttontp.h @@ -1,42 +1,42 @@ -// 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 void* 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);
- int32_t GetColorID(FX_DWORD dwStates);
-
- struct PBThemeData {
- FX_ARGB clrBorder[5];
- FX_ARGB clrStart[5];
- FX_ARGB clrEnd[5];
- FX_ARGB clrFill[5];
- } * m_pThemeData;
-};
-#endif
+// 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 void* 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); + int32_t GetColorID(FX_DWORD dwStates); + + struct PBThemeData { + 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 index 24be474202..d708066d4d 100644 --- a/xfa/include/fwl/theme/scrollbartp.h +++ b/xfa/include/fwl/theme/scrollbartp.h @@ -1,55 +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_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 void* 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 {
- 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
+// 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 void* 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 { + 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 index 083debfda0..4855feace1 100644 --- a/xfa/include/fwl/theme/utils.h +++ b/xfa/include/fwl/theme/utils.h @@ -1,72 +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_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 {
- uint8_t b;
- uint8_t g;
- uint8_t r;
- uint8_t 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
+// 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 { + uint8_t b; + uint8_t g; + uint8_t r; + uint8_t 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 index cd7cc0dbdd..adeeb42d6c 100644 --- a/xfa/include/fwl/theme/widgettp.h +++ b/xfa/include/fwl/theme/widgettp.h @@ -1,199 +1,199 @@ -// 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 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:
- virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget);
- virtual FX_DWORD GetThemeID(IFWL_Widget* pWidget);
- virtual FX_DWORD SetThemeID(IFWL_Widget* pWidget,
- FX_DWORD dwThemeID,
- FX_BOOL bChildren = TRUE);
- virtual FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix);
- virtual FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget,
- const CFX_Matrix& matrix);
- virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams);
- virtual FX_BOOL DrawText(CFWL_ThemeText* pParams);
- virtual void* GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity);
- virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget);
- virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart);
- virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
- FX_FLOAT fx,
- FX_FLOAT fy);
- virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect);
- virtual FWL_ERR Initialize();
- virtual FWL_ERR Finalize();
- virtual ~CFWL_WidgetTP();
- FWL_ERR SetFont(IFWL_Widget* pWidget,
- const FX_WCHAR* 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,
- int32_t 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, uint8_t 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:
- static CFWL_ArrowData* GetInstance();
- static FX_BOOL IsInstance();
- static void DestroyInstance();
- virtual ~CFWL_ArrowData();
- void SetColorData(FX_DWORD dwID);
-
- class CColorData {
- 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:
- CFWL_FontData();
- virtual ~CFWL_FontData();
- FX_BOOL Equal(const CFX_WideStringC& wsFontFamily,
- FX_DWORD dwFontStyles,
- FX_WORD wCodePage);
- FX_BOOL LoadFont(const CFX_WideStringC& 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:
- CFWL_FontManager();
- virtual ~CFWL_FontManager();
- IFX_Font* FindFont(const CFX_WideStringC& wsFontFamily,
- FX_DWORD dwFontStyles,
- FX_WORD dwCodePage);
-
- protected:
- CFX_PtrArray m_arrFonts;
-};
-CFWL_FontManager* FWL_GetFontManager();
-#endif
+// 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 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: + virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); + virtual FX_DWORD GetThemeID(IFWL_Widget* pWidget); + virtual FX_DWORD SetThemeID(IFWL_Widget* pWidget, + FX_DWORD dwThemeID, + FX_BOOL bChildren = TRUE); + virtual FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix); + virtual FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget, + const CFX_Matrix& matrix); + virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); + virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); + virtual void* GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity); + virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget); + virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart); + virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, + FX_FLOAT fx, + FX_FLOAT fy); + virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect); + virtual FWL_ERR Initialize(); + virtual FWL_ERR Finalize(); + virtual ~CFWL_WidgetTP(); + FWL_ERR SetFont(IFWL_Widget* pWidget, + const FX_WCHAR* 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, + int32_t 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, uint8_t 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: + static CFWL_ArrowData* GetInstance(); + static FX_BOOL IsInstance(); + static void DestroyInstance(); + virtual ~CFWL_ArrowData(); + void SetColorData(FX_DWORD dwID); + + class CColorData { + 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: + CFWL_FontData(); + virtual ~CFWL_FontData(); + FX_BOOL Equal(const CFX_WideStringC& wsFontFamily, + FX_DWORD dwFontStyles, + FX_WORD wCodePage); + FX_BOOL LoadFont(const CFX_WideStringC& 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: + CFWL_FontManager(); + virtual ~CFWL_FontManager(); + IFX_Font* FindFont(const CFX_WideStringC& 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 index b166458e7d..84745acb77 100644 --- a/xfa/include/fxbarcode/BC_BarCode.h +++ b/xfa/include/fxbarcode/BC_BarCode.h @@ -1,257 +1,257 @@ -// 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 XFA_INCLUDE_FXBARCODE_BC_BARCODE_H_
-#define XFA_INCLUDE_FXBARCODE_BC_BARCODE_H_
-
-#include "core/include/fxcrt/fx_string.h"
-#include "core/include/fxcrt/fx_system.h"
-#include "core/include/fxge/fx_dib.h"
-
-class CBC_Reader;
-class CBC_Writer;
-class CFX_Font;
-class CFX_RenderDevice;
-
-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
-};
-
-void BC_Library_Init();
-void BC_Library_Destory();
-
-class CBC_CodeBase {
- public:
- CBC_CodeBase();
- virtual ~CBC_CodeBase();
- virtual BC_TYPE GetType() = 0;
- virtual FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) = 0;
- virtual FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e) = 0;
- virtual FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) = 0;
- virtual CFX_WideString Decode(uint8_t* buf,
- int32_t width,
- int32_t hight,
- int32_t& e) = 0;
- virtual CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e) = 0;
-
- virtual FX_BOOL SetCharEncoding(int32_t encoding);
- virtual FX_BOOL SetModuleHeight(int32_t moduleHeight);
- virtual FX_BOOL SetModuleWidth(int32_t moduleWidth);
-
- virtual FX_BOOL SetHeight(int32_t height);
- virtual FX_BOOL SetWidth(int32_t 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(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) = 0;
- virtual FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e) = 0;
- virtual FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) = 0;
- virtual CFX_WideString Decode(uint8_t* buf,
- int32_t width,
- int32_t hight,
- int32_t& e) = 0;
- virtual CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e) = 0;
- virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
- virtual CFX_WideString FilterContents(const CFX_WideStringC& contents);
- virtual void SetPrintChecksum(FX_BOOL checksum);
- virtual void SetDataLength(int32_t length);
- virtual void SetCalChecksum(FX_BOOL calc);
- virtual FX_BOOL SetFont(CFX_Font* cFont);
- virtual void SetFontSize(FX_FLOAT size);
- virtual void SetFontStyle(int32_t 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(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e);
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e);
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e);
- CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e);
- CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e);
- BC_TYPE GetType() { return BC_CODE39; }
- FX_BOOL SetTextLocation(BC_TEXT_LOC location);
- FX_BOOL SetWideNarrowRatio(int32_t ratio);
-
- private:
- CFX_WideString m_renderContents;
-};
-class CBC_Codabar : public CBC_OneCode {
- public:
- CBC_Codabar();
- virtual ~CBC_Codabar();
- FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e);
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e);
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e);
- CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e);
- CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& 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(int32_t ratio);
-
- private:
- CFX_WideString m_renderContents;
-};
-class CBC_Code128 : public CBC_OneCode {
- public:
- CBC_Code128(BC_TYPE type);
- virtual ~CBC_Code128();
- FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e);
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e);
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e);
- CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e);
- CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& 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(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e);
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e);
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e);
- CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e);
- CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e);
- BC_TYPE GetType() { return BC_EAN8; }
-
- private:
- CFX_WideString Preprocess(const CFX_WideStringC& contents);
- CFX_WideString m_renderContents;
-};
-class CBC_EAN13 : public CBC_OneCode {
- public:
- CBC_EAN13();
- virtual ~CBC_EAN13();
- FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e);
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e);
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e);
- CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e);
- CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e);
- BC_TYPE GetType() { return BC_EAN13; }
-
- private:
- CFX_WideString Preprocess(const CFX_WideStringC& contents);
- CFX_WideString m_renderContents;
-};
-class CBC_UPCA : public CBC_OneCode {
- public:
- CBC_UPCA();
- virtual ~CBC_UPCA();
- FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e);
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e);
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e);
- CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e);
- CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e);
- BC_TYPE GetType() { return BC_UPCA; }
-
- private:
- CFX_WideString Preprocess(const CFX_WideStringC& contents);
- CFX_WideString m_renderContents;
-};
-class CBC_QRCode : public CBC_CodeBase {
- public:
- CBC_QRCode();
- virtual ~CBC_QRCode();
- FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e);
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e);
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e);
- CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e);
- CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e);
- BC_TYPE GetType() { return BC_QR_CODE; }
- FX_BOOL SetVersion(int32_t version);
- FX_BOOL SetErrorCorrectionLevel(int32_t level);
-};
-class CBC_PDF417I : public CBC_CodeBase {
- public:
- CBC_PDF417I();
- virtual ~CBC_PDF417I();
- FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e);
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e);
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e);
- CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e);
- CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e);
- BC_TYPE GetType() { return BC_PDF417; }
- FX_BOOL SetErrorCorrectionLevel(int32_t level);
- void SetTruncated(FX_BOOL truncated);
-};
-class CBC_DataMatrix : public CBC_CodeBase {
- public:
- CBC_DataMatrix();
- virtual ~CBC_DataMatrix();
- FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e);
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matirx,
- int32_t& e);
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e);
- CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e);
- CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e);
- BC_TYPE GetType() { return BC_DATAMATRIX; }
-};
-
-#endif // XFA_INCLUDE_FXBARCODE_BC_BARCODE_H_
+// 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 XFA_INCLUDE_FXBARCODE_BC_BARCODE_H_ +#define XFA_INCLUDE_FXBARCODE_BC_BARCODE_H_ + +#include "core/include/fxcrt/fx_string.h" +#include "core/include/fxcrt/fx_system.h" +#include "core/include/fxge/fx_dib.h" + +class CBC_Reader; +class CBC_Writer; +class CFX_Font; +class CFX_RenderDevice; + +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 +}; + +void BC_Library_Init(); +void BC_Library_Destory(); + +class CBC_CodeBase { + public: + CBC_CodeBase(); + virtual ~CBC_CodeBase(); + virtual BC_TYPE GetType() = 0; + virtual FX_BOOL Encode(const CFX_WideStringC& contents, + FX_BOOL isDevice, + int32_t& e) = 0; + virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e) = 0; + virtual FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) = 0; + virtual CFX_WideString Decode(uint8_t* buf, + int32_t width, + int32_t hight, + int32_t& e) = 0; + virtual CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e) = 0; + + virtual FX_BOOL SetCharEncoding(int32_t encoding); + virtual FX_BOOL SetModuleHeight(int32_t moduleHeight); + virtual FX_BOOL SetModuleWidth(int32_t moduleWidth); + + virtual FX_BOOL SetHeight(int32_t height); + virtual FX_BOOL SetWidth(int32_t 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(const CFX_WideStringC& contents, + FX_BOOL isDevice, + int32_t& e) = 0; + virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e) = 0; + virtual FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) = 0; + virtual CFX_WideString Decode(uint8_t* buf, + int32_t width, + int32_t hight, + int32_t& e) = 0; + virtual CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e) = 0; + virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); + virtual CFX_WideString FilterContents(const CFX_WideStringC& contents); + virtual void SetPrintChecksum(FX_BOOL checksum); + virtual void SetDataLength(int32_t length); + virtual void SetCalChecksum(FX_BOOL calc); + virtual FX_BOOL SetFont(CFX_Font* cFont); + virtual void SetFontSize(FX_FLOAT size); + virtual void SetFontStyle(int32_t 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(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); + FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e); + FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); + CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e); + CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e); + BC_TYPE GetType() { return BC_CODE39; } + FX_BOOL SetTextLocation(BC_TEXT_LOC location); + FX_BOOL SetWideNarrowRatio(int32_t ratio); + + private: + CFX_WideString m_renderContents; +}; +class CBC_Codabar : public CBC_OneCode { + public: + CBC_Codabar(); + virtual ~CBC_Codabar(); + FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); + FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e); + FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); + CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e); + CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& 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(int32_t ratio); + + private: + CFX_WideString m_renderContents; +}; +class CBC_Code128 : public CBC_OneCode { + public: + CBC_Code128(BC_TYPE type); + virtual ~CBC_Code128(); + FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); + FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e); + FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); + CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e); + CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& 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(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); + FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e); + FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); + CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e); + CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e); + BC_TYPE GetType() { return BC_EAN8; } + + private: + CFX_WideString Preprocess(const CFX_WideStringC& contents); + CFX_WideString m_renderContents; +}; +class CBC_EAN13 : public CBC_OneCode { + public: + CBC_EAN13(); + virtual ~CBC_EAN13(); + FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); + FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e); + FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); + CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e); + CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e); + BC_TYPE GetType() { return BC_EAN13; } + + private: + CFX_WideString Preprocess(const CFX_WideStringC& contents); + CFX_WideString m_renderContents; +}; +class CBC_UPCA : public CBC_OneCode { + public: + CBC_UPCA(); + virtual ~CBC_UPCA(); + FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); + FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e); + FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); + CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e); + CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e); + BC_TYPE GetType() { return BC_UPCA; } + + private: + CFX_WideString Preprocess(const CFX_WideStringC& contents); + CFX_WideString m_renderContents; +}; +class CBC_QRCode : public CBC_CodeBase { + public: + CBC_QRCode(); + virtual ~CBC_QRCode(); + FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); + FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e); + FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); + CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e); + CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e); + BC_TYPE GetType() { return BC_QR_CODE; } + FX_BOOL SetVersion(int32_t version); + FX_BOOL SetErrorCorrectionLevel(int32_t level); +}; +class CBC_PDF417I : public CBC_CodeBase { + public: + CBC_PDF417I(); + virtual ~CBC_PDF417I(); + FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); + FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e); + FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); + CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e); + CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e); + BC_TYPE GetType() { return BC_PDF417; } + FX_BOOL SetErrorCorrectionLevel(int32_t level); + void SetTruncated(FX_BOOL truncated); +}; +class CBC_DataMatrix : public CBC_CodeBase { + public: + CBC_DataMatrix(); + virtual ~CBC_DataMatrix(); + FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); + FX_BOOL RenderDevice(CFX_RenderDevice* device, + const CFX_Matrix* matirx, + int32_t& e); + FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); + CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e); + CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e); + BC_TYPE GetType() { return BC_DATAMATRIX; } +}; + +#endif // XFA_INCLUDE_FXBARCODE_BC_BARCODE_H_ diff --git a/xfa/include/fxfa/fxfa.h b/xfa/include/fxfa/fxfa.h index 503909a1c4..5c0f63619e 100644 --- a/xfa/include/fxfa/fxfa.h +++ b/xfa/include/fxfa/fxfa.h @@ -1,845 +1,845 @@ -// 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_H_
-#define FXFA_H_
-
-class CFX_Graphics;
-class CPDF_Document;
-class CXFA_Node;
-class CXFA_NodeList;
-class CXFA_WidgetAcc;
-class IFDE_XMLElement;
-class IFWL_AdapterTimerMgr;
-class IFX_Font;
-class IXFA_App;
-class IXFA_AppProvider;
-class IXFA_ChecksumContext;
-class IXFA_DocHandler;
-class IXFA_DocProvider;
-class IXFA_DocView;
-class IXFA_FontMgr;
-class IXFA_MenuHandler;
-class IXFA_PageView;
-class IXFA_PageViewRender;
-class IXFA_WidgetAccIterator;
-class IXFA_WidgetHandler;
-class IXFA_WidgetIterator;
-
-class IXFA_Doc {
- public:
- virtual ~IXFA_Doc() {}
-
- protected:
- IXFA_Doc() {}
-};
-
-class IXFA_Widget {
- public:
- virtual ~IXFA_Widget() {}
-
- protected:
- IXFA_Widget() {}
-};
-
-#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
-#define XFA_IDS_ValidateNumberError 99
-
-// Probably should be called IXFA_AppDelegate.
-class IXFA_AppProvider {
- public:
- virtual ~IXFA_AppProvider() {}
-
- /**
- * Specifies the name of the client application in which a form currently
- * exists. Such as Exchange-Pro.
- */
- virtual void SetAppType(const CFX_WideStringC& wsAppType) = 0;
- virtual void GetAppType(CFX_WideString& wsAppType) = 0;
- virtual void SetFoxitAppType(const CFX_WideStringC& wsFoxitAppType) {}
- virtual void GetFoxitAppType(CFX_WideString& wsFoxitAppType) {
- wsFoxitAppType.Empty();
- }
-
- /**
- * Returns the language of the running host application. Such as zh_CN
- */
- virtual void GetLanguage(CFX_WideString& wsLanguage) = 0;
-
- /**
- * Returns the platform of the machine running the script. Such as WIN
- */
- virtual void GetPlatform(CFX_WideString& wsPlatform) = 0;
-
- /**
- * Indicates the packaging of the application that is running the script. Such
- * as Full
- */
- virtual void GetVariation(CFX_WideString& wsVariation) = 0;
-
- /**
- * Indicates the version number of the current application. Such as 9
- */
- virtual void GetVersion(CFX_WideString& wsVersion) = 0;
- virtual void GetFoxitVersion(CFX_WideString& wsFoxitVersion) {
- wsFoxitVersion.Empty();
- }
-
- /**
- * Get application name, such as Phantom.
- */
- virtual void GetAppName(CFX_WideString& wsName) = 0;
- virtual void GetFoxitAppName(CFX_WideString& wsFoxitName) {
- wsFoxitName.Empty();
- }
-
- /**
- * Causes the system to play a sound.
- * @param[in] dwType The system code for the appropriate sound.0 (Error)1
- * (Warning)2 (Question)3 (Status)4 (Default)
- */
- virtual void Beep(FX_DWORD dwType) = 0;
-
- /**
- * Displays a message box.
- * @param[in] dwIconType Icon type, refer to XFA_MBICON.
- * @param[in] dwButtonType Button type, refer to XFA_MESSAGEBUTTON.
- * @return A valid integer representing the value of the button pressed by the
- * user, refer to XFA_ID.
- */
- virtual int32_t MsgBox(const CFX_WideStringC& wsMessage,
- const CFX_WideStringC& wsTitle = FX_WSTRC(L""),
- FX_DWORD dwIconType = 0,
- FX_DWORD dwButtonType = 0) = 0;
-
- /**
- * Get a response from the user.
- * @param[in] bMark - Mask the user input with * (asterisks) when true,
- */
- virtual void Response(CFX_WideString& wsAnswer,
- const CFX_WideStringC& wsQuestion,
- const CFX_WideStringC& wsTitle = FX_WSTRC(L""),
- const CFX_WideStringC& wsDefaultAnswer = FX_WSTRC(L""),
- FX_BOOL bMark = TRUE) = 0;
-
- virtual int32_t GetDocumentCountInBatch() = 0;
- virtual int32_t GetCurDocumentInBatch() = 0;
-
- /**
- * Download something from somewhere.
- * @param[in] wsURL - http, ftp, such as
- * "http://www.w3.org/TR/REC-xml-names/".
- */
- virtual IFX_FileRead* DownloadURL(const CFX_WideStringC& wsURL) = 0;
-
- /**
- * POST data to the given url.
- * @param[in] wsURL the URL being uploaded.
- * @param[in] wsData the data being uploaded.
- * @param[in] wsContentType the content type of data including text/html,
- * text/xml, text/plain, multipart/form-data,
- * application/x-www-form-urlencoded,
- * application/octet-stream, any valid MIME type.
- * @param[in] wsEncode the encode of data including UTF-8, UTF-16,
- * ISO8859-1, any recognized [IANA]character encoding
- * @param[in] wsHeader any additional HTTP headers to be included in the
- * post.
- * @param[out] wsResponse decoded response from server.
- * @return TRUE Server permitted the post request, FALSE otherwise.
- */
- virtual FX_BOOL PostRequestURL(const CFX_WideStringC& wsURL,
- const CFX_WideStringC& wsData,
- const CFX_WideStringC& wsContentType,
- const CFX_WideStringC& wsEncode,
- const CFX_WideStringC& wsHeader,
- CFX_WideString& wsResponse) = 0;
-
- /**
- * PUT data to the given url.
- * @param[in] wsURL the URL being uploaded.
- * @param[in] wsData the data being uploaded.
- * @param[in] wsEncode the encode of data including UTF-8, UTF-16,
- * ISO8859-1, any recognized [IANA]character encoding
- * @return TRUE Server permitted the post request, FALSE otherwise.
- */
- virtual FX_BOOL PutRequestURL(const CFX_WideStringC& wsURL,
- const CFX_WideStringC& wsData,
- const CFX_WideStringC& wsEncode) = 0;
-
- virtual void LoadString(int32_t iStringID, CFX_WideString& wsString) = 0;
- virtual FX_BOOL ShowFileDialog(const CFX_WideStringC& wsTitle,
- const CFX_WideStringC& wsFilter,
- CFX_WideStringArray& wsPathArr,
- FX_BOOL bOpen = TRUE) = 0;
- virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0;
-};
-class IXFA_FontMgr {
- public:
- static IXFA_FontMgr* CreateDefault();
- virtual ~IXFA_FontMgr();
-
- virtual IFX_Font* GetFont(IXFA_Doc* hDoc,
- const CFX_WideStringC& wsFontFamily,
- FX_DWORD dwFontStyles,
- FX_WORD wCodePage = 0xFFFF) = 0;
- virtual IFX_Font* GetDefaultFont(IXFA_Doc* hDoc,
- const CFX_WideStringC& wsFontFamily,
- FX_DWORD dwFontStyles,
- FX_WORD wCodePage = 0xFFFF) = 0;
-};
-class IXFA_App {
- public:
- static IXFA_App* Create(IXFA_AppProvider* pProvider);
- virtual ~IXFA_App();
-
- virtual IXFA_DocHandler* GetDocHandler() = 0;
- virtual IXFA_Doc* CreateDoc(IXFA_DocProvider* pProvider,
- IFX_FileRead* pStream,
- FX_BOOL bTakeOverFile = TRUE) = 0;
- virtual IXFA_Doc* 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 ~IXFA_MenuHandler() {}
-
- virtual FX_BOOL CanCopy(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL CanCut(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL CanPaste(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL CanSelectAll(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL CanDelete(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL CanDeSelect(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL Copy(IXFA_Widget* hWidget, CFX_WideString& wsText) = 0;
- virtual FX_BOOL Cut(IXFA_Widget* hWidget, CFX_WideString& wsText) = 0;
- virtual FX_BOOL Paste(IXFA_Widget* hWidget, const CFX_WideString& wsText) = 0;
- virtual FX_BOOL SelectAll(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL Delete(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL DeSelect(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL CanUndo(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL CanRedo(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL Undo(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL Redo(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL GetSuggestWords(IXFA_Widget* hWidget,
- CFX_PointF pointf,
- CFX_ByteStringArray& sSuggest) = 0;
- virtual FX_BOOL ReplaceSpellCheckWord(IXFA_Widget* hWidget,
- CFX_PointF pointf,
- const CFX_ByteStringC& 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 ~IXFA_DocProvider() {}
-
- virtual void SetChangeMark(IXFA_Doc* hDoc) = 0;
- virtual void InvalidateRect(IXFA_PageView* pPageView,
- const CFX_RectF& rt,
- FX_DWORD dwFlags = 0) = 0;
- virtual void DisplayCaret(IXFA_Widget* hWidget,
- FX_BOOL bVisible,
- const CFX_RectF* pRtAnchor) = 0;
- virtual FX_BOOL GetPopupPos(IXFA_Widget* hWidget,
- FX_FLOAT fMinPopup,
- FX_FLOAT fMaxPopup,
- const CFX_RectF& rtAnchor,
- CFX_RectF& rtPopup) = 0;
- virtual FX_BOOL PopupMenu(IXFA_Widget* hWidget,
- CFX_PointF ptPopup,
- const CFX_RectF* pRectExclude = NULL) = 0;
- virtual void PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags) = 0;
- virtual void WidgetEvent(IXFA_Widget* hWidget,
- CXFA_WidgetAcc* pWidgetData,
- FX_DWORD dwEvent,
- void* pParam = NULL,
- void* pAdditional = NULL) = 0;
- virtual FX_BOOL RenderCustomWidget(IXFA_Widget* hWidget,
- CFX_Graphics* pGS,
- CFX_Matrix* pMatrix,
- const CFX_RectF& rtUI) {
- return FALSE;
- }
- virtual int32_t CountPages(IXFA_Doc* hDoc) = 0;
- virtual int32_t GetCurrentPage(IXFA_Doc* hDoc) = 0;
- virtual void SetCurrentPage(IXFA_Doc* hDoc, int32_t iCurPage) = 0;
- virtual FX_BOOL IsCalculationsEnabled(IXFA_Doc* hDoc) = 0;
- virtual void SetCalculationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled) = 0;
- virtual void GetTitle(IXFA_Doc* hDoc, CFX_WideString& wsTitle) = 0;
- virtual void SetTitle(IXFA_Doc* hDoc, const CFX_WideStringC& wsTitle) = 0;
- virtual void ExportData(IXFA_Doc* hDoc,
- const CFX_WideStringC& wsFilePath,
- FX_BOOL bXDP = TRUE) = 0;
- virtual void ImportData(IXFA_Doc* hDoc,
- const CFX_WideStringC& wsFilePath) = 0;
- virtual void GotoURL(IXFA_Doc* hDoc,
- const CFX_WideStringC& bsURL,
- FX_BOOL bAppend = TRUE) = 0;
- virtual FX_BOOL IsValidationsEnabled(IXFA_Doc* hDoc) = 0;
- virtual void SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled) = 0;
- virtual void SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0;
- virtual void Print(IXFA_Doc* hDoc,
- int32_t nStartPage,
- int32_t nEndPage,
- FX_DWORD dwOptions) = 0;
- virtual int32_t AbsPageCountInBatch(IXFA_Doc* hDoc) = 0;
- virtual int32_t AbsPageInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0;
- virtual int32_t SheetCountInBatch(IXFA_Doc* hDoc) = 0;
- virtual int32_t SheetInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0;
- virtual int32_t Verify(IXFA_Doc* hDoc,
- CXFA_Node* pSigNode,
- FX_BOOL bUsed = TRUE) {
- return 0;
- }
- virtual FX_BOOL Sign(IXFA_Doc* hDoc,
- CXFA_NodeList* pNodeList,
- const CFX_WideStringC& wsExpression,
- const CFX_WideStringC& wsXMLIdent,
- const CFX_WideStringC& wsValue = FX_WSTRC(L"open"),
- FX_BOOL bUsed = TRUE) {
- return 0;
- }
- virtual CXFA_NodeList* Enumerate(IXFA_Doc* hDoc) { return 0; }
- virtual FX_BOOL Clear(IXFA_Doc* hDoc,
- CXFA_Node* pSigNode,
- FX_BOOL bCleared = TRUE) {
- return 0;
- }
- virtual void GetURL(IXFA_Doc* hDoc, CFX_WideString& wsDocURL) = 0;
- virtual FX_ARGB GetHighlightColor(IXFA_Doc* hDoc) = 0;
- virtual void AddDoRecord(IXFA_Widget* hWidget) = 0;
-
- virtual FX_BOOL SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit) = 0;
- virtual FX_BOOL CheckWord(IXFA_Doc* hDoc, const CFX_ByteStringC& sWord) = 0;
- virtual FX_BOOL GetSuggestWords(IXFA_Doc* hDoc,
- const CFX_ByteStringC& sWord,
- CFX_ByteStringArray& sSuggest) = 0;
- virtual FX_BOOL GetPDFScriptObject(IXFA_Doc* hDoc,
- const CFX_ByteStringC& utf8Name,
- FXJSE_HVALUE hValue) = 0;
- virtual FX_BOOL GetGlobalProperty(IXFA_Doc* hDoc,
- const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue) = 0;
- virtual FX_BOOL SetGlobalProperty(IXFA_Doc* hDoc,
- const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue) = 0;
- virtual CPDF_Document* OpenPDF(IXFA_Doc* hDoc,
- IFX_FileRead* pFile,
- FX_BOOL bTakeOverFile) = 0;
- virtual IFX_FileRead* OpenLinkedFile(IXFA_Doc* 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 ~IXFA_DocHandler() {}
-
- virtual void ReleaseDoc(IXFA_Doc* hDoc) = 0;
- virtual IXFA_DocProvider* GetDocProvider(IXFA_Doc* hDoc) = 0;
-
- virtual FX_DWORD GetDocType(IXFA_Doc* hDoc) = 0;
- virtual int32_t StartLoad(IXFA_Doc* hDoc) = 0;
- virtual int32_t DoLoad(IXFA_Doc* hDoc, IFX_Pause* pPause = NULL) = 0;
- virtual void StopLoad(IXFA_Doc* hDoc) = 0;
-
- virtual IXFA_DocView* CreateDocView(IXFA_Doc* hDoc, FX_DWORD dwView = 0) = 0;
-
- virtual int32_t CountPackages(IXFA_Doc* hDoc) = 0;
- virtual void GetPackageName(IXFA_Doc* hDoc,
- int32_t iPackage,
- CFX_WideStringC& wsPackage) = 0;
-
- virtual FX_BOOL SavePackage(IXFA_Doc* hDoc,
- const CFX_WideStringC& wsPackage,
- IFX_FileWrite* pFile,
- IXFA_ChecksumContext* pCSContext = NULL) = 0;
- virtual FX_BOOL CloseDoc(IXFA_Doc* hDoc) = 0;
-
- virtual FX_BOOL ImportData(IXFA_Doc* hDoc,
- IFX_FileRead* pStream,
- FX_BOOL bXDP = TRUE) = 0;
- virtual void SetJSERuntime(IXFA_Doc* hDoc, FXJSE_HRUNTIME hRuntime) = 0;
- virtual FXJSE_HVALUE GetXFAScriptObject(IXFA_Doc* hDoc) = 0;
- virtual XFA_ATTRIBUTEENUM GetRestoreState(IXFA_Doc* hDoc) = 0;
- virtual FX_BOOL RunDocScript(IXFA_Doc* hDoc,
- XFA_SCRIPTTYPE eScriptType,
- const CFX_WideStringC& 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:
- 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;
- int32_t m_iCommitKey;
- FX_BOOL m_bKeyDown;
- FX_BOOL m_bModifier;
- FX_BOOL m_bReenter;
- int32_t m_iSelEnd;
- int32_t 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;
- int32_t 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 ~IXFA_DocView() {}
-
- virtual IXFA_Doc* GetDoc() = 0;
- virtual int32_t StartLayout(int32_t iStartPage = 0) = 0;
- virtual int32_t DoLayout(IFX_Pause* pPause = NULL) = 0;
- virtual void StopLayout() = 0;
-
- virtual int32_t GetLayoutStatus() = 0;
- virtual void UpdateDocView() = 0;
- virtual int32_t CountPageViews() = 0;
- virtual IXFA_PageView* GetPageView(int32_t nIndex) = 0;
- virtual IXFA_Widget* GetWidgetByName(const CFX_WideStringC& wsName) = 0;
- virtual CXFA_WidgetAcc* GetWidgetAccByName(const CFX_WideStringC& wsName) = 0;
- virtual void ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc = NULL) = 0;
- virtual int32_t 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 IXFA_Widget* GetFocusWidget() = 0;
- virtual void KillFocus() = 0;
- virtual FX_BOOL SetFocus(IXFA_Widget* 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_PageView() {}
-
- virtual IXFA_DocView* GetDocView() = 0;
- virtual int32_t GetPageViewIndex() = 0;
- virtual void GetPageViewRect(CFX_RectF& rtPage) = 0;
-
- virtual void GetDisplayMatrix(CFX_Matrix& mt,
- const CFX_Rect& rtDisp,
- int32_t iRotate) = 0;
-
- virtual int32_t LoadPageView(IFX_Pause* pPause = NULL) = 0;
- virtual void UnloadPageView() = 0;
- virtual IXFA_Widget* 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:
- 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 int32_t StartRender(IXFA_PageView* pPageView,
- CFX_Graphics* pGS,
- const CFX_Matrix& pMatrix,
- const CXFA_RenderOptions& options) = 0;
- virtual int32_t DoRender(IFX_Pause* pPause = NULL) = 0;
- virtual void StopRender() = 0;
-
- protected:
- ~IXFA_RenderContext() {}
-};
-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 ~IXFA_WidgetHandler() {}
-
- virtual IXFA_Widget* CreateWidget(IXFA_Widget* hParent,
- XFA_WIDGETTYPE eType,
- IXFA_Widget* hBefore = NULL) = 0;
- virtual IXFA_PageView* GetPageView(IXFA_Widget* hWidget) = 0;
- virtual void GetRect(IXFA_Widget* hWidget, CFX_RectF& rt) = 0;
- virtual FX_DWORD GetStatus(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL GetBBox(IXFA_Widget* hWidget,
- CFX_RectF& rtBox,
- FX_DWORD dwStatus,
- FX_BOOL bDrawFocus = FALSE) = 0;
- virtual CXFA_WidgetAcc* GetDataAcc(IXFA_Widget* hWidget) = 0;
-
- virtual void GetName(IXFA_Widget* hWidget,
- CFX_WideString& wsName,
- int32_t iNameType = 0) = 0;
- virtual FX_BOOL GetToolTip(IXFA_Widget* hWidget,
- CFX_WideString& wsToolTip) = 0;
- virtual void SetPrivateData(IXFA_Widget* hWidget,
- void* module_id,
- void* pData,
- PD_CALLBACK_FREEDATA callback) = 0;
- virtual void* GetPrivateData(IXFA_Widget* hWidget, void* module_id) = 0;
- virtual FX_BOOL OnMouseEnter(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL OnMouseExit(IXFA_Widget* hWidget) = 0;
- virtual FX_BOOL OnLButtonDown(IXFA_Widget* hWidget,
- FX_DWORD dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
- virtual FX_BOOL OnLButtonUp(IXFA_Widget* hWidget,
- FX_DWORD dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
- virtual FX_BOOL OnLButtonDblClk(IXFA_Widget* hWidget,
- FX_DWORD dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
- virtual FX_BOOL OnMouseMove(IXFA_Widget* hWidget,
- FX_DWORD dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
- virtual FX_BOOL OnMouseWheel(IXFA_Widget* hWidget,
- FX_DWORD dwFlags,
- int16_t zDelta,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
- virtual FX_BOOL OnRButtonDown(IXFA_Widget* hWidget,
- FX_DWORD dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
- virtual FX_BOOL OnRButtonUp(IXFA_Widget* hWidget,
- FX_DWORD dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
- virtual FX_BOOL OnRButtonDblClk(IXFA_Widget* hWidget,
- FX_DWORD dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
-
- virtual FX_BOOL OnKeyDown(IXFA_Widget* hWidget,
- FX_DWORD dwKeyCode,
- FX_DWORD dwFlags) = 0;
- virtual FX_BOOL OnKeyUp(IXFA_Widget* hWidget,
- FX_DWORD dwKeyCode,
- FX_DWORD dwFlags) = 0;
- virtual FX_BOOL OnChar(IXFA_Widget* hWidget,
- FX_DWORD dwChar,
- FX_DWORD dwFlags) = 0;
- virtual FX_DWORD OnHitTest(IXFA_Widget* hWidget,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
- virtual FX_BOOL OnSetCursor(IXFA_Widget* hWidget,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
-
- virtual void RenderWidget(IXFA_Widget* 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 int32_t ProcessEvent(CXFA_WidgetAcc* pWidgetAcc,
- CXFA_EventParam* pParam) = 0;
-};
-class IXFA_WidgetIterator {
- public:
- virtual void Release() = 0;
- virtual void Reset() = 0;
- virtual IXFA_Widget* MoveToFirst() = 0;
- virtual IXFA_Widget* MoveToLast() = 0;
- virtual IXFA_Widget* MoveToNext() = 0;
- virtual IXFA_Widget* MoveToPrevious() = 0;
- virtual IXFA_Widget* GetCurrentWidget() = 0;
- virtual FX_BOOL SetCurrentWidget(IXFA_Widget* hWidget) = 0;
-
- protected:
- ~IXFA_WidgetIterator() {}
-};
-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;
-
- protected:
- ~IXFA_WidgetAccIterator() {}
-};
-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;
-
- protected:
- ~IXFA_ChecksumContext() {}
-};
-IXFA_ChecksumContext* XFA_Checksum_Create();
-
-#endif // FXFA_H_
+// 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_H_ +#define FXFA_H_ + +class CFX_Graphics; +class CPDF_Document; +class CXFA_Node; +class CXFA_NodeList; +class CXFA_WidgetAcc; +class IFDE_XMLElement; +class IFWL_AdapterTimerMgr; +class IFX_Font; +class IXFA_App; +class IXFA_AppProvider; +class IXFA_ChecksumContext; +class IXFA_DocHandler; +class IXFA_DocProvider; +class IXFA_DocView; +class IXFA_FontMgr; +class IXFA_MenuHandler; +class IXFA_PageView; +class IXFA_PageViewRender; +class IXFA_WidgetAccIterator; +class IXFA_WidgetHandler; +class IXFA_WidgetIterator; + +class IXFA_Doc { + public: + virtual ~IXFA_Doc() {} + + protected: + IXFA_Doc() {} +}; + +class IXFA_Widget { + public: + virtual ~IXFA_Widget() {} + + protected: + IXFA_Widget() {} +}; + +#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 +#define XFA_IDS_ValidateNumberError 99 + +// Probably should be called IXFA_AppDelegate. +class IXFA_AppProvider { + public: + virtual ~IXFA_AppProvider() {} + + /** + * Specifies the name of the client application in which a form currently + * exists. Such as Exchange-Pro. + */ + virtual void SetAppType(const CFX_WideStringC& wsAppType) = 0; + virtual void GetAppType(CFX_WideString& wsAppType) = 0; + virtual void SetFoxitAppType(const CFX_WideStringC& wsFoxitAppType) {} + virtual void GetFoxitAppType(CFX_WideString& wsFoxitAppType) { + wsFoxitAppType.Empty(); + } + + /** + * Returns the language of the running host application. Such as zh_CN + */ + virtual void GetLanguage(CFX_WideString& wsLanguage) = 0; + + /** + * Returns the platform of the machine running the script. Such as WIN + */ + virtual void GetPlatform(CFX_WideString& wsPlatform) = 0; + + /** + * Indicates the packaging of the application that is running the script. Such + * as Full + */ + virtual void GetVariation(CFX_WideString& wsVariation) = 0; + + /** + * Indicates the version number of the current application. Such as 9 + */ + virtual void GetVersion(CFX_WideString& wsVersion) = 0; + virtual void GetFoxitVersion(CFX_WideString& wsFoxitVersion) { + wsFoxitVersion.Empty(); + } + + /** + * Get application name, such as Phantom. + */ + virtual void GetAppName(CFX_WideString& wsName) = 0; + virtual void GetFoxitAppName(CFX_WideString& wsFoxitName) { + wsFoxitName.Empty(); + } + + /** + * Causes the system to play a sound. + * @param[in] dwType The system code for the appropriate sound.0 (Error)1 + * (Warning)2 (Question)3 (Status)4 (Default) + */ + virtual void Beep(FX_DWORD dwType) = 0; + + /** + * Displays a message box. + * @param[in] dwIconType Icon type, refer to XFA_MBICON. + * @param[in] dwButtonType Button type, refer to XFA_MESSAGEBUTTON. + * @return A valid integer representing the value of the button pressed by the + * user, refer to XFA_ID. + */ + virtual int32_t MsgBox(const CFX_WideStringC& wsMessage, + const CFX_WideStringC& wsTitle = FX_WSTRC(L""), + FX_DWORD dwIconType = 0, + FX_DWORD dwButtonType = 0) = 0; + + /** + * Get a response from the user. + * @param[in] bMark - Mask the user input with * (asterisks) when true, + */ + virtual void Response(CFX_WideString& wsAnswer, + const CFX_WideStringC& wsQuestion, + const CFX_WideStringC& wsTitle = FX_WSTRC(L""), + const CFX_WideStringC& wsDefaultAnswer = FX_WSTRC(L""), + FX_BOOL bMark = TRUE) = 0; + + virtual int32_t GetDocumentCountInBatch() = 0; + virtual int32_t GetCurDocumentInBatch() = 0; + + /** + * Download something from somewhere. + * @param[in] wsURL - http, ftp, such as + * "http://www.w3.org/TR/REC-xml-names/". + */ + virtual IFX_FileRead* DownloadURL(const CFX_WideStringC& wsURL) = 0; + + /** + * POST data to the given url. + * @param[in] wsURL the URL being uploaded. + * @param[in] wsData the data being uploaded. + * @param[in] wsContentType the content type of data including text/html, + * text/xml, text/plain, multipart/form-data, + * application/x-www-form-urlencoded, + * application/octet-stream, any valid MIME type. + * @param[in] wsEncode the encode of data including UTF-8, UTF-16, + * ISO8859-1, any recognized [IANA]character encoding + * @param[in] wsHeader any additional HTTP headers to be included in the + * post. + * @param[out] wsResponse decoded response from server. + * @return TRUE Server permitted the post request, FALSE otherwise. + */ + virtual FX_BOOL PostRequestURL(const CFX_WideStringC& wsURL, + const CFX_WideStringC& wsData, + const CFX_WideStringC& wsContentType, + const CFX_WideStringC& wsEncode, + const CFX_WideStringC& wsHeader, + CFX_WideString& wsResponse) = 0; + + /** + * PUT data to the given url. + * @param[in] wsURL the URL being uploaded. + * @param[in] wsData the data being uploaded. + * @param[in] wsEncode the encode of data including UTF-8, UTF-16, + * ISO8859-1, any recognized [IANA]character encoding + * @return TRUE Server permitted the post request, FALSE otherwise. + */ + virtual FX_BOOL PutRequestURL(const CFX_WideStringC& wsURL, + const CFX_WideStringC& wsData, + const CFX_WideStringC& wsEncode) = 0; + + virtual void LoadString(int32_t iStringID, CFX_WideString& wsString) = 0; + virtual FX_BOOL ShowFileDialog(const CFX_WideStringC& wsTitle, + const CFX_WideStringC& wsFilter, + CFX_WideStringArray& wsPathArr, + FX_BOOL bOpen = TRUE) = 0; + virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0; +}; +class IXFA_FontMgr { + public: + static IXFA_FontMgr* CreateDefault(); + virtual ~IXFA_FontMgr(); + + virtual IFX_Font* GetFont(IXFA_Doc* hDoc, + const CFX_WideStringC& wsFontFamily, + FX_DWORD dwFontStyles, + FX_WORD wCodePage = 0xFFFF) = 0; + virtual IFX_Font* GetDefaultFont(IXFA_Doc* hDoc, + const CFX_WideStringC& wsFontFamily, + FX_DWORD dwFontStyles, + FX_WORD wCodePage = 0xFFFF) = 0; +}; +class IXFA_App { + public: + static IXFA_App* Create(IXFA_AppProvider* pProvider); + virtual ~IXFA_App(); + + virtual IXFA_DocHandler* GetDocHandler() = 0; + virtual IXFA_Doc* CreateDoc(IXFA_DocProvider* pProvider, + IFX_FileRead* pStream, + FX_BOOL bTakeOverFile = TRUE) = 0; + virtual IXFA_Doc* 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 ~IXFA_MenuHandler() {} + + virtual FX_BOOL CanCopy(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL CanCut(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL CanPaste(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL CanSelectAll(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL CanDelete(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL CanDeSelect(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL Copy(IXFA_Widget* hWidget, CFX_WideString& wsText) = 0; + virtual FX_BOOL Cut(IXFA_Widget* hWidget, CFX_WideString& wsText) = 0; + virtual FX_BOOL Paste(IXFA_Widget* hWidget, const CFX_WideString& wsText) = 0; + virtual FX_BOOL SelectAll(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL Delete(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL DeSelect(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL CanUndo(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL CanRedo(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL Undo(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL Redo(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL GetSuggestWords(IXFA_Widget* hWidget, + CFX_PointF pointf, + CFX_ByteStringArray& sSuggest) = 0; + virtual FX_BOOL ReplaceSpellCheckWord(IXFA_Widget* hWidget, + CFX_PointF pointf, + const CFX_ByteStringC& 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 ~IXFA_DocProvider() {} + + virtual void SetChangeMark(IXFA_Doc* hDoc) = 0; + virtual void InvalidateRect(IXFA_PageView* pPageView, + const CFX_RectF& rt, + FX_DWORD dwFlags = 0) = 0; + virtual void DisplayCaret(IXFA_Widget* hWidget, + FX_BOOL bVisible, + const CFX_RectF* pRtAnchor) = 0; + virtual FX_BOOL GetPopupPos(IXFA_Widget* hWidget, + FX_FLOAT fMinPopup, + FX_FLOAT fMaxPopup, + const CFX_RectF& rtAnchor, + CFX_RectF& rtPopup) = 0; + virtual FX_BOOL PopupMenu(IXFA_Widget* hWidget, + CFX_PointF ptPopup, + const CFX_RectF* pRectExclude = NULL) = 0; + virtual void PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags) = 0; + virtual void WidgetEvent(IXFA_Widget* hWidget, + CXFA_WidgetAcc* pWidgetData, + FX_DWORD dwEvent, + void* pParam = NULL, + void* pAdditional = NULL) = 0; + virtual FX_BOOL RenderCustomWidget(IXFA_Widget* hWidget, + CFX_Graphics* pGS, + CFX_Matrix* pMatrix, + const CFX_RectF& rtUI) { + return FALSE; + } + virtual int32_t CountPages(IXFA_Doc* hDoc) = 0; + virtual int32_t GetCurrentPage(IXFA_Doc* hDoc) = 0; + virtual void SetCurrentPage(IXFA_Doc* hDoc, int32_t iCurPage) = 0; + virtual FX_BOOL IsCalculationsEnabled(IXFA_Doc* hDoc) = 0; + virtual void SetCalculationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled) = 0; + virtual void GetTitle(IXFA_Doc* hDoc, CFX_WideString& wsTitle) = 0; + virtual void SetTitle(IXFA_Doc* hDoc, const CFX_WideStringC& wsTitle) = 0; + virtual void ExportData(IXFA_Doc* hDoc, + const CFX_WideStringC& wsFilePath, + FX_BOOL bXDP = TRUE) = 0; + virtual void ImportData(IXFA_Doc* hDoc, + const CFX_WideStringC& wsFilePath) = 0; + virtual void GotoURL(IXFA_Doc* hDoc, + const CFX_WideStringC& bsURL, + FX_BOOL bAppend = TRUE) = 0; + virtual FX_BOOL IsValidationsEnabled(IXFA_Doc* hDoc) = 0; + virtual void SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled) = 0; + virtual void SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0; + virtual void Print(IXFA_Doc* hDoc, + int32_t nStartPage, + int32_t nEndPage, + FX_DWORD dwOptions) = 0; + virtual int32_t AbsPageCountInBatch(IXFA_Doc* hDoc) = 0; + virtual int32_t AbsPageInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0; + virtual int32_t SheetCountInBatch(IXFA_Doc* hDoc) = 0; + virtual int32_t SheetInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0; + virtual int32_t Verify(IXFA_Doc* hDoc, + CXFA_Node* pSigNode, + FX_BOOL bUsed = TRUE) { + return 0; + } + virtual FX_BOOL Sign(IXFA_Doc* hDoc, + CXFA_NodeList* pNodeList, + const CFX_WideStringC& wsExpression, + const CFX_WideStringC& wsXMLIdent, + const CFX_WideStringC& wsValue = FX_WSTRC(L"open"), + FX_BOOL bUsed = TRUE) { + return 0; + } + virtual CXFA_NodeList* Enumerate(IXFA_Doc* hDoc) { return 0; } + virtual FX_BOOL Clear(IXFA_Doc* hDoc, + CXFA_Node* pSigNode, + FX_BOOL bCleared = TRUE) { + return 0; + } + virtual void GetURL(IXFA_Doc* hDoc, CFX_WideString& wsDocURL) = 0; + virtual FX_ARGB GetHighlightColor(IXFA_Doc* hDoc) = 0; + virtual void AddDoRecord(IXFA_Widget* hWidget) = 0; + + virtual FX_BOOL SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit) = 0; + virtual FX_BOOL CheckWord(IXFA_Doc* hDoc, const CFX_ByteStringC& sWord) = 0; + virtual FX_BOOL GetSuggestWords(IXFA_Doc* hDoc, + const CFX_ByteStringC& sWord, + CFX_ByteStringArray& sSuggest) = 0; + virtual FX_BOOL GetPDFScriptObject(IXFA_Doc* hDoc, + const CFX_ByteStringC& utf8Name, + FXJSE_HVALUE hValue) = 0; + virtual FX_BOOL GetGlobalProperty(IXFA_Doc* hDoc, + const CFX_ByteStringC& szPropName, + FXJSE_HVALUE hValue) = 0; + virtual FX_BOOL SetGlobalProperty(IXFA_Doc* hDoc, + const CFX_ByteStringC& szPropName, + FXJSE_HVALUE hValue) = 0; + virtual CPDF_Document* OpenPDF(IXFA_Doc* hDoc, + IFX_FileRead* pFile, + FX_BOOL bTakeOverFile) = 0; + virtual IFX_FileRead* OpenLinkedFile(IXFA_Doc* 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 ~IXFA_DocHandler() {} + + virtual void ReleaseDoc(IXFA_Doc* hDoc) = 0; + virtual IXFA_DocProvider* GetDocProvider(IXFA_Doc* hDoc) = 0; + + virtual FX_DWORD GetDocType(IXFA_Doc* hDoc) = 0; + virtual int32_t StartLoad(IXFA_Doc* hDoc) = 0; + virtual int32_t DoLoad(IXFA_Doc* hDoc, IFX_Pause* pPause = NULL) = 0; + virtual void StopLoad(IXFA_Doc* hDoc) = 0; + + virtual IXFA_DocView* CreateDocView(IXFA_Doc* hDoc, FX_DWORD dwView = 0) = 0; + + virtual int32_t CountPackages(IXFA_Doc* hDoc) = 0; + virtual void GetPackageName(IXFA_Doc* hDoc, + int32_t iPackage, + CFX_WideStringC& wsPackage) = 0; + + virtual FX_BOOL SavePackage(IXFA_Doc* hDoc, + const CFX_WideStringC& wsPackage, + IFX_FileWrite* pFile, + IXFA_ChecksumContext* pCSContext = NULL) = 0; + virtual FX_BOOL CloseDoc(IXFA_Doc* hDoc) = 0; + + virtual FX_BOOL ImportData(IXFA_Doc* hDoc, + IFX_FileRead* pStream, + FX_BOOL bXDP = TRUE) = 0; + virtual void SetJSERuntime(IXFA_Doc* hDoc, FXJSE_HRUNTIME hRuntime) = 0; + virtual FXJSE_HVALUE GetXFAScriptObject(IXFA_Doc* hDoc) = 0; + virtual XFA_ATTRIBUTEENUM GetRestoreState(IXFA_Doc* hDoc) = 0; + virtual FX_BOOL RunDocScript(IXFA_Doc* hDoc, + XFA_SCRIPTTYPE eScriptType, + const CFX_WideStringC& 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: + 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; + int32_t m_iCommitKey; + FX_BOOL m_bKeyDown; + FX_BOOL m_bModifier; + FX_BOOL m_bReenter; + int32_t m_iSelEnd; + int32_t 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; + int32_t 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 ~IXFA_DocView() {} + + virtual IXFA_Doc* GetDoc() = 0; + virtual int32_t StartLayout(int32_t iStartPage = 0) = 0; + virtual int32_t DoLayout(IFX_Pause* pPause = NULL) = 0; + virtual void StopLayout() = 0; + + virtual int32_t GetLayoutStatus() = 0; + virtual void UpdateDocView() = 0; + virtual int32_t CountPageViews() = 0; + virtual IXFA_PageView* GetPageView(int32_t nIndex) = 0; + virtual IXFA_Widget* GetWidgetByName(const CFX_WideStringC& wsName) = 0; + virtual CXFA_WidgetAcc* GetWidgetAccByName(const CFX_WideStringC& wsName) = 0; + virtual void ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc = NULL) = 0; + virtual int32_t 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 IXFA_Widget* GetFocusWidget() = 0; + virtual void KillFocus() = 0; + virtual FX_BOOL SetFocus(IXFA_Widget* 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_PageView() {} + + virtual IXFA_DocView* GetDocView() = 0; + virtual int32_t GetPageViewIndex() = 0; + virtual void GetPageViewRect(CFX_RectF& rtPage) = 0; + + virtual void GetDisplayMatrix(CFX_Matrix& mt, + const CFX_Rect& rtDisp, + int32_t iRotate) = 0; + + virtual int32_t LoadPageView(IFX_Pause* pPause = NULL) = 0; + virtual void UnloadPageView() = 0; + virtual IXFA_Widget* 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: + 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 int32_t StartRender(IXFA_PageView* pPageView, + CFX_Graphics* pGS, + const CFX_Matrix& pMatrix, + const CXFA_RenderOptions& options) = 0; + virtual int32_t DoRender(IFX_Pause* pPause = NULL) = 0; + virtual void StopRender() = 0; + + protected: + ~IXFA_RenderContext() {} +}; +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 ~IXFA_WidgetHandler() {} + + virtual IXFA_Widget* CreateWidget(IXFA_Widget* hParent, + XFA_WIDGETTYPE eType, + IXFA_Widget* hBefore = NULL) = 0; + virtual IXFA_PageView* GetPageView(IXFA_Widget* hWidget) = 0; + virtual void GetRect(IXFA_Widget* hWidget, CFX_RectF& rt) = 0; + virtual FX_DWORD GetStatus(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL GetBBox(IXFA_Widget* hWidget, + CFX_RectF& rtBox, + FX_DWORD dwStatus, + FX_BOOL bDrawFocus = FALSE) = 0; + virtual CXFA_WidgetAcc* GetDataAcc(IXFA_Widget* hWidget) = 0; + + virtual void GetName(IXFA_Widget* hWidget, + CFX_WideString& wsName, + int32_t iNameType = 0) = 0; + virtual FX_BOOL GetToolTip(IXFA_Widget* hWidget, + CFX_WideString& wsToolTip) = 0; + virtual void SetPrivateData(IXFA_Widget* hWidget, + void* module_id, + void* pData, + PD_CALLBACK_FREEDATA callback) = 0; + virtual void* GetPrivateData(IXFA_Widget* hWidget, void* module_id) = 0; + virtual FX_BOOL OnMouseEnter(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL OnMouseExit(IXFA_Widget* hWidget) = 0; + virtual FX_BOOL OnLButtonDown(IXFA_Widget* hWidget, + FX_DWORD dwFlags, + FX_FLOAT fx, + FX_FLOAT fy) = 0; + virtual FX_BOOL OnLButtonUp(IXFA_Widget* hWidget, + FX_DWORD dwFlags, + FX_FLOAT fx, + FX_FLOAT fy) = 0; + virtual FX_BOOL OnLButtonDblClk(IXFA_Widget* hWidget, + FX_DWORD dwFlags, + FX_FLOAT fx, + FX_FLOAT fy) = 0; + virtual FX_BOOL OnMouseMove(IXFA_Widget* hWidget, + FX_DWORD dwFlags, + FX_FLOAT fx, + FX_FLOAT fy) = 0; + virtual FX_BOOL OnMouseWheel(IXFA_Widget* hWidget, + FX_DWORD dwFlags, + int16_t zDelta, + FX_FLOAT fx, + FX_FLOAT fy) = 0; + virtual FX_BOOL OnRButtonDown(IXFA_Widget* hWidget, + FX_DWORD dwFlags, + FX_FLOAT fx, + FX_FLOAT fy) = 0; + virtual FX_BOOL OnRButtonUp(IXFA_Widget* hWidget, + FX_DWORD dwFlags, + FX_FLOAT fx, + FX_FLOAT fy) = 0; + virtual FX_BOOL OnRButtonDblClk(IXFA_Widget* hWidget, + FX_DWORD dwFlags, + FX_FLOAT fx, + FX_FLOAT fy) = 0; + + virtual FX_BOOL OnKeyDown(IXFA_Widget* hWidget, + FX_DWORD dwKeyCode, + FX_DWORD dwFlags) = 0; + virtual FX_BOOL OnKeyUp(IXFA_Widget* hWidget, + FX_DWORD dwKeyCode, + FX_DWORD dwFlags) = 0; + virtual FX_BOOL OnChar(IXFA_Widget* hWidget, + FX_DWORD dwChar, + FX_DWORD dwFlags) = 0; + virtual FX_DWORD OnHitTest(IXFA_Widget* hWidget, + FX_FLOAT fx, + FX_FLOAT fy) = 0; + virtual FX_BOOL OnSetCursor(IXFA_Widget* hWidget, + FX_FLOAT fx, + FX_FLOAT fy) = 0; + + virtual void RenderWidget(IXFA_Widget* 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 int32_t ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, + CXFA_EventParam* pParam) = 0; +}; +class IXFA_WidgetIterator { + public: + virtual void Release() = 0; + virtual void Reset() = 0; + virtual IXFA_Widget* MoveToFirst() = 0; + virtual IXFA_Widget* MoveToLast() = 0; + virtual IXFA_Widget* MoveToNext() = 0; + virtual IXFA_Widget* MoveToPrevious() = 0; + virtual IXFA_Widget* GetCurrentWidget() = 0; + virtual FX_BOOL SetCurrentWidget(IXFA_Widget* hWidget) = 0; + + protected: + ~IXFA_WidgetIterator() {} +}; +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; + + protected: + ~IXFA_WidgetAccIterator() {} +}; +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; + + protected: + ~IXFA_ChecksumContext() {} +}; +IXFA_ChecksumContext* XFA_Checksum_Create(); + +#endif // FXFA_H_ diff --git a/xfa/include/fxfa/fxfa_basic.h b/xfa/include/fxfa/fxfa_basic.h index e71e417734..6e1979e042 100644 --- a/xfa/include/fxfa/fxfa_basic.h +++ b/xfa/include/fxfa/fxfa_basic.h @@ -1,1084 +1,1084 @@ -// 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
-
-#include "xfa/include/fxjse/fxjse.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 {
- uint32_t uHash;
- const FX_WCHAR* pName;
- XFA_XDPPACKET eName;
- const FX_WCHAR* pURI;
- FX_DWORD eFlags;
-} XFA_PACKETINFO, *XFA_LPPACKETINFO;
-typedef XFA_PACKETINFO const* XFA_LPCPACKETINFO;
-XFA_LPCPACKETINFO XFA_GetPacketByName(const CFX_WideStringC& 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 {
- uint32_t uHash;
- const FX_WCHAR* pName;
- XFA_ELEMENT eName;
- FX_DWORD dwPackets;
- FX_DWORD eObjectType;
-} XFA_ELEMENTINFO, *XFA_LPELEMENTINFO;
-typedef XFA_ELEMENTINFO const* XFA_LPCELEMENTINFO;
-int32_t XFA_GetElementCount();
-XFA_LPCELEMENTINFO XFA_GetElementByName(const CFX_WideStringC& 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 {
- uint32_t uHash;
- const FX_WCHAR* pName;
- XFA_ATTRIBUTE eName;
- XFA_ATTRIBUTETYPE eType;
- FX_DWORD dwPackets;
- void* pDefValue;
-} XFA_ATTRIBUTEINFO, *XFA_LPATTRIBUTEINFO;
-typedef XFA_ATTRIBUTEINFO const* XFA_LPCATTRIBUTEINFO;
-int32_t XFA_GetAttributeCount();
-XFA_LPCATTRIBUTEINFO XFA_GetAttributeByName(const CFX_WideStringC& wsName);
-XFA_LPCATTRIBUTEINFO XFA_GetAttributeByID(XFA_ATTRIBUTE eName);
-FX_BOOL XFA_GetAttributeDefaultValue(void*& 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);
-int32_t 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;
- int16_t wParentIndex;
-} XFA_SCRIPTHIERARCHY, *XFA_LPSCRIPTHIERARCHY;
-typedef XFA_SCRIPTHIERARCHY const* XFA_LPCSCRIPTHIERARCHY;
-const FX_WORD* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount);
-const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& 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;
- uint8_t uOccur;
- uint8_t uFlags;
-} XFA_PROPERTY, *XFA_LPPROPERTY;
-typedef XFA_PROPERTY const* XFA_LPCPROPERTY;
-XFA_LPCPROPERTY XFA_GetElementProperties(XFA_ELEMENT eElement, int32_t& iCount);
-XFA_LPCPROPERTY XFA_GetPropertyOfElement(XFA_ELEMENT eElement,
- XFA_ELEMENT eProperty,
- FX_DWORD dwPacket);
-typedef struct _XFA_ATTRIBUTEENUMINFO {
- uint32_t uHash;
- const FX_WCHAR* pName;
- XFA_ATTRIBUTEENUM eName;
-} XFA_ATTRIBUTEENUMINFO, *XFA_LPATTRIBUTEENUMINFO;
-typedef XFA_ATTRIBUTEENUMINFO const* XFA_LPCATTRIBUTEENUMINFO;
-XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByName(
- const CFX_WideStringC& 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(const CFX_WideStringC& 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(const CFX_WideStringC& wsMeasure) { Set(wsMeasure); }
- CXFA_Measurement(FX_FLOAT fValue, XFA_UNIT eUnit) { Set(fValue, eUnit); }
- static XFA_UNIT GetUnit(const CFX_WideStringC& 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 {
- uint32_t uHash;
- const FX_WCHAR* pName;
- XFA_METHOD_CALLBACK lpfnCallback;
-} XFA_METHODINFO, *XFA_LPMETHODINFO;
-typedef XFA_METHODINFO const* XFA_LPCMETHODINFO;
-int32_t XFA_GetMethodCount();
-XFA_LPCMETHODINFO XFA_GetMethodByName(XFA_ELEMENT eElement,
- const CFX_WideStringC& 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 {
- uint32_t uHash;
- const FX_WCHAR* pName;
- XFA_ATTRIBUTE_CALLBACK lpfnCallback;
- int32_t eAttribute;
- FX_WORD eValueType;
-} XFA_SCRIPTATTRIBUTEINFO, *XFA_LPSCRIPTATTRIBUTEINFO;
-typedef XFA_SCRIPTATTRIBUTEINFO const* XFA_LPCSCRIPTATTRIBUTEINFO;
-XFA_LPCSCRIPTATTRIBUTEINFO XFA_GetScriptAttributeByName(
- XFA_ELEMENT eElement,
- const CFX_WideStringC& wsAttributeName);
-#endif
+// 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 + +#include "xfa/include/fxjse/fxjse.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 { + uint32_t uHash; + const FX_WCHAR* pName; + XFA_XDPPACKET eName; + const FX_WCHAR* pURI; + FX_DWORD eFlags; +} XFA_PACKETINFO, *XFA_LPPACKETINFO; +typedef XFA_PACKETINFO const* XFA_LPCPACKETINFO; +XFA_LPCPACKETINFO XFA_GetPacketByName(const CFX_WideStringC& 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 { + uint32_t uHash; + const FX_WCHAR* pName; + XFA_ELEMENT eName; + FX_DWORD dwPackets; + FX_DWORD eObjectType; +} XFA_ELEMENTINFO, *XFA_LPELEMENTINFO; +typedef XFA_ELEMENTINFO const* XFA_LPCELEMENTINFO; +int32_t XFA_GetElementCount(); +XFA_LPCELEMENTINFO XFA_GetElementByName(const CFX_WideStringC& 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 { + uint32_t uHash; + const FX_WCHAR* pName; + XFA_ATTRIBUTE eName; + XFA_ATTRIBUTETYPE eType; + FX_DWORD dwPackets; + void* pDefValue; +} XFA_ATTRIBUTEINFO, *XFA_LPATTRIBUTEINFO; +typedef XFA_ATTRIBUTEINFO const* XFA_LPCATTRIBUTEINFO; +int32_t XFA_GetAttributeCount(); +XFA_LPCATTRIBUTEINFO XFA_GetAttributeByName(const CFX_WideStringC& wsName); +XFA_LPCATTRIBUTEINFO XFA_GetAttributeByID(XFA_ATTRIBUTE eName); +FX_BOOL XFA_GetAttributeDefaultValue(void*& 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); +int32_t 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; + int16_t wParentIndex; +} XFA_SCRIPTHIERARCHY, *XFA_LPSCRIPTHIERARCHY; +typedef XFA_SCRIPTHIERARCHY const* XFA_LPCSCRIPTHIERARCHY; +const FX_WORD* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount); +const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& 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; + uint8_t uOccur; + uint8_t uFlags; +} XFA_PROPERTY, *XFA_LPPROPERTY; +typedef XFA_PROPERTY const* XFA_LPCPROPERTY; +XFA_LPCPROPERTY XFA_GetElementProperties(XFA_ELEMENT eElement, int32_t& iCount); +XFA_LPCPROPERTY XFA_GetPropertyOfElement(XFA_ELEMENT eElement, + XFA_ELEMENT eProperty, + FX_DWORD dwPacket); +typedef struct _XFA_ATTRIBUTEENUMINFO { + uint32_t uHash; + const FX_WCHAR* pName; + XFA_ATTRIBUTEENUM eName; +} XFA_ATTRIBUTEENUMINFO, *XFA_LPATTRIBUTEENUMINFO; +typedef XFA_ATTRIBUTEENUMINFO const* XFA_LPCATTRIBUTEENUMINFO; +XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByName( + const CFX_WideStringC& 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(const CFX_WideStringC& 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(const CFX_WideStringC& wsMeasure) { Set(wsMeasure); } + CXFA_Measurement(FX_FLOAT fValue, XFA_UNIT eUnit) { Set(fValue, eUnit); } + static XFA_UNIT GetUnit(const CFX_WideStringC& 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 { + uint32_t uHash; + const FX_WCHAR* pName; + XFA_METHOD_CALLBACK lpfnCallback; +} XFA_METHODINFO, *XFA_LPMETHODINFO; +typedef XFA_METHODINFO const* XFA_LPCMETHODINFO; +int32_t XFA_GetMethodCount(); +XFA_LPCMETHODINFO XFA_GetMethodByName(XFA_ELEMENT eElement, + const CFX_WideStringC& 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 { + uint32_t uHash; + const FX_WCHAR* pName; + XFA_ATTRIBUTE_CALLBACK lpfnCallback; + int32_t eAttribute; + FX_WORD eValueType; +} XFA_SCRIPTATTRIBUTEINFO, *XFA_LPSCRIPTATTRIBUTEINFO; +typedef XFA_SCRIPTATTRIBUTEINFO const* XFA_LPCSCRIPTATTRIBUTEINFO; +XFA_LPCSCRIPTATTRIBUTEINFO XFA_GetScriptAttributeByName( + XFA_ELEMENT eElement, + const CFX_WideStringC& wsAttributeName); +#endif diff --git a/xfa/include/fxfa/fxfa_objectacc.h b/xfa/include/fxfa/fxfa_objectacc.h index 897cb08f99..0c6be3d38a 100644 --- a/xfa/include/fxfa/fxfa_objectacc.h +++ b/xfa/include/fxfa/fxfa_objectacc.h @@ -1,848 +1,848 @@ -// 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_OBJECTACC_H_
-#define FXFA_OBJECTACC_H_
-
-#include "core/include/fxge/fx_dib.h" // For FX_ARGB.
-
-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:
- 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();
-
- int32_t GetPresence();
-
- FX_ARGB GetColor(FX_BOOL bText = FALSE);
-
- void SetColor(FX_ARGB color);
-
- int32_t GetFillType();
-
- int32_t GetPattern(FX_ARGB& foreColor);
-
- int32_t GetStipple(FX_ARGB& stippleColor);
-
- int32_t GetLinear(FX_ARGB& endColor);
-
- int32_t GetRadial(FX_ARGB& endColor);
- FX_BOOL SetPresence(int32_t iPresence);
- FX_BOOL SetFillType(int32_t iType);
- FX_BOOL SetPattern(int32_t iPattern, FX_ARGB foreColor);
- FX_BOOL SetStipple(int32_t iStipple, FX_ARGB stippleColor);
- FX_BOOL SetLinear(int32_t iLinear, FX_ARGB endColor);
- FX_BOOL SetRadial(int32_t 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();
-
- int32_t GetLineThrough();
-
- int32_t GetLineThroughPeriod();
-
- int32_t GetOverline();
-
- int32_t GetOverlinePeriod();
-
- int32_t GetUnderline();
-
- int32_t 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(int32_t iLineThrough);
- FX_BOOL SetLineThroughPeriod(int32_t iLineThroughPeriod);
- FX_BOOL SetOverline(int32_t iOverline);
- FX_BOOL SetOverlinePeriod(int32_t iOverlinePeriod);
- FX_BOOL SetUnderline(int32_t iUnderline);
- FX_BOOL SetUnderlinePeriod(int32_t iUnderlinePeriod);
-};
-class CXFA_Caption : public CXFA_Data {
- public:
- CXFA_Caption(CXFA_Node* pNode);
-
- int32_t GetPresence();
-
- int32_t GetPlacementType();
-
- FX_FLOAT GetReserve();
-
- CXFA_Margin GetMargin();
-
- CXFA_Font GetFont();
-
- CXFA_Value GetValue();
-
- CXFA_Para GetPara();
- FX_BOOL SetPresence(int32_t iPresence);
- FX_BOOL SetPlacementType(int32_t iType);
- FX_BOOL SetReserve(FX_FLOAT fReserve);
-};
-class CXFA_Para : public CXFA_Data {
- public:
- CXFA_Para(CXFA_Node* pNode);
-
- int32_t GetHorizontalAlign();
-
- int32_t GetVerticalAlign();
-
- FX_FLOAT GetLineHeight();
- FX_FLOAT GetMarginLeft();
- FX_FLOAT GetMarginRight();
- int32_t GetOrphans();
- FX_FLOAT GetRadixOffset();
- FX_FLOAT GetSpaceAbove();
- FX_FLOAT GetSpaceBelow();
- FX_FLOAT GetTextIndent();
- int32_t GetWidows();
- FX_BOOL SetHorizontalAlign(int32_t iHorizontalAlign);
- FX_BOOL SetVerticalAlign(int32_t iVerticalAlign);
- FX_BOOL SetLineHeight(FX_FLOAT fLineHeight);
- FX_BOOL SetMarginLeft(FX_FLOAT fMarginLeft);
- FX_BOOL SetMarginRight(FX_FLOAT fMarginRight);
- FX_BOOL SetOrphans(int32_t 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(int32_t iWidows);
-};
-class CXFA_Keep : public CXFA_Data {
- public:
- CXFA_Keep(CXFA_Node* pNode, CXFA_Node* pParent);
-
- int32_t GetIntact();
- int32_t GetNext();
- int32_t GetPrevious();
- FX_BOOL SetIntact(int32_t iIntact);
- FX_BOOL SetNext(int32_t iNext);
- FX_BOOL SetPrevious(int32_t 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);
-
- int32_t GetActivity();
-
- int32_t GetEventType();
- void GetRef(CFX_WideStringC& wsRef);
-
- int32_t GetExecuteRunAt();
- int32_t GetExecuteType();
- void GetExecuteConnection(CFX_WideString& wsConnection);
-
- CXFA_Script GetScript();
-
- CXFA_Submit GetSubmit();
-
- int32_t GetSignDataOperation();
- void GetSignDataTarget(CFX_WideString& wsTarget);
- FX_BOOL SetActivity(int32_t iActivity);
- FX_BOOL SetEventType(int32_t iEventType);
- FX_BOOL SetExecuteRunAt(int32_t iExecuteRunAt);
- FX_BOOL SetExecuteType(int32_t iExecuteType);
- FX_BOOL SetExecuteConnection(const CFX_WideString& wsConnection);
- FX_BOOL SetSignDataOperation(int32_t 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();
- int32_t GetRunAt();
- void GetExpression(CFX_WideString& wsExpression);
- FX_BOOL SetBinding(const CFX_WideString& wsBinding);
- FX_BOOL SetContentType(XFA_SCRIPTTYPE eType);
- FX_BOOL SetRunAt(int32_t iRunAt);
- FX_BOOL SetExpression(const CFX_WideString& wsExpression);
-};
-class CXFA_Submit : public CXFA_Data {
- public:
- CXFA_Submit(CXFA_Node* pNode);
- FX_BOOL IsSubmitEmbedPDF();
- int32_t GetSubmitFormat();
- void GetSubmitTarget(CFX_WideStringC& wsTarget);
- XFA_TEXTENCODING GetSubmitTextEncoding();
- void GetSubmitXDPContent(CFX_WideStringC& wsContent);
- FX_BOOL SetSubmitFormat(int32_t 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) {}
- int32_t GetHand();
- FX_BOOL GetSlop();
- CXFA_Edge GetEdge();
- FX_BOOL SetHand(int32_t iHand);
- FX_BOOL SetSlop(int32_t iSlop);
-};
-class CXFA_Text : public CXFA_Data {
- public:
- CXFA_Text(CXFA_Node* pNode);
- void GetName(CFX_WideStringC& wsName);
- int32_t 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(int32_t 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);
- int32_t GetMaxLength();
- void GetRid(CFX_WideStringC& wsRid);
- int32_t GetTransferEncoding();
- void GetContent(CFX_WideString& wsText);
- FX_BOOL SetContentType(const CFX_WideString& wsContentType);
- FX_BOOL SetHref(const CFX_WideString& wsHref);
- FX_BOOL SetMaxLength(int32_t iMaxLength);
- FX_BOOL SetRid(const CFX_WideString& wsRid);
- FX_BOOL SetTransferEncoding(int32_t 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);
- int32_t GetAspect();
- FX_BOOL GetContentType(CFX_WideString& wsContentType);
- FX_BOOL GetHref(CFX_WideString& wsHref);
- int32_t GetTransferEncoding();
- FX_BOOL GetContent(CFX_WideString& wsText);
- FX_BOOL SetAspect(int32_t iAspect);
- FX_BOOL SetContentType(const CFX_WideString& wsContentType);
- FX_BOOL SetHref(const CFX_WideString& wsHref);
- FX_BOOL SetTransferEncoding(int32_t 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);
-
- int32_t GetOverride();
- CXFA_Script GetScript();
- void GetMessageText(CFX_WideString& wsMessage);
- FX_BOOL SetOverride(int32_t iOverride);
- FX_BOOL SetMessageText(const CFX_WideString& wsMessage);
-};
-class CXFA_Validate : public CXFA_Data {
- public:
- CXFA_Validate(CXFA_Node* pNode);
- int32_t GetFormatTest();
- FX_BOOL SetFormatTest(CFX_WideString wsValue);
- int32_t GetNullTest();
- FX_BOOL SetNullTest(CFX_WideString wsValue);
- int32_t 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,
- const CFX_WideStringC& wsMessageType);
- void SetMessageText(CFX_WideString& wsMessage,
- const CFX_WideStringC& wsMessageType);
- FX_BOOL SetTestValue(int32_t iType,
- CFX_WideString& wsValue,
- XFA_ATTRIBUTEENUM eName);
-};
-class CXFA_Variables : public CXFA_Data {
- public:
- CXFA_Variables(CXFA_Node* pNode);
-
- int32_t CountScripts();
- CXFA_Script GetScript(int32_t nIndex);
-};
-class CXFA_Bind : public CXFA_Data {
- public:
- CXFA_Bind(CXFA_Node* pNode);
- int32_t GetMatch();
- void GetRef(CFX_WideStringC& wsRef);
- void GetPicture(CFX_WideString& wsPicture);
- FX_BOOL SetMatch(int32_t 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; }
-
- int32_t GetPresence() const;
- FX_BOOL IsVisible() const {
- return GetPresence() == XFA_ATTRIBUTEENUM_Visible;
- }
-
- int32_t GetCapType() const;
-
- int32_t 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);
-
- int32_t 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; }
-
- int32_t GetBreak() const;
-
- int32_t GetHand() const;
-
- int32_t GetPresence() const;
-
- int32_t CountCorners() const;
-
- CXFA_Corner GetCorner(int32_t nIndex) const;
-
- int32_t CountEdges() const;
-
- CXFA_Edge GetEdge(int32_t 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;
-
- int32_t 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();
- int32_t GetAccess(FX_BOOL bTemplate = FALSE);
- FX_BOOL GetAccessKey(CFX_WideStringC& wsAccessKey);
- int32_t GetAnchorType();
- int32_t GetColSpan();
- int32_t GetPresence();
- int32_t 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);
- int32_t GetEventByActivity(int32_t 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(int32_t iAccess, FX_BOOL bNotify = TRUE);
- FX_BOOL SetAccessKey(const CFX_WideString& wsAccessKey);
- FX_BOOL SetAnchorType(int32_t iType);
- FX_BOOL SetColSpan(int32_t iColSpan);
- FX_BOOL SetPresence(int32_t iPresence);
- FX_BOOL SetRotate(int32_t 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(int32_t iButtonHighlight);
- FX_BOOL SetButtonRollover(const CFX_WideString& wsRollover,
- FX_BOOL bRichText);
- FX_BOOL SetButtonDown(const CFX_WideString& wsDown, FX_BOOL bRichText);
- FX_BOOL SetCheckButtonShape(int32_t iCheckButtonShape);
- FX_BOOL SetCheckButtonMark(int32_t 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);
- int32_t GetButtonHighlight();
- FX_BOOL GetButtonRollover(CFX_WideString& wsRollover, FX_BOOL& bRichText);
- FX_BOOL GetButtonDown(CFX_WideString& wsDown, FX_BOOL& bRichText);
- int32_t GetCheckButtonShape();
- int32_t 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(const CFX_WideStringC& wsName,
- FX_BOOL bNotify = TRUE);
- void SetSelectedMemberByValue(const CFX_WideStringC& wsValue,
- FX_BOOL bNotify = TRUE,
- FX_BOOL bScriptModify = FALSE,
- FX_BOOL bSyncData = TRUE);
- CXFA_Node* GetExclGroupFirstMember();
- CXFA_Node* GetExclGroupNextMember(CXFA_Node* pNode);
- int32_t GetChoiceListCommitOn();
- FX_BOOL IsChoiceListAllowTextEntry();
- int32_t GetChoiceListOpen();
- FX_BOOL IsListBox();
- int32_t CountChoiceListItems(FX_BOOL bSaveValue = FALSE);
- FX_BOOL GetChoiceListItem(CFX_WideString& wsText,
- int32_t nIndex,
- FX_BOOL bSaveValue = FALSE);
- void GetChoiceListItems(CFX_WideStringArray& wsTextArray,
- FX_BOOL bSaveValue = FALSE);
- int32_t CountSelectedItems();
- int32_t GetSelectedItem(int32_t nIndex = 0);
- void GetSelectedItems(CFX_Int32Array& iSelArray);
- void GetSelectedItemsValue(CFX_WideStringArray& wsSelTextArray);
- FX_BOOL GetItemState(int32_t nIndex);
- void SetItemState(int32_t 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,
- int32_t nIndex = -1,
- FX_BOOL bNotify = FALSE);
- void GetItemLabel(const CFX_WideStringC& wsValue, CFX_WideString& wsLabel);
- void GetItemValue(const CFX_WideStringC& wsLabel, CFX_WideString& wsValue);
- FX_BOOL DeleteItem(int32_t nIndex,
- FX_BOOL bNotify = FALSE,
- FX_BOOL bScriptModify = FALSE,
- FX_BOOL bSyncData = TRUE);
- int32_t GetHorizontalScrollPolicy();
- int32_t 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(const CFX_WideStringC& wsValue,
- CFX_WideString& wsNormalizeValue);
- FX_BOOL GetFormatDataValue(const CFX_WideStringC& wsValue,
- CFX_WideString& wsFormatedValue);
- void NormalizeNumStr(const CFX_WideString& wsValue, CFX_WideString& wsOutput);
- CFX_WideString GetBarcodeType();
- FX_BOOL GetBarcodeAttribute_CharEncoding(int32_t& val);
- FX_BOOL GetBarcodeAttribute_Checksum(int32_t& val);
- FX_BOOL GetBarcodeAttribute_DataLength(int32_t& val);
- FX_BOOL GetBarcodeAttribute_StartChar(FX_CHAR& val);
- FX_BOOL GetBarcodeAttribute_EndChar(FX_CHAR& val);
- FX_BOOL GetBarcodeAttribute_ECLevel(int32_t& val);
- FX_BOOL GetBarcodeAttribute_ModuleWidth(int32_t& val);
- FX_BOOL GetBarcodeAttribute_ModuleHeight(int32_t& val);
- FX_BOOL GetBarcodeAttribute_PrintChecksum(FX_BOOL& val);
- FX_BOOL GetBarcodeAttribute_TextLocation(int32_t& 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();
- int32_t GetVerticalScrollPolicy();
- int32_t GetMaxChars(XFA_ELEMENT& eType);
- FX_BOOL GetFracDigits(int32_t& iFracDigits);
- FX_BOOL GetLeadDigits(int32_t& 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,
- const CFX_WideStringC& wsText,
- int32_t 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);
- int32_t GetMax();
- int32_t GetMin();
- int32_t GetInitial();
- FX_BOOL GetOccurInfo(int32_t& iMin, int32_t& iMax, int32_t& iInit);
- void SetMax(int32_t iMax);
- void SetMin(int32_t 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();
- int32_t 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();
- int32_t CountCertificates();
- CXFA_Certificate GetCertificate(int32_t nIndex);
-};
-class CXFA_Oids : public CXFA_Data {
- public:
- CXFA_Oids(CXFA_Node* pNode) : CXFA_Data(pNode) {}
- XFA_ATTRIBUTEENUM GetOidsType();
- int32_t CountOids();
- CFX_WideString GetOidContent(int32_t nIndex);
-};
-class CXFA_SubjectDNs : public CXFA_Data {
- public:
- CXFA_SubjectDNs(CXFA_Node* pNode) : CXFA_Data(pNode) {}
- XFA_ATTRIBUTEENUM GetSubjectDNsType();
- int32_t CountSubjectDNs();
- CFX_WideString GetSubjectDNString(int32_t nIndex, XFA_ATTRIBUTE eAttribute);
- CFX_WideString GetSubjectDNContent(int32_t nIndex);
-};
-class CXFA_DigestMethods : public CXFA_Data {
- public:
- CXFA_DigestMethods(CXFA_Node* pNode) : CXFA_Data(pNode) {}
- XFA_ATTRIBUTEENUM GetDigestMethodsType();
- int32_t CountDigestMethods();
- CFX_WideString GetDigestMethodContent(int32_t nIndex);
-};
-class CXFA_Encodings : public CXFA_Data {
- public:
- CXFA_Encodings(CXFA_Node* pNode) : CXFA_Data(pNode) {}
- XFA_ATTRIBUTEENUM GetEncodingsType();
- int32_t CountEncodings();
- CFX_WideString GetEncodingContent(int32_t nIndex);
-};
-class CXFA_EncryptionMethods : public CXFA_Data {
- public:
- CXFA_EncryptionMethods(CXFA_Node* pNode) : CXFA_Data(pNode) {}
- XFA_ATTRIBUTEENUM GetEncryptionMethodsType();
- int32_t CountEncryptionMethods();
- CFX_WideString GetEncryptionMethodContent(int32_t nIndex);
-};
-class CXFA_Reasons : public CXFA_Data {
- public:
- CXFA_Reasons(CXFA_Node* pNode) : CXFA_Data(pNode) {}
- XFA_ATTRIBUTEENUM GetReasonsType();
- int32_t CountReasons();
- CFX_WideString GetReasonContent(int32_t nIndex);
-};
-class CXFA_Manifest : public CXFA_Data {
- public:
- CXFA_Manifest(CXFA_Node* pNode) : CXFA_Data(pNode) {}
- XFA_ATTRIBUTEENUM GetAction();
- int32_t CountReives();
- CFX_WideString GetRefContent(int32_t nIndex);
-};
-
-#endif // FXFA_OBJECTACC_H_
+// 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_OBJECTACC_H_ +#define FXFA_OBJECTACC_H_ + +#include "core/include/fxge/fx_dib.h" // For FX_ARGB. + +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: + 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(); + + int32_t GetPresence(); + + FX_ARGB GetColor(FX_BOOL bText = FALSE); + + void SetColor(FX_ARGB color); + + int32_t GetFillType(); + + int32_t GetPattern(FX_ARGB& foreColor); + + int32_t GetStipple(FX_ARGB& stippleColor); + + int32_t GetLinear(FX_ARGB& endColor); + + int32_t GetRadial(FX_ARGB& endColor); + FX_BOOL SetPresence(int32_t iPresence); + FX_BOOL SetFillType(int32_t iType); + FX_BOOL SetPattern(int32_t iPattern, FX_ARGB foreColor); + FX_BOOL SetStipple(int32_t iStipple, FX_ARGB stippleColor); + FX_BOOL SetLinear(int32_t iLinear, FX_ARGB endColor); + FX_BOOL SetRadial(int32_t 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(); + + int32_t GetLineThrough(); + + int32_t GetLineThroughPeriod(); + + int32_t GetOverline(); + + int32_t GetOverlinePeriod(); + + int32_t GetUnderline(); + + int32_t 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(int32_t iLineThrough); + FX_BOOL SetLineThroughPeriod(int32_t iLineThroughPeriod); + FX_BOOL SetOverline(int32_t iOverline); + FX_BOOL SetOverlinePeriod(int32_t iOverlinePeriod); + FX_BOOL SetUnderline(int32_t iUnderline); + FX_BOOL SetUnderlinePeriod(int32_t iUnderlinePeriod); +}; +class CXFA_Caption : public CXFA_Data { + public: + CXFA_Caption(CXFA_Node* pNode); + + int32_t GetPresence(); + + int32_t GetPlacementType(); + + FX_FLOAT GetReserve(); + + CXFA_Margin GetMargin(); + + CXFA_Font GetFont(); + + CXFA_Value GetValue(); + + CXFA_Para GetPara(); + FX_BOOL SetPresence(int32_t iPresence); + FX_BOOL SetPlacementType(int32_t iType); + FX_BOOL SetReserve(FX_FLOAT fReserve); +}; +class CXFA_Para : public CXFA_Data { + public: + CXFA_Para(CXFA_Node* pNode); + + int32_t GetHorizontalAlign(); + + int32_t GetVerticalAlign(); + + FX_FLOAT GetLineHeight(); + FX_FLOAT GetMarginLeft(); + FX_FLOAT GetMarginRight(); + int32_t GetOrphans(); + FX_FLOAT GetRadixOffset(); + FX_FLOAT GetSpaceAbove(); + FX_FLOAT GetSpaceBelow(); + FX_FLOAT GetTextIndent(); + int32_t GetWidows(); + FX_BOOL SetHorizontalAlign(int32_t iHorizontalAlign); + FX_BOOL SetVerticalAlign(int32_t iVerticalAlign); + FX_BOOL SetLineHeight(FX_FLOAT fLineHeight); + FX_BOOL SetMarginLeft(FX_FLOAT fMarginLeft); + FX_BOOL SetMarginRight(FX_FLOAT fMarginRight); + FX_BOOL SetOrphans(int32_t 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(int32_t iWidows); +}; +class CXFA_Keep : public CXFA_Data { + public: + CXFA_Keep(CXFA_Node* pNode, CXFA_Node* pParent); + + int32_t GetIntact(); + int32_t GetNext(); + int32_t GetPrevious(); + FX_BOOL SetIntact(int32_t iIntact); + FX_BOOL SetNext(int32_t iNext); + FX_BOOL SetPrevious(int32_t 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); + + int32_t GetActivity(); + + int32_t GetEventType(); + void GetRef(CFX_WideStringC& wsRef); + + int32_t GetExecuteRunAt(); + int32_t GetExecuteType(); + void GetExecuteConnection(CFX_WideString& wsConnection); + + CXFA_Script GetScript(); + + CXFA_Submit GetSubmit(); + + int32_t GetSignDataOperation(); + void GetSignDataTarget(CFX_WideString& wsTarget); + FX_BOOL SetActivity(int32_t iActivity); + FX_BOOL SetEventType(int32_t iEventType); + FX_BOOL SetExecuteRunAt(int32_t iExecuteRunAt); + FX_BOOL SetExecuteType(int32_t iExecuteType); + FX_BOOL SetExecuteConnection(const CFX_WideString& wsConnection); + FX_BOOL SetSignDataOperation(int32_t 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(); + int32_t GetRunAt(); + void GetExpression(CFX_WideString& wsExpression); + FX_BOOL SetBinding(const CFX_WideString& wsBinding); + FX_BOOL SetContentType(XFA_SCRIPTTYPE eType); + FX_BOOL SetRunAt(int32_t iRunAt); + FX_BOOL SetExpression(const CFX_WideString& wsExpression); +}; +class CXFA_Submit : public CXFA_Data { + public: + CXFA_Submit(CXFA_Node* pNode); + FX_BOOL IsSubmitEmbedPDF(); + int32_t GetSubmitFormat(); + void GetSubmitTarget(CFX_WideStringC& wsTarget); + XFA_TEXTENCODING GetSubmitTextEncoding(); + void GetSubmitXDPContent(CFX_WideStringC& wsContent); + FX_BOOL SetSubmitFormat(int32_t 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) {} + int32_t GetHand(); + FX_BOOL GetSlop(); + CXFA_Edge GetEdge(); + FX_BOOL SetHand(int32_t iHand); + FX_BOOL SetSlop(int32_t iSlop); +}; +class CXFA_Text : public CXFA_Data { + public: + CXFA_Text(CXFA_Node* pNode); + void GetName(CFX_WideStringC& wsName); + int32_t 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(int32_t 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); + int32_t GetMaxLength(); + void GetRid(CFX_WideStringC& wsRid); + int32_t GetTransferEncoding(); + void GetContent(CFX_WideString& wsText); + FX_BOOL SetContentType(const CFX_WideString& wsContentType); + FX_BOOL SetHref(const CFX_WideString& wsHref); + FX_BOOL SetMaxLength(int32_t iMaxLength); + FX_BOOL SetRid(const CFX_WideString& wsRid); + FX_BOOL SetTransferEncoding(int32_t 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); + int32_t GetAspect(); + FX_BOOL GetContentType(CFX_WideString& wsContentType); + FX_BOOL GetHref(CFX_WideString& wsHref); + int32_t GetTransferEncoding(); + FX_BOOL GetContent(CFX_WideString& wsText); + FX_BOOL SetAspect(int32_t iAspect); + FX_BOOL SetContentType(const CFX_WideString& wsContentType); + FX_BOOL SetHref(const CFX_WideString& wsHref); + FX_BOOL SetTransferEncoding(int32_t 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); + + int32_t GetOverride(); + CXFA_Script GetScript(); + void GetMessageText(CFX_WideString& wsMessage); + FX_BOOL SetOverride(int32_t iOverride); + FX_BOOL SetMessageText(const CFX_WideString& wsMessage); +}; +class CXFA_Validate : public CXFA_Data { + public: + CXFA_Validate(CXFA_Node* pNode); + int32_t GetFormatTest(); + FX_BOOL SetFormatTest(CFX_WideString wsValue); + int32_t GetNullTest(); + FX_BOOL SetNullTest(CFX_WideString wsValue); + int32_t 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, + const CFX_WideStringC& wsMessageType); + void SetMessageText(CFX_WideString& wsMessage, + const CFX_WideStringC& wsMessageType); + FX_BOOL SetTestValue(int32_t iType, + CFX_WideString& wsValue, + XFA_ATTRIBUTEENUM eName); +}; +class CXFA_Variables : public CXFA_Data { + public: + CXFA_Variables(CXFA_Node* pNode); + + int32_t CountScripts(); + CXFA_Script GetScript(int32_t nIndex); +}; +class CXFA_Bind : public CXFA_Data { + public: + CXFA_Bind(CXFA_Node* pNode); + int32_t GetMatch(); + void GetRef(CFX_WideStringC& wsRef); + void GetPicture(CFX_WideString& wsPicture); + FX_BOOL SetMatch(int32_t 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; } + + int32_t GetPresence() const; + FX_BOOL IsVisible() const { + return GetPresence() == XFA_ATTRIBUTEENUM_Visible; + } + + int32_t GetCapType() const; + + int32_t 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); + + int32_t 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; } + + int32_t GetBreak() const; + + int32_t GetHand() const; + + int32_t GetPresence() const; + + int32_t CountCorners() const; + + CXFA_Corner GetCorner(int32_t nIndex) const; + + int32_t CountEdges() const; + + CXFA_Edge GetEdge(int32_t 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; + + int32_t 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(); + int32_t GetAccess(FX_BOOL bTemplate = FALSE); + FX_BOOL GetAccessKey(CFX_WideStringC& wsAccessKey); + int32_t GetAnchorType(); + int32_t GetColSpan(); + int32_t GetPresence(); + int32_t 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); + int32_t GetEventByActivity(int32_t 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(int32_t iAccess, FX_BOOL bNotify = TRUE); + FX_BOOL SetAccessKey(const CFX_WideString& wsAccessKey); + FX_BOOL SetAnchorType(int32_t iType); + FX_BOOL SetColSpan(int32_t iColSpan); + FX_BOOL SetPresence(int32_t iPresence); + FX_BOOL SetRotate(int32_t 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(int32_t iButtonHighlight); + FX_BOOL SetButtonRollover(const CFX_WideString& wsRollover, + FX_BOOL bRichText); + FX_BOOL SetButtonDown(const CFX_WideString& wsDown, FX_BOOL bRichText); + FX_BOOL SetCheckButtonShape(int32_t iCheckButtonShape); + FX_BOOL SetCheckButtonMark(int32_t 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); + int32_t GetButtonHighlight(); + FX_BOOL GetButtonRollover(CFX_WideString& wsRollover, FX_BOOL& bRichText); + FX_BOOL GetButtonDown(CFX_WideString& wsDown, FX_BOOL& bRichText); + int32_t GetCheckButtonShape(); + int32_t 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(const CFX_WideStringC& wsName, + FX_BOOL bNotify = TRUE); + void SetSelectedMemberByValue(const CFX_WideStringC& wsValue, + FX_BOOL bNotify = TRUE, + FX_BOOL bScriptModify = FALSE, + FX_BOOL bSyncData = TRUE); + CXFA_Node* GetExclGroupFirstMember(); + CXFA_Node* GetExclGroupNextMember(CXFA_Node* pNode); + int32_t GetChoiceListCommitOn(); + FX_BOOL IsChoiceListAllowTextEntry(); + int32_t GetChoiceListOpen(); + FX_BOOL IsListBox(); + int32_t CountChoiceListItems(FX_BOOL bSaveValue = FALSE); + FX_BOOL GetChoiceListItem(CFX_WideString& wsText, + int32_t nIndex, + FX_BOOL bSaveValue = FALSE); + void GetChoiceListItems(CFX_WideStringArray& wsTextArray, + FX_BOOL bSaveValue = FALSE); + int32_t CountSelectedItems(); + int32_t GetSelectedItem(int32_t nIndex = 0); + void GetSelectedItems(CFX_Int32Array& iSelArray); + void GetSelectedItemsValue(CFX_WideStringArray& wsSelTextArray); + FX_BOOL GetItemState(int32_t nIndex); + void SetItemState(int32_t 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, + int32_t nIndex = -1, + FX_BOOL bNotify = FALSE); + void GetItemLabel(const CFX_WideStringC& wsValue, CFX_WideString& wsLabel); + void GetItemValue(const CFX_WideStringC& wsLabel, CFX_WideString& wsValue); + FX_BOOL DeleteItem(int32_t nIndex, + FX_BOOL bNotify = FALSE, + FX_BOOL bScriptModify = FALSE, + FX_BOOL bSyncData = TRUE); + int32_t GetHorizontalScrollPolicy(); + int32_t 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(const CFX_WideStringC& wsValue, + CFX_WideString& wsNormalizeValue); + FX_BOOL GetFormatDataValue(const CFX_WideStringC& wsValue, + CFX_WideString& wsFormatedValue); + void NormalizeNumStr(const CFX_WideString& wsValue, CFX_WideString& wsOutput); + CFX_WideString GetBarcodeType(); + FX_BOOL GetBarcodeAttribute_CharEncoding(int32_t& val); + FX_BOOL GetBarcodeAttribute_Checksum(int32_t& val); + FX_BOOL GetBarcodeAttribute_DataLength(int32_t& val); + FX_BOOL GetBarcodeAttribute_StartChar(FX_CHAR& val); + FX_BOOL GetBarcodeAttribute_EndChar(FX_CHAR& val); + FX_BOOL GetBarcodeAttribute_ECLevel(int32_t& val); + FX_BOOL GetBarcodeAttribute_ModuleWidth(int32_t& val); + FX_BOOL GetBarcodeAttribute_ModuleHeight(int32_t& val); + FX_BOOL GetBarcodeAttribute_PrintChecksum(FX_BOOL& val); + FX_BOOL GetBarcodeAttribute_TextLocation(int32_t& 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(); + int32_t GetVerticalScrollPolicy(); + int32_t GetMaxChars(XFA_ELEMENT& eType); + FX_BOOL GetFracDigits(int32_t& iFracDigits); + FX_BOOL GetLeadDigits(int32_t& 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, + const CFX_WideStringC& wsText, + int32_t 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); + int32_t GetMax(); + int32_t GetMin(); + int32_t GetInitial(); + FX_BOOL GetOccurInfo(int32_t& iMin, int32_t& iMax, int32_t& iInit); + void SetMax(int32_t iMax); + void SetMin(int32_t 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(); + int32_t 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(); + int32_t CountCertificates(); + CXFA_Certificate GetCertificate(int32_t nIndex); +}; +class CXFA_Oids : public CXFA_Data { + public: + CXFA_Oids(CXFA_Node* pNode) : CXFA_Data(pNode) {} + XFA_ATTRIBUTEENUM GetOidsType(); + int32_t CountOids(); + CFX_WideString GetOidContent(int32_t nIndex); +}; +class CXFA_SubjectDNs : public CXFA_Data { + public: + CXFA_SubjectDNs(CXFA_Node* pNode) : CXFA_Data(pNode) {} + XFA_ATTRIBUTEENUM GetSubjectDNsType(); + int32_t CountSubjectDNs(); + CFX_WideString GetSubjectDNString(int32_t nIndex, XFA_ATTRIBUTE eAttribute); + CFX_WideString GetSubjectDNContent(int32_t nIndex); +}; +class CXFA_DigestMethods : public CXFA_Data { + public: + CXFA_DigestMethods(CXFA_Node* pNode) : CXFA_Data(pNode) {} + XFA_ATTRIBUTEENUM GetDigestMethodsType(); + int32_t CountDigestMethods(); + CFX_WideString GetDigestMethodContent(int32_t nIndex); +}; +class CXFA_Encodings : public CXFA_Data { + public: + CXFA_Encodings(CXFA_Node* pNode) : CXFA_Data(pNode) {} + XFA_ATTRIBUTEENUM GetEncodingsType(); + int32_t CountEncodings(); + CFX_WideString GetEncodingContent(int32_t nIndex); +}; +class CXFA_EncryptionMethods : public CXFA_Data { + public: + CXFA_EncryptionMethods(CXFA_Node* pNode) : CXFA_Data(pNode) {} + XFA_ATTRIBUTEENUM GetEncryptionMethodsType(); + int32_t CountEncryptionMethods(); + CFX_WideString GetEncryptionMethodContent(int32_t nIndex); +}; +class CXFA_Reasons : public CXFA_Data { + public: + CXFA_Reasons(CXFA_Node* pNode) : CXFA_Data(pNode) {} + XFA_ATTRIBUTEENUM GetReasonsType(); + int32_t CountReasons(); + CFX_WideString GetReasonContent(int32_t nIndex); +}; +class CXFA_Manifest : public CXFA_Data { + public: + CXFA_Manifest(CXFA_Node* pNode) : CXFA_Data(pNode) {} + XFA_ATTRIBUTEENUM GetAction(); + int32_t CountReives(); + CFX_WideString GetRefContent(int32_t nIndex); +}; + +#endif // FXFA_OBJECTACC_H_ diff --git a/xfa/include/fxfa/fxfa_widget.h b/xfa/include/fxfa/fxfa_widget.h index 3040dafcbc..eda5e5769a 100644 --- a/xfa/include/fxfa/fxfa_widget.h +++ b/xfa/include/fxfa/fxfa_widget.h @@ -1,118 +1,118 @@ -// 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, int32_t iNameType = 0);
- FX_BOOL ProcessValueChanged();
-
- public:
- void ResetData();
-
- void SetImageEdit(const CFX_WideStringC& wsContentType,
- const CFX_WideStringC& wsHref,
- const CFX_WideStringC& wsData);
-
- CXFA_WidgetAcc* GetExclGroup();
- CXFA_FFDocView* GetDocView();
- CXFA_FFDoc* GetDoc();
- CXFA_FFApp* GetApp();
- IXFA_AppProvider* GetAppProvider();
-
- int32_t ProcessEvent(int32_t iActivity, CXFA_EventParam* pEventParam);
- int32_t ProcessEvent(CXFA_Event& event, CXFA_EventParam* pEventParam);
- int32_t ProcessCalculate();
- int32_t ProcessValidate(int32_t iFlags = 0);
- int32_t 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(int32_t iBlockIndex, FX_FLOAT& fCalcHeight);
- FX_BOOL LoadCaption();
- void LoadText();
- FX_BOOL LoadImageImage();
- FX_BOOL LoadImageEditImage();
- void GetImageDpi(int32_t& iImageXDpi, int32_t& iImageYDpi);
- void GetImageEditDpi(int32_t& iImageXDpi, int32_t& 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,
- void* pParam = NULL,
- void* 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,
- int32_t iRet,
- FXJSE_HVALUE pRetValue,
- FX_BOOL bVersionFlag);
- int32_t ProcessFormatTestValidate(CXFA_Validate validate,
- FX_BOOL bVersionFlag);
- int32_t ProcessNullTestValidate(CXFA_Validate validate,
- int32_t 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;
- uint32_t m_nRecursionDepth;
-};
-#endif
+// 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, int32_t iNameType = 0); + FX_BOOL ProcessValueChanged(); + + public: + void ResetData(); + + void SetImageEdit(const CFX_WideStringC& wsContentType, + const CFX_WideStringC& wsHref, + const CFX_WideStringC& wsData); + + CXFA_WidgetAcc* GetExclGroup(); + CXFA_FFDocView* GetDocView(); + CXFA_FFDoc* GetDoc(); + CXFA_FFApp* GetApp(); + IXFA_AppProvider* GetAppProvider(); + + int32_t ProcessEvent(int32_t iActivity, CXFA_EventParam* pEventParam); + int32_t ProcessEvent(CXFA_Event& event, CXFA_EventParam* pEventParam); + int32_t ProcessCalculate(); + int32_t ProcessValidate(int32_t iFlags = 0); + int32_t 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(int32_t iBlockIndex, FX_FLOAT& fCalcHeight); + FX_BOOL LoadCaption(); + void LoadText(); + FX_BOOL LoadImageImage(); + FX_BOOL LoadImageEditImage(); + void GetImageDpi(int32_t& iImageXDpi, int32_t& iImageYDpi); + void GetImageEditDpi(int32_t& iImageXDpi, int32_t& 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, + void* pParam = NULL, + void* 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, + int32_t iRet, + FXJSE_HVALUE pRetValue, + FX_BOOL bVersionFlag); + int32_t ProcessFormatTestValidate(CXFA_Validate validate, + FX_BOOL bVersionFlag); + int32_t ProcessNullTestValidate(CXFA_Validate validate, + int32_t 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; + uint32_t m_nRecursionDepth; +}; +#endif diff --git a/xfa/include/fxgraphics/fx_graphics.h b/xfa/include/fxgraphics/fx_graphics.h index 4131f45f86..a770c48051 100644 --- a/xfa/include/fxgraphics/fx_graphics.h +++ b/xfa/include/fxgraphics/fx_graphics.h @@ -1,501 +1,501 @@ -// 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 XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_
-#define XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_
-
-#include "core/include/fpdfapi/fpdf_pageobj.h"
-
-typedef int FX_ERR;
-#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 int32_t FX_DashStyle;
-enum {
- FX_DASHSTYLE_Solid = 0,
- FX_DASHSTYLE_Dash = 1,
- FX_DASHSTYLE_Dot = 2,
- FX_DASHSTYLE_DashDot = 3,
- FX_DASHSTYLE_DashDotDot = 4
-};
-typedef int32_t FX_StrokeAlignment;
-enum {
- FX_STROKEALIGNMENT_Center = 0,
- FX_STROKEALIGNMENT_Inset = 1,
- FX_STROKEALIGNMENT_Outset = 2,
- FX_STROKEALIGNMENT_Left = 3,
- FX_STROKEALIGNMENT_Right = 4
-};
-typedef int32_t 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 int32_t FX_DeviceCap;
-typedef int32_t FX_FillMode;
-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_Graphics();
-
- FX_ERR Create(CFX_RenderDevice* renderDevice, FX_BOOL isAntialiasing = TRUE);
-
- FX_ERR Create(int32_t width,
- int32_t height,
- FXDIB_Format format,
- FX_BOOL isNative = TRUE,
- FX_BOOL isAntialiasing = TRUE);
-
- virtual ~CFX_Graphics();
-
- FX_ERR GetDeviceCap(const int32_t 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(int32_t& dashCount);
-
- FX_ERR GetLineDash(FX_FLOAT& dashPhase, FX_FLOAT* dashArray);
-
- FX_ERR SetLineDash(FX_FLOAT dashPhase,
- FX_FLOAT* dashArray,
- int32_t 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(const 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 int32_t 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, const CFX_Matrix* matrix);
- FX_ERR Transfer(CFX_Graphics* graphics,
- FX_FLOAT srcLeft,
- FX_FLOAT srcTop,
- const CFX_RectF& dstRect,
- const CFX_Matrix* matrix);
-
- 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:
- int32_t _type;
-
- private:
- struct TInfo {
- 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_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_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:
- int32_t _type;
- union {
- struct {
- FX_ARGB _argb;
- CFX_Pattern* _pattern;
- };
- CFX_Shading* _shading;
- };
-
- friend class CFX_Graphics;
-};
-class CFX_Pattern {
- 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:
- int32_t _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_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:
- int32_t _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 // XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_
+// 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 XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_ +#define XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_ + +#include "core/include/fpdfapi/fpdf_pageobj.h" + +typedef int FX_ERR; +#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 int32_t FX_DashStyle; +enum { + FX_DASHSTYLE_Solid = 0, + FX_DASHSTYLE_Dash = 1, + FX_DASHSTYLE_Dot = 2, + FX_DASHSTYLE_DashDot = 3, + FX_DASHSTYLE_DashDotDot = 4 +}; +typedef int32_t FX_StrokeAlignment; +enum { + FX_STROKEALIGNMENT_Center = 0, + FX_STROKEALIGNMENT_Inset = 1, + FX_STROKEALIGNMENT_Outset = 2, + FX_STROKEALIGNMENT_Left = 3, + FX_STROKEALIGNMENT_Right = 4 +}; +typedef int32_t 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 int32_t FX_DeviceCap; +typedef int32_t FX_FillMode; +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_Graphics(); + + FX_ERR Create(CFX_RenderDevice* renderDevice, FX_BOOL isAntialiasing = TRUE); + + FX_ERR Create(int32_t width, + int32_t height, + FXDIB_Format format, + FX_BOOL isNative = TRUE, + FX_BOOL isAntialiasing = TRUE); + + virtual ~CFX_Graphics(); + + FX_ERR GetDeviceCap(const int32_t 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(int32_t& dashCount); + + FX_ERR GetLineDash(FX_FLOAT& dashPhase, FX_FLOAT* dashArray); + + FX_ERR SetLineDash(FX_FLOAT dashPhase, + FX_FLOAT* dashArray, + int32_t 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(const 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 int32_t 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, const CFX_Matrix* matrix); + FX_ERR Transfer(CFX_Graphics* graphics, + FX_FLOAT srcLeft, + FX_FLOAT srcTop, + const CFX_RectF& dstRect, + const CFX_Matrix* matrix); + + 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: + int32_t _type; + + private: + struct TInfo { + 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_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_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: + int32_t _type; + union { + struct { + FX_ARGB _argb; + CFX_Pattern* _pattern; + }; + CFX_Shading* _shading; + }; + + friend class CFX_Graphics; +}; +class CFX_Pattern { + 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: + int32_t _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_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: + int32_t _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 // XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_ diff --git a/xfa/include/fxjse/fxjse.h b/xfa/include/fxjse/fxjse.h index 5aa563a1eb..bac63208f8 100644 --- a/xfa/include/fxjse/fxjse.h +++ b/xfa/include/fxjse/fxjse.h @@ -1,176 +1,176 @@ -// 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 XFA_INCLUDE_FXJSE_FXJSE_H_
-#define XFA_INCLUDE_FXJSE_FXJSE_H_
-
-#include "core/include/fpdfapi/fpdf_parser.h"
-#include "core/include/fxcrt/fx_string.h"
-#include "core/include/fxcrt/fx_system.h"
-
-class CPDFDoc_Environment;
-class CPDF_Page;
-
-typedef struct FXJSE_HRUNTIME_ { void* pData; } * FXJSE_HRUNTIME;
-typedef struct FXJSE_HCONTEXT_ { void* pData; } * FXJSE_HCONTEXT;
-typedef struct FXJSE_HCLASS_ { void* pData; } * FXJSE_HCLASS;
-typedef struct FXJSE_HVALUE_ { void* pData; } * FXJSE_HVALUE;
-typedef struct FXJSE_HOBJECT_ : public 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 = nullptr,
- void* lpGlobalObject = nullptr);
-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;
- int32_t GetLength() const;
- FXJSE_HVALUE GetValue(int32_t index) const;
- FX_BOOL GetBoolean(int32_t index) const;
- int32_t GetInt32(int32_t index) const;
- FX_FLOAT GetFloat(int32_t index) const;
- CFX_ByteString GetUTF8String(int32_t index) const;
- void* GetObject(int32_t index, FXJSE_HCLASS hClass = nullptr) const;
- FXJSE_HVALUE GetReturnValue();
-};
-typedef void (*FXJSE_FuncCallback)(FXJSE_HOBJECT hThis,
- const CFX_ByteStringC& szFuncName,
- CFXJSE_Arguments& args);
-typedef void (*FXJSE_PropAccessor)(FXJSE_HOBJECT hObject,
- const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue);
-typedef int32_t (*FXJSE_PropTypeGetter)(FXJSE_HOBJECT hObject,
- const CFX_ByteStringC& szPropName,
- FX_BOOL bQueryIn);
-typedef FX_BOOL (*FXJSE_PropDeleter)(FXJSE_HOBJECT hObject,
- const CFX_ByteStringC& szPropName);
-typedef struct _FXJSE_FUNCTION {
- const FX_CHAR* 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 {
- const FX_CHAR* 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 {
- const FX_CHAR* name;
- FXJSE_FuncCallback constructor;
- FXJSE_PROPERTY* properties;
- FXJSE_FUNCTION* methods;
- int32_t propNum;
- int32_t 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,
- const CFX_ByteStringC& 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);
-int32_t FXJSE_Value_ToInteger(FXJSE_HVALUE hValue);
-void FXJSE_Value_ToUTF8String(FXJSE_HVALUE hValue, CFX_ByteString& szStrOutput);
-void* 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,
- const CFX_ByteStringC& szString);
-void FXJSE_Value_SetInteger(FXJSE_HVALUE hValue, int32_t 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,
- void* lpObject,
- FXJSE_HCLASS hClass);
-void FXJSE_Value_SetArray(FXJSE_HVALUE hValue,
- uint32_t 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,
- const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hPropValue);
-FX_BOOL FXJSE_Value_SetObjectProp(FXJSE_HVALUE hValue,
- const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hPropValue);
-FX_BOOL FXJSE_Value_GetObjectPropByIdx(FXJSE_HVALUE hValue,
- uint32_t uPropIdx,
- FXJSE_HVALUE hPropValue);
-FX_BOOL FXJSE_Value_SetObjectPropByIdx(FXJSE_HVALUE hValue,
- uint32_t uPropIdx,
- FXJSE_HVALUE hPropValue);
-FX_BOOL FXJSE_Value_DeleteObjectProp(FXJSE_HVALUE hValue,
- const CFX_ByteStringC& szPropName);
-FX_BOOL FXJSE_Value_ObjectHasOwnProp(FXJSE_HVALUE hValue,
- const CFX_ByteStringC& szPropName,
- FX_BOOL bUseTypeGetter);
-FX_BOOL FXJSE_Value_SetObjectOwnProp(FXJSE_HVALUE hValue,
- const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hPropValue);
-FX_BOOL FXJSE_Value_CallFunction(FXJSE_HVALUE hFunction,
- FXJSE_HVALUE hThis,
- FXJSE_HVALUE hRetValue,
- uint32_t 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,
- const FX_CHAR* szScript,
- FXJSE_HVALUE hRetValue,
- FXJSE_HVALUE hNewThisObject = nullptr);
-void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name,
- const CFX_ByteStringC& utf8Message);
-FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue,
- CFX_ByteString& utf8Name,
- CFX_ByteString& utf8Message);
-FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue,
- int32_t& nLine,
- int32_t& nCol);
-
-#endif // XFA_INCLUDE_FXJSE_FXJSE_H_
+// 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 XFA_INCLUDE_FXJSE_FXJSE_H_ +#define XFA_INCLUDE_FXJSE_FXJSE_H_ + +#include "core/include/fpdfapi/fpdf_parser.h" +#include "core/include/fxcrt/fx_string.h" +#include "core/include/fxcrt/fx_system.h" + +class CPDFDoc_Environment; +class CPDF_Page; + +typedef struct FXJSE_HRUNTIME_ { void* pData; } * FXJSE_HRUNTIME; +typedef struct FXJSE_HCONTEXT_ { void* pData; } * FXJSE_HCONTEXT; +typedef struct FXJSE_HCLASS_ { void* pData; } * FXJSE_HCLASS; +typedef struct FXJSE_HVALUE_ { void* pData; } * FXJSE_HVALUE; +typedef struct FXJSE_HOBJECT_ : public 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 = nullptr, + void* lpGlobalObject = nullptr); +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; + int32_t GetLength() const; + FXJSE_HVALUE GetValue(int32_t index) const; + FX_BOOL GetBoolean(int32_t index) const; + int32_t GetInt32(int32_t index) const; + FX_FLOAT GetFloat(int32_t index) const; + CFX_ByteString GetUTF8String(int32_t index) const; + void* GetObject(int32_t index, FXJSE_HCLASS hClass = nullptr) const; + FXJSE_HVALUE GetReturnValue(); +}; +typedef void (*FXJSE_FuncCallback)(FXJSE_HOBJECT hThis, + const CFX_ByteStringC& szFuncName, + CFXJSE_Arguments& args); +typedef void (*FXJSE_PropAccessor)(FXJSE_HOBJECT hObject, + const CFX_ByteStringC& szPropName, + FXJSE_HVALUE hValue); +typedef int32_t (*FXJSE_PropTypeGetter)(FXJSE_HOBJECT hObject, + const CFX_ByteStringC& szPropName, + FX_BOOL bQueryIn); +typedef FX_BOOL (*FXJSE_PropDeleter)(FXJSE_HOBJECT hObject, + const CFX_ByteStringC& szPropName); +typedef struct _FXJSE_FUNCTION { + const FX_CHAR* 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 { + const FX_CHAR* 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 { + const FX_CHAR* name; + FXJSE_FuncCallback constructor; + FXJSE_PROPERTY* properties; + FXJSE_FUNCTION* methods; + int32_t propNum; + int32_t 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, + const CFX_ByteStringC& 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); +int32_t FXJSE_Value_ToInteger(FXJSE_HVALUE hValue); +void FXJSE_Value_ToUTF8String(FXJSE_HVALUE hValue, CFX_ByteString& szStrOutput); +void* 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, + const CFX_ByteStringC& szString); +void FXJSE_Value_SetInteger(FXJSE_HVALUE hValue, int32_t 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, + void* lpObject, + FXJSE_HCLASS hClass); +void FXJSE_Value_SetArray(FXJSE_HVALUE hValue, + uint32_t 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, + const CFX_ByteStringC& szPropName, + FXJSE_HVALUE hPropValue); +FX_BOOL FXJSE_Value_SetObjectProp(FXJSE_HVALUE hValue, + const CFX_ByteStringC& szPropName, + FXJSE_HVALUE hPropValue); +FX_BOOL FXJSE_Value_GetObjectPropByIdx(FXJSE_HVALUE hValue, + uint32_t uPropIdx, + FXJSE_HVALUE hPropValue); +FX_BOOL FXJSE_Value_SetObjectPropByIdx(FXJSE_HVALUE hValue, + uint32_t uPropIdx, + FXJSE_HVALUE hPropValue); +FX_BOOL FXJSE_Value_DeleteObjectProp(FXJSE_HVALUE hValue, + const CFX_ByteStringC& szPropName); +FX_BOOL FXJSE_Value_ObjectHasOwnProp(FXJSE_HVALUE hValue, + const CFX_ByteStringC& szPropName, + FX_BOOL bUseTypeGetter); +FX_BOOL FXJSE_Value_SetObjectOwnProp(FXJSE_HVALUE hValue, + const CFX_ByteStringC& szPropName, + FXJSE_HVALUE hPropValue); +FX_BOOL FXJSE_Value_CallFunction(FXJSE_HVALUE hFunction, + FXJSE_HVALUE hThis, + FXJSE_HVALUE hRetValue, + uint32_t 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, + const FX_CHAR* szScript, + FXJSE_HVALUE hRetValue, + FXJSE_HVALUE hNewThisObject = nullptr); +void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name, + const CFX_ByteStringC& utf8Message); +FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue, + CFX_ByteString& utf8Name, + CFX_ByteString& utf8Message); +FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue, + int32_t& nLine, + int32_t& nCol); + +#endif // XFA_INCLUDE_FXJSE_FXJSE_H_ |