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/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 Loading... |
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 Loading... |
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 } |
OLD | NEW |