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

Side by Side Diff: xfa/include/fwl/lightwidget/theme.h

Issue 1502063005: Re-land "Rename CFWL_Thread classes to ThreadImp" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Implement 3-layer scheme Created 5 years 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
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 _FWL_THEME_LIGHT_H 7 #ifndef _FWL_THEME_LIGHT_H
8 #define _FWL_THEME_LIGHT_H 8 #define _FWL_THEME_LIGHT_H
9 class CFWL_ThemeBackground; 9
10 class CFWL_ThemeText; 10 #include "xfa/include/fwl/core/fwl_theme.h"
11 class CFWL_ThemePart; 11
12 class CFWL_WidgetTP; 12 class CFWL_WidgetTP;
13 class IFWL_Widget; 13 class IFWL_Widget;
14 class CFWL_Theme; 14
15 class CFWL_Theme { 15 class CFWL_Theme : public IFWL_ThemeProvider {
Tom Sepez 2015/12/07 23:21:55 yow. its cast to IFWL_ThemeProvider in a few place
16 public: 16 public:
17 virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget);
18 virtual FX_DWORD GetThemeID(IFWL_Widget* pWidget);
19 virtual FX_DWORD SetThemeID(IFWL_Widget* pWidget,
20 FX_DWORD dwThemeID,
21 FX_BOOL bChildren = TRUE);
22 virtual FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix);
23 virtual FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget,
24 const CFX_Matrix& matrix);
25 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams);
26 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams);
27 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity);
28 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget);
29 virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart);
30 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
31 FX_FLOAT fx,
32 FX_FLOAT fy);
33 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect);
34 virtual FWL_ERR Initialize();
35 virtual FWL_ERR Finalize();
36 CFWL_Theme(); 17 CFWL_Theme();
37 virtual ~CFWL_Theme(); 18 ~CFWL_Theme() override;
19
20 // IFWL_ThemeProvider:
21 FX_BOOL IsValidWidget(IFWL_Widget* pWidget) override;
22 FX_DWORD GetThemeID(IFWL_Widget* pWidget) override;
23 FX_DWORD SetThemeID(IFWL_Widget* pWidget,
24 FX_DWORD dwThemeID,
25 FX_BOOL bChildren = TRUE) override;
26 FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) override;
27 FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget,
28 const CFX_Matrix& matrix) override;
29 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override;
30 FX_BOOL DrawText(CFWL_ThemeText* pParams) override;
31 void* GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity) override;
32 FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) override;
33 FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart) override;
34 FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
35 FX_FLOAT fx,
36 FX_FLOAT fy) override;
37 FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) override;
38
39 FWL_ERR Initialize();
40 FWL_ERR Finalize();
38 FWL_ERR SetFont(IFWL_Widget* pWidget, 41 FWL_ERR SetFont(IFWL_Widget* pWidget,
39 const FX_WCHAR* strFont, 42 const FX_WCHAR* strFont,
40 FX_FLOAT fFontSize, 43 FX_FLOAT fFontSize,
41 FX_ARGB rgbFont); 44 FX_ARGB rgbFont);
42 CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget); 45 CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget);
43 46
44 protected: 47 protected:
45 CFX_PtrArray m_arrThemes; 48 CFX_PtrArray m_arrThemes;
46 }; 49 };
47 #endif 50 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698