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_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_ | 7 #ifndef XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_ |
8 #define XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_ | 8 #define XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "xfa/include/fwl/lightwidget/widget.h" | 13 #include "xfa/include/fwl/lightwidget/widget.h" |
14 | 14 |
15 class CFWL_Widget; | 15 class CFWL_Widget; |
16 class CFWL_WidgetProperties; | 16 class CFWL_WidgetProperties; |
17 class IFWL_ListBoxDP; | 17 class IFWL_ListBoxDP; |
18 class CFWL_ListBox; | 18 class CFWL_ListBox; |
19 class CFWL_ListItem; | 19 class CFWL_ListItem; |
20 | 20 |
21 class CFWL_ListBox : public CFWL_Widget { | 21 class CFWL_ListBox : public CFWL_Widget { |
22 public: | 22 public: |
23 static CFWL_ListBox* Create(); | 23 static CFWL_ListBox* Create(); |
24 FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL); | 24 FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL); |
25 FWL_ERR AddDIBitmap(CFX_DIBitmap* pDIB, FWL_HLISTITEM hItem); | 25 FWL_ERR AddDIBitmap(CFX_DIBitmap* pDIB, FWL_HLISTITEM hItem); |
26 FWL_HLISTITEM AddString(const CFX_WideStringC& wsAdd, | 26 FWL_HLISTITEM AddString(const CFX_WideStringC& wsAdd, |
27 FX_BOOL bSelect = FALSE); | 27 FX_BOOL bSelect = FALSE); |
28 FX_BOOL DeleteString(FWL_HLISTITEM hItem); | 28 FX_BOOL DeleteString(FWL_HLISTITEM hItem); |
29 FX_BOOL DeleteAll(); | 29 void DeleteAll(); |
30 int32_t CountSelItems(); | 30 int32_t CountSelItems(); |
31 FWL_HLISTITEM GetSelItem(int32_t nIndexSel); | 31 FWL_HLISTITEM GetSelItem(int32_t nIndexSel); |
32 int32_t GetSelIndex(int32_t nIndex); | 32 int32_t GetSelIndex(int32_t nIndex); |
33 FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE); | 33 FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE); |
34 FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText); | 34 FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText); |
35 FWL_ERR GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE); | 35 FWL_ERR GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE); |
36 FWL_ERR SetItemHeight(FX_FLOAT fItemHeight); | 36 FWL_ERR SetItemHeight(FX_FLOAT fItemHeight); |
37 FWL_HLISTITEM GetFocusItem(); | 37 FWL_HLISTITEM GetFocusItem(); |
38 FWL_ERR SetFocusItem(FWL_HLISTITEM hItem); | 38 FWL_ERR SetFocusItem(FWL_HLISTITEM hItem); |
39 FWL_ERR* Sort(IFWL_ListBoxCompare* pCom); | 39 FWL_ERR* Sort(IFWL_ListBoxCompare* pCom); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 CFX_RectF m_rtItem; | 119 CFX_RectF m_rtItem; |
120 FX_DWORD m_dwStates; | 120 FX_DWORD m_dwStates; |
121 CFX_WideString m_wsText; | 121 CFX_WideString m_wsText; |
122 CFX_DIBitmap* m_pDIB; | 122 CFX_DIBitmap* m_pDIB; |
123 void* m_pData; | 123 void* m_pData; |
124 FX_DWORD m_dwCheckState; | 124 FX_DWORD m_dwCheckState; |
125 CFX_RectF m_rtCheckBox; | 125 CFX_RectF m_rtCheckBox; |
126 }; | 126 }; |
127 | 127 |
128 #endif // XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_ | 128 #endif // XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_ |
OLD | NEW |