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_INCLUDE_FWL_BASEWIDGET_FWL_MONTHCALENDAR_H_ | 7 #ifndef XFA_INCLUDE_FWL_BASEWIDGET_FWL_MONTHCALENDAR_H_ |
8 #define XFA_INCLUDE_FWL_BASEWIDGET_FWL_MONTHCALENDAR_H_ | 8 #define XFA_INCLUDE_FWL_BASEWIDGET_FWL_MONTHCALENDAR_H_ |
9 | 9 |
10 class IFWL_MonthCalendarDP; | 10 #include "xfa/include/fwl/core/fwl_note.h" |
11 class IFWL_MonthCalendar; | 11 #include "xfa/include/fwl/core/fwl_widget.h" |
| 12 |
12 #define FWL_CLASS_MonthCalendar L"FWL_MONTHCALENDAR" | 13 #define FWL_CLASS_MonthCalendar L"FWL_MONTHCALENDAR" |
13 #define FWL_CLASSHASH_MonthCalendar 2733931374 | 14 #define FWL_CLASSHASH_MonthCalendar 2733931374 |
14 #define FWL_STYLEEXT_MCD_MultiSelect (1L << 0) | 15 #define FWL_STYLEEXT_MCD_MultiSelect (1L << 0) |
15 #define FWL_STYLEEXT_MCD_NoToday (1L << 1) | 16 #define FWL_STYLEEXT_MCD_NoToday (1L << 1) |
16 #define FWL_STYLEEXT_MCD_NoTodayCircle (1L << 2) | 17 #define FWL_STYLEEXT_MCD_NoTodayCircle (1L << 2) |
17 #define FWL_STYLEEXT_MCD_WeekNumbers (1L << 3) | 18 #define FWL_STYLEEXT_MCD_WeekNumbers (1L << 3) |
18 #define FWL_WGTCAPACITY_MC_HEADER_WIDTH 12 | 19 #define FWL_WGTCAPACITY_MC_HEADER_WIDTH 12 |
19 #define FWL_WGTCAPACITY_MC_HEADER_Height 13 | 20 #define FWL_WGTCAPACITY_MC_HEADER_Height 13 |
20 #define FWL_WGTCAPACITY_MC_HEADER_BTN_WIDTH 14 | 21 #define FWL_WGTCAPACITY_MC_HEADER_BTN_WIDTH 14 |
21 #define FWL_WGTCAPACITY_MC_HEADER_BTN_HEIGHT 15 | 22 #define FWL_WGTCAPACITY_MC_HEADER_BTN_HEIGHT 15 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 #define FWL_MCCAPACITY_August FWL_WGTCAPACITY_MAX + 19 | 91 #define FWL_MCCAPACITY_August FWL_WGTCAPACITY_MAX + 19 |
91 #define FWL_MCCAPACITY_September FWL_WGTCAPACITY_MAX + 20 | 92 #define FWL_MCCAPACITY_September FWL_WGTCAPACITY_MAX + 20 |
92 #define FWL_MCCAPACITY_October FWL_WGTCAPACITY_MAX + 21 | 93 #define FWL_MCCAPACITY_October FWL_WGTCAPACITY_MAX + 21 |
93 #define FWL_MCCAPACITY_November FWL_WGTCAPACITY_MAX + 22 | 94 #define FWL_MCCAPACITY_November FWL_WGTCAPACITY_MAX + 22 |
94 #define FWL_MCCAPACITY_December FWL_WGTCAPACITY_MAX + 23 | 95 #define FWL_MCCAPACITY_December FWL_WGTCAPACITY_MAX + 23 |
95 #define FWL_MCCAPACITY_Today FWL_WGTCAPACITY_MAX + 24 | 96 #define FWL_MCCAPACITY_Today FWL_WGTCAPACITY_MAX + 24 |
96 #define FWL_EVENT_MCD_DATESELECTED L"FWL_EVENT_MCD_DateSelected" | 97 #define FWL_EVENT_MCD_DATESELECTED L"FWL_EVENT_MCD_DateSelected" |
97 #define FWL_EVT_MCD_DateChanged L"FWL_EVENT_MCD_DateChanged" | 98 #define FWL_EVT_MCD_DateChanged L"FWL_EVENT_MCD_DateChanged" |
98 #define FWL_NOTEHASH_MCD_DATASELECTED 1085596932 | 99 #define FWL_NOTEHASH_MCD_DATASELECTED 1085596932 |
99 #define FWL_EVTHASH_MCD_DateChanged 54212227 | 100 #define FWL_EVTHASH_MCD_DateChanged 54212227 |
| 101 |
100 BEGIN_FWL_EVENT_DEF(CFWL_Event_McdDateSelected, FWL_NOTEHASH_MCD_DATASELECTED) | 102 BEGIN_FWL_EVENT_DEF(CFWL_Event_McdDateSelected, FWL_NOTEHASH_MCD_DATASELECTED) |
101 int32_t m_iStartDay; | 103 int32_t m_iStartDay; |
102 int32_t m_iEndDay; | 104 int32_t m_iEndDay; |
103 END_FWL_EVENT_DEF | 105 END_FWL_EVENT_DEF |
| 106 |
104 BEGIN_FWL_EVENT_DEF(CFWL_EventMcdDateChanged, FWL_EVTHASH_MCD_DateChanged) | 107 BEGIN_FWL_EVENT_DEF(CFWL_EventMcdDateChanged, FWL_EVTHASH_MCD_DateChanged) |
105 int32_t m_iOldYear; | 108 int32_t m_iOldYear; |
106 int32_t m_iOldMonth; | 109 int32_t m_iOldMonth; |
107 int32_t m_iStartDay; | 110 int32_t m_iStartDay; |
108 int32_t m_iEndDay; | 111 int32_t m_iEndDay; |
109 END_FWL_EVENT_DEF | 112 END_FWL_EVENT_DEF |
| 113 |
110 class IFWL_MonthCalendarDP : public IFWL_DataProvider { | 114 class IFWL_MonthCalendarDP : public IFWL_DataProvider { |
111 public: | 115 public: |
112 virtual int32_t GetCurDay(IFWL_Widget* pWidget) = 0; | 116 virtual int32_t GetCurDay(IFWL_Widget* pWidget) = 0; |
113 virtual int32_t GetCurMonth(IFWL_Widget* pWidget) = 0; | 117 virtual int32_t GetCurMonth(IFWL_Widget* pWidget) = 0; |
114 virtual int32_t GetCurYear(IFWL_Widget* pWidget) = 0; | 118 virtual int32_t GetCurYear(IFWL_Widget* pWidget) = 0; |
115 }; | 119 }; |
| 120 |
116 class IFWL_MonthCalendar : public IFWL_Widget { | 121 class IFWL_MonthCalendar : public IFWL_Widget { |
117 public: | 122 public: |
118 static IFWL_MonthCalendar* Create(const CFWL_WidgetImpProperties& properties, | 123 static IFWL_MonthCalendar* Create(const CFWL_WidgetImpProperties& properties, |
119 IFWL_Widget* pOuter); | 124 IFWL_Widget* pOuter); |
120 | 125 |
121 int32_t CountSelect(); | 126 int32_t CountSelect(); |
122 FX_BOOL GetSelect(int32_t& iYear, | 127 FX_BOOL GetSelect(int32_t& iYear, |
123 int32_t& iMonth, | 128 int32_t& iMonth, |
124 int32_t& iDay, | 129 int32_t& iDay, |
125 int32_t nIndex = 0); | 130 int32_t nIndex = 0); |
126 FX_BOOL SetSelect(int32_t iYear, int32_t iMonth, int32_t iDay); | 131 FX_BOOL SetSelect(int32_t iYear, int32_t iMonth, int32_t iDay); |
127 | 132 |
128 protected: | 133 protected: |
129 IFWL_MonthCalendar(); | 134 IFWL_MonthCalendar(); |
130 }; | 135 }; |
131 | 136 |
132 #endif // XFA_INCLUDE_FWL_BASEWIDGET_FWL_MONTHCALENDAR_H_ | 137 #endif // XFA_INCLUDE_FWL_BASEWIDGET_FWL_MONTHCALENDAR_H_ |
OLD | NEW |