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

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

Issue 2555253002: Split CFWL_Widget::GetWidgetRect into two parts (Closed)
Patch Set: Rebase to master Created 4 years 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_monthcalendar.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 <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 rect = m_pProperties->m_rtWidget; 54 rect = m_pProperties->m_rtWidget;
55 return; 55 return;
56 } 56 }
57 57
58 rect.Set(0, 0, 0, 0); 58 rect.Set(0, 0, 0, 0);
59 if (!m_pProperties->m_pThemeProvider) 59 if (!m_pProperties->m_pThemeProvider)
60 m_pProperties->m_pThemeProvider = GetAvailableTheme(); 60 m_pProperties->m_pThemeProvider = GetAvailableTheme();
61 61
62 CFX_SizeF fs = CalcSize(true); 62 CFX_SizeF fs = CalcSize(true);
63 rect.Set(0, 0, fs.x, fs.y); 63 rect.Set(0, 0, fs.x, fs.y);
64 CFWL_Widget::GetWidgetRect(rect, true); 64 InflateWidgetRect(rect);
65 } 65 }
66 66
67 void CFWL_ListBox::Update() { 67 void CFWL_ListBox::Update() {
68 if (IsLocked()) 68 if (IsLocked())
69 return; 69 return;
70 if (!m_pProperties->m_pThemeProvider) 70 if (!m_pProperties->m_pThemeProvider)
71 m_pProperties->m_pThemeProvider = GetAvailableTheme(); 71 m_pProperties->m_pThemeProvider = GetAvailableTheme();
72 72
73 switch (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_LTB_AlignMask) { 73 switch (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_LTB_AlignMask) {
74 case FWL_STYLEEXT_LTB_LeftAlign: { 74 case FWL_STYLEEXT_LTB_LeftAlign: {
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 void CFWL_ListBox::DeleteAll() { 1139 void CFWL_ListBox::DeleteAll() {
1140 m_ItemArray.clear(); 1140 m_ItemArray.clear();
1141 } 1141 }
1142 1142
1143 uint32_t CFWL_ListBox::GetItemStates(CFWL_ListItem* pItem) { 1143 uint32_t CFWL_ListBox::GetItemStates(CFWL_ListItem* pItem) {
1144 if (!pItem) 1144 if (!pItem)
1145 return 0; 1145 return 0;
1146 return pItem->m_dwStates | pItem->m_dwCheckState; 1146 return pItem->m_dwStates | pItem->m_dwCheckState;
1147 } 1147 }
1148 1148
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_edit.cpp ('k') | xfa/fwl/core/cfwl_monthcalendar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698