| 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_combobox.h" | 7 #include "xfa/fwl/lightwidget/cfwl_combobox.h" |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 283 |
| 284 CFWL_ComboBox::~CFWL_ComboBox() {} | 284 CFWL_ComboBox::~CFWL_ComboBox() {} |
| 285 | 285 |
| 286 CFWL_ComboBox::CFWL_ComboBoxDP::CFWL_ComboBoxDP() { | 286 CFWL_ComboBox::CFWL_ComboBoxDP::CFWL_ComboBoxDP() { |
| 287 m_fItemHeight = 0; | 287 m_fItemHeight = 0; |
| 288 m_fMaxListHeight = 0; | 288 m_fMaxListHeight = 0; |
| 289 } | 289 } |
| 290 | 290 |
| 291 CFWL_ComboBox::CFWL_ComboBoxDP::~CFWL_ComboBoxDP() {} | 291 CFWL_ComboBox::CFWL_ComboBoxDP::~CFWL_ComboBoxDP() {} |
| 292 | 292 |
| 293 FWL_Error CFWL_ComboBox::CFWL_ComboBoxDP::GetCaption( |
| 294 IFWL_Widget* pWidget, |
| 295 CFX_WideString& wsCaption) { |
| 296 return FWL_Error::Succeeded; |
| 297 } |
| 298 |
| 293 int32_t CFWL_ComboBox::CFWL_ComboBoxDP::CountItems(IFWL_Widget* pWidget) { | 299 int32_t CFWL_ComboBox::CFWL_ComboBoxDP::CountItems(IFWL_Widget* pWidget) { |
| 294 return m_ItemArray.size(); | 300 return m_ItemArray.size(); |
| 295 } | 301 } |
| 296 | 302 |
| 297 IFWL_ListItem* CFWL_ComboBox::CFWL_ComboBoxDP::GetItem(IFWL_Widget* pWidget, | 303 IFWL_ListItem* CFWL_ComboBox::CFWL_ComboBoxDP::GetItem(IFWL_Widget* pWidget, |
| 298 int32_t nIndex) { | 304 int32_t nIndex) { |
| 299 if (nIndex < 0 || static_cast<size_t>(nIndex) >= m_ItemArray.size()) | 305 if (nIndex < 0 || static_cast<size_t>(nIndex) >= m_ItemArray.size()) |
| 300 return nullptr; | 306 return nullptr; |
| 301 | 307 |
| 302 return m_ItemArray[nIndex].get(); | 308 return m_ItemArray[nIndex].get(); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 IFWL_Widget* pWidget, | 426 IFWL_Widget* pWidget, |
| 421 IFWL_ListItem* pItem, | 427 IFWL_ListItem* pItem, |
| 422 uint32_t dwCheckState) { | 428 uint32_t dwCheckState) { |
| 423 static_cast<CFWL_ComboBoxItem*>(pItem)->m_dwCheckState = dwCheckState; | 429 static_cast<CFWL_ComboBoxItem*>(pItem)->m_dwCheckState = dwCheckState; |
| 424 return FWL_Error::Succeeded; | 430 return FWL_Error::Succeeded; |
| 425 } | 431 } |
| 426 | 432 |
| 427 FX_FLOAT CFWL_ComboBox::CFWL_ComboBoxDP::GetListHeight(IFWL_Widget* pWidget) { | 433 FX_FLOAT CFWL_ComboBox::CFWL_ComboBoxDP::GetListHeight(IFWL_Widget* pWidget) { |
| 428 return m_fMaxListHeight; | 434 return m_fMaxListHeight; |
| 429 } | 435 } |
| 436 |
| 437 CFWL_ComboBoxItem::CFWL_ComboBoxItem() : m_pDIB(nullptr), m_pData(nullptr) {} |
| 438 |
| 439 CFWL_ComboBoxItem::~CFWL_ComboBoxItem() {} |
| OLD | NEW |