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/lightwidget/cfwl_theme.h" | 7 #include "xfa/fwl/lightwidget/cfwl_theme.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 return !!GetTheme(pWidget); | 49 return !!GetTheme(pWidget); |
50 } | 50 } |
51 | 51 |
52 uint32_t CFWL_Theme::GetThemeID(IFWL_Widget* pWidget) { | 52 uint32_t CFWL_Theme::GetThemeID(IFWL_Widget* pWidget) { |
53 return GetTheme(pWidget)->GetThemeID(pWidget); | 53 return GetTheme(pWidget)->GetThemeID(pWidget); |
54 } | 54 } |
55 | 55 |
56 uint32_t CFWL_Theme::SetThemeID(IFWL_Widget* pWidget, | 56 uint32_t CFWL_Theme::SetThemeID(IFWL_Widget* pWidget, |
57 uint32_t dwThemeID, | 57 uint32_t dwThemeID, |
58 FX_BOOL bChildren) { | 58 FX_BOOL bChildren) { |
59 uint32_t dwID; | 59 uint32_t dwID = 0; |
60 for (const auto& pTheme : m_ThemesArray) { | 60 for (const auto& pTheme : m_ThemesArray) { |
61 dwID = pTheme->GetThemeID(pWidget); | 61 dwID = pTheme->GetThemeID(pWidget); |
62 pTheme->SetThemeID(pWidget, dwThemeID, FALSE); | 62 pTheme->SetThemeID(pWidget, dwThemeID, FALSE); |
63 } | 63 } |
64 return dwID; | 64 return dwID; |
65 } | 65 } |
66 | 66 |
67 FWL_Error CFWL_Theme::GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) { | 67 FWL_Error CFWL_Theme::GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) { |
68 return FWL_Error::Succeeded; | 68 return FWL_Error::Succeeded; |
69 } | 69 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 return FWL_Error::Succeeded; | 131 return FWL_Error::Succeeded; |
132 } | 132 } |
133 | 133 |
134 CFWL_WidgetTP* CFWL_Theme::GetTheme(IFWL_Widget* pWidget) { | 134 CFWL_WidgetTP* CFWL_Theme::GetTheme(IFWL_Widget* pWidget) { |
135 for (const auto& pTheme : m_ThemesArray) { | 135 for (const auto& pTheme : m_ThemesArray) { |
136 if (pTheme->IsValidWidget(pWidget)) | 136 if (pTheme->IsValidWidget(pWidget)) |
137 return pTheme.get(); | 137 return pTheme.get(); |
138 } | 138 } |
139 return nullptr; | 139 return nullptr; |
140 } | 140 } |
OLD | NEW |