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_LISTBOX_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_LISTBOX_H_ |
8 #define XFA_FWL_CORE_CFWL_LISTBOX_H_ | 8 #define XFA_FWL_CORE_CFWL_LISTBOX_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "xfa/fwl/core/cfwl_widget.h" | 13 #include "xfa/fwl/core/cfwl_widget.h" |
14 #include "xfa/fwl/core/fwl_error.h" | 14 #include "xfa/fwl/core/fwl_error.h" |
15 #include "xfa/fwl/core/ifwl_listbox.h" | 15 #include "xfa/fwl/core/ifwl_listbox.h" |
16 #include "xfa/fwl/core/ifwl_widget.h" | 16 #include "xfa/fwl/core/ifwl_widget.h" |
17 | 17 |
18 class CFWL_ListItem; | 18 class CFWL_ListItem; |
19 | 19 |
20 class CFWL_ListBox : public CFWL_Widget { | 20 class CFWL_ListBox : public CFWL_Widget { |
21 public: | 21 public: |
22 CFWL_ListBox(); | 22 CFWL_ListBox(const IFWL_App*); |
23 ~CFWL_ListBox() override; | 23 ~CFWL_ListBox() override; |
24 | 24 |
25 IFWL_ListBox* GetWidget() override; | 25 IFWL_ListBox* GetWidget() override; |
26 const IFWL_ListBox* GetWidget() const override; | 26 const IFWL_ListBox* GetWidget() const override; |
27 | 27 |
28 FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr); | 28 void Initialize(const CFWL_WidgetProperties* pProperties); |
| 29 |
29 FWL_Error AddDIBitmap(CFX_DIBitmap* pDIB, IFWL_ListItem* pItem); | 30 FWL_Error AddDIBitmap(CFX_DIBitmap* pDIB, IFWL_ListItem* pItem); |
30 IFWL_ListItem* AddString(const CFX_WideStringC& wsAdd, | 31 IFWL_ListItem* AddString(const CFX_WideStringC& wsAdd, |
31 FX_BOOL bSelect = FALSE); | 32 FX_BOOL bSelect = FALSE); |
32 FX_BOOL DeleteString(IFWL_ListItem* pItem); | 33 FX_BOOL DeleteString(IFWL_ListItem* pItem); |
33 void DeleteAll(); | 34 void DeleteAll(); |
34 int32_t CountSelItems(); | 35 int32_t CountSelItems(); |
35 IFWL_ListItem* GetSelItem(int32_t nIndexSel); | 36 IFWL_ListItem* GetSelItem(int32_t nIndexSel); |
36 int32_t GetSelIndex(int32_t nIndex); | 37 int32_t GetSelIndex(int32_t nIndex); |
37 FWL_Error SetSelItem(IFWL_ListItem* pItem, FX_BOOL bSelect = TRUE); | 38 FWL_Error SetSelItem(IFWL_ListItem* pItem, FX_BOOL bSelect = TRUE); |
38 FWL_Error GetItemText(IFWL_ListItem* pItem, CFX_WideString& wsText); | 39 FWL_Error GetItemText(IFWL_ListItem* pItem, CFX_WideString& wsText); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 CFX_RectF m_rtItem; | 115 CFX_RectF m_rtItem; |
115 uint32_t m_dwStates; | 116 uint32_t m_dwStates; |
116 CFX_WideString m_wsText; | 117 CFX_WideString m_wsText; |
117 CFX_DIBitmap* m_pDIB; | 118 CFX_DIBitmap* m_pDIB; |
118 void* m_pData; | 119 void* m_pData; |
119 uint32_t m_dwCheckState; | 120 uint32_t m_dwCheckState; |
120 CFX_RectF m_rtCheckBox; | 121 CFX_RectF m_rtCheckBox; |
121 }; | 122 }; |
122 | 123 |
123 #endif // XFA_FWL_CORE_CFWL_LISTBOX_H_ | 124 #endif // XFA_FWL_CORE_CFWL_LISTBOX_H_ |
OLD | NEW |