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

Side by Side Diff: xfa/fxfa/app/xfa_fwltheme.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_widgettp.cpp ('k') | xfa/fxfa/app/xfa_fwltheme.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_FXFA_APP_XFA_FWLTHEME_H_ 7 #ifndef XFA_FXFA_APP_XFA_FWLTHEME_H_
8 #define XFA_FXFA_APP_XFA_FWLTHEME_H_ 8 #define XFA_FXFA_APP_XFA_FWLTHEME_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 11 matching lines...) Expand all
22 #include "xfa/fwl/theme/cfwl_pushbuttontp.h" 22 #include "xfa/fwl/theme/cfwl_pushbuttontp.h"
23 #include "xfa/fwl/theme/cfwl_scrollbartp.h" 23 #include "xfa/fwl/theme/cfwl_scrollbartp.h"
24 #include "xfa/fwl/theme/cfwl_widgettp.h" 24 #include "xfa/fwl/theme/cfwl_widgettp.h"
25 #include "xfa/fxfa/xfa_ffapp.h" 25 #include "xfa/fxfa/xfa_ffapp.h"
26 26
27 class CXFA_FWLTheme final : public IFWL_ThemeProvider { 27 class CXFA_FWLTheme final : public IFWL_ThemeProvider {
28 public: 28 public:
29 CXFA_FWLTheme(CXFA_FFApp* pApp); 29 CXFA_FWLTheme(CXFA_FFApp* pApp);
30 ~CXFA_FWLTheme() override; 30 ~CXFA_FWLTheme() override;
31 31
32 FWL_Error Initialize();
33 FWL_Error Finalize();
34
32 // IFWL_ThemeProvider: 35 // IFWL_ThemeProvider:
33 bool IsValidWidget(IFWL_Widget* pWidget) override;
34 uint32_t GetThemeID(IFWL_Widget* pWidget) override;
35 uint32_t SetThemeID(IFWL_Widget* pWidget,
36 uint32_t dwThemeID,
37 FX_BOOL bChildren = TRUE) override;
38 FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) override;
39 FWL_Error SetThemeMatrix(IFWL_Widget* pWidget,
40 const CFX_Matrix& matrix) override;
41 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override; 36 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override;
42 FX_BOOL DrawText(CFWL_ThemeText* pParams) override; 37 FX_BOOL DrawText(CFWL_ThemeText* pParams) override;
43 void* GetCapacity(CFWL_ThemePart* pThemePart, 38 void* GetCapacity(CFWL_ThemePart* pThemePart,
44 CFWL_WidgetCapacity dwCapacity) override; 39 CFWL_WidgetCapacity dwCapacity) override;
45 FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) override; 40 FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) override;
46 FWL_Error GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart) override;
47 FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
48 FX_FLOAT fx,
49 FX_FLOAT fy) override;
50 FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) override; 41 FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) override;
51 42
52 FWL_Error GetClassName(CFX_WideString& wsClass) const {
53 return FWL_Error::Succeeded;
54 }
55 uint32_t GetHashCode() const { return 0; }
56 FWL_Error Initialize();
57 FWL_Error Finalize();
58 FWL_Error GetPartRect(CFWL_ThemePart* pThemePart);
59
60 protected: 43 protected:
61 CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget); 44 CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget);
62 std::unique_ptr<CFWL_CheckBoxTP> m_pCheckBoxTP; 45 std::unique_ptr<CFWL_CheckBoxTP> m_pCheckBoxTP;
63 std::unique_ptr<CFWL_ListBoxTP> m_pListBoxTP; 46 std::unique_ptr<CFWL_ListBoxTP> m_pListBoxTP;
64 std::unique_ptr<CFWL_PictureBoxTP> m_pPictureBoxTP; 47 std::unique_ptr<CFWL_PictureBoxTP> m_pPictureBoxTP;
65 std::unique_ptr<CFWL_ScrollBarTP> m_pSrollBarTP; 48 std::unique_ptr<CFWL_ScrollBarTP> m_pSrollBarTP;
66 std::unique_ptr<CFWL_EditTP> m_pEditTP; 49 std::unique_ptr<CFWL_EditTP> m_pEditTP;
67 std::unique_ptr<CFWL_ComboBoxTP> m_pComboBoxTP; 50 std::unique_ptr<CFWL_ComboBoxTP> m_pComboBoxTP;
68 std::unique_ptr<CFWL_MonthCalendarTP> m_pMonthCalendarTP; 51 std::unique_ptr<CFWL_MonthCalendarTP> m_pMonthCalendarTP;
69 std::unique_ptr<CFWL_DateTimePickerTP> m_pDateTimePickerTP; 52 std::unique_ptr<CFWL_DateTimePickerTP> m_pDateTimePickerTP;
(...skipping 28 matching lines...) Expand all
98 class CXFA_FWLEditTP : public CFWL_EditTP { 81 class CXFA_FWLEditTP : public CFWL_EditTP {
99 public: 82 public:
100 CXFA_FWLEditTP(); 83 CXFA_FWLEditTP();
101 ~CXFA_FWLEditTP() override; 84 ~CXFA_FWLEditTP() override;
102 85
103 // CFWL_EditTP 86 // CFWL_EditTP
104 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override; 87 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override;
105 }; 88 };
106 89
107 #endif // XFA_FXFA_APP_XFA_FWLTHEME_H_ 90 #endif // XFA_FXFA_APP_XFA_FWLTHEME_H_
OLDNEW
« no previous file with comments | « xfa/fwl/theme/cfwl_widgettp.cpp ('k') | xfa/fxfa/app/xfa_fwltheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698