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

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

Issue 2422373002: Cleanup unneeded FWL theme code. (Closed)
Patch Set: Created 4 years, 2 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/theme/cfwl_scrollbartp.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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 class CFWL_WidgetTP { 106 class CFWL_WidgetTP {
107 public: 107 public:
108 virtual ~CFWL_WidgetTP(); 108 virtual ~CFWL_WidgetTP();
109 109
110 virtual FWL_Error Initialize(); 110 virtual FWL_Error Initialize();
111 virtual FWL_Error Finalize(); 111 virtual FWL_Error Finalize();
112 112
113 virtual bool IsValidWidget(IFWL_Widget* pWidget); 113 virtual bool IsValidWidget(IFWL_Widget* pWidget);
114 virtual uint32_t GetThemeID(IFWL_Widget* pWidget); 114 virtual uint32_t GetThemeID(IFWL_Widget* pWidget);
115 virtual uint32_t SetThemeID(IFWL_Widget* pWidget, 115 virtual uint32_t SetThemeID(IFWL_Widget* pWidget, uint32_t dwThemeID);
116 uint32_t dwThemeID,
117 FX_BOOL bChildren = TRUE);
118 virtual FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix); 116 virtual FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix);
119 virtual FWL_Error SetThemeMatrix(IFWL_Widget* pWidget, 117 virtual FWL_Error SetThemeMatrix(IFWL_Widget* pWidget,
120 const CFX_Matrix& matrix); 118 const CFX_Matrix& matrix);
121 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); 119 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams);
122 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); 120 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams);
123 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, 121 virtual void* GetCapacity(CFWL_ThemePart* pThemePart,
124 CFWL_WidgetCapacity dwCapacity); 122 CFWL_WidgetCapacity dwCapacity);
125 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget); 123 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget);
126 virtual FWL_Error GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart);
127 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
128 FX_FLOAT fx,
129 FX_FLOAT fy);
130 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect); 124 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect);
131 125
132 FWL_Error SetFont(IFWL_Widget* pWidget, 126 FWL_Error SetFont(IFWL_Widget* pWidget,
133 const FX_WCHAR* strFont, 127 const FX_WCHAR* strFont,
134 FX_FLOAT fFontSize, 128 FX_FLOAT fFontSize,
135 FX_ARGB rgbFont); 129 FX_ARGB rgbFont);
136 FWL_Error SetFont(IFWL_Widget* pWidget, 130 FWL_Error SetFont(IFWL_Widget* pWidget,
137 CFGAS_GEFont* pFont, 131 CFGAS_GEFont* pFont,
138 FX_FLOAT fFontSize, 132 FX_FLOAT fFontSize,
139 FX_ARGB rgbFont); 133 FX_ARGB rgbFont);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 CFX_Matrix* pMatrix = nullptr); 214 CFX_Matrix* pMatrix = nullptr);
221 uint32_t m_dwRefCount; 215 uint32_t m_dwRefCount;
222 std::unique_ptr<CFDE_TextOut> m_pTextOut; 216 std::unique_ptr<CFDE_TextOut> m_pTextOut;
223 CFGAS_GEFont* m_pFDEFont; 217 CFGAS_GEFont* m_pFDEFont;
224 FX_FLOAT m_fValue; 218 FX_FLOAT m_fValue;
225 uint32_t m_dwValue; 219 uint32_t m_dwValue;
226 CFX_RectF m_rtMargin; 220 CFX_RectF m_rtMargin;
227 uint32_t m_dwThemeID; 221 uint32_t m_dwThemeID;
228 CFX_Matrix _ctm; 222 CFX_Matrix _ctm;
229 }; 223 };
230 FX_BOOL FWLTHEME_Init(); 224
231 void FWLTHEME_Release(); 225 void FWLTHEME_Release();
232 uint32_t FWL_GetThemeLayout(uint32_t dwThemeID); 226 uint32_t FWL_GetThemeLayout(uint32_t dwThemeID);
233 uint32_t FWL_GetThemeColor(uint32_t dwThemeID); 227 uint32_t FWL_GetThemeColor(uint32_t dwThemeID);
234 228
235 class CFWL_FontData { 229 class CFWL_FontData {
236 public: 230 public:
237 CFWL_FontData(); 231 CFWL_FontData();
238 virtual ~CFWL_FontData(); 232 virtual ~CFWL_FontData();
239 233
240 FX_BOOL Equal(const CFX_WideStringC& wsFontFamily, 234 FX_BOOL Equal(const CFX_WideStringC& wsFontFamily,
(...skipping 26 matching lines...) Expand all
267 261
268 protected: 262 protected:
269 CFWL_FontManager(); 263 CFWL_FontManager();
270 virtual ~CFWL_FontManager(); 264 virtual ~CFWL_FontManager();
271 265
272 static CFWL_FontManager* s_FontManager; 266 static CFWL_FontManager* s_FontManager;
273 std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray; 267 std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray;
274 }; 268 };
275 269
276 #endif // XFA_FWL_THEME_CFWL_WIDGETTP_H_ 270 #endif // XFA_FWL_THEME_CFWL_WIDGETTP_H_
OLDNEW
« no previous file with comments | « xfa/fwl/theme/cfwl_scrollbartp.cpp ('k') | xfa/fwl/theme/cfwl_widgettp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698