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

Side by Side Diff: xfa/fwl/core/cfwl_listbox.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_edit.cpp ('k') | xfa/fwl/core/cfwl_picturebox.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_listbox.h" 7 #include "xfa/fwl/core/cfwl_listbox.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
11 #include "third_party/base/ptr_util.h" 11 #include "third_party/base/ptr_util.h"
12 #include "third_party/base/stl_util.h" 12 #include "third_party/base/stl_util.h"
13 13
14 namespace { 14 namespace {
15 15
16 IFWL_ListBox* ToListBox(IFWL_Widget* widget) { 16 IFWL_ListBox* ToListBox(IFWL_Widget* widget) {
17 return static_cast<IFWL_ListBox*>(widget); 17 return static_cast<IFWL_ListBox*>(widget);
18 } 18 }
19 19
20 } // namespace 20 } // namespace
21 21
22 CFWL_ListBox::CFWL_ListBox(const IFWL_App* app) : CFWL_Widget(app) {} 22 CFWL_ListBox::CFWL_ListBox(const IFWL_App* app) : CFWL_Widget(app) {}
23 23
24 CFWL_ListBox::~CFWL_ListBox() {} 24 CFWL_ListBox::~CFWL_ListBox() {}
25 25
26 void CFWL_ListBox::Initialize() { 26 void CFWL_ListBox::Initialize() {
27 ASSERT(!m_pIface); 27 ASSERT(!m_pIface);
28 28
29 m_pIface = pdfium::MakeUnique<IFWL_ListBox>( 29 m_pIface = pdfium::MakeUnique<IFWL_ListBox>(
30 m_pApp, m_pProperties->MakeWidgetImpProperties(&m_ListBoxDP), nullptr); 30 m_pApp, pdfium::MakeUnique<CFWL_WidgetProperties>(&m_ListBoxDP), nullptr);
31 31
32 CFWL_Widget::Initialize(); 32 CFWL_Widget::Initialize();
33 } 33 }
34 34
35 FWL_Error CFWL_ListBox::AddDIBitmap(CFX_DIBitmap* pDIB, IFWL_ListItem* pItem) { 35 FWL_Error CFWL_ListBox::AddDIBitmap(CFX_DIBitmap* pDIB, IFWL_ListItem* pItem) {
36 static_cast<CFWL_ListItem*>(pItem)->m_pDIB = pDIB; 36 static_cast<CFWL_ListItem*>(pItem)->m_pDIB = pDIB;
37 return FWL_Error::Succeeded; 37 return FWL_Error::Succeeded;
38 } 38 }
39 39
40 IFWL_ListItem* CFWL_ListBox::AddString(const CFX_WideStringC& wsAdd, 40 IFWL_ListItem* CFWL_ListBox::AddString(const CFX_WideStringC& wsAdd,
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 m_rtItem.Reset(); 339 m_rtItem.Reset();
340 m_dwStates = 0; 340 m_dwStates = 0;
341 m_wsText = L""; 341 m_wsText = L"";
342 m_pDIB = nullptr; 342 m_pDIB = nullptr;
343 m_pData = nullptr; 343 m_pData = nullptr;
344 m_dwCheckState = 0; 344 m_dwCheckState = 0;
345 m_rtCheckBox.Reset(); 345 m_rtCheckBox.Reset();
346 } 346 }
347 347
348 CFWL_ListItem::~CFWL_ListItem() {} 348 CFWL_ListItem::~CFWL_ListItem() {}
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_edit.cpp ('k') | xfa/fwl/core/cfwl_picturebox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698