| 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 _FWL_WIDGETTP_H | 7 #ifndef _FWL_WIDGETTP_H |
| 8 #define _FWL_WIDGETTP_H | 8 #define _FWL_WIDGETTP_H |
| 9 class CFX_Object; | |
| 10 class IFWL_ThemeProvider; | 9 class IFWL_ThemeProvider; |
| 11 class IFWL_Widget; | 10 class IFWL_Widget; |
| 12 class IFDE_TextOut; | 11 class IFDE_TextOut; |
| 13 class IFX_Font; | 12 class IFX_Font; |
| 14 class IFX_FontMgr; | 13 class IFX_FontMgr; |
| 15 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 14 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
| 16 class IFX_FontSourceEnum; | 15 class IFX_FontSourceEnum; |
| 17 #endif | 16 #endif |
| 18 class CFWL_WidgetTP; | 17 class CFWL_WidgetTP; |
| 19 class CFWL_ArrowData; | 18 class CFWL_ArrowData; |
| 20 class CFWL_WidgetTP : public CFX_Object | 19 class CFWL_WidgetTP |
| 21 { | 20 { |
| 22 public: | 21 public: |
| 23 virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget); | 22 virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget); |
| 24 virtual FX_DWORD GetThemeID(IFWL_Widget *pWidget); | 23 virtual FX_DWORD GetThemeID(IFWL_Widget *pWidget); |
| 25 virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_
BOOL bChildren = TRUE); | 24 virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_
BOOL bChildren = TRUE); |
| 26 virtual FWL_ERR GetThemeMatrix(IFWL_Widget *pWidget, CFX_Matrix
&matrix); | 25 virtual FWL_ERR GetThemeMatrix(IFWL_Widget *pWidget, CFX_Matrix
&matrix); |
| 27 virtual FWL_ERR SetThemeMatrix(IFWL_Widget *pWidget, const CFX_M
atrix &matrix); | 26 virtual FWL_ERR SetThemeMatrix(IFWL_Widget *pWidget, const CFX_M
atrix &matrix); |
| 28 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams); | 27 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams); |
| 29 virtual FX_BOOL DrawText(CFWL_ThemeText *pParams); | 28 virtual FX_BOOL DrawText(CFWL_ThemeText *pParams); |
| 30 virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapac
ity); | 29 virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapac
ity); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 FX_DWORD m_dwValue; | 63 FX_DWORD m_dwValue; |
| 65 CFX_RectF m_rtMargin; | 64 CFX_RectF m_rtMargin; |
| 66 FX_DWORD m_dwThemeID; | 65 FX_DWORD m_dwThemeID; |
| 67 CFX_Matrix _ctm; | 66 CFX_Matrix _ctm; |
| 68 }; | 67 }; |
| 69 FX_BOOL FWLTHEME_Init(); | 68 FX_BOOL FWLTHEME_Init(); |
| 70 void FWLTHEME_Release(); | 69 void FWLTHEME_Release(); |
| 71 FX_DWORD FWL_GetThemeLayout(FX_DWORD dwThemeID); | 70 FX_DWORD FWL_GetThemeLayout(FX_DWORD dwThemeID); |
| 72 FX_DWORD FWL_GetThemeColor(FX_DWORD dwThemeID); | 71 FX_DWORD FWL_GetThemeColor(FX_DWORD dwThemeID); |
| 73 FX_DWORD FWL_MakeThemeID(FX_DWORD dwLayout, FX_DWORD dwColor); | 72 FX_DWORD FWL_MakeThemeID(FX_DWORD dwLayout, FX_DWORD dwColor); |
| 74 class CFWL_ArrowData : public CFX_Object | 73 class CFWL_ArrowData |
| 75 { | 74 { |
| 76 public: | 75 public: |
| 77 static CFWL_ArrowData* GetInstance(); | 76 static CFWL_ArrowData* GetInstance(); |
| 78 static FX_BOOL IsInstance(); | 77 static FX_BOOL IsInstance(); |
| 79 static void DestroyInstance(); | 78 static void DestroyInstance(); |
| 80 virtual ~CFWL_ArrowData(); | 79 virtual ~CFWL_ArrowData(); |
| 81 void SetColorData(FX_DWORD dwID); | 80 void SetColorData(FX_DWORD dwID); |
| 82 | 81 |
| 83 class CColorData : public CFX_Object | 82 class CColorData |
| 84 { | 83 { |
| 85 public: | 84 public: |
| 86 FX_ARGB clrBorder[4]; | 85 FX_ARGB clrBorder[4]; |
| 87 FX_ARGB clrStart[4]; | 86 FX_ARGB clrStart[4]; |
| 88 FX_ARGB clrEnd[4]; | 87 FX_ARGB clrEnd[4]; |
| 89 FX_ARGB clrSign[4]; | 88 FX_ARGB clrSign[4]; |
| 90 } *m_pColorData; | 89 } *m_pColorData; |
| 91 protected: | 90 protected: |
| 92 CFWL_ArrowData(); | 91 CFWL_ArrowData(); |
| 93 static CFWL_ArrowData *m_pInstance; | 92 static CFWL_ArrowData *m_pInstance; |
| 94 }; | 93 }; |
| 95 class CFWL_FontData : public CFX_Object | 94 class CFWL_FontData |
| 96 { | 95 { |
| 97 public: | 96 public: |
| 98 CFWL_FontData(); | 97 CFWL_FontData(); |
| 99 virtual ~CFWL_FontData(); | 98 virtual ~CFWL_FontData(); |
| 100 FX_BOOL Equal(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage
); | 99 FX_BOOL Equal(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage
); |
| 101 FX_BOOL LoadFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodeP
age); | 100 FX_BOOL LoadFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodeP
age); |
| 102 IFX_Font* GetFont() const | 101 IFX_Font* GetFont() const |
| 103 { | 102 { |
| 104 return m_pFont; | 103 return m_pFont; |
| 105 } | 104 } |
| 106 protected: | 105 protected: |
| 107 CFX_WideString m_wsFamily; | 106 CFX_WideString m_wsFamily; |
| 108 FX_DWORD m_dwStyles; | 107 FX_DWORD m_dwStyles; |
| 109 FX_DWORD m_dwCodePage; | 108 FX_DWORD m_dwCodePage; |
| 110 IFX_Font *m_pFont; | 109 IFX_Font *m_pFont; |
| 111 IFX_FontMgr *m_pFontMgr; | 110 IFX_FontMgr *m_pFontMgr; |
| 112 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 111 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
| 113 IFX_FontSourceEnum *m_pFontSource; | 112 IFX_FontSourceEnum *m_pFontSource; |
| 114 #endif | 113 #endif |
| 115 }; | 114 }; |
| 116 class CFWL_FontManager : public CFX_Object | 115 class CFWL_FontManager |
| 117 { | 116 { |
| 118 public: | 117 public: |
| 119 CFWL_FontManager(); | 118 CFWL_FontManager(); |
| 120 virtual ~CFWL_FontManager(); | 119 virtual ~CFWL_FontManager(); |
| 121 IFX_Font* FindFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD dwCo
dePage); | 120 IFX_Font* FindFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD dwCo
dePage); |
| 122 protected: | 121 protected: |
| 123 CFX_PtrArray m_arrFonts; | 122 CFX_PtrArray m_arrFonts; |
| 124 }; | 123 }; |
| 125 CFWL_FontManager *FWL_GetFontManager(); | 124 CFWL_FontManager *FWL_GetFontManager(); |
| 126 #endif | 125 #endif |
| OLD | NEW |