OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FWL_CORE_CFWL_COMBOBOX_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_COMBOBOX_H_ |
8 #define XFA_FWL_CORE_CFWL_COMBOBOX_H_ | 8 #define XFA_FWL_CORE_CFWL_COMBOBOX_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 25 matching lines...) Expand all Loading... |
36 FWL_Error SetEditText(const CFX_WideString& wsText); | 36 FWL_Error SetEditText(const CFX_WideString& wsText); |
37 int32_t GetEditTextLength() const; | 37 int32_t GetEditTextLength() const; |
38 FWL_Error GetEditText(CFX_WideString& wsText, | 38 FWL_Error GetEditText(CFX_WideString& wsText, |
39 int32_t nStart = 0, | 39 int32_t nStart = 0, |
40 int32_t nCount = -1) const; | 40 int32_t nCount = -1) const; |
41 FWL_Error SetEditSelRange(int32_t nStart, int32_t nCount = -1); | 41 FWL_Error SetEditSelRange(int32_t nStart, int32_t nCount = -1); |
42 int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart); | 42 int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart); |
43 int32_t GetEditLimit(); | 43 int32_t GetEditLimit(); |
44 FWL_Error SetEditLimit(int32_t nLimit); | 44 FWL_Error SetEditLimit(int32_t nLimit); |
45 FWL_Error EditDoClipboard(int32_t iCmd); | 45 FWL_Error EditDoClipboard(int32_t iCmd); |
46 FX_BOOL EditRedo(const IFDE_TxtEdtDoRecord* pRecord); | 46 bool EditRedo(const IFDE_TxtEdtDoRecord* pRecord); |
47 FX_BOOL EditUndo(const IFDE_TxtEdtDoRecord* pRecord); | 47 bool EditUndo(const IFDE_TxtEdtDoRecord* pRecord); |
48 FWL_Error SetMaxListHeight(FX_FLOAT fMaxHeight); | 48 FWL_Error SetMaxListHeight(FX_FLOAT fMaxHeight); |
49 FWL_Error SetItemData(int32_t iIndex, void* pData); | 49 FWL_Error SetItemData(int32_t iIndex, void* pData); |
50 void* GetItemData(int32_t iIndex); | 50 void* GetItemData(int32_t iIndex); |
51 FWL_Error SetListTheme(IFWL_ThemeProvider* pTheme); | 51 FWL_Error SetListTheme(IFWL_ThemeProvider* pTheme); |
52 FX_BOOL AfterFocusShowDropList(); | 52 bool AfterFocusShowDropList(); |
53 FWL_Error OpenDropDownList(FX_BOOL bActivate); | 53 FWL_Error OpenDropDownList(bool bActivate); |
54 | 54 |
55 FX_BOOL EditCanUndo(); | 55 bool EditCanUndo(); |
56 FX_BOOL EditCanRedo(); | 56 bool EditCanRedo(); |
57 FX_BOOL EditUndo(); | 57 bool EditUndo(); |
58 FX_BOOL EditRedo(); | 58 bool EditRedo(); |
59 FX_BOOL EditCanCopy(); | 59 bool EditCanCopy(); |
60 FX_BOOL EditCanCut(); | 60 bool EditCanCut(); |
61 FX_BOOL EditCanSelectAll(); | 61 bool EditCanSelectAll(); |
62 FX_BOOL EditCopy(CFX_WideString& wsCopy); | 62 bool EditCopy(CFX_WideString& wsCopy); |
63 FX_BOOL EditCut(CFX_WideString& wsCut); | 63 bool EditCut(CFX_WideString& wsCut); |
64 FX_BOOL EditPaste(const CFX_WideString& wsPaste); | 64 bool EditPaste(const CFX_WideString& wsPaste); |
65 FX_BOOL EditSelectAll(); | 65 bool EditSelectAll(); |
66 FX_BOOL EditDelete(); | 66 bool EditDelete(); |
67 FX_BOOL EditDeSelect(); | 67 bool EditDeSelect(); |
68 FWL_Error GetBBox(CFX_RectF& rect); | 68 FWL_Error GetBBox(CFX_RectF& rect); |
69 FWL_Error EditModifyStylesEx(uint32_t dwStylesExAdded, | 69 FWL_Error EditModifyStylesEx(uint32_t dwStylesExAdded, |
70 uint32_t dwStylesExRemoved); | 70 uint32_t dwStylesExRemoved); |
71 | 71 |
72 protected: | 72 protected: |
73 class CFWL_ComboBoxDP : public IFWL_ComboBoxDP { | 73 class CFWL_ComboBoxDP : public IFWL_ComboBoxDP { |
74 public: | 74 public: |
75 CFWL_ComboBoxDP(); | 75 CFWL_ComboBoxDP(); |
76 ~CFWL_ComboBoxDP() override; | 76 ~CFWL_ComboBoxDP() override; |
77 | 77 |
78 // IFWL_DataProvider | 78 // IFWL_DataProvider |
79 FWL_Error GetCaption(IFWL_Widget* pWidget, | 79 FWL_Error GetCaption(IFWL_Widget* pWidget, |
80 CFX_WideString& wsCaption) override; | 80 CFX_WideString& wsCaption) override; |
81 | 81 |
82 // IFWL_ListBoxDP | 82 // IFWL_ListBoxDP |
83 int32_t CountItems(const IFWL_Widget* pWidget) override; | 83 int32_t CountItems(const IFWL_Widget* pWidget) override; |
84 IFWL_ListItem* GetItem(const IFWL_Widget* pWidget, int32_t nIndex) override; | 84 IFWL_ListItem* GetItem(const IFWL_Widget* pWidget, int32_t nIndex) override; |
85 int32_t GetItemIndex(IFWL_Widget* pWidget, IFWL_ListItem* pItem) override; | 85 int32_t GetItemIndex(IFWL_Widget* pWidget, IFWL_ListItem* pItem) override; |
86 FX_BOOL SetItemIndex(IFWL_Widget* pWidget, | 86 bool SetItemIndex(IFWL_Widget* pWidget, |
87 IFWL_ListItem* pItem, | 87 IFWL_ListItem* pItem, |
88 int32_t nIndex) override; | 88 int32_t nIndex) override; |
89 | 89 |
90 uint32_t GetItemStyles(IFWL_Widget* pWidget, IFWL_ListItem* pItem) override; | 90 uint32_t GetItemStyles(IFWL_Widget* pWidget, IFWL_ListItem* pItem) override; |
91 FWL_Error GetItemText(IFWL_Widget* pWidget, | 91 FWL_Error GetItemText(IFWL_Widget* pWidget, |
92 IFWL_ListItem* pItem, | 92 IFWL_ListItem* pItem, |
93 CFX_WideString& wsText) override; | 93 CFX_WideString& wsText) override; |
94 FWL_Error GetItemRect(IFWL_Widget* pWidget, | 94 FWL_Error GetItemRect(IFWL_Widget* pWidget, |
95 IFWL_ListItem* pItem, | 95 IFWL_ListItem* pItem, |
96 CFX_RectF& rtItem) override; | 96 CFX_RectF& rtItem) override; |
97 void* GetItemData(IFWL_Widget* pWidget, IFWL_ListItem* pItem) override; | 97 void* GetItemData(IFWL_Widget* pWidget, IFWL_ListItem* pItem) override; |
98 FWL_Error SetItemStyles(IFWL_Widget* pWidget, | 98 FWL_Error SetItemStyles(IFWL_Widget* pWidget, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 CFX_RectF m_rtItem; | 137 CFX_RectF m_rtItem; |
138 uint32_t m_dwStyles; | 138 uint32_t m_dwStyles; |
139 CFX_WideString m_wsText; | 139 CFX_WideString m_wsText; |
140 CFX_DIBitmap* m_pDIB; | 140 CFX_DIBitmap* m_pDIB; |
141 uint32_t m_dwCheckState; | 141 uint32_t m_dwCheckState; |
142 CFX_RectF m_rtCheckBox; | 142 CFX_RectF m_rtCheckBox; |
143 void* m_pData; | 143 void* m_pData; |
144 }; | 144 }; |
145 | 145 |
146 #endif // XFA_FWL_CORE_CFWL_COMBOBOX_H_ | 146 #endif // XFA_FWL_CORE_CFWL_COMBOBOX_H_ |
OLD | NEW |