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 11 matching lines...) Expand all Loading... |
22 } // namespace | 22 } // namespace |
23 | 23 |
24 CFWL_ComboBox::CFWL_ComboBox(const CFWL_App* app) : CFWL_Widget(app) {} | 24 CFWL_ComboBox::CFWL_ComboBox(const CFWL_App* app) : CFWL_Widget(app) {} |
25 | 25 |
26 CFWL_ComboBox::~CFWL_ComboBox() {} | 26 CFWL_ComboBox::~CFWL_ComboBox() {} |
27 | 27 |
28 void CFWL_ComboBox::Initialize() { | 28 void CFWL_ComboBox::Initialize() { |
29 ASSERT(!m_pIface); | 29 ASSERT(!m_pIface); |
30 | 30 |
31 m_pIface = pdfium::MakeUnique<IFWL_ComboBox>( | 31 m_pIface = pdfium::MakeUnique<IFWL_ComboBox>( |
32 m_pApp, pdfium::MakeUnique<CFWL_WidgetProperties>(this)); | 32 m_pApp, pdfium::MakeUnique<CFWL_WidgetProperties>()); |
33 | 33 |
34 CFWL_Widget::Initialize(); | 34 CFWL_Widget::Initialize(); |
35 } | 35 } |
36 | 36 |
37 void CFWL_ComboBox::AddString(const CFX_WideStringC& wsText) { | 37 void CFWL_ComboBox::AddString(const CFX_WideStringC& wsText) { |
38 if (GetWidget()) | 38 if (GetWidget()) |
39 ToComboBox(GetWidget())->AddString(wsText); | 39 ToComboBox(GetWidget())->AddString(wsText); |
40 } | 40 } |
41 | 41 |
42 bool CFWL_ComboBox::RemoveAt(int32_t iIndex) { | 42 bool CFWL_ComboBox::RemoveAt(int32_t iIndex) { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 ToComboBox(GetWidget())->GetBBox(rect); | 140 ToComboBox(GetWidget())->GetBBox(rect); |
141 } | 141 } |
142 | 142 |
143 void CFWL_ComboBox::EditModifyStylesEx(uint32_t dwStylesExAdded, | 143 void CFWL_ComboBox::EditModifyStylesEx(uint32_t dwStylesExAdded, |
144 uint32_t dwStylesExRemoved) { | 144 uint32_t dwStylesExRemoved) { |
145 if (GetWidget()) { | 145 if (GetWidget()) { |
146 ToComboBox(GetWidget()) | 146 ToComboBox(GetWidget()) |
147 ->EditModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); | 147 ->EditModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); |
148 } | 148 } |
149 } | 149 } |
OLD | NEW |