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_BASEWIDGET_IFWL_MONTHCALENDAR_H_ | 7 #ifndef XFA_FWL_BASEWIDGET_IFWL_MONTHCALENDAR_H_ |
8 #define XFA_FWL_BASEWIDGET_IFWL_MONTHCALENDAR_H_ | 8 #define XFA_FWL_BASEWIDGET_IFWL_MONTHCALENDAR_H_ |
9 | 9 |
10 #include "xfa/fwl/core/ifwl_widget.h" | 10 #include "xfa/fwl/core/ifwl_widget.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 #define FWL_MCCAPACITY_May FWL_WGTCAPACITY_MAX + 16 | 90 #define FWL_MCCAPACITY_May FWL_WGTCAPACITY_MAX + 16 |
91 #define FWL_MCCAPACITY_June FWL_WGTCAPACITY_MAX + 17 | 91 #define FWL_MCCAPACITY_June FWL_WGTCAPACITY_MAX + 17 |
92 #define FWL_MCCAPACITY_July FWL_WGTCAPACITY_MAX + 18 | 92 #define FWL_MCCAPACITY_July FWL_WGTCAPACITY_MAX + 18 |
93 #define FWL_MCCAPACITY_August FWL_WGTCAPACITY_MAX + 19 | 93 #define FWL_MCCAPACITY_August FWL_WGTCAPACITY_MAX + 19 |
94 #define FWL_MCCAPACITY_September FWL_WGTCAPACITY_MAX + 20 | 94 #define FWL_MCCAPACITY_September FWL_WGTCAPACITY_MAX + 20 |
95 #define FWL_MCCAPACITY_October FWL_WGTCAPACITY_MAX + 21 | 95 #define FWL_MCCAPACITY_October FWL_WGTCAPACITY_MAX + 21 |
96 #define FWL_MCCAPACITY_November FWL_WGTCAPACITY_MAX + 22 | 96 #define FWL_MCCAPACITY_November FWL_WGTCAPACITY_MAX + 22 |
97 #define FWL_MCCAPACITY_December FWL_WGTCAPACITY_MAX + 23 | 97 #define FWL_MCCAPACITY_December FWL_WGTCAPACITY_MAX + 23 |
98 #define FWL_MCCAPACITY_Today FWL_WGTCAPACITY_MAX + 24 | 98 #define FWL_MCCAPACITY_Today FWL_WGTCAPACITY_MAX + 24 |
99 #define FWL_EVENT_MCD_DATESELECTED L"FWL_EVENT_MCD_DateSelected" | 99 #define FWL_EVENT_MCD_DATESELECTED L"FWL_EVENT_MCD_DateSelected" |
100 #define FWL_NOTEHASH_MCD_DATASELECTED 1085596932 | |
101 // TODO(dsinclair): Event hash is hash of string, cleanup. pdfium:474 | |
102 #define FWL_EVTHASH_MCD_DateChanged 54212227 | |
103 | 100 |
104 BEGIN_FWL_EVENT_DEF(CFWL_Event_McdDateSelected, FWL_NOTEHASH_MCD_DATASELECTED) | 101 BEGIN_FWL_EVENT_DEF(CFWL_Event_McdDateSelected, CFWL_EventType::DataSelected) |
105 int32_t m_iStartDay; | 102 int32_t m_iStartDay; |
106 int32_t m_iEndDay; | 103 int32_t m_iEndDay; |
107 END_FWL_EVENT_DEF | 104 END_FWL_EVENT_DEF |
108 | 105 |
109 BEGIN_FWL_EVENT_DEF(CFWL_EventMcdDateChanged, FWL_EVTHASH_MCD_DateChanged) | 106 BEGIN_FWL_EVENT_DEF(CFWL_EventMcdDateChanged, CFWL_EventType::DateChanged) |
110 int32_t m_iOldYear; | 107 int32_t m_iOldYear; |
111 int32_t m_iOldMonth; | 108 int32_t m_iOldMonth; |
112 int32_t m_iStartDay; | 109 int32_t m_iStartDay; |
113 int32_t m_iEndDay; | 110 int32_t m_iEndDay; |
114 END_FWL_EVENT_DEF | 111 END_FWL_EVENT_DEF |
115 | 112 |
116 class IFWL_MonthCalendarDP : public IFWL_DataProvider { | 113 class IFWL_MonthCalendarDP : public IFWL_DataProvider { |
117 public: | 114 public: |
118 virtual int32_t GetCurDay(IFWL_Widget* pWidget) = 0; | 115 virtual int32_t GetCurDay(IFWL_Widget* pWidget) = 0; |
119 virtual int32_t GetCurMonth(IFWL_Widget* pWidget) = 0; | 116 virtual int32_t GetCurMonth(IFWL_Widget* pWidget) = 0; |
(...skipping 10 matching lines...) Expand all Loading... |
130 int32_t& iMonth, | 127 int32_t& iMonth, |
131 int32_t& iDay, | 128 int32_t& iDay, |
132 int32_t nIndex = 0); | 129 int32_t nIndex = 0); |
133 FX_BOOL SetSelect(int32_t iYear, int32_t iMonth, int32_t iDay); | 130 FX_BOOL SetSelect(int32_t iYear, int32_t iMonth, int32_t iDay); |
134 | 131 |
135 protected: | 132 protected: |
136 IFWL_MonthCalendar(); | 133 IFWL_MonthCalendar(); |
137 }; | 134 }; |
138 | 135 |
139 #endif // XFA_FWL_BASEWIDGET_IFWL_MONTHCALENDAR_H_ | 136 #endif // XFA_FWL_BASEWIDGET_IFWL_MONTHCALENDAR_H_ |
OLD | NEW |