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 _FWL_LISTBOX_H | 7 #ifndef _FWL_LISTBOX_H |
8 #define _FWL_LISTBOX_H | 8 #define _FWL_LISTBOX_H |
9 class CFWL_WidgetImpProperties; | 9 class CFWL_WidgetImpProperties; |
10 class IFWL_Widget; | 10 class IFWL_Widget; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 FWL_HLISTITEM hItem, | 102 FWL_HLISTITEM hItem, |
103 FX_DWORD dwCheckState) = 0; | 103 FX_DWORD dwCheckState) = 0; |
104 }; | 104 }; |
105 class IFWL_ListBoxCompare { | 105 class IFWL_ListBoxCompare { |
106 public: | 106 public: |
107 virtual ~IFWL_ListBoxCompare() {} | 107 virtual ~IFWL_ListBoxCompare() {} |
108 virtual int32_t Compare(FWL_HLISTITEM hLeft, FWL_HLISTITEM hRight) = 0; | 108 virtual int32_t Compare(FWL_HLISTITEM hLeft, FWL_HLISTITEM hRight) = 0; |
109 }; | 109 }; |
110 class IFWL_ListBox : public IFWL_Widget { | 110 class IFWL_ListBox : public IFWL_Widget { |
111 public: | 111 public: |
112 static IFWL_ListBox* Create(); | 112 IFWL_ListBox(); |
| 113 |
113 FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties, | 114 FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties, |
114 IFWL_Widget* pOuter); | 115 IFWL_Widget* pOuter); |
115 int32_t CountSelItems(); | 116 int32_t CountSelItems(); |
116 FWL_HLISTITEM GetSelItem(int32_t nIndexSel); | 117 FWL_HLISTITEM GetSelItem(int32_t nIndexSel); |
117 int32_t GetSelIndex(int32_t nIndex); | 118 int32_t GetSelIndex(int32_t nIndex); |
118 FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE); | 119 FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE); |
119 FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText); | 120 FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText); |
120 FWL_ERR GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE); | 121 FWL_ERR GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE); |
121 FWL_ERR* Sort(IFWL_ListBoxCompare* pCom); | 122 FWL_ERR* Sort(IFWL_ListBoxCompare* pCom); |
122 | |
123 protected: | |
124 IFWL_ListBox(); | |
125 }; | 123 }; |
126 #endif | 124 #endif |
OLD | NEW |