| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef XFA_INCLUDE_FWL_THEME_FORMTP_H_ | |
| 8 #define XFA_INCLUDE_FWL_THEME_FORMTP_H_ | |
| 9 | |
| 10 #include "xfa/include/fwl/theme/utils.h" | |
| 11 #include "xfa/include/fwl/theme/widgettp.h" | |
| 12 | |
| 13 class CFWL_FormTP : public CFWL_WidgetTP { | |
| 14 public: | |
| 15 CFWL_FormTP(); | |
| 16 virtual ~CFWL_FormTP(); | |
| 17 | |
| 18 virtual FWL_ERR Initialize(); | |
| 19 virtual FWL_ERR Finalize(); | |
| 20 virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); | |
| 21 virtual uint32_t SetThemeID(IFWL_Widget* pWidget, | |
| 22 uint32_t dwThemeID, | |
| 23 FX_BOOL bChildren = TRUE); | |
| 24 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); | |
| 25 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); | |
| 26 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, uint32_t dwCapacity); | |
| 27 virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart); | |
| 28 | |
| 29 protected: | |
| 30 void CalCloseBox(IFWL_Widget* pWidget, CFX_RectF& rect); | |
| 31 void CalMaxBox(IFWL_Widget* pWidget, CFX_RectF& rect); | |
| 32 void CalMinBox(IFWL_Widget* pWidget, CFX_RectF& rect); | |
| 33 void CalCaption(IFWL_Widget* pWidget, CFX_RectF& rect); | |
| 34 void CalIcon(IFWL_Widget* pWidget, CFX_RectF& rect); | |
| 35 | |
| 36 void DrawFormBorder(CFX_Graphics* pGraphics, | |
| 37 const CFX_RectF* pRect, | |
| 38 FWLTHEME_STATE eState, | |
| 39 CFX_Matrix* pMatrix, | |
| 40 int32_t iActive = 0); | |
| 41 void DrawCaption(CFX_Graphics* pGraphics, | |
| 42 const CFX_RectF* pRect, | |
| 43 FWLTHEME_STATE eState, | |
| 44 CFX_Matrix* pMatrix, | |
| 45 int32_t iActive = 0); | |
| 46 void DrawNarrowCaption(CFX_Graphics* pGraphics, | |
| 47 const CFX_RectF* pRect, | |
| 48 FWLTHEME_STATE eState, | |
| 49 CFX_Matrix* pMatrix, | |
| 50 int32_t iActive = 0); | |
| 51 void DrawCloseBox(CFX_Graphics* pGraphics, | |
| 52 const CFX_RectF* pRect, | |
| 53 FWLTHEME_STATE eState, | |
| 54 CFX_Matrix* pMatrix, | |
| 55 int32_t iActive = 0); | |
| 56 void DrawMinMaxBoxCommon(CFX_Graphics* pGraphics, | |
| 57 const CFX_RectF* pRect, | |
| 58 FWLTHEME_STATE eState, | |
| 59 CFX_Matrix* pMatrix, | |
| 60 int32_t iActive = 0); | |
| 61 void DrawMinimizeBox(CFX_Graphics* pGraphics, | |
| 62 const CFX_RectF* pRect, | |
| 63 FWLTHEME_STATE eState, | |
| 64 CFX_Matrix* pMatrix, | |
| 65 int32_t iActive = 0); | |
| 66 void DrawMaximizeBox(CFX_Graphics* pGraphics, | |
| 67 const CFX_RectF* pRect, | |
| 68 FWLTHEME_STATE eState, | |
| 69 FX_BOOL bMax, | |
| 70 CFX_Matrix* pMatrix, | |
| 71 int32_t iActive = 0); | |
| 72 void DrawIconImage(CFX_Graphics* pGraphics, | |
| 73 CFX_DIBitmap* pDIBitmap, | |
| 74 const CFX_RectF* pRect, | |
| 75 FWLTHEME_STATE eState, | |
| 76 CFX_Matrix* pMatrix, | |
| 77 int32_t iActive = 0); | |
| 78 void SetThemeData(uint32_t dwID); | |
| 79 void TransModeColor(FX_ARGB clrFore, FX_ARGB& clrBack); | |
| 80 void DeactiveForm(); | |
| 81 void InitCaption(FX_BOOL bActive); | |
| 82 CFX_DIBitmap* m_pActiveBitmap; | |
| 83 CFX_DIBitmap* m_pDeactivebitmap; | |
| 84 CFX_RectF m_rtDisCaption; | |
| 85 CFX_RectF m_rtDisLBorder; | |
| 86 CFX_RectF m_rtDisRBorder; | |
| 87 CFX_RectF m_rtDisBBorder; | |
| 88 struct SBThemeData { | |
| 89 FX_ARGB clrHeadBK[2][4]; | |
| 90 FX_ARGB clrHeadEdgeLeft[2][3]; | |
| 91 FX_ARGB clrHeadEdgeRight[2][3]; | |
| 92 FX_ARGB clrHeadEdgeTop[2][3]; | |
| 93 FX_ARGB clrHeadEdgeBottom[2][3]; | |
| 94 FX_ARGB clrCloseBtBKStart[2][3]; | |
| 95 FX_ARGB clrCloseBtBKEnd[2][3]; | |
| 96 FX_ARGB clrCloseBtEdgeLight[2][3]; | |
| 97 FX_ARGB clrCloseBtEdgeDark[2][3]; | |
| 98 FX_ARGB clrNormalBtBKStart[2][3]; | |
| 99 FX_ARGB clrNormalBtBKEnd[2][3]; | |
| 100 FX_ARGB clrNormalBtEdgeLight[2][3]; | |
| 101 FX_ARGB clrNormalBtEdgeDark[2][3]; | |
| 102 FX_ARGB clrBtnEdgeOut[2]; | |
| 103 FX_ARGB clrBtnCornerLight[2][3]; | |
| 104 FX_ARGB clrHeadText[2]; | |
| 105 FX_ARGB clrFormBorder[2][5]; | |
| 106 FX_ARGB clrFormBorderLight[2]; | |
| 107 FX_ARGB clrTransWhite; | |
| 108 } * m_pThemeData; | |
| 109 }; | |
| 110 | |
| 111 #endif // XFA_INCLUDE_FWL_THEME_FORMTP_H_ | |
| OLD | NEW |