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_FWL_THEME_CFWL_MONTHCALENDARTP_H_ | 7 #ifndef XFA_FWL_THEME_CFWL_MONTHCALENDARTP_H_ |
8 #define XFA_FWL_THEME_CFWL_MONTHCALENDARTP_H_ | 8 #define XFA_FWL_THEME_CFWL_MONTHCALENDARTP_H_ |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "xfa/fwl/theme/cfwl_widgettp.h" | 12 #include "xfa/fwl/theme/cfwl_widgettp.h" |
11 | 13 |
12 class CFWL_MonthCalendarTP : public CFWL_WidgetTP { | 14 class CFWL_MonthCalendarTP : public CFWL_WidgetTP { |
13 public: | 15 public: |
14 CFWL_MonthCalendarTP(); | 16 CFWL_MonthCalendarTP(); |
15 ~CFWL_MonthCalendarTP() override; | 17 ~CFWL_MonthCalendarTP() override; |
16 | 18 |
17 // CFWL_WidgetTP | 19 // CFWL_WidgetTP |
18 bool IsValidWidget(IFWL_Widget* pWidget) override; | 20 bool IsValidWidget(IFWL_Widget* pWidget) override; |
19 uint32_t SetThemeID(IFWL_Widget* pWidget, | 21 uint32_t SetThemeID(IFWL_Widget* pWidget, |
20 uint32_t dwThemeID, | 22 uint32_t dwThemeID, |
21 FX_BOOL bChildren = TRUE) override; | 23 FX_BOOL bChildren = TRUE) override; |
22 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override; | 24 FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override; |
23 FX_BOOL DrawText(CFWL_ThemeText* pParams) override; | 25 FX_BOOL DrawText(CFWL_ThemeText* pParams) override; |
24 void* GetCapacity(CFWL_ThemePart* pThemePart, | 26 void* GetCapacity(CFWL_ThemePart* pThemePart, |
25 CFWL_WidgetCapacity dwCapacity) override; | 27 CFWL_WidgetCapacity dwCapacity) override; |
26 FWL_Error Initialize() override; | 28 FWL_Error Initialize() override; |
27 FWL_Error Finalize() override; | 29 FWL_Error Finalize() override; |
28 | 30 |
29 protected: | 31 protected: |
| 32 struct MCThemeData { |
| 33 FX_ARGB clrCaption; |
| 34 FX_ARGB clrSeperator; |
| 35 FX_ARGB clrDatesHoverBK; |
| 36 FX_ARGB clrDatesSelectedBK; |
| 37 FX_ARGB clrDatesCircle; |
| 38 FX_ARGB clrToday; |
| 39 FX_ARGB clrBK; |
| 40 }; |
| 41 |
30 FX_BOOL DrawTotalBK(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); | 42 FX_BOOL DrawTotalBK(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); |
31 FX_BOOL DrawHeadBk(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); | 43 FX_BOOL DrawHeadBk(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); |
32 FX_BOOL DrawLButton(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); | 44 FX_BOOL DrawLButton(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); |
33 FX_BOOL DrawRButton(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); | 45 FX_BOOL DrawRButton(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); |
34 FX_BOOL DrawDatesInBK(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); | 46 FX_BOOL DrawDatesInBK(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); |
35 FX_BOOL DrawDatesInCircle(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); | 47 FX_BOOL DrawDatesInCircle(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); |
36 FX_BOOL DrawTodayCircle(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); | 48 FX_BOOL DrawTodayCircle(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); |
37 FX_BOOL DrawHSeperator(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); | 49 FX_BOOL DrawHSeperator(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); |
38 FX_BOOL DrawWeekNumSep(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); | 50 FX_BOOL DrawWeekNumSep(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); |
39 FWLTHEME_STATE GetState(uint32_t dwFWLStates); | 51 FWLTHEME_STATE GetState(uint32_t dwFWLStates); |
40 void SetThemeData(uint32_t dwThemeID); | 52 void SetThemeData(uint32_t dwThemeID); |
41 | 53 |
42 class MCThemeData { | 54 std::unique_ptr<MCThemeData> m_pThemeData; |
43 public: | |
44 FX_ARGB clrCaption; | |
45 FX_ARGB clrSeperator; | |
46 FX_ARGB clrDatesHoverBK; | |
47 FX_ARGB clrDatesSelectedBK; | |
48 FX_ARGB clrDatesCircle; | |
49 FX_ARGB clrToday; | |
50 FX_ARGB clrBK; | |
51 } * m_pThemeData; | |
52 CFX_WideString wsResource; | 55 CFX_WideString wsResource; |
53 }; | 56 }; |
54 | 57 |
55 #endif // XFA_FWL_THEME_CFWL_MONTHCALENDARTP_H_ | 58 #endif // XFA_FWL_THEME_CFWL_MONTHCALENDARTP_H_ |
OLD | NEW |