| 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 "../../../foxitlib.h" | 7 #include "xfa/src/foxitlib.h" |
| 8 FX_BOOL CFWL_Theme::IsValidWidget(IFWL_Widget* pWidget) { | 8 FX_BOOL CFWL_Theme::IsValidWidget(IFWL_Widget* pWidget) { |
| 9 return !!GetTheme(pWidget); | 9 return !!GetTheme(pWidget); |
| 10 } | 10 } |
| 11 FX_DWORD CFWL_Theme::GetThemeID(IFWL_Widget* pWidget) { | 11 FX_DWORD CFWL_Theme::GetThemeID(IFWL_Widget* pWidget) { |
| 12 return GetTheme(pWidget)->GetThemeID(pWidget); | 12 return GetTheme(pWidget)->GetThemeID(pWidget); |
| 13 } | 13 } |
| 14 FX_DWORD CFWL_Theme::SetThemeID(IFWL_Widget* pWidget, | 14 FX_DWORD CFWL_Theme::SetThemeID(IFWL_Widget* pWidget, |
| 15 FX_DWORD dwThemeID, | 15 FX_DWORD dwThemeID, |
| 16 FX_BOOL bChildren) { | 16 FX_BOOL bChildren) { |
| 17 int32_t iCount = m_arrThemes.GetSize(); | 17 int32_t iCount = m_arrThemes.GetSize(); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 CFWL_WidgetTP* CFWL_Theme::GetTheme(IFWL_Widget* pWidget) { | 131 CFWL_WidgetTP* CFWL_Theme::GetTheme(IFWL_Widget* pWidget) { |
| 132 int32_t iCount = m_arrThemes.GetSize(); | 132 int32_t iCount = m_arrThemes.GetSize(); |
| 133 for (int32_t i = 0; i < iCount; i++) { | 133 for (int32_t i = 0; i < iCount; i++) { |
| 134 CFWL_WidgetTP* pTheme = static_cast<CFWL_WidgetTP*>(m_arrThemes[i]); | 134 CFWL_WidgetTP* pTheme = static_cast<CFWL_WidgetTP*>(m_arrThemes[i]); |
| 135 if (pTheme->IsValidWidget(pWidget)) { | 135 if (pTheme->IsValidWidget(pWidget)) { |
| 136 return pTheme; | 136 return pTheme; |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 return NULL; | 139 return NULL; |
| 140 } | 140 } |
| OLD | NEW |