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_DATETIMEPICKER_H_ | 7 #ifndef XFA_INCLUDE_FWL_BASEWIDGET_FWL_DATETIMEPICKER_H_ |
8 #define XFA_INCLUDE_FWL_BASEWIDGET_FWL_DATETIMEPICKER_H_ | 8 #define XFA_INCLUDE_FWL_BASEWIDGET_FWL_DATETIMEPICKER_H_ |
9 | 9 |
10 class CFWL_WidgetImpProperties; | 10 #include "xfa/include/fwl/core/fwl_note.h" |
11 class IFWL_Widget; | 11 #include "xfa/include/fwl/core/fwl_widget.h" |
12 class IFWL_DateTimePickerDP; | 12 |
13 class IFWL_DateTimePicker; | |
14 #define FWL_CLASS_DateTimePicker L"FWL_DATETIMEPICKER" | 13 #define FWL_CLASS_DateTimePicker L"FWL_DATETIMEPICKER" |
15 #define FWL_CLASSHASH_DateTimePicker 3851176257 | 14 #define FWL_CLASSHASH_DateTimePicker 3851176257 |
16 #define FWL_STYLEEXT_DTP_AllowEdit (1L << 0) | 15 #define FWL_STYLEEXT_DTP_AllowEdit (1L << 0) |
17 #define FWL_STYLEEXT_DTP_LongDateFormat (0L << 1) | 16 #define FWL_STYLEEXT_DTP_LongDateFormat (0L << 1) |
18 #define FWL_STYLEEXT_DTP_ShortDateFormat (1L << 1) | 17 #define FWL_STYLEEXT_DTP_ShortDateFormat (1L << 1) |
19 #define FWL_STYLEEXT_DTP_TimeFormat (2L << 1) | 18 #define FWL_STYLEEXT_DTP_TimeFormat (2L << 1) |
20 #define FWL_STYLEEXT_DTP_Spin (1L << 3) | 19 #define FWL_STYLEEXT_DTP_Spin (1L << 3) |
21 #define FWL_STYLEEXT_DTP_EditHNear (0L << 4) | 20 #define FWL_STYLEEXT_DTP_EditHNear (0L << 4) |
22 #define FWL_STYLEEXT_DTP_EditHCenter (1L << 4) | 21 #define FWL_STYLEEXT_DTP_EditHCenter (1L << 4) |
23 #define FWL_STYLEEXT_DTP_EditHFar (2L << 4) | 22 #define FWL_STYLEEXT_DTP_EditHFar (2L << 4) |
(...skipping 16 matching lines...) Expand all Loading... |
40 #define FWL_EVT_DTP_DropDown L"FWL_EVENT_DTP_DropDown" | 39 #define FWL_EVT_DTP_DropDown L"FWL_EVENT_DTP_DropDown" |
41 #define FWL_EVTHASH_DTP_DropDown 264728733 | 40 #define FWL_EVTHASH_DTP_DropDown 264728733 |
42 #define FWL_EVT_DTP_CloseUp L"FWL_EVENT_DTP_CloseUp" | 41 #define FWL_EVT_DTP_CloseUp L"FWL_EVENT_DTP_CloseUp" |
43 #define FWL_EVTHASH_DTP_CloseUp 4280973803 | 42 #define FWL_EVTHASH_DTP_CloseUp 4280973803 |
44 #define FWL_EVT_DTP_EditChanged L"FWL_EVENT_DTP_EditChanged" | 43 #define FWL_EVT_DTP_EditChanged L"FWL_EVENT_DTP_EditChanged" |
45 #define FWL_EVTHASH_DTP_EditChanged 4009610944 | 44 #define FWL_EVTHASH_DTP_EditChanged 4009610944 |
46 #define FWL_EVT_DTP_HoverChanged L"FWL_EVENT_DTP_HoverChanged" | 45 #define FWL_EVT_DTP_HoverChanged L"FWL_EVENT_DTP_HoverChanged" |
47 #define FWL_EVTHASH_DTP_HoverChanged 686674750 | 46 #define FWL_EVTHASH_DTP_HoverChanged 686674750 |
48 #define FWL_EVT_DTP_SelectChanged L"FWL_EVENT_DTP_SelectChanged" | 47 #define FWL_EVT_DTP_SelectChanged L"FWL_EVENT_DTP_SelectChanged" |
49 #define FWL_EVTHASH_DTP_SelectChanged 1589616858 | 48 #define FWL_EVTHASH_DTP_SelectChanged 1589616858 |
| 49 |
50 BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpDropDown, FWL_EVTHASH_DTP_DropDown) | 50 BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpDropDown, FWL_EVTHASH_DTP_DropDown) |
51 END_FWL_EVENT_DEF | 51 END_FWL_EVENT_DEF |
| 52 |
52 BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpCloseUp, FWL_EVTHASH_DTP_CloseUp) | 53 BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpCloseUp, FWL_EVTHASH_DTP_CloseUp) |
53 END_FWL_EVENT_DEF | 54 END_FWL_EVENT_DEF |
| 55 |
54 BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpEditChanged, FWL_EVTHASH_DTP_EditChanged) | 56 BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpEditChanged, FWL_EVTHASH_DTP_EditChanged) |
55 CFX_WideString m_wsText; | 57 CFX_WideString m_wsText; |
56 END_FWL_EVENT_DEF | 58 END_FWL_EVENT_DEF |
| 59 |
57 BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpHoverChanged, FWL_EVTHASH_DTP_HoverChanged) | 60 BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpHoverChanged, FWL_EVTHASH_DTP_HoverChanged) |
58 int32_t hoverday; | 61 int32_t hoverday; |
59 END_FWL_EVENT_DEF | 62 END_FWL_EVENT_DEF |
| 63 |
60 BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpSelectChanged, FWL_EVTHASH_DTP_SelectChanged) | 64 BEGIN_FWL_EVENT_DEF(CFWL_Event_DtpSelectChanged, FWL_EVTHASH_DTP_SelectChanged) |
61 int32_t iYear; | 65 int32_t iYear; |
62 int32_t iMonth; | 66 int32_t iMonth; |
63 int32_t iDay; | 67 int32_t iDay; |
64 END_FWL_EVENT_DEF | 68 END_FWL_EVENT_DEF |
| 69 |
65 class IFWL_DateTimePickerDP : public IFWL_DataProvider { | 70 class IFWL_DateTimePickerDP : public IFWL_DataProvider { |
66 public: | 71 public: |
67 virtual FWL_ERR GetToday(IFWL_Widget* pWidget, | 72 virtual FWL_ERR GetToday(IFWL_Widget* pWidget, |
68 int32_t& iYear, | 73 int32_t& iYear, |
69 int32_t& iMonth, | 74 int32_t& iMonth, |
70 int32_t& iDay) = 0; | 75 int32_t& iDay) = 0; |
71 }; | 76 }; |
72 class IFWL_DateTimePicker : public IFWL_Widget { | 77 class IFWL_DateTimePicker : public IFWL_Widget { |
73 public: | 78 public: |
74 static IFWL_DateTimePicker* Create(const CFWL_WidgetImpProperties& properties, | 79 static IFWL_DateTimePicker* Create(const CFWL_WidgetImpProperties& properties, |
(...skipping 23 matching lines...) Expand all Loading... |
98 FWL_ERR GetBBox(CFX_RectF& rect); | 103 FWL_ERR GetBBox(CFX_RectF& rect); |
99 FWL_ERR SetEditLimit(int32_t nLimit); | 104 FWL_ERR SetEditLimit(int32_t nLimit); |
100 FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded, | 105 FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded, |
101 FX_DWORD dwStylesExRemoved); | 106 FX_DWORD dwStylesExRemoved); |
102 | 107 |
103 protected: | 108 protected: |
104 IFWL_DateTimePicker(); | 109 IFWL_DateTimePicker(); |
105 }; | 110 }; |
106 | 111 |
107 #endif // XFA_INCLUDE_FWL_BASEWIDGET_FWL_DATETIMEPICKER_H_ | 112 #endif // XFA_INCLUDE_FWL_BASEWIDGET_FWL_DATETIMEPICKER_H_ |
OLD | NEW |