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/core/cfwl_combobox.h" | 7 #include "xfa/fwl/core/cfwl_combobox.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 87 } |
88 if (!m_pProperties->m_pThemeProvider) | 88 if (!m_pProperties->m_pThemeProvider) |
89 ResetTheme(); | 89 ResetTheme(); |
90 | 90 |
91 FX_FLOAT* pFWidth = static_cast<FX_FLOAT*>( | 91 FX_FLOAT* pFWidth = static_cast<FX_FLOAT*>( |
92 GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth)); | 92 GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth)); |
93 if (!pFWidth) | 93 if (!pFWidth) |
94 return; | 94 return; |
95 | 95 |
96 rect.Inflate(0, 0, *pFWidth, 0); | 96 rect.Inflate(0, 0, *pFWidth, 0); |
97 CFWL_Widget::GetWidgetRect(rect, true); | 97 InflateWidgetRect(rect); |
98 } | 98 } |
99 | 99 |
100 void CFWL_ComboBox::AddString(const CFX_WideStringC& wsText) { | 100 void CFWL_ComboBox::AddString(const CFX_WideStringC& wsText) { |
101 m_pListBox->AddString(wsText); | 101 m_pListBox->AddString(wsText); |
102 } | 102 } |
103 | 103 |
104 bool CFWL_ComboBox::RemoveAt(int32_t iIndex) { | 104 bool CFWL_ComboBox::RemoveAt(int32_t iIndex) { |
105 return m_pListBox->RemoveAt(iIndex); | 105 return m_pListBox->RemoveAt(iIndex); |
106 } | 106 } |
107 | 107 |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 else | 1099 else |
1100 iCurSel++; | 1100 iCurSel++; |
1101 } | 1101 } |
1102 m_iCurSel = iCurSel; | 1102 m_iCurSel = iCurSel; |
1103 SyncEditText(m_iCurSel); | 1103 SyncEditText(m_iCurSel); |
1104 return; | 1104 return; |
1105 } | 1105 } |
1106 if (m_pEdit) | 1106 if (m_pEdit) |
1107 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); | 1107 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); |
1108 } | 1108 } |
OLD | NEW |