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