| 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 |
| 11 #include "third_party/base/ptr_util.h" | 11 #include "third_party/base/ptr_util.h" |
| 12 #include "xfa/fwl/core/fwl_error.h" | 12 #include "xfa/fwl/core/fwl_error.h" |
| 13 #include "xfa/fwl/core/ifwl_widget.h" | 13 #include "xfa/fwl/core/ifwl_widget.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 IFWL_ComboBox* ToComboBox(IFWL_Widget* widget) { | 17 IFWL_ComboBox* ToComboBox(IFWL_Widget* widget) { |
| 18 return static_cast<IFWL_ComboBox*>(widget); | 18 return static_cast<IFWL_ComboBox*>(widget); |
| 19 } | 19 } |
| 20 | 20 |
| 21 const IFWL_ComboBox* ToComboBox(const IFWL_Widget* widget) { | |
| 22 return static_cast<const IFWL_ComboBox*>(widget); | |
| 23 } | |
| 24 | |
| 25 } // namespace | 21 } // namespace |
| 26 | 22 |
| 27 CFWL_ComboBox::CFWL_ComboBox(const IFWL_App* app) | 23 CFWL_ComboBox::CFWL_ComboBox(const IFWL_App* app) |
| 28 : CFWL_Widget(app), m_fMaxListHeight(0) {} | 24 : CFWL_Widget(app), m_fMaxListHeight(0) {} |
| 29 | 25 |
| 30 CFWL_ComboBox::~CFWL_ComboBox() {} | 26 CFWL_ComboBox::~CFWL_ComboBox() {} |
| 31 | 27 |
| 32 void CFWL_ComboBox::Initialize() { | 28 void CFWL_ComboBox::Initialize() { |
| 33 ASSERT(!m_pIface); | 29 ASSERT(!m_pIface); |
| 34 | 30 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 241 |
| 246 void CFWL_ComboBox::SetItemCheckState(IFWL_Widget* pWidget, | 242 void CFWL_ComboBox::SetItemCheckState(IFWL_Widget* pWidget, |
| 247 CFWL_ListItem* pItem, | 243 CFWL_ListItem* pItem, |
| 248 uint32_t dwCheckState) { | 244 uint32_t dwCheckState) { |
| 249 static_cast<CFWL_ListItem*>(pItem)->m_dwCheckState = dwCheckState; | 245 static_cast<CFWL_ListItem*>(pItem)->m_dwCheckState = dwCheckState; |
| 250 } | 246 } |
| 251 | 247 |
| 252 FX_FLOAT CFWL_ComboBox::GetListHeight(IFWL_Widget* pWidget) { | 248 FX_FLOAT CFWL_ComboBox::GetListHeight(IFWL_Widget* pWidget) { |
| 253 return m_fMaxListHeight; | 249 return m_fMaxListHeight; |
| 254 } | 250 } |
| OLD | NEW |