Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Side by Side Diff: xfa/fwl/lightwidget/cfwl_listbox.cpp

Issue 1952693003: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_listbox.h ('k') | xfa/fwl/lightwidget/cfwl_picturebox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "xfa/fwl/lightwidget/cfwl_listbox.h" 7 #include "xfa/fwl/lightwidget/cfwl_listbox.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
11 #include "third_party/base/stl_util.h" 11 #include "third_party/base/stl_util.h"
12 12
13 CFWL_ListBox* CFWL_ListBox::Create() { 13 CFWL_ListBox* CFWL_ListBox::Create() {
14 return new CFWL_ListBox; 14 return new CFWL_ListBox;
15 } 15 }
16 16
17 FWL_ERR CFWL_ListBox::Initialize(const CFWL_WidgetProperties* pProperties) { 17 FWL_Error CFWL_ListBox::Initialize(const CFWL_WidgetProperties* pProperties) {
18 if (m_pIface) 18 if (m_pIface)
19 return FWL_ERR_Indefinite; 19 return FWL_Error::Indefinite;
20 if (pProperties) { 20 if (pProperties) {
21 *m_pProperties = *pProperties; 21 *m_pProperties = *pProperties;
22 } 22 }
23 std::unique_ptr<IFWL_ListBox> pListBox(IFWL_ListBox::Create( 23 std::unique_ptr<IFWL_ListBox> pListBox(IFWL_ListBox::Create(
24 m_pProperties->MakeWidgetImpProperties(&m_ListBoxDP), nullptr)); 24 m_pProperties->MakeWidgetImpProperties(&m_ListBoxDP), nullptr));
25 FWL_ERR ret = pListBox->Initialize(); 25 FWL_Error ret = pListBox->Initialize();
26 if (ret != FWL_ERR_Succeeded) { 26 if (ret != FWL_Error::Succeeded) {
27 return ret; 27 return ret;
28 } 28 }
29 m_pIface = pListBox.release(); 29 m_pIface = pListBox.release();
30 CFWL_Widget::Initialize(); 30 CFWL_Widget::Initialize();
31 return FWL_ERR_Succeeded; 31 return FWL_Error::Succeeded;
32 } 32 }
33 33
34 FWL_ERR CFWL_ListBox::AddDIBitmap(CFX_DIBitmap* pDIB, FWL_HLISTITEM hItem) { 34 FWL_Error CFWL_ListBox::AddDIBitmap(CFX_DIBitmap* pDIB, FWL_HLISTITEM hItem) {
35 reinterpret_cast<CFWL_ListItem*>(hItem)->m_pDIB = pDIB; 35 reinterpret_cast<CFWL_ListItem*>(hItem)->m_pDIB = pDIB;
36 return FWL_ERR_Succeeded; 36 return FWL_Error::Succeeded;
37 } 37 }
38 38
39 FWL_HLISTITEM CFWL_ListBox::AddString(const CFX_WideStringC& wsAdd, 39 FWL_HLISTITEM CFWL_ListBox::AddString(const CFX_WideStringC& wsAdd,
40 FX_BOOL bSelect) { 40 FX_BOOL bSelect) {
41 std::unique_ptr<CFWL_ListItem> pItem(new CFWL_ListItem); 41 std::unique_ptr<CFWL_ListItem> pItem(new CFWL_ListItem);
42 pItem->m_dwStates = 0; 42 pItem->m_dwStates = 0;
43 pItem->m_wsText = wsAdd; 43 pItem->m_wsText = wsAdd;
44 pItem->m_dwStates = bSelect ? FWL_ITEMSTATE_LTB_Selected : 0; 44 pItem->m_dwStates = bSelect ? FWL_ITEMSTATE_LTB_Selected : 0;
45 m_ListBoxDP.m_ItemArray.push_back(std::move(pItem)); 45 m_ListBoxDP.m_ItemArray.push_back(std::move(pItem));
46 return (FWL_HLISTITEM)m_ListBoxDP.m_ItemArray.back().get(); 46 return (FWL_HLISTITEM)m_ListBoxDP.m_ItemArray.back().get();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 return NULL; 84 return NULL;
85 return static_cast<IFWL_ListBox*>(m_pIface)->GetSelItem(nIndexSel); 85 return static_cast<IFWL_ListBox*>(m_pIface)->GetSelItem(nIndexSel);
86 } 86 }
87 87
88 int32_t CFWL_ListBox::GetSelIndex(int32_t nIndex) { 88 int32_t CFWL_ListBox::GetSelIndex(int32_t nIndex) {
89 if (!m_pIface) 89 if (!m_pIface)
90 return 0; 90 return 0;
91 return static_cast<IFWL_ListBox*>(m_pIface)->GetSelIndex(nIndex); 91 return static_cast<IFWL_ListBox*>(m_pIface)->GetSelIndex(nIndex);
92 } 92 }
93 93
94 FWL_ERR CFWL_ListBox::SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect) { 94 FWL_Error CFWL_ListBox::SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect) {
95 if (!m_pIface) 95 if (!m_pIface)
96 return FWL_ERR_Indefinite; 96 return FWL_Error::Indefinite;
97 return static_cast<IFWL_ListBox*>(m_pIface)->SetSelItem(hItem, bSelect); 97 return static_cast<IFWL_ListBox*>(m_pIface)->SetSelItem(hItem, bSelect);
98 } 98 }
99 99
100 FWL_ERR CFWL_ListBox::GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText) { 100 FWL_Error CFWL_ListBox::GetItemText(FWL_HLISTITEM hItem,
101 CFX_WideString& wsText) {
101 if (!m_pIface) 102 if (!m_pIface)
102 return FWL_ERR_Indefinite; 103 return FWL_Error::Indefinite;
103 return static_cast<IFWL_ListBox*>(m_pIface)->GetItemText(hItem, wsText); 104 return static_cast<IFWL_ListBox*>(m_pIface)->GetItemText(hItem, wsText);
104 } 105 }
105 106
106 FWL_ERR CFWL_ListBox::GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert) { 107 FWL_Error CFWL_ListBox::GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert) {
107 if (!m_pIface) 108 if (!m_pIface)
108 return FWL_ERR_Indefinite; 109 return FWL_Error::Indefinite;
109 return static_cast<IFWL_ListBox*>(m_pIface)->GetScrollPos(fPos, bVert); 110 return static_cast<IFWL_ListBox*>(m_pIface)->GetScrollPos(fPos, bVert);
110 } 111 }
111 112
112 FWL_ERR CFWL_ListBox::SetItemHeight(FX_FLOAT fItemHeight) { 113 FWL_Error CFWL_ListBox::SetItemHeight(FX_FLOAT fItemHeight) {
113 m_ListBoxDP.m_fItemHeight = fItemHeight; 114 m_ListBoxDP.m_fItemHeight = fItemHeight;
114 return FWL_ERR_Succeeded; 115 return FWL_Error::Succeeded;
115 } 116 }
116 117
117 FWL_HLISTITEM CFWL_ListBox::GetFocusItem() { 118 FWL_HLISTITEM CFWL_ListBox::GetFocusItem() {
118 for (const auto& hItem : m_ListBoxDP.m_ItemArray) { 119 for (const auto& hItem : m_ListBoxDP.m_ItemArray) {
119 if (hItem->m_dwStates & FWL_ITEMSTATE_LTB_Focused) 120 if (hItem->m_dwStates & FWL_ITEMSTATE_LTB_Focused)
120 return (FWL_HLISTITEM)hItem.get(); 121 return (FWL_HLISTITEM)hItem.get();
121 } 122 }
122 return nullptr; 123 return nullptr;
123 } 124 }
124 125
125 FWL_ERR CFWL_ListBox::SetFocusItem(FWL_HLISTITEM hItem) { 126 FWL_Error CFWL_ListBox::SetFocusItem(FWL_HLISTITEM hItem) {
126 int32_t nIndex = m_ListBoxDP.GetItemIndex(GetWidget(), hItem); 127 int32_t nIndex = m_ListBoxDP.GetItemIndex(GetWidget(), hItem);
127 m_ListBoxDP.m_ItemArray[nIndex]->m_dwStates |= FWL_ITEMSTATE_LTB_Focused; 128 m_ListBoxDP.m_ItemArray[nIndex]->m_dwStates |= FWL_ITEMSTATE_LTB_Focused;
128 return FWL_ERR_Succeeded; 129 return FWL_Error::Succeeded;
129 }
130
131 FWL_ERR* CFWL_ListBox::Sort(IFWL_ListBoxCompare* pCom) {
132 return static_cast<IFWL_ListBox*>(m_pIface)->Sort(pCom);
133 } 130 }
134 131
135 int32_t CFWL_ListBox::CountItems() { 132 int32_t CFWL_ListBox::CountItems() {
136 return pdfium::CollectionSize<int32_t>(m_ListBoxDP.m_ItemArray); 133 return pdfium::CollectionSize<int32_t>(m_ListBoxDP.m_ItemArray);
137 } 134 }
138 135
139 FWL_HLISTITEM CFWL_ListBox::GetItem(int32_t nIndex) { 136 FWL_HLISTITEM CFWL_ListBox::GetItem(int32_t nIndex) {
140 if (nIndex < 0 || nIndex >= CountItems()) 137 if (nIndex < 0 || nIndex >= CountItems())
141 return nullptr; 138 return nullptr;
142 139
143 return (FWL_HLISTITEM)m_ListBoxDP.m_ItemArray[nIndex].get(); 140 return (FWL_HLISTITEM)m_ListBoxDP.m_ItemArray[nIndex].get();
144 } 141 }
145 142
146 FWL_ERR CFWL_ListBox::SetItemString(FWL_HLISTITEM hItem, 143 FWL_Error CFWL_ListBox::SetItemString(FWL_HLISTITEM hItem,
147 const CFX_WideStringC& wsText) { 144 const CFX_WideStringC& wsText) {
148 if (!hItem) 145 if (!hItem)
149 return FWL_ERR_Indefinite; 146 return FWL_Error::Indefinite;
150 reinterpret_cast<CFWL_ListItem*>(hItem)->m_wsText = wsText; 147 reinterpret_cast<CFWL_ListItem*>(hItem)->m_wsText = wsText;
151 return FWL_ERR_Succeeded; 148 return FWL_Error::Succeeded;
152 } 149 }
153 150
154 FWL_ERR CFWL_ListBox::GetItemString(FWL_HLISTITEM hItem, 151 FWL_Error CFWL_ListBox::GetItemString(FWL_HLISTITEM hItem,
155 CFX_WideString& wsText) { 152 CFX_WideString& wsText) {
156 if (!hItem) 153 if (!hItem)
157 return FWL_ERR_Indefinite; 154 return FWL_Error::Indefinite;
158 wsText = reinterpret_cast<CFWL_ListItem*>(hItem)->m_wsText; 155 wsText = reinterpret_cast<CFWL_ListItem*>(hItem)->m_wsText;
159 return FWL_ERR_Succeeded; 156 return FWL_Error::Succeeded;
160 } 157 }
161 158
162 FWL_ERR CFWL_ListBox::SetItemData(FWL_HLISTITEM hItem, void* pData) { 159 FWL_Error CFWL_ListBox::SetItemData(FWL_HLISTITEM hItem, void* pData) {
163 if (!hItem) 160 if (!hItem)
164 return FWL_ERR_Indefinite; 161 return FWL_Error::Indefinite;
165 reinterpret_cast<CFWL_ListItem*>(hItem)->m_pData = pData; 162 reinterpret_cast<CFWL_ListItem*>(hItem)->m_pData = pData;
166 return FWL_ERR_Succeeded; 163 return FWL_Error::Succeeded;
167 } 164 }
168 165
169 void* CFWL_ListBox::GetItemData(FWL_HLISTITEM hItem) { 166 void* CFWL_ListBox::GetItemData(FWL_HLISTITEM hItem) {
170 if (!hItem) 167 if (!hItem)
171 return NULL; 168 return NULL;
172 return reinterpret_cast<CFWL_ListItem*>(hItem)->m_pData; 169 return reinterpret_cast<CFWL_ListItem*>(hItem)->m_pData;
173 } 170 }
174 171
175 FWL_HLISTITEM CFWL_ListBox::GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy) { 172 FWL_HLISTITEM CFWL_ListBox::GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy) {
176 CFX_RectF rtClient; 173 CFX_RectF rtClient;
(...skipping 28 matching lines...) Expand all
205 } 202 }
206 203
207 CFWL_ListBox::CFWL_ListBox() {} 204 CFWL_ListBox::CFWL_ListBox() {}
208 205
209 CFWL_ListBox::~CFWL_ListBox() {} 206 CFWL_ListBox::~CFWL_ListBox() {}
210 207
211 CFWL_ListBox::CFWL_ListBoxDP::CFWL_ListBoxDP() {} 208 CFWL_ListBox::CFWL_ListBoxDP::CFWL_ListBoxDP() {}
212 209
213 CFWL_ListBox::CFWL_ListBoxDP::~CFWL_ListBoxDP() {} 210 CFWL_ListBox::CFWL_ListBoxDP::~CFWL_ListBoxDP() {}
214 211
215 FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::GetCaption(IFWL_Widget* pWidget, 212 FWL_Error CFWL_ListBox::CFWL_ListBoxDP::GetCaption(IFWL_Widget* pWidget,
216 CFX_WideString& wsCaption) { 213 CFX_WideString& wsCaption) {
217 wsCaption = m_wsData; 214 wsCaption = m_wsData;
218 return FWL_ERR_Succeeded; 215 return FWL_Error::Succeeded;
219 } 216 }
220 217
221 int32_t CFWL_ListBox::CFWL_ListBoxDP::CountItems(IFWL_Widget* pWidget) { 218 int32_t CFWL_ListBox::CFWL_ListBoxDP::CountItems(IFWL_Widget* pWidget) {
222 return pdfium::CollectionSize<int32_t>(m_ItemArray); 219 return pdfium::CollectionSize<int32_t>(m_ItemArray);
223 } 220 }
224 221
225 FWL_HLISTITEM CFWL_ListBox::CFWL_ListBoxDP::GetItem(IFWL_Widget* pWidget, 222 FWL_HLISTITEM CFWL_ListBox::CFWL_ListBoxDP::GetItem(IFWL_Widget* pWidget,
226 int32_t nIndex) { 223 int32_t nIndex) {
227 if (nIndex < 0 || nIndex >= CountItems(pWidget)) 224 if (nIndex < 0 || nIndex >= CountItems(pWidget))
228 return nullptr; 225 return nullptr;
(...skipping 20 matching lines...) Expand all
249 return TRUE; 246 return TRUE;
250 } 247 }
251 248
252 uint32_t CFWL_ListBox::CFWL_ListBoxDP::GetItemStyles(IFWL_Widget* pWidget, 249 uint32_t CFWL_ListBox::CFWL_ListBoxDP::GetItemStyles(IFWL_Widget* pWidget,
253 FWL_HLISTITEM hItem) { 250 FWL_HLISTITEM hItem) {
254 if (!hItem) 251 if (!hItem)
255 return -1; 252 return -1;
256 return reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwStates; 253 return reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwStates;
257 } 254 }
258 255
259 FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::GetItemText(IFWL_Widget* pWidget, 256 FWL_Error CFWL_ListBox::CFWL_ListBoxDP::GetItemText(IFWL_Widget* pWidget,
260 FWL_HLISTITEM hItem, 257 FWL_HLISTITEM hItem,
261 CFX_WideString& wsText) { 258 CFX_WideString& wsText) {
262 if (!hItem) 259 if (!hItem)
263 return FWL_ERR_Indefinite; 260 return FWL_Error::Indefinite;
264 wsText = reinterpret_cast<CFWL_ListItem*>(hItem)->m_wsText; 261 wsText = reinterpret_cast<CFWL_ListItem*>(hItem)->m_wsText;
265 return FWL_ERR_Succeeded; 262 return FWL_Error::Succeeded;
266 } 263 }
267 264
268 FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::GetItemRect(IFWL_Widget* pWidget, 265 FWL_Error CFWL_ListBox::CFWL_ListBoxDP::GetItemRect(IFWL_Widget* pWidget,
269 FWL_HLISTITEM hItem, 266 FWL_HLISTITEM hItem,
270 CFX_RectF& rtItem) { 267 CFX_RectF& rtItem) {
271 if (!hItem) 268 if (!hItem)
272 return FWL_ERR_Indefinite; 269 return FWL_Error::Indefinite;
273 CFWL_ListItem* pItem = reinterpret_cast<CFWL_ListItem*>(hItem); 270 CFWL_ListItem* pItem = reinterpret_cast<CFWL_ListItem*>(hItem);
274 rtItem = pItem->m_rtItem; 271 rtItem = pItem->m_rtItem;
275 return FWL_ERR_Succeeded; 272 return FWL_Error::Succeeded;
276 } 273 }
277 274
278 void* CFWL_ListBox::CFWL_ListBoxDP::GetItemData(IFWL_Widget* pWidget, 275 void* CFWL_ListBox::CFWL_ListBoxDP::GetItemData(IFWL_Widget* pWidget,
279 FWL_HLISTITEM hItem) { 276 FWL_HLISTITEM hItem) {
280 if (!hItem) 277 if (!hItem)
281 return NULL; 278 return NULL;
282 CFWL_ListItem* pItem = reinterpret_cast<CFWL_ListItem*>(hItem); 279 CFWL_ListItem* pItem = reinterpret_cast<CFWL_ListItem*>(hItem);
283 return pItem->m_pData; 280 return pItem->m_pData;
284 } 281 }
285 282
286 FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::SetItemStyles(IFWL_Widget* pWidget, 283 FWL_Error CFWL_ListBox::CFWL_ListBoxDP::SetItemStyles(IFWL_Widget* pWidget,
287 FWL_HLISTITEM hItem, 284 FWL_HLISTITEM hItem,
288 uint32_t dwStyle) { 285 uint32_t dwStyle) {
289 if (!hItem) 286 if (!hItem)
290 return FWL_ERR_Indefinite; 287 return FWL_Error::Indefinite;
291 reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwStates = dwStyle; 288 reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwStates = dwStyle;
292 return FWL_ERR_Succeeded; 289 return FWL_Error::Succeeded;
293 } 290 }
294 291
295 FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::SetItemText(IFWL_Widget* pWidget, 292 FWL_Error CFWL_ListBox::CFWL_ListBoxDP::SetItemText(IFWL_Widget* pWidget,
296 FWL_HLISTITEM hItem, 293 FWL_HLISTITEM hItem,
297 const FX_WCHAR* pszText) { 294 const FX_WCHAR* pszText) {
298 if (!hItem) 295 if (!hItem)
299 return FWL_ERR_Indefinite; 296 return FWL_Error::Indefinite;
300 reinterpret_cast<CFWL_ListItem*>(hItem)->m_wsText = pszText; 297 reinterpret_cast<CFWL_ListItem*>(hItem)->m_wsText = pszText;
301 return FWL_ERR_Succeeded; 298 return FWL_Error::Succeeded;
302 } 299 }
303 300
304 FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::SetItemRect(IFWL_Widget* pWidget, 301 FWL_Error CFWL_ListBox::CFWL_ListBoxDP::SetItemRect(IFWL_Widget* pWidget,
305 FWL_HLISTITEM hItem, 302 FWL_HLISTITEM hItem,
306 const CFX_RectF& rtItem) { 303 const CFX_RectF& rtItem) {
307 if (!hItem) 304 if (!hItem)
308 return FWL_ERR_Indefinite; 305 return FWL_Error::Indefinite;
309 reinterpret_cast<CFWL_ListItem*>(hItem)->m_rtItem = rtItem; 306 reinterpret_cast<CFWL_ListItem*>(hItem)->m_rtItem = rtItem;
310 return FWL_ERR_Succeeded; 307 return FWL_Error::Succeeded;
311 } 308 }
312 309
313 FX_FLOAT CFWL_ListBox::CFWL_ListBoxDP::GetItemHeight(IFWL_Widget* pWidget) { 310 FX_FLOAT CFWL_ListBox::CFWL_ListBoxDP::GetItemHeight(IFWL_Widget* pWidget) {
314 return m_fItemHeight; 311 return m_fItemHeight;
315 } 312 }
316 313
317 CFX_DIBitmap* CFWL_ListBox::CFWL_ListBoxDP::GetItemIcon(IFWL_Widget* pWidget, 314 CFX_DIBitmap* CFWL_ListBox::CFWL_ListBoxDP::GetItemIcon(IFWL_Widget* pWidget,
318 FWL_HLISTITEM hItem) { 315 FWL_HLISTITEM hItem) {
319 return reinterpret_cast<CFWL_ListItem*>(hItem)->m_pDIB; 316 return reinterpret_cast<CFWL_ListItem*>(hItem)->m_pDIB;
320 } 317 }
321 318
322 FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::GetItemCheckRect(IFWL_Widget* pWidget, 319 FWL_Error CFWL_ListBox::CFWL_ListBoxDP::GetItemCheckRect(IFWL_Widget* pWidget,
323 FWL_HLISTITEM hItem, 320 FWL_HLISTITEM hItem,
324 CFX_RectF& rtCheck) { 321 CFX_RectF& rtCheck) {
325 rtCheck = reinterpret_cast<CFWL_ListItem*>(hItem)->m_rtCheckBox; 322 rtCheck = reinterpret_cast<CFWL_ListItem*>(hItem)->m_rtCheckBox;
326 return FWL_ERR_Succeeded; 323 return FWL_Error::Succeeded;
327 } 324 }
328 325
329 FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::SetItemCheckRect( 326 FWL_Error CFWL_ListBox::CFWL_ListBoxDP::SetItemCheckRect(
330 IFWL_Widget* pWidget, 327 IFWL_Widget* pWidget,
331 FWL_HLISTITEM hItem, 328 FWL_HLISTITEM hItem,
332 const CFX_RectF& rtCheck) { 329 const CFX_RectF& rtCheck) {
333 reinterpret_cast<CFWL_ListItem*>(hItem)->m_rtCheckBox = rtCheck; 330 reinterpret_cast<CFWL_ListItem*>(hItem)->m_rtCheckBox = rtCheck;
334 return FWL_ERR_Succeeded; 331 return FWL_Error::Succeeded;
335 } 332 }
336 333
337 uint32_t CFWL_ListBox::CFWL_ListBoxDP::GetItemCheckState(IFWL_Widget* pWidget, 334 uint32_t CFWL_ListBox::CFWL_ListBoxDP::GetItemCheckState(IFWL_Widget* pWidget,
338 FWL_HLISTITEM hItem) { 335 FWL_HLISTITEM hItem) {
339 return reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwCheckState; 336 return reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwCheckState;
340 } 337 }
341 338
342 FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::SetItemCheckState(IFWL_Widget* pWidget, 339 FWL_Error CFWL_ListBox::CFWL_ListBoxDP::SetItemCheckState(
343 FWL_HLISTITEM hItem, 340 IFWL_Widget* pWidget,
344 uint32_t dwCheckState) { 341 FWL_HLISTITEM hItem,
342 uint32_t dwCheckState) {
345 reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwCheckState = dwCheckState; 343 reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwCheckState = dwCheckState;
346 return FWL_ERR_Succeeded; 344 return FWL_Error::Succeeded;
347 } 345 }
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_listbox.h ('k') | xfa/fwl/lightwidget/cfwl_picturebox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698