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_INCLUDE_FWL_CORE_FWL_THEME_H_ | 7 #ifndef XFA_INCLUDE_FWL_CORE_FWL_THEME_H_ |
8 #define XFA_INCLUDE_FWL_CORE_FWL_THEME_H_ | 8 #define XFA_INCLUDE_FWL_CORE_FWL_THEME_H_ |
9 | 9 |
| 10 #include "xfa/include/fwl/core/fwl_error.h" |
| 11 #include "xfa/include/fxgraphics/fx_graphics.h" |
| 12 |
10 class IFWL_Widget; | 13 class IFWL_Widget; |
11 class CFWL_ThemePart; | 14 |
12 class CFWL_ThemeBackground; | |
13 class CFWL_ThemeText; | |
14 class CFWL_ThemeElement; | |
15 class IFWL_ThemeProvider; | |
16 #define FWL_WGTCAPACITY_CXBorder 1 | 15 #define FWL_WGTCAPACITY_CXBorder 1 |
17 #define FWL_WGTCAPACITY_CYBorder 2 | 16 #define FWL_WGTCAPACITY_CYBorder 2 |
18 #define FWL_WGTCAPACITY_ScrollBarWidth 3 | 17 #define FWL_WGTCAPACITY_ScrollBarWidth 3 |
19 #define FWL_WGTCAPACITY_EdgeFlat 4 | 18 #define FWL_WGTCAPACITY_EdgeFlat 4 |
20 #define FWL_WGTCAPACITY_EdgeRaised 5 | 19 #define FWL_WGTCAPACITY_EdgeRaised 5 |
21 #define FWL_WGTCAPACITY_EdgeSunken 6 | 20 #define FWL_WGTCAPACITY_EdgeSunken 6 |
22 #define FWL_WGTCAPACITY_Font 7 | 21 #define FWL_WGTCAPACITY_Font 7 |
23 #define FWL_WGTCAPACITY_FontSize 8 | 22 #define FWL_WGTCAPACITY_FontSize 8 |
24 #define FWL_WGTCAPACITY_TextColor 9 | 23 #define FWL_WGTCAPACITY_TextColor 9 |
25 #define FWL_WGTCAPACITY_TextSelColor 10 | 24 #define FWL_WGTCAPACITY_TextSelColor 10 |
26 #define FWL_WGTCAPACITY_LineHeight 11 | 25 #define FWL_WGTCAPACITY_LineHeight 11 |
27 #define FWL_WGTCAPACITY_UIMargin 12 | 26 #define FWL_WGTCAPACITY_UIMargin 12 |
28 #define FWL_WGTCAPACITY_SpaceAboveBelow 13 | 27 #define FWL_WGTCAPACITY_SpaceAboveBelow 13 |
29 #define FWL_WGTCAPACITY_MAX 65535 | 28 #define FWL_WGTCAPACITY_MAX 65535 |
| 29 |
30 class CFWL_ThemePart { | 30 class CFWL_ThemePart { |
31 public: | 31 public: |
32 CFWL_ThemePart() | 32 CFWL_ThemePart() |
33 : m_pWidget(NULL), m_iPart(0), m_dwStates(0), m_dwData(0), m_pData(NULL) { | 33 : m_pWidget(NULL), m_iPart(0), m_dwStates(0), m_dwData(0), m_pData(NULL) { |
34 m_rtPart.Reset(); | 34 m_rtPart.Reset(); |
35 m_matrix.SetIdentity(); | 35 m_matrix.SetIdentity(); |
36 } | 36 } |
37 CFX_Matrix m_matrix; | 37 CFX_Matrix m_matrix; |
38 CFX_RectF m_rtPart; | 38 CFX_RectF m_rtPart; |
39 IFWL_Widget* m_pWidget; | 39 IFWL_Widget* m_pWidget; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) = 0; | 75 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) = 0; |
76 virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, | 76 virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, |
77 CFX_RectF& rtPart) = 0; | 77 CFX_RectF& rtPart) = 0; |
78 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, | 78 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, |
79 FX_FLOAT fx, | 79 FX_FLOAT fx, |
80 FX_FLOAT fy) = 0; | 80 FX_FLOAT fy) = 0; |
81 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) = 0; | 81 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) = 0; |
82 }; | 82 }; |
83 | 83 |
84 #endif // XFA_INCLUDE_FWL_CORE_FWL_THEME_H_ | 84 #endif // XFA_INCLUDE_FWL_CORE_FWL_THEME_H_ |
OLD | NEW |