Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: xfa/fwl/theme/cfwl_widgettp.h

Issue 2037563002: Replace IFGAS_Font with underlying concrete type (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_editimp.cpp ('k') | xfa/fwl/theme/cfwl_widgettp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 UIMargin, 84 UIMargin,
85 VSepHeight, 85 VSepHeight,
86 VSepWidth, 86 VSepWidth,
87 WeekHeight, 87 WeekHeight,
88 WeekNumHeight, 88 WeekNumHeight,
89 WeekNumWidth, 89 WeekNumWidth,
90 WeekWidth, 90 WeekWidth,
91 Width 91 Width
92 }; 92 };
93 93
94 class IFWL_Widget;
95 class CFDE_TextOut; 94 class CFDE_TextOut;
96 class IFGAS_Font; 95 class CFGAS_GEFont;
97 class IFGAS_FontMgr;
98 class CFWL_ArrowData; 96 class CFWL_ArrowData;
99 class CFWL_ThemeBackground; 97 class CFWL_ThemeBackground;
100 class CFWL_ThemePart; 98 class CFWL_ThemePart;
101 class CFWL_ThemeText; 99 class CFWL_ThemeText;
100 class IFGAS_FontMgr;
101 class IFWL_Widget;
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 ~CFWL_WidgetTP(); 109 virtual ~CFWL_WidgetTP();
110 110
111 virtual FWL_Error Initialize(); 111 virtual FWL_Error Initialize();
(...skipping 16 matching lines...) Expand all
128 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, 128 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
129 FX_FLOAT fx, 129 FX_FLOAT fx,
130 FX_FLOAT fy); 130 FX_FLOAT fy);
131 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect); 131 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect);
132 132
133 FWL_Error SetFont(IFWL_Widget* pWidget, 133 FWL_Error SetFont(IFWL_Widget* pWidget,
134 const FX_WCHAR* strFont, 134 const FX_WCHAR* strFont,
135 FX_FLOAT fFontSize, 135 FX_FLOAT fFontSize,
136 FX_ARGB rgbFont); 136 FX_ARGB rgbFont);
137 FWL_Error SetFont(IFWL_Widget* pWidget, 137 FWL_Error SetFont(IFWL_Widget* pWidget,
138 IFGAS_Font* pFont, 138 CFGAS_GEFont* pFont,
139 FX_FLOAT fFontSize, 139 FX_FLOAT fFontSize,
140 FX_ARGB rgbFont); 140 FX_ARGB rgbFont);
141 IFGAS_Font* GetFont(IFWL_Widget* pWidget); 141 CFGAS_GEFont* GetFont(IFWL_Widget* pWidget);
142 142
143 protected: 143 protected:
144 CFWL_WidgetTP(); 144 CFWL_WidgetTP();
145 FWL_Error InitTTO(); 145 FWL_Error InitTTO();
146 FWL_Error FinalizeTTO(); 146 FWL_Error FinalizeTTO();
147 void DrawEdge(CFX_Graphics* pGraphics, 147 void DrawEdge(CFX_Graphics* pGraphics,
148 uint32_t dwStyles, 148 uint32_t dwStyles,
149 const CFX_RectF* pRect, 149 const CFX_RectF* pRect,
150 CFX_Matrix* pMatrix = NULL); 150 CFX_Matrix* pMatrix = NULL);
151 void Draw3DRect(CFX_Graphics* pGraphics, 151 void Draw3DRect(CFX_Graphics* pGraphics,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 const CFX_RectF* pRect, 214 const CFX_RectF* pRect,
215 FWLTHEME_STATE eState, 215 FWLTHEME_STATE eState,
216 CFX_Matrix* pMatrix = NULL); 216 CFX_Matrix* pMatrix = NULL);
217 void DrawArrowBtn(CFX_Graphics* pGraphics, 217 void DrawArrowBtn(CFX_Graphics* pGraphics,
218 const CFX_RectF* pRect, 218 const CFX_RectF* pRect,
219 FWLTHEME_DIRECTION eDict, 219 FWLTHEME_DIRECTION eDict,
220 FWLTHEME_STATE eState, 220 FWLTHEME_STATE eState,
221 CFX_Matrix* pMatrix = NULL); 221 CFX_Matrix* pMatrix = NULL);
222 uint32_t m_dwRefCount; 222 uint32_t m_dwRefCount;
223 std::unique_ptr<CFDE_TextOut> m_pTextOut; 223 std::unique_ptr<CFDE_TextOut> m_pTextOut;
224 IFGAS_Font* m_pFDEFont; 224 CFGAS_GEFont* m_pFDEFont;
225 FX_FLOAT m_fValue; 225 FX_FLOAT m_fValue;
226 uint32_t m_dwValue; 226 uint32_t m_dwValue;
227 CFX_RectF m_rtMargin; 227 CFX_RectF m_rtMargin;
228 uint32_t m_dwThemeID; 228 uint32_t m_dwThemeID;
229 CFX_Matrix _ctm; 229 CFX_Matrix _ctm;
230 }; 230 };
231 FX_BOOL FWLTHEME_Init(); 231 FX_BOOL FWLTHEME_Init();
232 void FWLTHEME_Release(); 232 void FWLTHEME_Release();
233 uint32_t FWL_GetThemeLayout(uint32_t dwThemeID); 233 uint32_t FWL_GetThemeLayout(uint32_t dwThemeID);
234 uint32_t FWL_GetThemeColor(uint32_t dwThemeID); 234 uint32_t FWL_GetThemeColor(uint32_t dwThemeID);
(...skipping 22 matching lines...) Expand all
257 class CFWL_FontData { 257 class CFWL_FontData {
258 public: 258 public:
259 CFWL_FontData(); 259 CFWL_FontData();
260 virtual ~CFWL_FontData(); 260 virtual ~CFWL_FontData();
261 FX_BOOL Equal(const CFX_WideStringC& wsFontFamily, 261 FX_BOOL Equal(const CFX_WideStringC& wsFontFamily,
262 uint32_t dwFontStyles, 262 uint32_t dwFontStyles,
263 uint16_t wCodePage); 263 uint16_t wCodePage);
264 FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily, 264 FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily,
265 uint32_t dwFontStyles, 265 uint32_t dwFontStyles,
266 uint16_t wCodePage); 266 uint16_t wCodePage);
267 IFGAS_Font* GetFont() const { return m_pFont; } 267 CFGAS_GEFont* GetFont() const { return m_pFont; }
268 268
269 protected: 269 protected:
270 CFX_WideString m_wsFamily; 270 CFX_WideString m_wsFamily;
271 uint32_t m_dwStyles; 271 uint32_t m_dwStyles;
272 uint32_t m_dwCodePage; 272 uint32_t m_dwCodePage;
273 IFGAS_Font* m_pFont; 273 CFGAS_GEFont* m_pFont;
274 IFGAS_FontMgr* m_pFontMgr; 274 IFGAS_FontMgr* m_pFontMgr;
275 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ 275 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
276 CFX_FontSourceEnum_File* m_pFontSource; 276 CFX_FontSourceEnum_File* m_pFontSource;
277 #endif 277 #endif
278 }; 278 };
279 279
280 class CFWL_FontManager { 280 class CFWL_FontManager {
281 public: 281 public:
282 static CFWL_FontManager* GetInstance(); 282 static CFWL_FontManager* GetInstance();
283 static void DestroyInstance(); 283 static void DestroyInstance();
284 284
285 IFGAS_Font* FindFont(const CFX_WideStringC& wsFontFamily, 285 CFGAS_GEFont* FindFont(const CFX_WideStringC& wsFontFamily,
286 uint32_t dwFontStyles, 286 uint32_t dwFontStyles,
287 uint16_t dwCodePage); 287 uint16_t dwCodePage);
288 288
289 protected: 289 protected:
290 CFWL_FontManager(); 290 CFWL_FontManager();
291 virtual ~CFWL_FontManager(); 291 virtual ~CFWL_FontManager();
292 292
293 static CFWL_FontManager* s_FontManager; 293 static CFWL_FontManager* s_FontManager;
294 std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray; 294 std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray;
295 }; 295 };
296 296
297 #endif // XFA_FWL_THEME_CFWL_WIDGETTP_H_ 297 #endif // XFA_FWL_THEME_CFWL_WIDGETTP_H_
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_editimp.cpp ('k') | xfa/fwl/theme/cfwl_widgettp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698