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 10 matching lines...) Expand all Loading... |
21 void Initialize(); | 21 void Initialize(); |
22 | 22 |
23 int32_t AddString(const CFX_WideStringC& wsText); | 23 int32_t AddString(const CFX_WideStringC& wsText); |
24 int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon); | 24 int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon); |
25 bool RemoveAt(int32_t iIndex); // Returns false iff |iIndex| out of range. | 25 bool RemoveAt(int32_t iIndex); // Returns false iff |iIndex| out of range. |
26 void RemoveAll(); | 26 void RemoveAll(); |
27 int32_t CountItems(); | 27 int32_t CountItems(); |
28 FWL_Error GetTextByIndex(int32_t iIndex, CFX_WideString& wsText); | 28 FWL_Error GetTextByIndex(int32_t iIndex, CFX_WideString& wsText); |
29 int32_t GetCurSel(); | 29 int32_t GetCurSel(); |
30 FWL_Error SetCurSel(int32_t iSel); | 30 FWL_Error SetCurSel(int32_t iSel); |
31 FWL_Error SetEditText(const CFX_WideString& wsText); | 31 void SetEditText(const CFX_WideString& wsText); |
32 int32_t GetEditTextLength() const; | 32 int32_t GetEditTextLength() const; |
33 FWL_Error GetEditText(CFX_WideString& wsText, | 33 FWL_Error GetEditText(CFX_WideString& wsText, |
34 int32_t nStart = 0, | 34 int32_t nStart = 0, |
35 int32_t nCount = -1) const; | 35 int32_t nCount = -1) const; |
36 FWL_Error SetEditSelRange(int32_t nStart, int32_t nCount = -1); | 36 FWL_Error SetEditSelRange(int32_t nStart, int32_t nCount = -1); |
37 int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart); | 37 int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart); |
38 int32_t GetEditLimit(); | 38 int32_t GetEditLimit(); |
39 FWL_Error SetEditLimit(int32_t nLimit); | 39 FWL_Error SetEditLimit(int32_t nLimit); |
40 FWL_Error EditDoClipboard(int32_t iCmd); | 40 FWL_Error EditDoClipboard(int32_t iCmd); |
41 bool EditRedo(const IFDE_TxtEdtDoRecord* pRecord); | 41 bool EditRedo(const IFDE_TxtEdtDoRecord* pRecord); |
42 bool EditUndo(const IFDE_TxtEdtDoRecord* pRecord); | 42 bool EditUndo(const IFDE_TxtEdtDoRecord* pRecord); |
43 FWL_Error SetMaxListHeight(FX_FLOAT fMaxHeight); | 43 FWL_Error SetMaxListHeight(FX_FLOAT fMaxHeight); |
44 FWL_Error SetItemData(int32_t iIndex, void* pData); | 44 FWL_Error SetItemData(int32_t iIndex, void* pData); |
45 void* GetItemData(int32_t iIndex); | 45 void* GetItemData(int32_t iIndex); |
46 FWL_Error SetListTheme(IFWL_ThemeProvider* pTheme); | 46 void SetListTheme(IFWL_ThemeProvider* pTheme); |
47 bool AfterFocusShowDropList(); | 47 bool AfterFocusShowDropList(); |
48 FWL_Error OpenDropDownList(bool bActivate); | 48 FWL_Error OpenDropDownList(bool bActivate); |
49 | 49 |
50 bool EditCanUndo(); | 50 bool EditCanUndo(); |
51 bool EditCanRedo(); | 51 bool EditCanRedo(); |
52 bool EditUndo(); | 52 bool EditUndo(); |
53 bool EditRedo(); | 53 bool EditRedo(); |
54 bool EditCanCopy(); | 54 bool EditCanCopy(); |
55 bool EditCanCut(); | 55 bool EditCanCut(); |
56 bool EditCanSelectAll(); | 56 bool EditCanSelectAll(); |
57 bool EditCopy(CFX_WideString& wsCopy); | 57 bool EditCopy(CFX_WideString& wsCopy); |
58 bool EditCut(CFX_WideString& wsCut); | 58 bool EditCut(CFX_WideString& wsCut); |
59 bool EditPaste(const CFX_WideString& wsPaste); | 59 bool EditPaste(const CFX_WideString& wsPaste); |
60 bool EditSelectAll(); | 60 bool EditSelectAll(); |
61 bool EditDelete(); | 61 bool EditDelete(); |
62 bool EditDeSelect(); | 62 bool EditDeSelect(); |
63 FWL_Error GetBBox(CFX_RectF& rect); | 63 FWL_Error GetBBox(CFX_RectF& rect); |
64 FWL_Error EditModifyStylesEx(uint32_t dwStylesExAdded, | 64 void EditModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved); |
65 uint32_t dwStylesExRemoved); | |
66 | 65 |
67 // IFWL_DataProvider | 66 // IFWL_DataProvider |
68 FWL_Error GetCaption(IFWL_Widget* pWidget, | 67 FWL_Error GetCaption(IFWL_Widget* pWidget, |
69 CFX_WideString& wsCaption) override; | 68 CFX_WideString& wsCaption) override; |
70 | 69 |
71 // IFWL_ListBoxDP | 70 // IFWL_ListBoxDP |
72 int32_t CountItems(const IFWL_Widget* pWidget) override; | 71 int32_t CountItems(const IFWL_Widget* pWidget) override; |
73 CFWL_ListItem* GetItem(const IFWL_Widget* pWidget, int32_t nIndex) override; | 72 CFWL_ListItem* GetItem(const IFWL_Widget* pWidget, int32_t nIndex) override; |
74 int32_t GetItemIndex(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; | 73 int32_t GetItemIndex(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; |
75 bool SetItemIndex(IFWL_Widget* pWidget, | 74 bool SetItemIndex(IFWL_Widget* pWidget, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // IFWL_ComboBoxDP | 110 // IFWL_ComboBoxDP |
112 FX_FLOAT GetListHeight(IFWL_Widget* pWidget) override; | 111 FX_FLOAT GetListHeight(IFWL_Widget* pWidget) override; |
113 | 112 |
114 private: | 113 private: |
115 std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray; | 114 std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray; |
116 FX_FLOAT m_fMaxListHeight; | 115 FX_FLOAT m_fMaxListHeight; |
117 FX_FLOAT m_fItemHeight; | 116 FX_FLOAT m_fItemHeight; |
118 }; | 117 }; |
119 | 118 |
120 #endif // XFA_FWL_CORE_CFWL_COMBOBOX_H_ | 119 #endif // XFA_FWL_CORE_CFWL_COMBOBOX_H_ |
OLD | NEW |