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

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

Issue 2575093002: Cleanup widget edge related code (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/cfwl_edit.cpp ('k') | xfa/fwl/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/cfwl_listbox.h" 7 #include "xfa/fwl/cfwl_listbox.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const CFX_Matrix* pMatrix) { 95 const CFX_Matrix* pMatrix) {
96 if (!pGraphics) 96 if (!pGraphics)
97 return; 97 return;
98 if (!m_pProperties->m_pThemeProvider) 98 if (!m_pProperties->m_pThemeProvider)
99 return; 99 return;
100 100
101 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; 101 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
102 pGraphics->SaveGraphState(); 102 pGraphics->SaveGraphState();
103 if (HasBorder()) 103 if (HasBorder())
104 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); 104 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
105 if (HasEdge())
106 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix);
107 105
108 CFX_RectF rtClip(m_rtConent); 106 CFX_RectF rtClip(m_rtConent);
109 if (IsShowScrollBar(false)) 107 if (IsShowScrollBar(false))
110 rtClip.height -= m_fScorllBarWidth; 108 rtClip.height -= m_fScorllBarWidth;
111 if (IsShowScrollBar(true)) 109 if (IsShowScrollBar(true))
112 rtClip.width -= m_fScorllBarWidth; 110 rtClip.width -= m_fScorllBarWidth;
113 if (pMatrix) 111 if (pMatrix)
114 pMatrix->TransformRect(rtClip); 112 pMatrix->TransformRect(rtClip);
115 113
116 pGraphics->SetClipRect(rtClip); 114 pGraphics->SetClipRect(rtClip);
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 if (CFWL_ListItem* item = GetItem(this, iSel)) 946 if (CFWL_ListItem* item = GetItem(this, iSel))
949 item->SetStates(item->GetStates() | FWL_ITEMSTATE_LTB_Selected); 947 item->SetStates(item->GetStates() | FWL_ITEMSTATE_LTB_Selected);
950 } 948 }
951 949
952 m_ItemArray.erase(m_ItemArray.begin() + nIndex); 950 m_ItemArray.erase(m_ItemArray.begin() + nIndex);
953 } 951 }
954 952
955 void CFWL_ListBox::DeleteAll() { 953 void CFWL_ListBox::DeleteAll() {
956 m_ItemArray.clear(); 954 m_ItemArray.clear();
957 } 955 }
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_edit.cpp ('k') | xfa/fwl/cfwl_monthcalendar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698