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 #ifndef XFA_FWL_CORE_IFWL_THEMEPROVIDER_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_THEMEPROVIDER_H_ |
8 #define XFA_FWL_CORE_IFWL_THEMEPROVIDER_H_ | 8 #define XFA_FWL_CORE_IFWL_THEMEPROVIDER_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_coordinates.h" | 10 #include "core/fxcrt/include/fx_coordinates.h" |
11 #include "core/fxcrt/include/fx_system.h" | 11 #include "core/fxcrt/include/fx_system.h" |
12 #include "xfa/fwl/core/fwl_error.h" | 12 #include "xfa/fwl/core/fwl_error.h" |
13 #include "xfa/fwl/theme/cfwl_widgettp.h" | 13 #include "xfa/fwl/theme/cfwl_widgettp.h" |
14 | 14 |
15 class CFWL_ThemeBackground; | 15 class CFWL_ThemeBackground; |
16 class CFWL_ThemePart; | 16 class CFWL_ThemePart; |
17 class CFWL_ThemeText; | 17 class CFWL_ThemeText; |
18 class IFWL_Widget; | 18 class IFWL_Widget; |
19 | 19 |
20 class IFWL_ThemeProvider { | 20 class IFWL_ThemeProvider { |
21 public: | 21 public: |
22 virtual ~IFWL_ThemeProvider() {} | 22 virtual ~IFWL_ThemeProvider() {} |
23 virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget) = 0; | 23 virtual bool IsValidWidget(IFWL_Widget* pWidget) = 0; |
24 virtual uint32_t GetThemeID(IFWL_Widget* pWidget) = 0; | 24 virtual uint32_t GetThemeID(IFWL_Widget* pWidget) = 0; |
25 virtual uint32_t SetThemeID(IFWL_Widget* pWidget, | 25 virtual uint32_t SetThemeID(IFWL_Widget* pWidget, |
26 uint32_t dwThemeID, | 26 uint32_t dwThemeID, |
27 FX_BOOL bChildren = TRUE) = 0; | 27 FX_BOOL bChildren = TRUE) = 0; |
28 virtual FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, | 28 virtual FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, |
29 CFX_Matrix& matrix) = 0; | 29 CFX_Matrix& matrix) = 0; |
30 virtual FWL_Error SetThemeMatrix(IFWL_Widget* pWidget, | 30 virtual FWL_Error SetThemeMatrix(IFWL_Widget* pWidget, |
31 const CFX_Matrix& matrix) = 0; | 31 const CFX_Matrix& matrix) = 0; |
32 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) = 0; | 32 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) = 0; |
33 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams) = 0; | 33 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams) = 0; |
34 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, | 34 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, |
35 CFWL_WidgetCapacity dwCapacity) = 0; | 35 CFWL_WidgetCapacity dwCapacity) = 0; |
36 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) = 0; | 36 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) = 0; |
37 virtual FWL_Error GetPartRect(CFWL_ThemePart* pThemePart, | 37 virtual FWL_Error GetPartRect(CFWL_ThemePart* pThemePart, |
38 CFX_RectF& rtPart) = 0; | 38 CFX_RectF& rtPart) = 0; |
39 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, | 39 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, |
40 FX_FLOAT fx, | 40 FX_FLOAT fx, |
41 FX_FLOAT fy) = 0; | 41 FX_FLOAT fy) = 0; |
42 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) = 0; | 42 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) = 0; |
43 }; | 43 }; |
44 | 44 |
45 #endif // XFA_FWL_CORE_IFWL_THEMEPROVIDER_H_ | 45 #endif // XFA_FWL_CORE_IFWL_THEMEPROVIDER_H_ |
OLD | NEW |