| 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/core/cfwl_listbox.h" | 7 #include "xfa/fwl/core/cfwl_listbox.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 return m_ItemArray[nIndex].get(); | 112 return m_ItemArray[nIndex].get(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 uint32_t CFWL_ListBox::GetItemStates(CFWL_ListItem* pItem) { | 115 uint32_t CFWL_ListBox::GetItemStates(CFWL_ListItem* pItem) { |
| 116 if (!pItem) | 116 if (!pItem) |
| 117 return 0; | 117 return 0; |
| 118 CFWL_ListItem* pListItem = static_cast<CFWL_ListItem*>(pItem); | 118 CFWL_ListItem* pListItem = static_cast<CFWL_ListItem*>(pItem); |
| 119 return pListItem->m_dwStates | pListItem->m_dwCheckState; | 119 return pListItem->m_dwStates | pListItem->m_dwCheckState; |
| 120 } | 120 } |
| 121 | 121 |
| 122 FWL_Error CFWL_ListBox::GetCaption(IFWL_Widget* pWidget, | 122 void CFWL_ListBox::GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption) { |
| 123 CFX_WideString& wsCaption) { | |
| 124 wsCaption = L""; | 123 wsCaption = L""; |
| 125 return FWL_Error::Succeeded; | |
| 126 } | 124 } |
| 127 | 125 |
| 128 int32_t CFWL_ListBox::CountItems(const IFWL_Widget* pWidget) { | 126 int32_t CFWL_ListBox::CountItems(const IFWL_Widget* pWidget) { |
| 129 return pdfium::CollectionSize<int32_t>(m_ItemArray); | 127 return pdfium::CollectionSize<int32_t>(m_ItemArray); |
| 130 } | 128 } |
| 131 | 129 |
| 132 CFWL_ListItem* CFWL_ListBox::GetItem(const IFWL_Widget* pWidget, | 130 CFWL_ListItem* CFWL_ListBox::GetItem(const IFWL_Widget* pWidget, |
| 133 int32_t nIndex) { | 131 int32_t nIndex) { |
| 134 if (nIndex < 0 || nIndex >= CountItems(pWidget)) | 132 if (nIndex < 0 || nIndex >= CountItems(pWidget)) |
| 135 return nullptr; | 133 return nullptr; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 uint32_t CFWL_ListBox::GetItemCheckState(IFWL_Widget* pWidget, | 223 uint32_t CFWL_ListBox::GetItemCheckState(IFWL_Widget* pWidget, |
| 226 CFWL_ListItem* pItem) { | 224 CFWL_ListItem* pItem) { |
| 227 return static_cast<CFWL_ListItem*>(pItem)->m_dwCheckState; | 225 return static_cast<CFWL_ListItem*>(pItem)->m_dwCheckState; |
| 228 } | 226 } |
| 229 | 227 |
| 230 void CFWL_ListBox::SetItemCheckState(IFWL_Widget* pWidget, | 228 void CFWL_ListBox::SetItemCheckState(IFWL_Widget* pWidget, |
| 231 CFWL_ListItem* pItem, | 229 CFWL_ListItem* pItem, |
| 232 uint32_t dwCheckState) { | 230 uint32_t dwCheckState) { |
| 233 static_cast<CFWL_ListItem*>(pItem)->m_dwCheckState = dwCheckState; | 231 static_cast<CFWL_ListItem*>(pItem)->m_dwCheckState = dwCheckState; |
| 234 } | 232 } |
| OLD | NEW |