| 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 #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 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 CFWL_ListBox::CFWL_ListBoxDP::CFWL_ListBoxDP() {} | 210 CFWL_ListBox::CFWL_ListBoxDP::CFWL_ListBoxDP() {} |
| 211 | 211 |
| 212 CFWL_ListBox::CFWL_ListBoxDP::~CFWL_ListBoxDP() {} | 212 CFWL_ListBox::CFWL_ListBoxDP::~CFWL_ListBoxDP() {} |
| 213 | 213 |
| 214 FWL_Error CFWL_ListBox::CFWL_ListBoxDP::GetCaption(IFWL_Widget* pWidget, | 214 FWL_Error CFWL_ListBox::CFWL_ListBoxDP::GetCaption(IFWL_Widget* pWidget, |
| 215 CFX_WideString& wsCaption) { | 215 CFX_WideString& wsCaption) { |
| 216 wsCaption = m_wsData; | 216 wsCaption = m_wsData; |
| 217 return FWL_Error::Succeeded; | 217 return FWL_Error::Succeeded; |
| 218 } | 218 } |
| 219 | 219 |
| 220 int32_t CFWL_ListBox::CFWL_ListBoxDP::CountItems(IFWL_Widget* pWidget) { | 220 int32_t CFWL_ListBox::CFWL_ListBoxDP::CountItems(const IFWL_Widget* pWidget) { |
| 221 return pdfium::CollectionSize<int32_t>(m_ItemArray); | 221 return pdfium::CollectionSize<int32_t>(m_ItemArray); |
| 222 } | 222 } |
| 223 | 223 |
| 224 IFWL_ListItem* CFWL_ListBox::CFWL_ListBoxDP::GetItem(IFWL_Widget* pWidget, | 224 IFWL_ListItem* CFWL_ListBox::CFWL_ListBoxDP::GetItem(const IFWL_Widget* pWidget, |
| 225 int32_t nIndex) { | 225 int32_t nIndex) { |
| 226 if (nIndex < 0 || nIndex >= CountItems(pWidget)) | 226 if (nIndex < 0 || nIndex >= CountItems(pWidget)) |
| 227 return nullptr; | 227 return nullptr; |
| 228 | 228 |
| 229 return m_ItemArray[nIndex].get(); | 229 return m_ItemArray[nIndex].get(); |
| 230 } | 230 } |
| 231 | 231 |
| 232 int32_t CFWL_ListBox::CFWL_ListBoxDP::GetItemIndex(IFWL_Widget* pWidget, | 232 int32_t CFWL_ListBox::CFWL_ListBoxDP::GetItemIndex(IFWL_Widget* pWidget, |
| 233 IFWL_ListItem* pItem) { | 233 IFWL_ListItem* pItem) { |
| 234 auto it = std::find_if( | 234 auto it = std::find_if( |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 m_rtItem.Reset(); | 346 m_rtItem.Reset(); |
| 347 m_dwStates = 0; | 347 m_dwStates = 0; |
| 348 m_wsText = L""; | 348 m_wsText = L""; |
| 349 m_pDIB = nullptr; | 349 m_pDIB = nullptr; |
| 350 m_pData = nullptr; | 350 m_pData = nullptr; |
| 351 m_dwCheckState = 0; | 351 m_dwCheckState = 0; |
| 352 m_rtCheckBox.Reset(); | 352 m_rtCheckBox.Reset(); |
| 353 } | 353 } |
| 354 | 354 |
| 355 CFWL_ListItem::~CFWL_ListItem() {} | 355 CFWL_ListItem::~CFWL_ListItem() {} |
| OLD | NEW |