OLD | NEW |
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 Loading... |
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 | |
35 // IFWL_ThemeProvider: | 32 // IFWL_ThemeProvider: |
36 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override; | 33 void DrawBackground(CFWL_ThemeBackground* pParams) override; |
37 FX_BOOL DrawText(CFWL_ThemeText* pParams) override; | 34 void DrawText(CFWL_ThemeText* pParams) override; |
38 void* GetCapacity(CFWL_ThemePart* pThemePart, | 35 void* GetCapacity(CFWL_ThemePart* pThemePart, |
39 CFWL_WidgetCapacity dwCapacity) override; | 36 CFWL_WidgetCapacity dwCapacity) override; |
40 FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) override; | 37 bool IsCustomizedLayout(IFWL_Widget* pWidget) override; |
41 FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) override; | 38 void CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) override; |
42 | 39 |
43 protected: | 40 private: |
44 CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget); | 41 CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget); |
45 std::unique_ptr<CFWL_CheckBoxTP> m_pCheckBoxTP; | 42 std::unique_ptr<CFWL_CheckBoxTP> m_pCheckBoxTP; |
46 std::unique_ptr<CFWL_ListBoxTP> m_pListBoxTP; | 43 std::unique_ptr<CFWL_ListBoxTP> m_pListBoxTP; |
47 std::unique_ptr<CFWL_PictureBoxTP> m_pPictureBoxTP; | 44 std::unique_ptr<CFWL_PictureBoxTP> m_pPictureBoxTP; |
48 std::unique_ptr<CFWL_ScrollBarTP> m_pSrollBarTP; | 45 std::unique_ptr<CFWL_ScrollBarTP> m_pSrollBarTP; |
49 std::unique_ptr<CFWL_EditTP> m_pEditTP; | 46 std::unique_ptr<CFWL_EditTP> m_pEditTP; |
50 std::unique_ptr<CFWL_ComboBoxTP> m_pComboBoxTP; | 47 std::unique_ptr<CFWL_ComboBoxTP> m_pComboBoxTP; |
51 std::unique_ptr<CFWL_MonthCalendarTP> m_pMonthCalendarTP; | 48 std::unique_ptr<CFWL_MonthCalendarTP> m_pMonthCalendarTP; |
52 std::unique_ptr<CFWL_DateTimePickerTP> m_pDateTimePickerTP; | 49 std::unique_ptr<CFWL_DateTimePickerTP> m_pDateTimePickerTP; |
53 std::unique_ptr<CFWL_PushButtonTP> m_pPushButtonTP; | 50 std::unique_ptr<CFWL_PushButtonTP> m_pPushButtonTP; |
54 std::unique_ptr<CFWL_CaretTP> m_pCaretTP; | 51 std::unique_ptr<CFWL_CaretTP> m_pCaretTP; |
55 std::unique_ptr<CFWL_BarcodeTP> m_pBarcodeTP; | 52 std::unique_ptr<CFWL_BarcodeTP> m_pBarcodeTP; |
56 std::unique_ptr<CFDE_TextOut> m_pTextOut; | 53 std::unique_ptr<CFDE_TextOut> m_pTextOut; |
57 FX_FLOAT m_fCapacity; | 54 FX_FLOAT m_fCapacity; |
58 uint32_t m_dwCapacity; | 55 uint32_t m_dwCapacity; |
59 CFGAS_GEFont* m_pCalendarFont; | 56 CFGAS_GEFont* m_pCalendarFont; |
60 CFX_WideString m_wsResource; | 57 CFX_WideString m_wsResource; |
61 CXFA_FFApp* const m_pApp; | 58 CXFA_FFApp* const m_pApp; |
62 CFX_RectF m_Rect; | 59 CFX_RectF m_Rect; |
63 CFX_SizeF m_SizeAboveBelow; | 60 CFX_SizeF m_SizeAboveBelow; |
64 }; | 61 }; |
65 | 62 |
66 CXFA_FFWidget* XFA_ThemeGetOuterWidget(IFWL_Widget* pWidget); | 63 CXFA_FFWidget* XFA_ThemeGetOuterWidget(IFWL_Widget* pWidget); |
67 | 64 |
68 #endif // XFA_FXFA_APP_XFA_FWLTHEME_H_ | 65 #endif // XFA_FXFA_APP_XFA_FWLTHEME_H_ |
OLD | NEW |