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_FXFA_APP_XFA_FWLTHEME_H_ | 7 #ifndef XFA_FXFA_APP_XFA_FWLTHEME_H_ |
8 #define XFA_FXFA_APP_XFA_FWLTHEME_H_ | 8 #define XFA_FXFA_APP_XFA_FWLTHEME_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 24 matching lines...) Expand all Loading... |
35 uint32_t GetHashCode() const { return 0; } | 35 uint32_t GetHashCode() const { return 0; } |
36 FWL_Error Initialize(); | 36 FWL_Error Initialize(); |
37 FWL_Error Finalize(); | 37 FWL_Error Finalize(); |
38 | 38 |
39 // IFWL_ThemeProvider: | 39 // IFWL_ThemeProvider: |
40 bool IsValidWidget(IFWL_Widget* pWidget) override; | 40 bool IsValidWidget(IFWL_Widget* pWidget) override; |
41 uint32_t GetThemeID(IFWL_Widget* pWidget) override; | 41 uint32_t GetThemeID(IFWL_Widget* pWidget) override; |
42 uint32_t SetThemeID(IFWL_Widget* pWidget, | 42 uint32_t SetThemeID(IFWL_Widget* pWidget, |
43 uint32_t dwThemeID, | 43 uint32_t dwThemeID, |
44 FX_BOOL bChildren = TRUE) override; | 44 FX_BOOL bChildren = TRUE) override; |
45 FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) override { | 45 FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) override; |
46 return FWL_Error::Succeeded; | |
47 } | |
48 FWL_Error SetThemeMatrix(IFWL_Widget* pWidget, | 46 FWL_Error SetThemeMatrix(IFWL_Widget* pWidget, |
49 const CFX_Matrix& matrix) override { | 47 const CFX_Matrix& matrix) override; |
50 return FWL_Error::Succeeded; | |
51 } | |
52 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override; | 48 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override; |
53 FX_BOOL DrawText(CFWL_ThemeText* pParams) override; | 49 FX_BOOL DrawText(CFWL_ThemeText* pParams) override; |
54 void* GetCapacity(CFWL_ThemePart* pThemePart, | 50 void* GetCapacity(CFWL_ThemePart* pThemePart, |
55 CFWL_WidgetCapacity dwCapacity) override; | 51 CFWL_WidgetCapacity dwCapacity) override; |
56 FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) override; | 52 FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) override; |
57 FWL_Error GetPartRect(CFWL_ThemePart* pThemePart, | 53 FWL_Error GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart) override; |
58 CFX_RectF& rtPart) override { | |
59 return FWL_Error::Succeeded; | |
60 } | |
61 FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, | 54 FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, |
62 FX_FLOAT fx, | 55 FX_FLOAT fx, |
63 FX_FLOAT fy) override; | 56 FX_FLOAT fy) override; |
64 FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) override; | 57 FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) override; |
65 | 58 |
66 FWL_Error GetPartRect(CFWL_ThemePart* pThemePart); | 59 FWL_Error GetPartRect(CFWL_ThemePart* pThemePart); |
67 | 60 |
68 protected: | 61 protected: |
69 CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget); | 62 CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget); |
70 CFWL_CheckBoxTP* m_pCheckBoxTP; | 63 CFWL_CheckBoxTP* m_pCheckBoxTP; |
(...skipping 12 matching lines...) Expand all Loading... |
83 uint32_t m_dwCapacity; | 76 uint32_t m_dwCapacity; |
84 CFGAS_GEFont* m_pCalendarFont; | 77 CFGAS_GEFont* m_pCalendarFont; |
85 CFX_WideString m_wsResource; | 78 CFX_WideString m_wsResource; |
86 CXFA_FFApp* m_pApp; | 79 CXFA_FFApp* m_pApp; |
87 CFX_RectF m_Rect; | 80 CFX_RectF m_Rect; |
88 CFX_SizeF m_SizeAboveBelow; | 81 CFX_SizeF m_SizeAboveBelow; |
89 }; | 82 }; |
90 class CXFA_FWLCheckBoxTP : public CFWL_CheckBoxTP { | 83 class CXFA_FWLCheckBoxTP : public CFWL_CheckBoxTP { |
91 public: | 84 public: |
92 CXFA_FWLCheckBoxTP(); | 85 CXFA_FWLCheckBoxTP(); |
93 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); | 86 |
| 87 // CFWL_CheckBoxTP |
| 88 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override; |
94 | 89 |
95 protected: | 90 protected: |
96 void DrawCheckSign(IFWL_Widget* pWidget, | 91 void DrawCheckSign(IFWL_Widget* pWidget, |
97 CFX_Graphics* pGraphics, | 92 CFX_Graphics* pGraphics, |
98 const CFX_RectF* pRtBox, | 93 const CFX_RectF* pRtBox, |
99 int32_t iState, | 94 int32_t iState, |
100 CFX_Matrix* pMatrix); | 95 CFX_Matrix* pMatrix); |
101 }; | 96 }; |
102 class CXFA_FWLEditTP : public CFWL_EditTP { | 97 class CXFA_FWLEditTP : public CFWL_EditTP { |
103 public: | 98 public: |
104 CXFA_FWLEditTP(); | 99 CXFA_FWLEditTP(); |
105 virtual ~CXFA_FWLEditTP(); | 100 ~CXFA_FWLEditTP() override; |
106 | 101 |
107 public: | 102 // CFWL_EditTP |
108 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); | 103 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override; |
109 }; | 104 }; |
110 | 105 |
111 #endif // XFA_FXFA_APP_XFA_FWLTHEME_H_ | 106 #endif // XFA_FXFA_APP_XFA_FWLTHEME_H_ |
OLD | NEW |