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_THEME_FORMTP_H_ | 7 #ifndef XFA_INCLUDE_FWL_THEME_FORMTP_H_ |
8 #define XFA_INCLUDE_FWL_THEME_FORMTP_H_ | 8 #define XFA_INCLUDE_FWL_THEME_FORMTP_H_ |
9 | 9 |
10 #include "xfa/include/fwl/theme/utils.h" | 10 #include "xfa/include/fwl/theme/utils.h" |
11 #include "xfa/include/fwl/theme/widgettp.h" | 11 #include "xfa/include/fwl/theme/widgettp.h" |
12 | 12 |
13 class CFWL_FormTP : public CFWL_WidgetTP { | 13 class CFWL_FormTP : public CFWL_WidgetTP { |
14 public: | 14 public: |
15 CFWL_FormTP(); | 15 CFWL_FormTP(); |
16 virtual ~CFWL_FormTP(); | 16 virtual ~CFWL_FormTP(); |
17 | 17 |
18 virtual FWL_ERR Initialize(); | 18 virtual FWL_ERR Initialize(); |
19 virtual FWL_ERR Finalize(); | 19 virtual FWL_ERR Finalize(); |
20 virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); | 20 virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); |
21 virtual FX_DWORD SetThemeID(IFWL_Widget* pWidget, | 21 virtual uint32_t SetThemeID(IFWL_Widget* pWidget, |
22 FX_DWORD dwThemeID, | 22 uint32_t dwThemeID, |
23 FX_BOOL bChildren = TRUE); | 23 FX_BOOL bChildren = TRUE); |
24 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); | 24 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); |
25 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); | 25 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); |
26 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity); | 26 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, uint32_t dwCapacity); |
27 virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart); | 27 virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart); |
28 | 28 |
29 protected: | 29 protected: |
30 void CalCloseBox(IFWL_Widget* pWidget, CFX_RectF& rect); | 30 void CalCloseBox(IFWL_Widget* pWidget, CFX_RectF& rect); |
31 void CalMaxBox(IFWL_Widget* pWidget, CFX_RectF& rect); | 31 void CalMaxBox(IFWL_Widget* pWidget, CFX_RectF& rect); |
32 void CalMinBox(IFWL_Widget* pWidget, CFX_RectF& rect); | 32 void CalMinBox(IFWL_Widget* pWidget, CFX_RectF& rect); |
33 void CalCaption(IFWL_Widget* pWidget, CFX_RectF& rect); | 33 void CalCaption(IFWL_Widget* pWidget, CFX_RectF& rect); |
34 void CalIcon(IFWL_Widget* pWidget, CFX_RectF& rect); | 34 void CalIcon(IFWL_Widget* pWidget, CFX_RectF& rect); |
35 | 35 |
36 void DrawFormBorder(CFX_Graphics* pGraphics, | 36 void DrawFormBorder(CFX_Graphics* pGraphics, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 FWLTHEME_STATE eState, | 68 FWLTHEME_STATE eState, |
69 FX_BOOL bMax, | 69 FX_BOOL bMax, |
70 CFX_Matrix* pMatrix, | 70 CFX_Matrix* pMatrix, |
71 int32_t iActive = 0); | 71 int32_t iActive = 0); |
72 void DrawIconImage(CFX_Graphics* pGraphics, | 72 void DrawIconImage(CFX_Graphics* pGraphics, |
73 CFX_DIBitmap* pDIBitmap, | 73 CFX_DIBitmap* pDIBitmap, |
74 const CFX_RectF* pRect, | 74 const CFX_RectF* pRect, |
75 FWLTHEME_STATE eState, | 75 FWLTHEME_STATE eState, |
76 CFX_Matrix* pMatrix, | 76 CFX_Matrix* pMatrix, |
77 int32_t iActive = 0); | 77 int32_t iActive = 0); |
78 void SetThemeData(FX_DWORD dwID); | 78 void SetThemeData(uint32_t dwID); |
79 void TransModeColor(FX_ARGB clrFore, FX_ARGB& clrBack); | 79 void TransModeColor(FX_ARGB clrFore, FX_ARGB& clrBack); |
80 void DeactiveForm(); | 80 void DeactiveForm(); |
81 void InitCaption(FX_BOOL bActive); | 81 void InitCaption(FX_BOOL bActive); |
82 CFX_DIBitmap* m_pActiveBitmap; | 82 CFX_DIBitmap* m_pActiveBitmap; |
83 CFX_DIBitmap* m_pDeactivebitmap; | 83 CFX_DIBitmap* m_pDeactivebitmap; |
84 CFX_RectF m_rtDisCaption; | 84 CFX_RectF m_rtDisCaption; |
85 CFX_RectF m_rtDisLBorder; | 85 CFX_RectF m_rtDisLBorder; |
86 CFX_RectF m_rtDisRBorder; | 86 CFX_RectF m_rtDisRBorder; |
87 CFX_RectF m_rtDisBBorder; | 87 CFX_RectF m_rtDisBBorder; |
88 struct SBThemeData { | 88 struct SBThemeData { |
(...skipping 13 matching lines...) Expand all Loading... |
102 FX_ARGB clrBtnEdgeOut[2]; | 102 FX_ARGB clrBtnEdgeOut[2]; |
103 FX_ARGB clrBtnCornerLight[2][3]; | 103 FX_ARGB clrBtnCornerLight[2][3]; |
104 FX_ARGB clrHeadText[2]; | 104 FX_ARGB clrHeadText[2]; |
105 FX_ARGB clrFormBorder[2][5]; | 105 FX_ARGB clrFormBorder[2][5]; |
106 FX_ARGB clrFormBorderLight[2]; | 106 FX_ARGB clrFormBorderLight[2]; |
107 FX_ARGB clrTransWhite; | 107 FX_ARGB clrTransWhite; |
108 } * m_pThemeData; | 108 } * m_pThemeData; |
109 }; | 109 }; |
110 | 110 |
111 #endif // XFA_INCLUDE_FWL_THEME_FORMTP_H_ | 111 #endif // XFA_INCLUDE_FWL_THEME_FORMTP_H_ |
OLD | NEW |