Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: xfa/fwl/core/cfwl_combobox.cpp

Issue 2469893004: Unify CFWL_WidgetProperties and CFWL_WidgetImpProperties. (Closed)
Patch Set: review cleanup Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/cfwl_combobox.h ('k') | xfa/fwl/core/cfwl_datetimepicker.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 } // namespace 25 } // namespace
26 26
27 CFWL_ComboBox::CFWL_ComboBox(const IFWL_App* app) : CFWL_Widget(app) {} 27 CFWL_ComboBox::CFWL_ComboBox(const IFWL_App* app) : CFWL_Widget(app) {}
28 28
29 CFWL_ComboBox::~CFWL_ComboBox() {} 29 CFWL_ComboBox::~CFWL_ComboBox() {}
30 30
31 void CFWL_ComboBox::Initialize() { 31 void CFWL_ComboBox::Initialize() {
32 ASSERT(!m_pIface); 32 ASSERT(!m_pIface);
33 33
34 m_pIface = pdfium::MakeUnique<IFWL_ComboBox>( 34 m_pIface = pdfium::MakeUnique<IFWL_ComboBox>(
35 m_pApp, m_pProperties->MakeWidgetImpProperties(&m_comboBoxData)); 35 m_pApp, pdfium::MakeUnique<CFWL_WidgetProperties>(&m_comboBoxData));
36 36
37 CFWL_Widget::Initialize(); 37 CFWL_Widget::Initialize();
38 } 38 }
39 39
40 int32_t CFWL_ComboBox::AddString(const CFX_WideStringC& wsText) { 40 int32_t CFWL_ComboBox::AddString(const CFX_WideStringC& wsText) {
41 std::unique_ptr<CFWL_ComboBoxItem> pItem(new CFWL_ComboBoxItem); 41 std::unique_ptr<CFWL_ComboBoxItem> pItem(new CFWL_ComboBoxItem);
42 pItem->m_wsText = wsText; 42 pItem->m_wsText = wsText;
43 pItem->m_dwStyles = 0; 43 pItem->m_dwStyles = 0;
44 m_comboBoxData.m_ItemArray.push_back(std::move(pItem)); 44 m_comboBoxData.m_ItemArray.push_back(std::move(pItem));
45 return m_comboBoxData.m_ItemArray.size() - 1; 45 return m_comboBoxData.m_ItemArray.size() - 1;
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 return FWL_Error::Succeeded; 381 return FWL_Error::Succeeded;
382 } 382 }
383 383
384 FX_FLOAT CFWL_ComboBox::CFWL_ComboBoxDP::GetListHeight(IFWL_Widget* pWidget) { 384 FX_FLOAT CFWL_ComboBox::CFWL_ComboBoxDP::GetListHeight(IFWL_Widget* pWidget) {
385 return m_fMaxListHeight; 385 return m_fMaxListHeight;
386 } 386 }
387 387
388 CFWL_ComboBoxItem::CFWL_ComboBoxItem() : m_pDIB(nullptr), m_pData(nullptr) {} 388 CFWL_ComboBoxItem::CFWL_ComboBoxItem() : m_pDIB(nullptr), m_pData(nullptr) {}
389 389
390 CFWL_ComboBoxItem::~CFWL_ComboBoxItem() {} 390 CFWL_ComboBoxItem::~CFWL_ComboBoxItem() {}
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_combobox.h ('k') | xfa/fwl/core/cfwl_datetimepicker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698