summaryrefslogtreecommitdiff
path: root/xfa/include/fwl
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-03-29 12:38:01 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-29 12:38:01 -0700
commit7f432a1c87014d6673ee69ff0ffa3724f237acf4 (patch)
tree517afad0bed7a3706b9cafa35f0b4944ebc68f76 /xfa/include/fwl
parent90d87793cf55f3c4e57e9db6c8de692ebef41e29 (diff)
downloadpdfium-7f432a1c87014d6673ee69ff0ffa3724f237acf4.tar.xz
Move xfa/include/fwl/{theme,lightwidget} to xfa/fwl
This CL moves and splits the remaining FWL files out of xfa/include and into their proper locations. Review URL: https://codereview.chromium.org/1834323003
Diffstat (limited to 'xfa/include/fwl')
-rw-r--r--xfa/include/fwl/lightwidget/app.h31
-rw-r--r--xfa/include/fwl/lightwidget/barcode.h120
-rw-r--r--xfa/include/fwl/lightwidget/caret.h28
-rw-r--r--xfa/include/fwl/lightwidget/checkbox.h38
-rw-r--r--xfa/include/fwl/lightwidget/combobox.h144
-rw-r--r--xfa/include/fwl/lightwidget/datetimepicker.h61
-rw-r--r--xfa/include/fwl/lightwidget/edit.h67
-rw-r--r--xfa/include/fwl/lightwidget/listbox.h127
-rw-r--r--xfa/include/fwl/lightwidget/picturebox.h64
-rw-r--r--xfa/include/fwl/lightwidget/pushbutton.h36
-rw-r--r--xfa/include/fwl/lightwidget/scrollbar.h32
-rw-r--r--xfa/include/fwl/lightwidget/theme.h59
-rw-r--r--xfa/include/fwl/lightwidget/tooltipctrl.h53
-rw-r--r--xfa/include/fwl/lightwidget/widget.h110
-rw-r--r--xfa/include/fwl/theme/barcodetp.h21
-rw-r--r--xfa/include/fwl/theme/carettp.h27
-rw-r--r--xfa/include/fwl/theme/checkboxtp.h84
-rw-r--r--xfa/include/fwl/theme/comboboxtp.h29
-rw-r--r--xfa/include/fwl/theme/datetimepickertp.h27
-rw-r--r--xfa/include/fwl/theme/edittp.h22
-rw-r--r--xfa/include/fwl/theme/formtp.h111
-rw-r--r--xfa/include/fwl/theme/listboxtp.h29
-rw-r--r--xfa/include/fwl/theme/monthcalendartp.h51
-rw-r--r--xfa/include/fwl/theme/pictureboxtp.h20
-rw-r--r--xfa/include/fwl/theme/pushbuttontp.h44
-rw-r--r--xfa/include/fwl/theme/scrollbartp.h57
-rw-r--r--xfa/include/fwl/theme/utils.h75
-rw-r--r--xfa/include/fwl/theme/widgettp.h220
28 files changed, 0 insertions, 1787 deletions
diff --git a/xfa/include/fwl/lightwidget/app.h b/xfa/include/fwl/lightwidget/app.h
deleted file mode 100644
index dee8d04de3..0000000000
--- a/xfa/include/fwl/lightwidget/app.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// 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_LIGHTWIDGET_APP_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_APP_H_
-
-#include "xfa/fwl/core/fwl_error.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 // XFA_INCLUDE_FWL_LIGHTWIDGET_APP_H_
diff --git a/xfa/include/fwl/lightwidget/barcode.h b/xfa/include/fwl/lightwidget/barcode.h
deleted file mode 100644
index 2aa05a2a3c..0000000000
--- a/xfa/include/fwl/lightwidget/barcode.h
+++ /dev/null
@@ -1,120 +0,0 @@
-// 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_LIGHTWIDGET_BARCODE_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_BARCODE_H_
-
-#include "xfa/fwl/basewidget/ifwl_barcode.h"
-#include "xfa/fwl/core/fwl_error.h"
-#include "xfa/include/fwl/lightwidget/edit.h"
-
-class CFWL_Widget;
-class CFWL_WidgetProperties;
-
-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; }
- uint32_t m_dwAttributeMask;
- virtual uint32_t GetBarcodeAttributeMask() { return m_dwAttributeMask; }
-
- public:
- CFWL_BarcodeDP() : m_dwAttributeMask(0) {}
- };
- CFWL_BarcodeDP m_barcodeData;
-};
-
-#endif // XFA_INCLUDE_FWL_LIGHTWIDGET_BARCODE_H_
diff --git a/xfa/include/fwl/lightwidget/caret.h b/xfa/include/fwl/lightwidget/caret.h
deleted file mode 100644
index 0d8817d296..0000000000
--- a/xfa/include/fwl/lightwidget/caret.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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_LIGHTWIDGET_CARET_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_CARET_H_
-
-#include "xfa/fwl/core/fwl_error.h"
-#include "xfa/fxgraphics/cfx_color.h"
-#include "xfa/include/fwl/lightwidget/widget.h"
-
-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(uint32_t& elapse);
- FWL_ERR SetFrequency(uint32_t elapse);
- FWL_ERR SetColor(CFX_Color crFill);
-
- protected:
- CFWL_Caret();
- virtual ~CFWL_Caret();
-};
-
-#endif // XFA_INCLUDE_FWL_LIGHTWIDGET_CARET_H_
diff --git a/xfa/include/fwl/lightwidget/checkbox.h b/xfa/include/fwl/lightwidget/checkbox.h
deleted file mode 100644
index a691c9664c..0000000000
--- a/xfa/include/fwl/lightwidget/checkbox.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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_LIGHTWIDGET_CHECKBOX_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_CHECKBOX_H_
-
-#include "xfa/fwl/basewidget/ifwl_checkbox.h"
-#include "xfa/include/fwl/lightwidget/widget.h"
-
-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 // XFA_INCLUDE_FWL_LIGHTWIDGET_CHECKBOX_H_
diff --git a/xfa/include/fwl/lightwidget/combobox.h b/xfa/include/fwl/lightwidget/combobox.h
deleted file mode 100644
index c89ddb2b2a..0000000000
--- a/xfa/include/fwl/lightwidget/combobox.h
+++ /dev/null
@@ -1,144 +0,0 @@
-// 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_LIGHTWIDGET_COMBOBOX_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_COMBOBOX_H_
-
-#include <memory>
-#include <vector>
-
-#include "xfa/fwl/basewidget/ifwl_combobox.h"
-#include "xfa/include/fwl/lightwidget/widget.h"
-
-class CFWL_WidgetProperties;
-class IFWL_ComboBoxDP;
-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);
- bool RemoveAt(int32_t iIndex); // Returns false iff |iIndex| out of range.
- void 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(uint32_t dwStylesExAdded,
- uint32_t 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 uint32_t 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,
- uint32_t 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 uint32_t GetItemCheckState(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem);
- virtual FWL_ERR SetItemCheckState(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- uint32_t dwCheckState);
- virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget);
-
- std::vector<std::unique_ptr<CFWL_ComboBoxItem>> m_ItemArray;
- 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;
- uint32_t m_dwStyles;
- CFX_WideString m_wsText;
- CFX_DIBitmap* m_pDIB;
- uint32_t m_dwCheckState;
- CFX_RectF m_rtCheckBox;
- void* m_pData;
-};
-
-#endif // XFA_INCLUDE_FWL_LIGHTWIDGET_COMBOBOX_H_
diff --git a/xfa/include/fwl/lightwidget/datetimepicker.h b/xfa/include/fwl/lightwidget/datetimepicker.h
deleted file mode 100644
index 17ab11ceb2..0000000000
--- a/xfa/include/fwl/lightwidget/datetimepicker.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// 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_LIGHTWIDGET_DATETIMEPICKER_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_DATETIMEPICKER_H_
-
-#include "xfa/fwl/basewidget/ifwl_datetimepicker.h"
-#include "xfa/include/fwl/lightwidget/widget.h"
-
-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(uint32_t dwStylesExAdded,
- uint32_t 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 // XFA_INCLUDE_FWL_LIGHTWIDGET_DATETIMEPICKER_H_
diff --git a/xfa/include/fwl/lightwidget/edit.h b/xfa/include/fwl/lightwidget/edit.h
deleted file mode 100644
index a142f483d1..0000000000
--- a/xfa/include/fwl/lightwidget/edit.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// 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_LIGHTWIDGET_EDIT_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_EDIT_H_
-
-#include <vector>
-
-#include "xfa/include/fwl/lightwidget/widget.h"
-
-class CFWL_WidgetProperties;
-
-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(uint32_t 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,
- std::vector<CFX_ByteString>& sSuggest);
- FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf,
- const CFX_ByteStringC& bsReplace);
- CFWL_Edit();
- virtual ~CFWL_Edit();
-};
-
-#endif // XFA_INCLUDE_FWL_LIGHTWIDGET_EDIT_H_
diff --git a/xfa/include/fwl/lightwidget/listbox.h b/xfa/include/fwl/lightwidget/listbox.h
deleted file mode 100644
index 6e35de738b..0000000000
--- a/xfa/include/fwl/lightwidget/listbox.h
+++ /dev/null
@@ -1,127 +0,0 @@
-// 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_LIGHTWIDGET_LISTBOX_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_
-
-#include <memory>
-#include <vector>
-
-#include "xfa/fwl/basewidget/ifwl_listbox.h"
-#include "xfa/fwl/core/fwl_error.h"
-#include "xfa/fwl/core/ifwl_widget.h"
-#include "xfa/include/fwl/lightwidget/widget.h"
-
-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);
- void 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);
- uint32_t GetItemStates(FWL_HLISTITEM hItem);
- CFWL_ListBox();
- virtual ~CFWL_ListBox();
-
- protected:
- class CFWL_ListBoxDP : public IFWL_ListBoxDP {
- public:
- CFWL_ListBoxDP();
- ~CFWL_ListBoxDP();
-
- // IFWL_DataProvider:
- FWL_ERR GetCaption(IFWL_Widget* pWidget,
- CFX_WideString& wsCaption) override;
-
- // IFWL_ListBoxDP:
- int32_t CountItems(IFWL_Widget* pWidget) override;
- FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex) override;
- int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) override;
- FX_BOOL SetItemIndex(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- int32_t nIndex) override;
- uint32_t GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) override;
- FWL_ERR GetItemText(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_WideString& wsText) override;
- FWL_ERR GetItemRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_RectF& rtItem) override;
- void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) override;
- FWL_ERR SetItemStyles(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- uint32_t dwStyle) override;
- FWL_ERR SetItemText(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const FX_WCHAR* pszText) override;
- FWL_ERR SetItemRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const CFX_RectF& rtItem) override;
- FX_FLOAT GetItemHeight(IFWL_Widget* pWidget) override;
- CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem) override;
- FWL_ERR GetItemCheckRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_RectF& rtCheck) override;
- FWL_ERR SetItemCheckRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const CFX_RectF& rtCheck) override;
- uint32_t GetItemCheckState(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem) override;
- FWL_ERR SetItemCheckState(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- uint32_t dwCheckState) override;
-
- std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray;
- 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;
- uint32_t m_dwStates;
- CFX_WideString m_wsText;
- CFX_DIBitmap* m_pDIB;
- void* m_pData;
- uint32_t m_dwCheckState;
- CFX_RectF m_rtCheckBox;
-};
-
-#endif // XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_
diff --git a/xfa/include/fwl/lightwidget/picturebox.h b/xfa/include/fwl/lightwidget/picturebox.h
deleted file mode 100644
index b5c8ae5192..0000000000
--- a/xfa/include/fwl/lightwidget/picturebox.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// 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_LIGHTWIDGET_PICTUREBOX_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_PICTUREBOX_H_
-
-#include "xfa/fwl/basewidget/ifwl_picturebox.h"
-#include "xfa/fwl/core/fwl_error.h"
-#include "xfa/include/fwl/lightwidget/widget.h"
-
-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 // XFA_INCLUDE_FWL_LIGHTWIDGET_PICTUREBOX_H_
diff --git a/xfa/include/fwl/lightwidget/pushbutton.h b/xfa/include/fwl/lightwidget/pushbutton.h
deleted file mode 100644
index abd76f50a5..0000000000
--- a/xfa/include/fwl/lightwidget/pushbutton.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// 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_LIGHTWIDGET_PUSHBUTTON_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_PUSHBUTTON_H_
-
-#include "xfa/fwl/basewidget/ifwl_pushbutton.h"
-#include "xfa/include/fwl/lightwidget/widget.h"
-
-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 // XFA_INCLUDE_FWL_LIGHTWIDGET_PUSHBUTTON_H_
diff --git a/xfa/include/fwl/lightwidget/scrollbar.h b/xfa/include/fwl/lightwidget/scrollbar.h
deleted file mode 100644
index 3d35ee651f..0000000000
--- a/xfa/include/fwl/lightwidget/scrollbar.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// 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_LIGHTWIDGET_SCROLLBAR_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_SCROLLBAR_H_
-
-#include "xfa/include/fwl/lightwidget/widget.h"
-
-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(uint32_t dwCode, FX_FLOAT fPos = 0.0f);
- CFWL_ScrollBar();
- virtual ~CFWL_ScrollBar();
-};
-
-#endif // XFA_INCLUDE_FWL_LIGHTWIDGET_SCROLLBAR_H_
diff --git a/xfa/include/fwl/lightwidget/theme.h b/xfa/include/fwl/lightwidget/theme.h
deleted file mode 100644
index 9e91236ce8..0000000000
--- a/xfa/include/fwl/lightwidget/theme.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// 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_LIGHTWIDGET_THEME_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_THEME_H_
-
-#include <memory>
-#include <vector>
-
-#include "core/fxcrt/include/fx_coordinates.h"
-#include "core/fxcrt/include/fx_system.h"
-#include "core/include/fxge/fx_dib.h"
-#include "xfa/fwl/core/ifwl_themeprovider.h"
-
-class CFWL_WidgetTP;
-class IFWL_Widget;
-class CFWL_ThemePart;
-class CFWL_ThemeText;
-
-class CFWL_Theme : public IFWL_ThemeProvider {
- public:
- CFWL_Theme();
- ~CFWL_Theme() override;
-
- // IFWL_ThemeProvider:
- FX_BOOL IsValidWidget(IFWL_Widget* pWidget) override;
- uint32_t GetThemeID(IFWL_Widget* pWidget) override;
- uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t 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, uint32_t 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:
- std::vector<std::unique_ptr<CFWL_WidgetTP>> m_ThemesArray;
-};
-
-#endif // XFA_INCLUDE_FWL_LIGHTWIDGET_THEME_H_
diff --git a/xfa/include/fwl/lightwidget/tooltipctrl.h b/xfa/include/fwl/lightwidget/tooltipctrl.h
deleted file mode 100644
index 6a487f27e7..0000000000
--- a/xfa/include/fwl/lightwidget/tooltipctrl.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// 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_LIGHTWIDGET_TOOLTIPCTRL_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_TOOLTIPCTRL_H_
-
-#include "xfa/fwl/basewidget/ifwl_tooltip.h"
-#include "xfa/include/fwl/lightwidget/widget.h"
-
-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 // XFA_INCLUDE_FWL_LIGHTWIDGET_TOOLTIPCTRL_H_
diff --git a/xfa/include/fwl/lightwidget/widget.h b/xfa/include/fwl/lightwidget/widget.h
deleted file mode 100644
index 38fe777fd2..0000000000
--- a/xfa/include/fwl/lightwidget/widget.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// 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_LIGHTWIDGET_WIDGET_H_
-#define XFA_INCLUDE_FWL_LIGHTWIDGET_WIDGET_H_
-
-#include "xfa/fwl/core/cfwl_event.h"
-#include "xfa/fwl/core/cfwl_widgetimpproperties.h"
-#include "xfa/fwl/core/ifwl_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;
- uint32_t m_dwStyles;
- uint32_t m_dwStyleExes;
- uint32_t 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;
- uint32_t 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);
- uint32_t GetStyles();
- FWL_ERR ModifyStyles(uint32_t dwStylesAdded, uint32_t dwStylesRemoved);
- uint32_t GetStylesEx();
- FWL_ERR ModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved);
- uint32_t GetStates();
- FWL_ERR SetStates(uint32_t 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();
- uint32_t 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,
- uint32_t 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 // XFA_INCLUDE_FWL_LIGHTWIDGET_WIDGET_H_
diff --git a/xfa/include/fwl/theme/barcodetp.h b/xfa/include/fwl/theme/barcodetp.h
deleted file mode 100644
index 89c9a679f3..0000000000
--- a/xfa/include/fwl/theme/barcodetp.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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_THEME_BARCODETP_H_
-#define XFA_INCLUDE_FWL_THEME_BARCODETP_H_
-
-#include "xfa/include/fwl/theme/utils.h"
-#include "xfa/include/fwl/theme/widgettp.h"
-
-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 // XFA_INCLUDE_FWL_THEME_BARCODETP_H_
diff --git a/xfa/include/fwl/theme/carettp.h b/xfa/include/fwl/theme/carettp.h
deleted file mode 100644
index bd432dc401..0000000000
--- a/xfa/include/fwl/theme/carettp.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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_THEME_CARETTP_H_
-#define XFA_INCLUDE_FWL_THEME_CARETTP_H_
-
-#include "xfa/include/fwl/theme/widgettp.h"
-
-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,
- uint32_t dwStates,
- const CFX_RectF* pRect,
- CFX_Color* crFill,
- CFX_Matrix* pMatrix = NULL);
-};
-
-#endif // XFA_INCLUDE_FWL_THEME_CARETTP_H_
diff --git a/xfa/include/fwl/theme/checkboxtp.h b/xfa/include/fwl/theme/checkboxtp.h
deleted file mode 100644
index fc666d74b5..0000000000
--- a/xfa/include/fwl/theme/checkboxtp.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// 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_THEME_CHECKBOXTP_H_
-#define XFA_INCLUDE_FWL_THEME_CHECKBOXTP_H_
-
-#include "xfa/include/fwl/theme/utils.h"
-#include "xfa/include/fwl/theme/widgettp.h"
-
-class CFWL_CheckBoxTP : public CFWL_WidgetTP {
- public:
- CFWL_CheckBoxTP();
- virtual ~CFWL_CheckBoxTP();
- virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget);
- virtual uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t 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,
- uint32_t dwStates,
- CFX_Matrix* pMatrix = NULL);
- void DrawSign(IFWL_Widget* pWidget,
- CFX_Graphics* pGraphics,
- const CFX_RectF* pRtBox,
- uint32_t 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(uint32_t 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 // XFA_INCLUDE_FWL_THEME_CHECKBOXTP_H_
diff --git a/xfa/include/fwl/theme/comboboxtp.h b/xfa/include/fwl/theme/comboboxtp.h
deleted file mode 100644
index 74d49b45e7..0000000000
--- a/xfa/include/fwl/theme/comboboxtp.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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_THEME_COMBOBOXTP_H_
-#define XFA_INCLUDE_FWL_THEME_COMBOBOXTP_H_
-
-#include "xfa/include/fwl/theme/widgettp.h"
-
-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, uint32_t dwCapacity);
-
- protected:
- void DrawDropDownButton(CFWL_ThemeBackground* pParams,
- uint32_t dwStates,
- CFX_Matrix* pMatrix);
- void DrawStrethHandler(CFWL_ThemeBackground* pParams,
- uint32_t dwStates,
- CFX_Matrix* pMatrix);
-};
-
-#endif // XFA_INCLUDE_FWL_THEME_COMBOBOXTP_H_
diff --git a/xfa/include/fwl/theme/datetimepickertp.h b/xfa/include/fwl/theme/datetimepickertp.h
deleted file mode 100644
index de2f8304f0..0000000000
--- a/xfa/include/fwl/theme/datetimepickertp.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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_THEME_DATETIMEPICKERTP_H_
-#define XFA_INCLUDE_FWL_THEME_DATETIMEPICKERTP_H_
-
-#include "xfa/include/fwl/theme/widgettp.h"
-
-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 // XFA_INCLUDE_FWL_THEME_DATETIMEPICKERTP_H_
diff --git a/xfa/include/fwl/theme/edittp.h b/xfa/include/fwl/theme/edittp.h
deleted file mode 100644
index d03fbe60eb..0000000000
--- a/xfa/include/fwl/theme/edittp.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// 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_THEME_EDITTP_H_
-#define XFA_INCLUDE_FWL_THEME_EDITTP_H_
-
-#include "xfa/include/fwl/theme/widgettp.h"
-
-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 // XFA_INCLUDE_FWL_THEME_EDITTP_H_
diff --git a/xfa/include/fwl/theme/formtp.h b/xfa/include/fwl/theme/formtp.h
deleted file mode 100644
index 90ec67387e..0000000000
--- a/xfa/include/fwl/theme/formtp.h
+++ /dev/null
@@ -1,111 +0,0 @@
-// 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_THEME_FORMTP_H_
-#define XFA_INCLUDE_FWL_THEME_FORMTP_H_
-
-#include "xfa/include/fwl/theme/utils.h"
-#include "xfa/include/fwl/theme/widgettp.h"
-
-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 uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t 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, uint32_t 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(uint32_t 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 // XFA_INCLUDE_FWL_THEME_FORMTP_H_
diff --git a/xfa/include/fwl/theme/listboxtp.h b/xfa/include/fwl/theme/listboxtp.h
deleted file mode 100644
index 8f5720c9fb..0000000000
--- a/xfa/include/fwl/theme/listboxtp.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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_THEME_LISTBOXTP_H_
-#define XFA_INCLUDE_FWL_THEME_LISTBOXTP_H_
-
-#include "xfa/include/fwl/theme/widgettp.h"
-
-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,
- uint32_t dwStates,
- const CFX_RectF* prtItem,
- void* pData = NULL,
- CFX_Matrix* pMatrix = NULL);
-};
-
-#endif // XFA_INCLUDE_FWL_THEME_LISTBOXTP_H_
diff --git a/xfa/include/fwl/theme/monthcalendartp.h b/xfa/include/fwl/theme/monthcalendartp.h
deleted file mode 100644
index 8321965a8b..0000000000
--- a/xfa/include/fwl/theme/monthcalendartp.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// 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_THEME_MONTHCALENDARTP_H_
-#define XFA_INCLUDE_FWL_THEME_MONTHCALENDARTP_H_
-
-#include "xfa/include/fwl/theme/widgettp.h"
-
-class CFWL_MonthCalendarTP : public CFWL_WidgetTP {
- public:
- CFWL_MonthCalendarTP();
- virtual ~CFWL_MonthCalendarTP();
- virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget);
- virtual uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t 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, uint32_t 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(uint32_t dwFWLStates);
- void SetThemeData(uint32_t 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 // XFA_INCLUDE_FWL_THEME_MONTHCALENDARTP_H_
diff --git a/xfa/include/fwl/theme/pictureboxtp.h b/xfa/include/fwl/theme/pictureboxtp.h
deleted file mode 100644
index 8879890649..0000000000
--- a/xfa/include/fwl/theme/pictureboxtp.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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_THEME_PICTUREBOXTP_H_
-#define XFA_INCLUDE_FWL_THEME_PICTUREBOXTP_H_
-
-#include "xfa/include/fwl/theme/widgettp.h"
-
-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 // XFA_INCLUDE_FWL_THEME_PICTUREBOXTP_H_
diff --git a/xfa/include/fwl/theme/pushbuttontp.h b/xfa/include/fwl/theme/pushbuttontp.h
deleted file mode 100644
index b951de0bed..0000000000
--- a/xfa/include/fwl/theme/pushbuttontp.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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_THEME_PUSHBUTTONTP_H_
-#define XFA_INCLUDE_FWL_THEME_PUSHBUTTONTP_H_
-
-#include "xfa/include/fwl/theme/widgettp.h"
-
-class CFWL_PushButtonTP : public CFWL_WidgetTP {
- public:
- CFWL_PushButtonTP();
- virtual ~CFWL_PushButtonTP();
- virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget);
- virtual uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren = TRUE);
- virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams);
- virtual void* GetCapacity(CFWL_ThemePart* pThemePart, uint32_t dwCapacity);
- virtual FWL_ERR Initialize();
- virtual FWL_ERR Finalize();
-
- protected:
- void SetThemeData(uint32_t dwID);
- void SetTopLineColor(uint32_t* pData);
- void SetLeftLineColor(uint32_t* pData);
- void SetRightLineColor(uint32_t* pData);
- void SetBottomLineColor(uint32_t* pData);
- void SetBackgroudColor(uint32_t* pData);
- void SetCaptionColor(uint32_t* pData);
- void SetCornerColor(uint32_t* pData);
- int32_t GetColorID(uint32_t dwStates);
-
- struct PBThemeData {
- FX_ARGB clrBorder[5];
- FX_ARGB clrStart[5];
- FX_ARGB clrEnd[5];
- FX_ARGB clrFill[5];
- } * m_pThemeData;
-};
-
-#endif // XFA_INCLUDE_FWL_THEME_PUSHBUTTONTP_H_
diff --git a/xfa/include/fwl/theme/scrollbartp.h b/xfa/include/fwl/theme/scrollbartp.h
deleted file mode 100644
index 5b7145c155..0000000000
--- a/xfa/include/fwl/theme/scrollbartp.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// 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_THEME_SCROLLBARTP_H_
-#define XFA_INCLUDE_FWL_THEME_SCROLLBARTP_H_
-
-#include "xfa/include/fwl/theme/widgettp.h"
-
-class CFWL_ScrollBarTP : public CFWL_WidgetTP {
- public:
- CFWL_ScrollBarTP();
- virtual ~CFWL_ScrollBarTP();
- virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget);
- virtual uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren = TRUE);
- virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams);
- virtual void* GetCapacity(CFWL_ThemePart* pThemePart, uint32_t 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(uint32_t 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 // XFA_INCLUDE_FWL_THEME_SCROLLBARTP_H_
diff --git a/xfa/include/fwl/theme/utils.h b/xfa/include/fwl/theme/utils.h
deleted file mode 100644
index 0a37d3274b..0000000000
--- a/xfa/include/fwl/theme/utils.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// 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_THEME_UTILS_H_
-#define XFA_INCLUDE_FWL_THEME_UTILS_H_
-
-#include "core/fxcrt/include/fx_system.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
-};
-struct FWLCOLOR {
- union {
- uint32_t color;
- struct {
- uint8_t b;
- uint8_t g;
- uint8_t r;
- uint8_t a;
- };
- };
-
- FWLCOLOR() : color(0) {}
- FWLCOLOR(uint32_t c) : color(c) {}
- FWLCOLOR(const FWLCOLOR& c) : color(c.color) {}
-
- bool operator==(const FWLCOLOR& frColor) { return color == frColor.color; }
- operator uint32_t() { return color; }
-};
-#define FWLTHEME_BEZIER FX_BEZIER
-#define FWLTHEME_PI FX_PI
-#define FWLTHEME_PI_2_1 (FX_PI / 2.0f)
-#define FWLTHEME_PI_2_3 (3.0f * FX_PI / 2.0f)
-#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 // XFA_INCLUDE_FWL_THEME_UTILS_H_
diff --git a/xfa/include/fwl/theme/widgettp.h b/xfa/include/fwl/theme/widgettp.h
deleted file mode 100644
index 344f4d3034..0000000000
--- a/xfa/include/fwl/theme/widgettp.h
+++ /dev/null
@@ -1,220 +0,0 @@
-// 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_THEME_WIDGETTP_H_
-#define XFA_INCLUDE_FWL_THEME_WIDGETTP_H_
-
-#include <memory>
-#include <vector>
-
-#include "core/fxcrt/include/fx_coordinates.h"
-#include "core/fxcrt/include/fx_system.h"
-#include "xfa/fwl/core/fwl_error.h"
-#include "xfa/fxgraphics/include/cfx_graphics.h"
-#include "xfa/include/fwl/theme/utils.h"
-
-class IFWL_Widget;
-class IFDE_TextOut;
-class IFX_Font;
-class IFX_FontMgr;
-class CFWL_ArrowData;
-class CFWL_ThemeBackground;
-class CFWL_ThemePart;
-class CFWL_ThemeText;
-
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
-class IFX_FontSourceEnum;
-#endif
-
-class CFWL_WidgetTP {
- public:
- virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget);
- virtual uint32_t GetThemeID(IFWL_Widget* pWidget);
- virtual uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t 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, uint32_t 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,
- uint32_t 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);
- uint32_t m_dwRefCount;
- IFDE_TextOut* m_pTextOut;
- IFX_Font* m_pFDEFont;
- FX_FLOAT m_fValue;
- uint32_t m_dwValue;
- CFX_RectF m_rtMargin;
- uint32_t m_dwThemeID;
- CFX_Matrix _ctm;
-};
-FX_BOOL FWLTHEME_Init();
-void FWLTHEME_Release();
-uint32_t FWL_GetThemeLayout(uint32_t dwThemeID);
-uint32_t FWL_GetThemeColor(uint32_t dwThemeID);
-uint32_t FWL_MakeThemeID(uint32_t dwLayout, uint32_t dwColor);
-
-class CFWL_ArrowData {
- public:
- static CFWL_ArrowData* GetInstance();
- static FX_BOOL IsInstance();
- static void DestroyInstance();
- virtual ~CFWL_ArrowData();
- void SetColorData(uint32_t 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,
- uint32_t dwFontStyles,
- uint16_t wCodePage);
- FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage);
- IFX_Font* GetFont() const { return m_pFont; }
-
- protected:
- CFX_WideString m_wsFamily;
- uint32_t m_dwStyles;
- uint32_t 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:
- static CFWL_FontManager* GetInstance();
- static void DestroyInstance();
-
- IFX_Font* FindFont(const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t dwCodePage);
-
- protected:
- CFWL_FontManager();
- virtual ~CFWL_FontManager();
-
- static CFWL_FontManager* s_FontManager;
- std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray;
-};
-
-#endif // XFA_INCLUDE_FWL_THEME_WIDGETTP_H_