| 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_THEME_CFWL_WIDGETTP_H_ | 7 #ifndef XFA_FWL_THEME_CFWL_WIDGETTP_H_ |
| 8 #define XFA_FWL_THEME_CFWL_WIDGETTP_H_ | 8 #define XFA_FWL_THEME_CFWL_WIDGETTP_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 class CFWL_ThemeBackground; | 99 class CFWL_ThemeBackground; |
| 100 class CFWL_ThemePart; | 100 class CFWL_ThemePart; |
| 101 class CFWL_ThemeText; | 101 class CFWL_ThemeText; |
| 102 | 102 |
| 103 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 103 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
| 104 class CFX_FontSourceEnum_File; | 104 class CFX_FontSourceEnum_File; |
| 105 #endif | 105 #endif |
| 106 | 106 |
| 107 class CFWL_WidgetTP { | 107 class CFWL_WidgetTP { |
| 108 public: | 108 public: |
| 109 virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); | 109 virtual ~CFWL_WidgetTP(); |
| 110 |
| 111 virtual FWL_Error Initialize(); |
| 112 virtual FWL_Error Finalize(); |
| 113 |
| 114 virtual bool IsValidWidget(IFWL_Widget* pWidget); |
| 110 virtual uint32_t GetThemeID(IFWL_Widget* pWidget); | 115 virtual uint32_t GetThemeID(IFWL_Widget* pWidget); |
| 111 virtual uint32_t SetThemeID(IFWL_Widget* pWidget, | 116 virtual uint32_t SetThemeID(IFWL_Widget* pWidget, |
| 112 uint32_t dwThemeID, | 117 uint32_t dwThemeID, |
| 113 FX_BOOL bChildren = TRUE); | 118 FX_BOOL bChildren = TRUE); |
| 114 virtual FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix); | 119 virtual FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix); |
| 115 virtual FWL_Error SetThemeMatrix(IFWL_Widget* pWidget, | 120 virtual FWL_Error SetThemeMatrix(IFWL_Widget* pWidget, |
| 116 const CFX_Matrix& matrix); | 121 const CFX_Matrix& matrix); |
| 117 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); | 122 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); |
| 118 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); | 123 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); |
| 119 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, | 124 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, |
| 120 CFWL_WidgetCapacity dwCapacity); | 125 CFWL_WidgetCapacity dwCapacity); |
| 121 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget); | 126 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget); |
| 122 virtual FWL_Error GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart); | 127 virtual FWL_Error GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart); |
| 123 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, | 128 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, |
| 124 FX_FLOAT fx, | 129 FX_FLOAT fx, |
| 125 FX_FLOAT fy); | 130 FX_FLOAT fy); |
| 126 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect); | 131 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect); |
| 127 virtual FWL_Error Initialize(); | 132 |
| 128 virtual FWL_Error Finalize(); | |
| 129 virtual ~CFWL_WidgetTP(); | |
| 130 FWL_Error SetFont(IFWL_Widget* pWidget, | 133 FWL_Error SetFont(IFWL_Widget* pWidget, |
| 131 const FX_WCHAR* strFont, | 134 const FX_WCHAR* strFont, |
| 132 FX_FLOAT fFontSize, | 135 FX_FLOAT fFontSize, |
| 133 FX_ARGB rgbFont); | 136 FX_ARGB rgbFont); |
| 134 FWL_Error SetFont(IFWL_Widget* pWidget, | 137 FWL_Error SetFont(IFWL_Widget* pWidget, |
| 135 IFX_Font* pFont, | 138 IFX_Font* pFont, |
| 136 FX_FLOAT fFontSize, | 139 FX_FLOAT fFontSize, |
| 137 FX_ARGB rgbFont); | 140 FX_ARGB rgbFont); |
| 138 IFX_Font* GetFont(IFWL_Widget* pWidget); | 141 IFX_Font* GetFont(IFWL_Widget* pWidget); |
| 139 | 142 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 288 |
| 286 protected: | 289 protected: |
| 287 CFWL_FontManager(); | 290 CFWL_FontManager(); |
| 288 virtual ~CFWL_FontManager(); | 291 virtual ~CFWL_FontManager(); |
| 289 | 292 |
| 290 static CFWL_FontManager* s_FontManager; | 293 static CFWL_FontManager* s_FontManager; |
| 291 std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray; | 294 std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray; |
| 292 }; | 295 }; |
| 293 | 296 |
| 294 #endif // XFA_FWL_THEME_CFWL_WIDGETTP_H_ | 297 #endif // XFA_FWL_THEME_CFWL_WIDGETTP_H_ |
| OLD | NEW |