diff options
Diffstat (limited to 'xfa/include/fwl/basewidget')
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_barcode.h | 63 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_caret.h | 32 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_checkbox.h | 95 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_combobox.h | 139 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_datetimepicker.h | 101 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_edit.h | 165 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_listbox.h | 110 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_menu.h | 15 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_monthcalendar.h | 130 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_picturebox.h | 55 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_pushbutton.h | 57 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_scrollbar.h | 73 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_spinbutton.h | 43 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fwl_tooltipctrl.h | 45 | ||||
-rw-r--r-- | xfa/include/fwl/basewidget/fxmath_barcode.h | 41 |
15 files changed, 1164 insertions, 0 deletions
diff --git a/xfa/include/fwl/basewidget/fwl_barcode.h b/xfa/include/fwl/basewidget/fwl_barcode.h new file mode 100644 index 0000000000..ba6e99691e --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_barcode.h @@ -0,0 +1,63 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_BARCODE_H
+#define _FWL_BARCODE_H
+#include "fwl_edit.h"
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_BarcodeDP;
+class IFWL_Barcode;
+#define FWL_CLASS_Barcode L"FWL_BARCODE"
+#define FWL_CLASSHASH_Barcode 366886968
+#define FWL_BCDATTRIBUTE_CHARENCODING (1L << 0)
+#define FWL_BCDATTRIBUTE_MODULEHEIGHT (1L << 1)
+#define FWL_BCDATTRIBUTE_MODULEWIDTH (1L << 2)
+#define FWL_BCDATTRIBUTE_DATALENGTH (1L << 3)
+#define FWL_BCDATTRIBUTE_CALCHECKSUM (1L << 4)
+#define FWL_BCDATTRIBUTE_PRINTCHECKSUM (1L << 5)
+#define FWL_BCDATTRIBUTE_TEXTLOCATION (1L << 6)
+#define FWL_BCDATTRIBUTE_WIDENARROWRATIO (1L << 7)
+#define FWL_BCDATTRIBUTE_STARTCHAR (1L << 8)
+#define FWL_BCDATTRIBUTE_ENDCHAR (1L << 9)
+#define FWL_BCDATTRIBUTE_VERSION (1L << 10)
+#define FWL_BCDATTRIBUTE_ECLEVEL (1L << 11)
+#define FWL_BCDATTRIBUTE_TRUNCATED (1L << 12)
+#define FWL_PART_BCD_Border 1
+#define FWL_PART_BCD_Edge 2
+#define FWL_PART_BCD_Background 3
+#define FWL_BCUPDATECMD_Data FWL_WGTUPDATECMD_User
+class IFWL_BarcodeDP : public IFWL_EditDP
+{
+public:
+ virtual BC_CHAR_ENCODING GetCharEncoding() = 0;
+ virtual FX_INT32 GetModuleHeight() = 0;
+ virtual FX_INT32 GetModuleWidth() = 0;
+ virtual FX_INT32 GetDataLength() = 0;
+ virtual FX_INT32 GetCalChecksum() = 0;
+ virtual FX_BOOL GetPrintChecksum() = 0;
+ virtual BC_TEXT_LOC GetTextLocation() = 0;
+ virtual FX_INT32 GetWideNarrowRatio() = 0;
+ virtual FX_CHAR GetStartChar() = 0;
+ virtual FX_CHAR GetEndChar() = 0;
+ virtual FX_INT32 GetVersion() = 0;
+ virtual FX_INT32 GetErrorCorrectionLevel() = 0;
+ virtual FX_BOOL GetTruncated() = 0;
+ virtual FX_DWORD GetBarcodeAttributeMask() = 0;
+};
+class IFWL_Barcode : public IFWL_Edit
+{
+public:
+ static IFWL_Barcode* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ void SetType(BC_TYPE type);
+ FX_BOOL IsProtectedType();
+protected:
+ IFWL_Barcode();
+ virtual ~IFWL_Barcode();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_caret.h b/xfa/include/fwl/basewidget/fwl_caret.h new file mode 100644 index 0000000000..0d29fca863 --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_caret.h @@ -0,0 +1,32 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_CARET_H
+#define _FWL_CARET_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_Caret;
+#define FWL_CLASS_Caret L"FWL_CARET"
+#define FWL_CLASSHASH_Caret 671181879
+#define FWL_STATE_CAT_HightLight 1
+#define FWL_PART_CAT_Background 1
+#define FWL_PARTSTATE_CAT_HightLight 1
+class IFWL_Caret : public IFWL_Widget
+{
+public:
+ static IFWL_Caret* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+
+ FWL_ERR ShowCaret(FX_BOOL bFlag = TRUE);
+ FWL_ERR GetFrequency(FX_DWORD &elapse);
+ FWL_ERR SetFrequency(FX_DWORD elapse);
+ FWL_ERR SetColor(CFX_Color crFill);
+protected:
+ IFWL_Caret();
+ virtual ~IFWL_Caret();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_checkbox.h b/xfa/include/fwl/basewidget/fwl_checkbox.h new file mode 100644 index 0000000000..625ad489c2 --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_checkbox.h @@ -0,0 +1,95 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_CHECKBOX_H
+#define _FWL_CHECKBOX_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_CheckBoxDP;
+class IFWL_CheckBox;
+#define FWL_CLASS_CheckBox L"FWL_CHECKBOX"
+#define FWL_CLASS_RadioButton L"FWL_RADIOBUTTON"
+#define FWL_CLASSHASH_CheckBox 4107183823
+#define FWL_CLASSHASH_RadioButton 3811304691
+#define FWL_STYLEEXT_CKB_Left (0L << 0)
+#define FWL_STYLEEXT_CKB_Center (1L << 0)
+#define FWL_STYLEEXT_CKB_Right (2L << 0)
+#define FWL_STYLEEXT_CKB_Top (0L << 2)
+#define FWL_STYLEEXT_CKB_VCenter (1L << 2)
+#define FWL_STYLEEXT_CKB_Bottom (2L << 2)
+#define FWL_STYLEEXT_CKB_LeftText (1L << 4)
+#define FWL_STYLEEXT_CKB_MultiLine (1L << 5)
+#define FWL_STYLEEXT_CKB_3State (1L << 6)
+#define FWL_STYLEEXT_CKB_RadioButton (1L << 7)
+#define FWL_STYLEEXT_CKB_ShapeSolidSquare (0L << 8)
+#define FWL_STYLEEXT_CKB_ShapeSunkenSquare (1L << 8)
+#define FWL_STYLEEXT_CKB_ShapeSolidCircle (2L << 8)
+#define FWL_STYLEEXT_CKB_ShapeSunkenCircle (3L << 8)
+#define FWL_STYLEEXT_CKB_SignShapeCheck (0L << 10)
+#define FWL_STYLEEXT_CKB_SignShapeCircle (1L << 10)
+#define FWL_STYLEEXT_CKB_SignShapeCross (2L << 10)
+#define FWL_STYLEEXT_CKB_SignShapeDiamond (3L << 10)
+#define FWL_STYLEEXT_CKB_SignShapeSquare (4L << 10)
+#define FWL_STYLEEXT_CKB_SignShapeStar (5L << 10)
+#define FWL_STYLEEXT_CKB_HLayoutMask (3L << 0)
+#define FWL_STYLEEXT_CKB_VLayoutMask (3L << 2)
+#define FWL_STYLEEXT_CKB_ShapeMask (3L << 8)
+#define FWL_STYLEEXT_CKB_SignShapeMask (7L << 10)
+#define FWL_STATE_CKB_Hovered (1 << FWL_WGTSTATE_MAX)
+#define FWL_STATE_CKB_Pressed (1 << (FWL_WGTSTATE_MAX + 1))
+#define FWL_STATE_CKB_Unchecked (0 << (FWL_WGTSTATE_MAX + 2))
+#define FWL_STATE_CKB_Checked (1 << (FWL_WGTSTATE_MAX + 2))
+#define FWL_STATE_CKB_Neutral (2 << (FWL_WGTSTATE_MAX + 2))
+#define FWL_STATE_CKB_CheckMask (3L << (FWL_WGTSTATE_MAX + 2))
+#define FWL_PART_CKB_Border 1
+#define FWL_PART_CKB_Edge 2
+#define FWL_PART_CKB_Background 3
+#define FWL_PART_CKB_CheckBox 4
+#define FWL_PART_CKB_Caption 5
+#define FWL_PARTSTATE_CKB_Normal (0L << 0)
+#define FWL_PARTSTATE_CKB_Pressed (1L << 0)
+#define FWL_PARTSTATE_CKB_Hovered (2L << 0)
+#define FWL_PARTSTATE_CKB_Disabled (3L << 0)
+#define FWL_PARTSTATE_CKB_UnChecked (0L << 2)
+#define FWL_PARTSTATE_CKB_Checked (1L << 2)
+#define FWL_PARTSTATE_CKB_Neutral (2L << 2)
+#define FWL_PARTSTATE_CKB_Focused (1L << 4)
+#define FWL_PARTSTATE_CKB_Mask1 (3L << 0)
+#define FWL_PARTSTATE_CKB_Mask2 (3L << 2)
+#define FWL_EVT_CKB_CheckStateChanged L"FWL_EVENT_CKB_CheckStateChanged"
+#define FWL_EVTHASH_CKB_CheckStateChanged 2503252963
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCkbCheckStateChanged, FWL_EVTHASH_CKB_CheckStateChanged)
+END_FWL_EVENT_DEF
+class IFWL_CheckBoxDP : public IFWL_DataProvider
+{
+public:
+ virtual FX_FLOAT GetBoxSize(IFWL_Widget *pWidget) = 0;
+};
+class IFWL_CheckBox : public IFWL_Widget
+{
+public:
+ static IFWL_CheckBox* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FX_INT32 GetCheckState();
+ FWL_ERR SetCheckState(FX_INT32 iCheck);
+protected:
+ IFWL_CheckBox();
+ virtual ~IFWL_CheckBox();
+};
+class IFWL_RadioButton : public IFWL_Widget
+{
+public:
+ static IFWL_RadioButton* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FX_INT32 GetCheckState();
+ FWL_ERR SetCheckState(FX_INT32 iCheck);
+protected:
+ IFWL_RadioButton();
+ virtual ~IFWL_RadioButton();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_combobox.h b/xfa/include/fwl/basewidget/fwl_combobox.h new file mode 100644 index 0000000000..74d6bdf24b --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_combobox.h @@ -0,0 +1,139 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_COMBOBOX_H
+#define _FWL_COMBOBOX_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_ListBox;
+class IFWL_ComboBoxDP;
+class IFWL_ComboBox;
+#define FWL_CLASS_ComboBox L"FWL_COMBOBOX"
+#define FWL_CLASSHASH_ComboBox 602353697
+#define FWL_STYLEEXT_CMB_DropList (0L << 0)
+#define FWL_STYLEEXT_CMB_DropDown (1L << 0)
+#define FWL_STYLEEXT_CMB_Sort (1L << 1)
+#define FWL_STYLEEXT_CMB_ListDrag (1L << 2)
+#define FWL_STYLEEXT_CMB_OwnerDraw (1L << 3)
+#define FWL_STYLEEXT_CMB_EditHNear (0L << 4)
+#define FWL_STYLEEXT_CMB_EditHCenter (1L << 4)
+#define FWL_STYLEEXT_CMB_EditHFar (2L << 4)
+#define FWL_STYLEEXT_CMB_EditVNear (0L << 6)
+#define FWL_STYLEEXT_CMB_EditVCenter (1L << 6)
+#define FWL_STYLEEXT_CMB_EditVFar (2L << 6)
+#define FWL_STYLEEXT_CMB_EditJustified (1L << 8)
+#define FWL_STYLEEXT_CMB_EditDistributed (2L << 8)
+#define FWL_STYLEEXT_CMB_EditHAlignMask (3L << 4)
+#define FWL_STYLEEXT_CMB_EditVAlignMask (3L << 6)
+#define FWL_STYLEEXT_CMB_EditHAlignModeMask (3L << 8)
+#define FWL_STYLEEXT_CMB_ListItemLeftAlign (0L << 10)
+#define FWL_STYLEEXT_CMB_ListItemCenterAlign (1L << 10)
+#define FWL_STYLEEXT_CMB_ListItemRightAlign (2L << 10)
+#define FWL_STYLEEXT_CMB_ListItemText (0L << 12)
+#define FWL_STYLEEXT_CMB_ListItemIconText (1L << 12)
+#define FWL_STYLEEXT_CMB_ListItemAlignMask (3L << 12)
+#define FWL_STYLEEXT_CMB_ReadOnly (1L << 13)
+#define FWL_PART_CMB_Border 1
+#define FWL_PART_CMB_Edge 2
+#define FWL_PART_CMB_Background 3
+#define FWL_PART_CMB_DropDownButton 4
+#define FWL_PART_CMB_Caption 5
+#define FWL_PART_CMB_StretcgHandler 6
+#define FWL_PARTSTATE_CMB_Normal (0L << 0)
+#define FWL_PARTSTATE_CMB_Hovered (1L << 0)
+#define FWL_PARTSTATE_CMB_Pressed (2L << 0)
+#define FWL_PARTSTATE_CMB_Disabled (3L << 0)
+#define FWL_PARTSTATE_CMB_Selected (1L << 2)
+#define FWL_WGTCAPACITY_CMB_ComboFormHandler (FWL_WGTCAPACITY_MAX + 7)
+enum FWL_CMB_TEXTCHANGED {
+ FWL_CMB_TEXTCHANGED_Insert = 0 ,
+ FWL_CMB_TEXTCHANGED_Delete ,
+ FWL_CMB_TEXTCHANGED_Replace ,
+};
+#define FWL_EVT_CMB_DropDown L"FWL_EVENT_CMB_PreDropDown"
+#define FWL_EVT_CMB_PostDropDown L"FWL_EVENT_CMB_PostDropDown"
+#define FWL_EVT_CMB_CloseUp L"FWL_EVENT_CMB_CloseUp"
+#define FWL_EVT_CMB_EditChanged L"FWL_EVENT_CMB_EditChanged"
+#define FWL_EVT_CMB_SelChanged L"FWL_EVENT_CMB_SelChanged"
+#define FWL_EVT_CMB_HoverChanged L"FWL_EVENT_CMB_HoverChanged"
+#define FWL_EVT_CMB_DrawItem L"FWL_EVENT_CMB_DrawItem"
+#define FWL_EVTHASH_CMB_PreDropDown 1357646798
+#define FWL_EVTHASH_CMB_PostDropDown 3677010285
+#define FWL_EVTHASH_CMB_CloseUp 2871271190
+#define FWL_EVTHASH_CMB_EditChanged 1527034762
+#define FWL_EVTHASH_CMB_SelChanged 2923227784
+#define FWL_EVTHASH_CMB_HoverChanged 944325448
+#define FWL_EVTHASH_CMB_DrawItem 917354551
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPreDropDown, FWL_EVTHASH_CMB_PreDropDown)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPostDropDown, FWL_EVTHASH_CMB_PostDropDown)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbCloseUp, FWL_EVTHASH_CMB_CloseUp)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbEditChanged, FWL_EVTHASH_CMB_EditChanged)
+FX_INT32 nChangeType;
+CFX_WideString wsInsert;
+CFX_WideString wsDelete;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbSelChanged, FWL_EVTHASH_CMB_SelChanged)
+CFX_Int32Array iArraySels;
+FX_BOOL bLButtonUp;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbHoverChanged, FWL_EVTHASH_CMB_HoverChanged)
+FX_INT32 m_iCurHover;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbDrawItem, FWL_EVTHASH_CMB_DrawItem)
+CFX_Graphics *m_pGraphics;
+CFX_Matrix m_matrix;
+FX_INT32 m_index;
+CFX_RectF m_rtItem;
+END_FWL_EVENT_DEF
+class IFWL_ComboBoxDP : public IFWL_ListBoxDP
+{
+public:
+ virtual FX_FLOAT GetListHeight(IFWL_Widget *pWidget) = 0;
+};
+class IFWL_ComboBox : public IFWL_Widget
+{
+public:
+ static IFWL_ComboBox* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FX_INT32 GetCurSel();
+ FWL_ERR SetCurSel(FX_INT32 iSel);
+ FWL_ERR SetEditText(const CFX_WideString &wsText);
+ FX_INT32 GetEditTextLength() const;
+ FWL_ERR GetEditText(CFX_WideString &wsText, FX_INT32 nStart = 0, FX_INT32 nCount = -1) const;
+ FWL_ERR SetEditSelRange(FX_INT32 nStart, FX_INT32 nCount = -1);
+ FX_INT32 GetEditSelRange(FX_INT32 nIndex, FX_INT32 &nStart);
+ FX_INT32 GetEditLimit();
+ FWL_ERR SetEditLimit(FX_INT32 nLimit);
+ FWL_ERR EditDoClipboard(FX_INT32 iCmd);
+ FX_BOOL EditRedo(FX_BSTR bsRecord);
+ FX_BOOL EditUndo(FX_BSTR bsRecord);
+ IFWL_ListBox* GetListBoxt();
+ FX_BOOL AfterFocusShowDropList();
+ FX_ERR OpenDropDownList(FX_BOOL bActivate);
+ FX_BOOL EditCanUndo();
+ FX_BOOL EditCanRedo();
+ FX_BOOL EditUndo();
+ FX_BOOL EditRedo();
+ FX_BOOL EditCanCopy();
+ FX_BOOL EditCanCut();
+ FX_BOOL EditCanSelectAll();
+ FX_BOOL EditCopy(CFX_WideString &wsCopy);
+ FX_BOOL EditCut(CFX_WideString &wsCut);
+ FX_BOOL EditPaste(const CFX_WideString &wsPaste);
+ FX_BOOL EditSelectAll();
+ FX_BOOL EditDelete();
+ FX_BOOL EditDeSelect();
+ FWL_ERR GetBBox(CFX_RectF &rect);
+ FWL_ERR EditModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
+protected:
+ IFWL_ComboBox();
+ virtual ~IFWL_ComboBox();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_datetimepicker.h b/xfa/include/fwl/basewidget/fwl_datetimepicker.h new file mode 100644 index 0000000000..898264eeec --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_datetimepicker.h @@ -0,0 +1,101 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_DATETIMEPICKER_H
+#define _FWL_DATETIMEPICKER_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_DateTimePickerDP;
+class IFWL_DateTimePicker;
+#define FWL_CLASS_DateTimePicker L"FWL_DATETIMEPICKER"
+#define FWL_CLASSHASH_DateTimePicker 3851176257
+#define FWL_STYLEEXT_DTP_AllowEdit (1L << 0)
+#define FWL_STYLEEXT_DTP_LongDateFormat (0L << 1)
+#define FWL_STYLEEXT_DTP_ShortDateFormat (1L << 1)
+#define FWL_STYLEEXT_DTP_TimeFormat (2L << 1)
+#define FWL_STYLEEXT_DTP_Spin (1L << 3)
+#define FWL_STYLEEXT_DTP_EditHNear (0L << 4)
+#define FWL_STYLEEXT_DTP_EditHCenter (1L << 4)
+#define FWL_STYLEEXT_DTP_EditHFar (2L << 4)
+#define FWL_STYLEEXT_DTP_EditVNear (0L << 6)
+#define FWL_STYLEEXT_DTP_EditVCenter (1L << 6)
+#define FWL_STYLEEXT_DTP_EditVFar (2L << 6)
+#define FWL_STYLEEXT_DTP_EditJustified (1L << 8)
+#define FWL_STYLEEXT_DTP_EditDistributed (2L << 8)
+#define FWL_STYLEEXT_DTP_EditHAlignMask (3L << 4)
+#define FWL_STYLEEXT_DTP_EditVAlignMask (3L << 6)
+#define FWL_STYLEEXT_DTP_EditHAlignModeMask (3L << 8)
+#define FWL_PART_DTP_Border 1
+#define FWL_PART_DTP_Edge 2
+#define FWL_PART_DTP_Background 3
+#define FWL_PART_DTP_DropDownButton 4
+#define FWL_PARTSTATE_DTP_Normal (0L << 0)
+#define FWL_PARTSTATE_DTP_Hovered (1L << 0)
+#define FWL_PARTSTATE_DTP_Pressed (2L << 0)
+#define FWL_PARTSTATE_DTP_Disabled (3L << 0)
+#define FWL_EVT_DTP_DropDown L"FWL_EVENT_DTP_DropDown"
+#define FWL_EVTHASH_DTP_DropDown 264728733
+#define FWL_EVT_DTP_CloseUp L"FWL_EVENT_DTP_CloseUp"
+#define FWL_EVTHASH_DTP_CloseUp 4280973803
+#define FWL_EVT_DTP_EditChanged L"FWL_EVENT_DTP_EditChanged"
+#define FWL_EVTHASH_DTP_EditChanged 4009610944
+#define FWL_EVT_DTP_HoverChanged L"FWL_EVENT_DTP_HoverChanged"
+#define FWL_EVTHASH_DTP_HoverChanged 686674750
+#define FWL_EVT_DTP_SelectChanged L"FWL_EVENT_DTP_SelectChanged"
+#define FWL_EVTHASH_DTP_SelectChanged 1589616858
+BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpDropDown, FWL_EVTHASH_DTP_DropDown)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpCloseUp, FWL_EVTHASH_DTP_CloseUp)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpEditChanged, FWL_EVTHASH_DTP_EditChanged)
+CFX_WideString m_wsText;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpHoverChanged, FWL_EVTHASH_DTP_HoverChanged)
+FX_INT32 hoverday;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpSelectChanged, FWL_EVTHASH_DTP_SelectChanged)
+FX_INT32 iYear;
+FX_INT32 iMonth;
+FX_INT32 iDay;
+END_FWL_EVENT_DEF
+class IFWL_DateTimePickerDP : public IFWL_DataProvider
+{
+public:
+ virtual FWL_ERR GetToday(IFWL_Widget *pWidget, FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay) = 0;
+};
+class IFWL_DateTimePicker : public IFWL_Widget
+{
+public:
+ static IFWL_DateTimePicker* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FWL_ERR GetCurSel(FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay);
+ FWL_ERR SetCurSel(FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 iDay);
+ FWL_ERR SetEditText(const CFX_WideString &wsText);
+ FWL_ERR GetEditText(CFX_WideString &wsText, FX_INT32 nStart = 0, FX_INT32 nCount = -1) const;
+ FX_INT32 CountSelRanges();
+ FX_INT32 GetSelRange(FX_INT32 nIndex, FX_INT32 &nStart);
+ FX_BOOL CanUndo();
+ FX_BOOL CanRedo();
+ FX_BOOL Undo();
+ FX_BOOL Redo();
+ FX_BOOL CanCopy();
+ FX_BOOL CanCut();
+ FX_BOOL CanSelectAll();
+ FX_BOOL Copy(CFX_WideString &wsCopy);
+ FX_BOOL Cut(CFX_WideString &wsCut);
+ FX_BOOL Paste(const CFX_WideString &wsPaste);
+ FX_BOOL SelectAll();
+ FX_BOOL Delete();
+ FX_BOOL DeSelect();
+ FWL_ERR GetBBox(CFX_RectF &rect);
+ FWL_ERR SetEditLimit(FX_INT32 nLimit);
+ FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
+protected:
+ IFWL_DateTimePicker();
+ virtual ~IFWL_DateTimePicker();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_edit.h b/xfa/include/fwl/basewidget/fwl_edit.h new file mode 100644 index 0000000000..18bdee662b --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_edit.h @@ -0,0 +1,165 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_EDIT_H
+#define _FWL_EDIT_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_EditDP;
+class IFWL_Edit;
+#define FWL_CLASS_Edit L"FWL_EDIT"
+#define FWL_CLASSHASH_Edit 2893987822
+#define FWL_STYLEEXT_EDT_ReadOnly (1L << 0)
+#define FWL_STYLEEXT_EDT_MultiLine (1L << 1)
+#define FWL_STYLEEXT_EDT_WantReturn (1L << 2)
+#define FWL_STYLEEXT_EDT_NoHideSel (1L << 3)
+#define FWL_STYLEEXT_EDT_AutoHScroll (1L << 4)
+#define FWL_STYLEEXT_EDT_AutoVScroll (1L << 5)
+#define FWL_STYLEEXT_EDT_NoRedoUndo (1L << 6)
+#define FWL_STYLEEXT_EDT_Validate (1L << 7)
+#define FWL_STYLEEXT_EDT_Password (1L << 8)
+#define FWL_STYLEEXT_EDT_Number (1L << 9)
+#define FWL_STYLEEXT_EDT_HSelfAdaption (1L << 10)
+#define FWL_STYLEEXT_EDT_VSelfAdaption (1L << 11)
+#define FWL_STYLEEXT_EDT_VerticalLayout (1L << 12)
+#define FWL_STYLEEXT_EDT_VerticalChars (1L << 13)
+#define FWL_STYLEEXT_EDT_ReverseLine (1L << 14)
+#define FWL_STYLEEXT_EDT_ArabicShapes (1L << 15)
+#define FWL_STYLEEXT_EDT_ExpandTab (1L << 16)
+#define FWL_STYLEEXT_EDT_CombText (1L << 17)
+#define FWL_STYLEEXT_EDT_HNear (0L << 18)
+#define FWL_STYLEEXT_EDT_HCenter (1L << 18)
+#define FWL_STYLEEXT_EDT_HFar (2L << 18)
+#define FWL_STYLEEXT_EDT_VNear (0L << 20)
+#define FWL_STYLEEXT_EDT_VCenter (1L << 20)
+#define FWL_STYLEEXT_EDT_VFar (2L << 20)
+#define FWL_STYLEEXT_EDT_Justified (1L << 22)
+#define FWL_STYLEEXT_EDT_Distributed (2L << 22)
+#define FWL_STYLEEXT_EDT_HAlignMask (3L << 18)
+#define FWL_STYLEEXT_EDT_VAlignMask (3L << 20)
+#define FWL_STYLEEXT_EDT_HAlignModeMask (3L << 22)
+#define FWL_STYLEEXT_EDT_InnerCaret (1L << 24)
+#define FWL_STYLEEXT_EDT_ShowScrollbarFocus (1L << 25)
+#define FWL_STYLEEXT_EDT_OuterScrollbar (1L << 26)
+#define FWL_STYLEEXT_EDT_LastLineHeight (1L << 27)
+#define FWL_STATE_EDT_Editing (1 << FWL_WGTSTATE_MAX)
+#define FWL_PART_EDT_Border 1
+#define FWL_PART_EDT_Edge 2
+#define FWL_PART_EDT_Background 3
+#define FWL_PART_EDT_CombTextLine 4
+#define FWL_PARTDATA_EDT_Background 0
+#define FWL_PARTDATA_EDT_StaticBackground 1
+#define FWL_PARTSTATE_EDT_Normal (0L << 0)
+#define FWL_PARTSTATE_EDT_ReadOnly (1L << 0)
+#define FWL_PARTSTATE_EDT_Disable (2L << 0)
+enum FWL_EDT_TEXTCHANGED {
+ FWL_EDT_TEXTCHANGED_Insert = 0 ,
+ FWL_EDT_TEXTCHANGED_Delete ,
+ FWL_EDT_TEXTCHANGED_Replace ,
+};
+#define FWL_EVT_EDT_AddDoRecord L"FWL_EVENT_EDT_AddDoRecord"
+#define FWL_EVTHASH_EDT_AddDoRecord 3701672224
+#define FWL_EVT_EDT_TextChanged L"FWL_EVENT_EDT_TextChanged"
+#define FWL_EVTHASH_EDT_TextChanged 1064022132
+#define FWL_EVT_EDT_PreSelfAdaption L"FWL_EVENT_PreSelfAdaption"
+#define FWL_EVTHASH_EDT_PreSelfAdaption 1001979178
+#define FWL_EVT_EDT_Validate L"FWL_EVTHASH_EDT_Validate"
+#define FWL_EVTHASH_EDT_Validate 3373308608
+#define FWL_EVT_EDT_CheckWord L"FWL_EVTHASH_EDT_CheckWord"
+#define FWL_EVTHASH_EDT_CheckWord 2897181520
+#define FWL_EVT_EDT_GetSuggestWords L"FWL_EVTHASH_EDT_GetSuggestWords"
+#define FWL_EVTHASH_EDT_GetSuggestWords 315782791
+#define FWL_EVT_EDT_TextFull L"FWL_EVTHASH_EDT_TextFull"
+#define FWL_EVTHASH_EDT_TextFull 2158580174
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtAddDoRecord, FWL_EVTHASH_EDT_AddDoRecord)
+CFX_ByteString m_wsDoRecord;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtTextChanged, FWL_EVTHASH_EDT_TextChanged)
+FX_INT32 nChangeType;
+CFX_WideString wsInsert;
+CFX_WideString wsDelete;
+CFX_WideString wsPrevText;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtTextFull, FWL_EVTHASH_EDT_TextFull)
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtPreSelfAdaption, FWL_EVTHASH_EDT_PreSelfAdaption)
+FX_BOOL bHSelfAdaption;
+FX_BOOL bVSelfAdaption;
+CFX_RectF rtAfterChange;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtValidate, FWL_EVTHASH_EDT_Validate)
+IFWL_Widget* pDstWidget;
+CFX_WideString wsInsert;
+FX_BOOL bValidate;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtCheckWord, FWL_EVTHASH_EDT_CheckWord)
+CFX_ByteString bsWord;
+FX_BOOL bCheckWord;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtGetSuggestWords, FWL_EVTHASH_EDT_GetSuggestWords)
+FX_BOOL bSuggestWords;
+CFX_ByteString bsWord;
+CFX_ByteStringArray bsArraySuggestWords;
+END_FWL_EVENT_DEF
+class IFWL_EditDP : public IFWL_DataProvider
+{
+};
+#define FWL_EDT_FIND_FLAGS_Prev (0L << 0)
+#define FWL_EDT_FIND_FLAGS_Next (1L << 0)
+#define FWL_EDT_FIND_FLAGS_WholeWord (1L << 1)
+#define FWL_EDT_FIND_FLAGS_NoCase (1L << 2)
+typedef struct _FWL_HEDTFIND {
+ FX_LPVOID pData;
+}* FWL_HEDTFIND;
+class IFWL_Edit : public IFWL_Widget
+{
+public:
+ static IFWL_Edit* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FWL_ERR SetText(const CFX_WideString &wsText);
+ FX_INT32 GetTextLength() const;
+ FWL_ERR GetText(CFX_WideString &wsText, FX_INT32 nStart = 0, FX_INT32 nCount = -1) const;
+ FWL_ERR ClearText();
+ FX_INT32 GetCaretPos() const;
+ FX_INT32 SetCaretPos(FX_INT32 nIndex, FX_BOOL bBefore = TRUE);
+ FWL_ERR AddSelRange(FX_INT32 nStart, FX_INT32 nCount = -1);
+ FX_INT32 CountSelRanges();
+ FX_INT32 GetSelRange(FX_INT32 nIndex, FX_INT32 &nStart);
+ FWL_ERR ClearSelections();
+ FX_INT32 GetLimit();
+ FWL_ERR SetLimit(FX_INT32 nLimit);
+ FWL_ERR SetAliasChar(FX_WCHAR wAlias);
+ FWL_ERR SetFormatString(const CFX_WideString &wsFormat);
+ FWL_ERR Insert(FX_INT32 nStart, FX_LPCWSTR lpText, FX_INT32 nLen);
+ FWL_ERR DeleteSelections();
+ FWL_ERR DeleteRange(FX_INT32 nStart, FX_INT32 nCount = -1);
+ FWL_ERR ReplaceSelections(const CFX_WideStringC &wsReplace);
+ FWL_ERR Replace(FX_INT32 nStart, FX_INT32 nLen, const CFX_WideStringC &wsReplace);
+ FWL_ERR DoClipboard(FX_INT32 iCmd);
+ FX_BOOL Copy(CFX_WideString &wsCopy);
+ FX_BOOL Cut(CFX_WideString &wsCut);
+ FX_BOOL Paste(const CFX_WideString &wsPaste);
+ FX_BOOL Delete();
+ FX_BOOL Redo(FX_BSTR bsRecord);
+ FX_BOOL Undo(FX_BSTR bsRecord);
+ FX_BOOL Undo();
+ FX_BOOL Redo();
+ FX_BOOL CanUndo();
+ FX_BOOL CanRedo();
+ FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
+ FWL_ERR SetOuter(IFWL_Widget *pOuter);
+ FWL_ERR SetNumberRange(FX_INT32 iMin, FX_INT32 iMax);
+ FWL_ERR SetBackColor(FX_DWORD dwColor);
+ FWL_ERR SetFont(const CFX_WideString &wsFont, FX_FLOAT fSize);
+ void SetScrollOffset(FX_FLOAT fScrollOffset);
+ FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSuggest);
+ FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace);
+protected:
+ IFWL_Edit();
+ virtual ~IFWL_Edit();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_listbox.h b/xfa/include/fwl/basewidget/fwl_listbox.h new file mode 100644 index 0000000000..4b2f2555c5 --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_listbox.h @@ -0,0 +1,110 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_LISTBOX_H
+#define _FWL_LISTBOX_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_ListBoxDP;
+class IFWL_ListBox;
+#define FWL_CLASS_ListBox L"FWL_LISTBOX"
+#define FWL_CLASSHASH_ListBox 1777358317
+#define FWL_STYLEEXT_LTB_MultiSelection (1L << 0)
+#define FWL_STYLEEXT_LTB_Sort (1L << 1)
+#define FWL_STYLEEXT_LTB_ShowScrollBarAlaways (1L << 2)
+#define FWL_STYLEEXT_LTB_MultiColumn (1L << 3)
+#define FWL_STYLEEXT_LTB_LeftAlign (0L << 4)
+#define FWL_STYLEEXT_LTB_CenterAlign (1L << 4)
+#define FWL_STYLEEXT_LTB_RightAlign (2L << 4)
+#define FWL_STYLEEXT_LTB_MultiLine (1L << 6)
+#define FWL_STYLEEXT_LTB_OwnerDraw (1L << 7)
+#define FWL_STYLEEXT_LTB_Icon (1L << 8)
+#define FWL_STYLEEXT_LTB_Check (1L << 9)
+#define FWL_STYLEEXT_LTB_AlignMask (3L << 4)
+#define FWL_STYLEEXT_LTB_ShowScrollBarFocus (1L << 10)
+#define FWL_ITEMSTATE_LTB_Selected (1L << 0)
+#define FWL_ITEMSTATE_LTB_Focused (1L << 1)
+#define FWL_ITEMSTATE_LTB_Checked (1L << 2)
+#define FWL_PART_LTB_Border 1
+#define FWL_PART_LTB_Edge 2
+#define FWL_PART_LTB_Background 3
+#define FWL_PART_LTB_ListItem 4
+#define FWL_PART_LTB_Check 5
+#define FWL_PART_LTB_Icon 6
+#define FWL_PARTSTATE_LTB_Normal (0L << 0)
+#define FWL_PARTSTATE_LTB_Selected (1L << 0)
+#define FWL_PARTSTATE_LTB_Disabled (2L << 0)
+#define FWL_PARTSTATE_LTB_Focused (1L << 2)
+#define FWL_PARTSTATE_LTB_UnChecked (0L << 3)
+#define FWL_PARTSTATE_LTB_Checked (1L << 3)
+#define FWL_PARTSTATE_LTB_Mask (3L << 0)
+#define FWL_WGTHITTEST_LTB_Item FWL_WGTHITTEST_MAX + 1
+#define FWL_WGTHITTEST_LTB_HScrollBar FWL_WGTHITTEST_MAX + 2
+#define FWL_WGTHITTEST_LTB_VScrollBar FWL_WGTHITTEST_MAX + 3
+#define FWL_EVT_LTB_SelChanged L"FWL_EVENT_LTB_SelChanged"
+#define FWL_EVT_LTB_DrawItem L"FWL_EVENT_LTB_DrawItem"
+#define FWL_EVTHASH_LTB_SelChanged 1701781688
+#define FWL_EVTHASH_LTB_DrawItem 1050853991
+BEGIN_FWL_EVENT_DEF(CFWL_EvtLtbSelChanged, FWL_EVTHASH_LTB_SelChanged)
+CFX_Int32Array iarraySels;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EvtLtbDrawItem, FWL_EVTHASH_LTB_DrawItem)
+CFX_Graphics *m_pGraphics;
+CFX_Matrix m_matrix;
+FX_INT32 m_index;
+CFX_RectF m_rect;
+END_FWL_EVENT_DEF
+typedef struct _FWL_HLISTITEM {
+ FX_LPVOID pData;
+}* FWL_HLISTITEM;
+typedef struct _FWL_ListBoxItemData {
+ IFWL_ListBoxDP *pDataProvider;
+ FX_INT32 iIndex;
+} FWL_ListBoxItemData;
+class IFWL_ListBoxDP : public IFWL_DataProvider
+{
+public:
+ virtual FX_INT32 CountItems(IFWL_Widget *pWidget) = 0;
+ virtual FWL_HLISTITEM GetItem(IFWL_Widget *pWidget, FX_INT32 nIndex) = 0;
+ virtual FX_INT32 GetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
+ virtual FX_BOOL SetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_INT32 nIndex) = 0;
+ virtual FX_DWORD GetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
+ virtual FWL_ERR GetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_WideString &wsText) = 0;
+ virtual FWL_ERR GetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_RectF &rtItem) = 0;
+ virtual FX_LPVOID GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
+ virtual FWL_ERR SetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_DWORD dwStyle) = 0;
+ virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_LPCWSTR pszText) = 0;
+ virtual FWL_ERR SetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const CFX_RectF &rtItem) = 0;
+ virtual FX_FLOAT GetItemHeight(IFWL_Widget *pWidget) = 0;
+ virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
+ virtual FWL_ERR GetItemCheckRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_RectF& rtCheck) = 0;
+ virtual FWL_ERR SetItemCheckRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const CFX_RectF& rtCheck) = 0;
+ virtual FX_DWORD GetItemCheckState(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
+ virtual FWL_ERR SetItemCheckState(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_DWORD dwCheckState) = 0;
+};
+class IFWL_ListBoxCompare
+{
+public:
+ virtual FX_INT32 Compare(FWL_HLISTITEM hLeft, FWL_HLISTITEM hRight) = 0;
+};
+class IFWL_ListBox : public IFWL_Widget
+{
+public:
+ static IFWL_ListBox* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FX_INT32 CountSelItems();
+ FWL_HLISTITEM GetSelItem(FX_INT32 nIndexSel);
+ FX_INT32 GetSelIndex(FX_INT32 nIndex);
+ FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE);
+ FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString &wsText);
+ FWL_ERR GetScrollPos(FX_FLOAT &fPos, FX_BOOL bVert = TRUE);
+ FWL_ERR* Sort(IFWL_ListBoxCompare *pCom);
+protected:
+ IFWL_ListBox();
+ virtual ~IFWL_ListBox();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_menu.h b/xfa/include/fwl/basewidget/fwl_menu.h new file mode 100644 index 0000000000..156274344f --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_menu.h @@ -0,0 +1,15 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_MENU_H
+#define _FWL_MENU_H
+#define FWL_CLASS_Menu L"FWL_MENU"
+#define FWL_CLASSHASH_Menu 3957949655
+#define FWL_STYLEEXT_MNU_Horz (0L << 0)
+#define FWL_STYLEEXT_MNU_Vert (1L << 0)
+#define FWL_STYLEEXT_MNU_Dock (1L << 1)
+#define FWL_STYLEEXT_MNU_OwnerDraw (1L << 2)
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_monthcalendar.h b/xfa/include/fwl/basewidget/fwl_monthcalendar.h new file mode 100644 index 0000000000..7ad8f8a364 --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_monthcalendar.h @@ -0,0 +1,130 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_MONTHCALENDAR_H
+#define _FWL_MONTHCALENDAR_H
+class IFWL_MonthCalendarDP;
+class IFWL_MonthCalendar;
+#define FWL_CLASS_MonthCalendar L"FWL_MONTHCALENDAR"
+#define FWL_CLASSHASH_MonthCalendar 2733931374
+#define FWL_STYLEEXT_MCD_MultiSelect (1L << 0)
+#define FWL_STYLEEXT_MCD_NoToday (1L << 1)
+#define FWL_STYLEEXT_MCD_NoTodayCircle (1L << 2)
+#define FWL_STYLEEXT_MCD_WeekNumbers (1L << 3)
+#define FWL_WGTCAPACITY_MC_HEADER_WIDTH 12
+#define FWL_WGTCAPACITY_MC_HEADER_Height 13
+#define FWL_WGTCAPACITY_MC_HEADER_BTN_WIDTH 14
+#define FWL_WGTCAPACITY_MC_HEADER_BTN_HEIGHT 15
+#define FWL_WGTCAPACITY_MC_HEADER_BTN_HMARGIN 16
+#define FWL_WGTCAPACITY_MC_HEADER_BTN_VMARGIN 17
+#define FWL_WGTCAPACITY_MC_HEADER_TEXTWIDHT 18
+#define FWL_WGTCAPACITY_MC_HEADER_TEXTHEIGHT 19
+#define FWL_WGTCAPACITY_MC_HEADER_TEXT_HMARGIN 20
+#define FWL_WGTCAPACITY_MC_HEADER_TEXT_VMARGIN 21
+#define FWL_WGTCAPACITY_MC_HSEP_WIDTH 22
+#define FWL_WGTCAPACITY_MC_HSEP_HEIGHT 23
+#define FWL_WGTCAPACITY_MC_VSEP_WIDTH 24
+#define FWL_WGTCAPACITY_MC_VSEP_HEIGHT 25
+#define FWL_WGTCAPACITY_MC_WEEKNUM_WIDTH 26
+#define FWL_WGTCAPACITY_MC_SEP_DOFFSET 40
+#define FWL_WGTCAPACITY_MC_SEP_X 27
+#define FWL_WGTCAPACITY_MC_SEP_Y 28
+#define FWL_WGTCAPACITY_MC_WEEKNUM_HEIGHT 29
+#define FWL_WGTCAPACITY_MC_WEEK_WIDTH 30
+#define FWL_WGTCAPACITY_MC_WEEK_HEIGHT 31
+#define FWL_WGTCAPACITY_MC_DATES_CELL_WIDTH 32
+#define FWL_WGTCAPACITY_MC_DATES_CELL_HEIGHT 33
+#define FWL_WGTCAPACITY_MC_TODAY_WIDHT 34
+#define FWL_WGTCAPACITY_MC_TODAY_HEIGHT 35
+#define FWL_WGTCAPACITY_MC_TODAY_FLAG_WIDHT 36
+#define FWL_WGTCAPACITY_MC_WIDTH 37
+#define FWL_WGTCAPACITY_MC_HEIGHT 38
+#define FWL_ITEMSTATE_MCD_Nomal (0L << 0)
+#define FWL_ITEMSTATE_MCD_Flag (1L << 0)
+#define FWL_ITEMSTATE_MCD_Selected (1L << 1)
+#define FWL_ITEMSTATE_MCD_Focused (1L << 2)
+#define FWL_PART_MCD_Border 1
+#define FWL_PART_MCD_Edge 2
+#define FWL_PART_MCD_Background 3
+#define FWL_PART_MCD_LBtn 4
+#define FWL_PART_MCD_RBtn 5
+#define FWL_PART_MCD_HSeparator 6
+#define FWL_PART_MCD_VSeparator 7
+#define FWL_PART_MCD_TodayCircle 8
+#define FWL_PART_MCD_DateInCircle 9
+#define FWL_PART_MCD_DateInBK 10
+#define FWL_PART_MCD_Caption 9
+#define FWL_PART_MCD_DatesIn 10
+#define FWL_PART_MCD_DatesOut 11
+#define FWL_PART_MCD_Week 12
+#define FWL_PART_MCD_Today 13
+#define FWL_PART_MCD_Header 14
+#define FWL_PART_MCD_WeekNum 15
+#define FWL_PART_MCD_WeekNumSep 16
+#define FWL_PARTSTATE_MCD_Normal (0L << 0)
+#define FWL_PARTSTATE_MCD_Pressed (1L << 0)
+#define FWL_PARTSTATE_MCD_Hovered (2L << 0)
+#define FWL_PARTSTATE_MCD_Selected (3L << 0)
+#define FWL_PARTSTATE_MCD_LSelected (1L << 2)
+#define FWL_PARTSTATE_MCD_RSelected (2L << 2)
+#define FWL_PARTSTATE_MCD_Flagged (1L << 3)
+#define FWL_PARTSTATE_MCD_Focused (1L << 4)
+#define FWL_MCCAPACITY_Sun FWL_WGTCAPACITY_MAX + 5
+#define FWL_MCCAPACITY_Mon FWL_WGTCAPACITY_MAX + 6
+#define FWL_MCCAPACITY_Tue FWL_WGTCAPACITY_MAX + 7
+#define FWL_MCCAPACITY_Wed FWL_WGTCAPACITY_MAX + 8
+#define FWL_MCCAPACITY_Thu FWL_WGTCAPACITY_MAX + 9
+#define FWL_MCCAPACITY_Fri FWL_WGTCAPACITY_MAX + 10
+#define FWL_MCCAPACITY_Sat FWL_WGTCAPACITY_MAX + 11
+#define FWL_MCCAPACITY_January FWL_WGTCAPACITY_MAX + 12
+#define FWL_MCCAPACITY_February FWL_WGTCAPACITY_MAX + 13
+#define FWL_MCCAPACITY_March FWL_WGTCAPACITY_MAX + 14
+#define FWL_MCCAPACITY_April FWL_WGTCAPACITY_MAX + 15
+#define FWL_MCCAPACITY_May FWL_WGTCAPACITY_MAX + 16
+#define FWL_MCCAPACITY_June FWL_WGTCAPACITY_MAX + 17
+#define FWL_MCCAPACITY_July FWL_WGTCAPACITY_MAX + 18
+#define FWL_MCCAPACITY_August FWL_WGTCAPACITY_MAX + 19
+#define FWL_MCCAPACITY_September FWL_WGTCAPACITY_MAX + 20
+#define FWL_MCCAPACITY_October FWL_WGTCAPACITY_MAX + 21
+#define FWL_MCCAPACITY_November FWL_WGTCAPACITY_MAX + 22
+#define FWL_MCCAPACITY_December FWL_WGTCAPACITY_MAX + 23
+#define FWL_MCCAPACITY_Today FWL_WGTCAPACITY_MAX + 24
+#define FWL_EVENT_MCD_DATESELECTED L"FWL_EVENT_MCD_DateSelected"
+#define FWL_EVT_MCD_DateChanged L"FWL_EVENT_MCD_DateChanged"
+#define FWL_NOTEHASH_MCD_DATASELECTED 1085596932
+#define FWL_EVTHASH_MCD_DateChanged 54212227
+BEGIN_FWL_EVENT_DEF(CFWL_Event_McdDateSelected, FWL_NOTEHASH_MCD_DATASELECTED)
+FX_INT32 m_iStartDay;
+FX_INT32 m_iEndDay;
+END_FWL_EVENT_DEF
+BEGIN_FWL_EVENT_DEF(CFWL_EventMcdDateChanged, FWL_EVTHASH_MCD_DateChanged)
+FX_INT32 m_iOldYear;
+FX_INT32 m_iOldMonth;
+FX_INT32 m_iStartDay;
+FX_INT32 m_iEndDay;
+END_FWL_EVENT_DEF
+class IFWL_MonthCalendarDP : public IFWL_DataProvider
+{
+public:
+ virtual FX_INT32 GetCurDay(IFWL_Widget *pWidget) = 0;
+ virtual FX_INT32 GetCurMonth(IFWL_Widget *pWidget) = 0;
+ virtual FX_INT32 GetCurYear(IFWL_Widget *pWidget) = 0;
+};
+class IFWL_MonthCalendar : public IFWL_Widget
+{
+public:
+ static IFWL_MonthCalendar* Create();
+
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FX_INT32 CountSelect();
+ FX_BOOL GetSelect(FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay, FX_INT32 nIndex = 0);
+ FX_BOOL SetSelect(FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 iDay);
+protected:
+ IFWL_MonthCalendar();
+ virtual ~IFWL_MonthCalendar();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_picturebox.h b/xfa/include/fwl/basewidget/fwl_picturebox.h new file mode 100644 index 0000000000..419fd4e0d1 --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_picturebox.h @@ -0,0 +1,55 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_PICTUREBOX_H
+#define _FWL_PICTUREBOX_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_PictureBoxDP;
+class IFWL_PictureBox;
+#define FWL_CLASS_PictureBox L"FWL_PICTUREBOX"
+#define FWL_CLASSHASH_PictureBox 2974721741
+#define FWL_STYLEEXT_PTB_Left 0L << 0
+#define FWL_STYLEEXT_PTB_Center 1L << 0
+#define FWL_STYLEEXT_PTB_Right 2L << 0
+#define FWL_STYLEEXT_PTB_Top 0L << 2
+#define FWL_STYLEEXT_PTB_Vcenter 1L << 2
+#define FWL_STYLEEXT_PTB_Bottom 2L << 2
+#define FWL_STYLEEXT_PTB_Normal 0L << 4
+#define FWL_STYLEEXT_PTB_AutoSize 1L << 4
+#define FWL_STYLEEXT_PTB_StretchImage 2L << 4
+#define FWL_STYLEEXT_PTB_StretchHImage 3L << 4
+#define FWL_STYLEEXT_PTB_StretchVImage 4L << 4
+#define FWL_STYLEEXT_PTB_HAlignMask 3L << 0
+#define FWL_STYLEEXT_PTB_VAlignMask 3L << 2
+#define FWL_STYLEEXT_PTB_StretchAlignMask 7L << 4
+#define FWL_PART_PTB_Border 1
+#define FWL_PART_PTB_Edge 2
+#define FWL_PART_PTB_Image 3
+#define FWL_PARTSTATE_PTB_Normal (0L << 0)
+#define FWL_PARTSTATE_PTB_Disabled (1L << 0)
+class IFWL_PictureBoxDP : public IFWL_DataProvider
+{
+public:
+ virtual CFX_DIBitmap* GetPicture(IFWL_Widget *pWidget) = 0;
+ virtual CFX_DIBitmap* GetErrorPicture(IFWL_Widget *pWidget) = 0;
+ virtual CFX_DIBitmap* GetInitialPicture(IFWL_Widget *pWidget) = 0;
+ virtual FX_INT32 GetOpacity(IFWL_Widget *pWidget) = 0;
+ virtual FX_INT32 GetFlipMode(IFWL_Widget *pWidget) = 0;
+ virtual FWL_ERR GetMatrix(IFWL_Widget *pWidget, CFX_Matrix &matrix) = 0;
+};
+class IFWL_PictureBox : public IFWL_Widget
+{
+public:
+ static IFWL_PictureBox* Create();
+
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+protected:
+ IFWL_PictureBox();
+ virtual ~IFWL_PictureBox();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_pushbutton.h b/xfa/include/fwl/basewidget/fwl_pushbutton.h new file mode 100644 index 0000000000..890689a141 --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_pushbutton.h @@ -0,0 +1,57 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_PUSHBUTTON_H
+#define _FWL_PUSHBUTTON_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_PushButtonDP;
+class IFWL_PushButton;
+#define FWL_CLASS_PushButton L"FWL_PUSHBUTTON"
+#define FWL_CLASSHASH_PushButton 3521614244
+#define FWL_STYLEEXT_PSB_Left (0L << 0)
+#define FWL_STYLEEXT_PSB_Center (1L << 0)
+#define FWL_STYLEEXT_PSB_Right (2L << 0)
+#define FWL_STYLEEXT_PSB_Top (0L << 2)
+#define FWL_STYLEEXT_PSB_VCenter (1L << 2)
+#define FWL_STYLEEXT_PSB_Bottom (2L << 2)
+#define FWL_STYLEEXT_PSB_TextOnly (0L << 4)
+#define FWL_STYLEEXT_PSB_IconOnly (1L << 4)
+#define FWL_STYLEEXT_PSB_TextIcon (2L << 4)
+#define FWL_STYLEEXT_PSB_HLayoutMask (3L << 0)
+#define FWL_STYLEEXT_PSB_VLayoutMask (3L << 2)
+#define FWL_STYLEEXT_PSB_ModeMask (3L << 4)
+#define FWL_STATE_PSB_Hovered (1 << FWL_WGTSTATE_MAX)
+#define FWL_STATE_PSB_Pressed (1 << (FWL_WGTSTATE_MAX + 1))
+#define FWL_STATE_PSB_Default (1 << (FWL_WGTSTATE_MAX + 2))
+#define FWL_WGTCAPACITY_PSB_Margin (FWL_WGTCAPACITY_MAX + 1)
+#define FWL_PART_PSB_Border 1
+#define FWL_PART_PSB_Edge 2
+#define FWL_PART_PSB_Background 3
+#define FWL_PART_PSB_Caption 4
+#define FWL_PARTSTATE_PSB_Normal (0L << 0)
+#define FWL_PARTSTATE_PSB_Pressed (1L << 0)
+#define FWL_PARTSTATE_PSB_Hovered (2L << 0)
+#define FWL_PARTSTATE_PSB_Default (3L << 0)
+#define FWL_PARTSTATE_PSB_Disabled (4L << 0)
+#define FWL_PARTSTATE_PSB_Focused (1L << 3)
+#define FWL_PARTSTATE_PSB_Mask (7L << 0)
+class IFWL_PushButtonDP : public IFWL_DataProvider
+{
+public:
+ virtual CFX_DIBitmap* GetPicture(IFWL_Widget *pWidget) = 0;
+};
+class IFWL_PushButton : public IFWL_Widget
+{
+public:
+ static IFWL_PushButton* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+protected:
+ IFWL_PushButton();
+ virtual ~IFWL_PushButton();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_scrollbar.h b/xfa/include/fwl/basewidget/fwl_scrollbar.h new file mode 100644 index 0000000000..8fc76f6dae --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_scrollbar.h @@ -0,0 +1,73 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_SCROLLBAR_H
+#define _FWL_SCROLLBAR_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_ScrollBarDP;
+class IFWL_ScrollBar;
+#define FWL_CLASS_ScrollBar L"FWL_SCROLLBAR"
+#define FWL_CLASSHASH_ScrollBar 2826584844
+#define FWL_STYLEEXT_SCB_Horz (0L << 0)
+#define FWL_STYLEEXT_SCB_Vert (1L << 0)
+#define FWL_PART_SCB_Border 1
+#define FWL_PART_SCB_Edge 2
+#define FWL_PART_SCB_Background 3
+#define FWL_PART_SCB_ForeArrow 4
+#define FWL_PART_SCB_BackArrow 5
+#define FWL_PART_SCB_Thumb 6
+#define FWL_PART_SCB_LowerTrack 7
+#define FWL_PART_SCB_UpperTrack 8
+#define FWL_PARTSTATE_SCB_Normal (0L << 0)
+#define FWL_PARTSTATE_SCB_Hovered (1L << 0)
+#define FWL_PARTSTATE_SCB_Pressed (2L << 0)
+#define FWL_PARTSTATE_SCB_Disabled (3L << 0)
+#define FWL_WGTHITTEST_SCB_ForeArrow FWL_WGTHITTEST_MAX + 1
+#define FWL_WGTHITTEST_SCB_BackArrow FWL_WGTHITTEST_MAX + 2
+#define FWL_WGTHITTEST_SCB_LowerTrack FWL_WGTHITTEST_MAX + 3
+#define FWL_WGTHITTEST_SCB_UpperTrack FWL_WGTHITTEST_MAX + 4
+#define FWL_WGTHITTEST_SCB_Thumb FWL_WGTHITTEST_MAX + 5
+#define FWL_CAPACITY_SCB_Size FWL_WGTCAPACITY_MAX
+enum FWL_SCBCODE {
+ FWL_SCBCODE_None = 1,
+ FWL_SCBCODE_Min ,
+ FWL_SCBCODE_Max ,
+ FWL_SCBCODE_PageBackward ,
+ FWL_SCBCODE_PageForward ,
+ FWL_SCBCODE_StepBackward ,
+ FWL_SCBCODE_StepForward ,
+ FWL_SCBCODE_Pos ,
+ FWL_SCBCODE_TrackPos ,
+ FWL_SCBCODE_EndScroll ,
+};
+class IFWL_ScrollBarDP : public IFWL_DataProvider
+{
+};
+class IFWL_ScrollBar : public IFWL_Widget
+{
+public:
+ static IFWL_ScrollBar* Create();
+
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FX_BOOL IsVertical();
+ FWL_ERR GetRange(FX_FLOAT &fMin, FX_FLOAT &fMax);
+ FWL_ERR SetRange(FX_FLOAT fMin, FX_FLOAT fMax);
+ FX_FLOAT GetPageSize();
+ FWL_ERR SetPageSize(FX_FLOAT fPageSize);
+ FX_FLOAT GetStepSize();
+ FWL_ERR SetStepSize(FX_FLOAT fStepSize);
+ FX_FLOAT GetPos();
+ FWL_ERR SetPos(FX_FLOAT fPos);
+ FX_FLOAT GetTrackPos();
+ FWL_ERR SetTrackPos(FX_FLOAT fTrackPos);
+ FX_BOOL DoScroll(FX_DWORD dwCode, FX_FLOAT fPos = 0.0f);
+protected:
+ IFWL_ScrollBar();
+ virtual ~IFWL_ScrollBar();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_spinbutton.h b/xfa/include/fwl/basewidget/fwl_spinbutton.h new file mode 100644 index 0000000000..ba417f30bb --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_spinbutton.h @@ -0,0 +1,43 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_SPINBUTTON_H
+#define _FWL_SPINBUTTON_H
+class CFWL_WidgetImpProperties;
+class IFWL_Widget;
+class IFWL_SpinButton;
+#define FWL_CLASS_SpinButton L"FWL_SPINBUTTON"
+#define FWL_CLASSHASH_SpinButton 3793043646
+#define FWL_STYLEEXE_SPB_Vert (1L << 0)
+#define FWL_PART_SPB_Border 1
+#define FWL_PART_SPB_Edge 2
+#define FWL_PART_SPB_UpButton 3
+#define FWL_PART_SPB_DownButton 4
+#define FWL_PARTSTATE_SPB_Normal (0L << 0)
+#define FWL_PARTSTATE_SPB_Hovered (1L << 0)
+#define FWL_PARTSTATE_SPB_Pressed (2L << 0)
+#define FWL_PARTSTATE_SPB_Disabled (3L << 0)
+#define FWL_WGTHITTEST_SPB_UpButton (FWL_WGTHITTEST_MAX + 1)
+#define FWL_WGTHITTEST_SPB_DownButton (FWL_WGTHITTEST_MAX + 2)
+#define FWL_EVT_SPB_Click L"FWL_EVENT_SPB_Click"
+#define FWL_EVTHASH_SPB_Click 2927651187
+BEGIN_FWL_EVENT_DEF(CFWL_EvtSpbClick, FWL_EVTHASH_SPB_Click)
+FX_BOOL m_bUp;
+END_FWL_EVENT_DEF
+class IFWL_SpinButton : public IFWL_Widget
+{
+public:
+ static IFWL_SpinButton* Create();
+
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FWL_ERR EnableButton(FX_BOOL bEnable, FX_BOOL bUp = TRUE);
+ FX_BOOL IsButtonEnable(FX_BOOL bUp = TRUE);
+protected:
+ IFWL_SpinButton();
+ virtual ~IFWL_SpinButton();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fwl_tooltipctrl.h b/xfa/include/fwl/basewidget/fwl_tooltipctrl.h new file mode 100644 index 0000000000..d27b9a2638 --- /dev/null +++ b/xfa/include/fwl/basewidget/fwl_tooltipctrl.h @@ -0,0 +1,45 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FWL_TOOLTIP_H
+#define _FWL_TOOLTIP_H
+class CFWL_WidgetImpProperties;
+class IFWL_Form;
+class IFWL_ToolTipDP;
+class IFWL_ToolTip;
+#define FWL_CLASS_ToolTip L"FWL_TOOLTIP"
+#define FWL_CLASSHASH_ToolTip 1111984755
+#define FWL_STYLEEXT_TTP_Rectangle (0L << 3)
+#define FWL_STYLEEXT_TTP_RoundCorner (1L << 3)
+#define FWL_STYLEEXT_TTP_Balloon (1L << 4)
+#define FWL_STYLEEXT_TTP_Multiline (1L << 5)
+#define FWL_STYLEEXT_TTP_NoAnchor (1L << 6)
+#define FWL_PART_TTP_Border 1
+#define FWL_PART_TTP_Background 2
+#define FWL_PART_TTP_Caption 3
+class IFWL_ToolTipDP : public IFWL_DataProvider
+{
+public:
+ virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption) = 0;
+ virtual FX_INT32 GetInitialDelay(IFWL_Widget *pWidget) = 0;
+ virtual FX_INT32 GetAutoPopDelay(IFWL_Widget *pWidget) = 0;
+ virtual CFX_DIBitmap* GetToolTipIcon(IFWL_Widget *pWidget) = 0;
+ virtual CFX_SizeF GetToolTipIconSize(IFWL_Widget *pWidget) = 0;
+};
+class IFWL_ToolTip : public IFWL_Form
+{
+public:
+ static IFWL_ToolTip* Create();
+ FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
+ FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);
+ FWL_ERR SetAnchor(const CFX_RectF &rtAnchor);
+ FWL_ERR Show();
+ FWL_ERR Hide();
+protected:
+ IFWL_ToolTip();
+ virtual ~IFWL_ToolTip();
+};
+#endif
diff --git a/xfa/include/fwl/basewidget/fxmath_barcode.h b/xfa/include/fwl/basewidget/fxmath_barcode.h new file mode 100644 index 0000000000..d885ac4c57 --- /dev/null +++ b/xfa/include/fwl/basewidget/fxmath_barcode.h @@ -0,0 +1,41 @@ +// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FXMATH_BARCODE_H_
+#define _FXMATH_BARCODE_H_
+class IFX_Barcode
+{
+public:
+ virtual void Release() = 0;
+ virtual BC_TYPE GetType() = 0;
+ virtual FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, FX_INT32 &e) = 0;
+ virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, FX_INT32 &e) = 0;
+ virtual FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, FX_INT32 &e) = 0;
+ virtual CFX_WideString Decode(FX_BYTE* buf, FX_INT32 width, FX_INT32 height, FX_INT32 &errorCode) = 0;
+ virtual CFX_WideString Decode(CFX_DIBitmap *pBitmap, FX_INT32 &errorCode) = 0;
+ virtual FX_BOOL SetCharEncoding(BC_CHAR_ENCODING encoding) = 0;
+ virtual FX_BOOL SetModuleHeight(FX_INT32 moduleHeight) = 0;
+ virtual FX_BOOL SetModuleWidth(FX_INT32 moduleWidth) = 0;
+ virtual FX_BOOL SetHeight(FX_INT32 height) = 0;
+ virtual FX_BOOL SetWidth(FX_INT32 width) = 0;
+ virtual FX_BOOL CheckContentValidity(FX_WSTR contents) = 0;
+ virtual FX_BOOL SetPrintChecksum(FX_BOOL checksum) = 0;
+ virtual FX_BOOL SetDataLength(FX_INT32 length) = 0;
+ virtual FX_BOOL SetCalChecksum(FX_INT32 state) = 0;
+ virtual FX_BOOL SetFont(CFX_Font* pFont) = 0;
+ virtual FX_BOOL SetFontSize(FX_FLOAT size) = 0;
+ virtual FX_BOOL SetFontStyle(FX_INT32 style) = 0;
+ virtual FX_BOOL SetFontColor(FX_ARGB color) = 0;
+ virtual FX_BOOL SetTextLocation(BC_TEXT_LOC location) = 0;
+ virtual FX_BOOL SetWideNarrowRatio(FX_INT32 ratio) = 0;
+ virtual FX_BOOL SetStartChar(FX_CHAR start) = 0;
+ virtual FX_BOOL SetEndChar(FX_CHAR end) = 0;
+ virtual FX_BOOL SetVersion(FX_INT32 version) = 0;
+ virtual FX_BOOL SetErrorCorrectionLevel (FX_INT32 level) = 0;
+ virtual FX_BOOL SetTruncated(FX_BOOL truncated) = 0;
+};
+IFX_Barcode* FX_Barcode_Create(BC_TYPE type);
+#endif
|