| 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_combobox.h" | 7 #include "xfa/fwl/core/cfwl_combobox.h" |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 } | 149 } |
| 150 | 150 |
| 151 void CFWL_ComboBox::EditModifyStylesEx(uint32_t dwStylesExAdded, | 151 void CFWL_ComboBox::EditModifyStylesEx(uint32_t dwStylesExAdded, |
| 152 uint32_t dwStylesExRemoved) { | 152 uint32_t dwStylesExRemoved) { |
| 153 if (GetWidget()) { | 153 if (GetWidget()) { |
| 154 ToComboBox(GetWidget()) | 154 ToComboBox(GetWidget()) |
| 155 ->EditModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); | 155 ->EditModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 | 158 |
| 159 void CFWL_ComboBox::GetCaption(IFWL_Widget* pWidget, | |
| 160 CFX_WideString& wsCaption) {} | |
| 161 | |
| 162 int32_t CFWL_ComboBox::CountItems(const IFWL_Widget* pWidget) const { | 159 int32_t CFWL_ComboBox::CountItems(const IFWL_Widget* pWidget) const { |
| 163 return m_ItemArray.size(); | 160 return m_ItemArray.size(); |
| 164 } | 161 } |
| 165 | 162 |
| 166 CFWL_ListItem* CFWL_ComboBox::GetItem(const IFWL_Widget* pWidget, | 163 CFWL_ListItem* CFWL_ComboBox::GetItem(const IFWL_Widget* pWidget, |
| 167 int32_t nIndex) const { | 164 int32_t nIndex) const { |
| 168 if (nIndex < 0 || static_cast<size_t>(nIndex) >= m_ItemArray.size()) | 165 if (nIndex < 0 || static_cast<size_t>(nIndex) >= m_ItemArray.size()) |
| 169 return nullptr; | 166 return nullptr; |
| 170 return m_ItemArray[nIndex].get(); | 167 return m_ItemArray[nIndex].get(); |
| 171 } | 168 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 242 |
| 246 void CFWL_ComboBox::SetItemCheckState(IFWL_Widget* pWidget, | 243 void CFWL_ComboBox::SetItemCheckState(IFWL_Widget* pWidget, |
| 247 CFWL_ListItem* pItem, | 244 CFWL_ListItem* pItem, |
| 248 uint32_t dwCheckState) { | 245 uint32_t dwCheckState) { |
| 249 static_cast<CFWL_ListItem*>(pItem)->m_dwCheckState = dwCheckState; | 246 static_cast<CFWL_ListItem*>(pItem)->m_dwCheckState = dwCheckState; |
| 250 } | 247 } |
| 251 | 248 |
| 252 FX_FLOAT CFWL_ComboBox::GetListHeight(IFWL_Widget* pWidget) { | 249 FX_FLOAT CFWL_ComboBox::GetListHeight(IFWL_Widget* pWidget) { |
| 253 return m_fMaxListHeight; | 250 return m_fMaxListHeight; |
| 254 } | 251 } |
| OLD | NEW |