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

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

Issue 1943413002: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@bcdattribute
Patch Set: Created 4 years, 7 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_pushbuttontp.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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 FX_BOOL IsValidWidget(IFWL_Widget* pWidget);
110 virtual uint32_t GetThemeID(IFWL_Widget* pWidget); 110 virtual uint32_t GetThemeID(IFWL_Widget* pWidget);
111 virtual uint32_t SetThemeID(IFWL_Widget* pWidget, 111 virtual uint32_t SetThemeID(IFWL_Widget* pWidget,
112 uint32_t dwThemeID, 112 uint32_t dwThemeID,
113 FX_BOOL bChildren = TRUE); 113 FX_BOOL bChildren = TRUE);
114 virtual FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix); 114 virtual FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix);
115 virtual FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget, 115 virtual FWL_Error SetThemeMatrix(IFWL_Widget* pWidget,
116 const CFX_Matrix& matrix); 116 const CFX_Matrix& matrix);
117 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); 117 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams);
118 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); 118 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams);
119 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, 119 virtual void* GetCapacity(CFWL_ThemePart* pThemePart,
120 CFWL_WidgetCapacity dwCapacity); 120 CFWL_WidgetCapacity dwCapacity);
121 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget); 121 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget);
122 virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart); 122 virtual FWL_Error GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart);
123 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, 123 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
124 FX_FLOAT fx, 124 FX_FLOAT fx,
125 FX_FLOAT fy); 125 FX_FLOAT fy);
126 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect); 126 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect);
127 virtual FWL_ERR Initialize(); 127 virtual FWL_Error Initialize();
128 virtual FWL_ERR Finalize(); 128 virtual FWL_Error Finalize();
129 virtual ~CFWL_WidgetTP(); 129 virtual ~CFWL_WidgetTP();
130 FWL_ERR SetFont(IFWL_Widget* pWidget, 130 FWL_Error SetFont(IFWL_Widget* pWidget,
131 const FX_WCHAR* strFont, 131 const FX_WCHAR* strFont,
132 FX_FLOAT fFontSize, 132 FX_FLOAT fFontSize,
133 FX_ARGB rgbFont); 133 FX_ARGB rgbFont);
134 FWL_ERR SetFont(IFWL_Widget* pWidget, 134 FWL_Error SetFont(IFWL_Widget* pWidget,
135 IFX_Font* pFont, 135 IFX_Font* pFont,
136 FX_FLOAT fFontSize, 136 FX_FLOAT fFontSize,
137 FX_ARGB rgbFont); 137 FX_ARGB rgbFont);
138 IFX_Font* GetFont(IFWL_Widget* pWidget); 138 IFX_Font* GetFont(IFWL_Widget* pWidget);
139 139
140 protected: 140 protected:
141 CFWL_WidgetTP(); 141 CFWL_WidgetTP();
142 FX_ERR InitTTO(); 142 FWL_Error InitTTO();
143 FX_ERR FinalizeTTO(); 143 FWL_Error FinalizeTTO();
144 void DrawEdge(CFX_Graphics* pGraphics, 144 void DrawEdge(CFX_Graphics* pGraphics,
145 uint32_t dwStyles, 145 uint32_t dwStyles,
146 const CFX_RectF* pRect, 146 const CFX_RectF* pRect,
147 CFX_Matrix* pMatrix = NULL); 147 CFX_Matrix* pMatrix = NULL);
148 void Draw3DRect(CFX_Graphics* pGraphics, 148 void Draw3DRect(CFX_Graphics* pGraphics,
149 FWLTHEME_EDGE eType, 149 FWLTHEME_EDGE eType,
150 FX_FLOAT fWidth, 150 FX_FLOAT fWidth,
151 const CFX_RectF* pRect, 151 const CFX_RectF* pRect,
152 FX_ARGB cr1, 152 FX_ARGB cr1,
153 FX_ARGB cr2, 153 FX_ARGB cr2,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 285
286 protected: 286 protected:
287 CFWL_FontManager(); 287 CFWL_FontManager();
288 virtual ~CFWL_FontManager(); 288 virtual ~CFWL_FontManager();
289 289
290 static CFWL_FontManager* s_FontManager; 290 static CFWL_FontManager* s_FontManager;
291 std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray; 291 std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray;
292 }; 292 };
293 293
294 #endif // XFA_FWL_THEME_CFWL_WIDGETTP_H_ 294 #endif // XFA_FWL_THEME_CFWL_WIDGETTP_H_
OLDNEW
« no previous file with comments | « xfa/fwl/theme/cfwl_pushbuttontp.cpp ('k') | xfa/fwl/theme/cfwl_widgettp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698