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_CORE_IFWL_DATETIMEPICKER_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_ |
8 #define XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_ | 8 #define XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_ |
9 | 9 |
10 #include "xfa/fwl/core/cfwl_event.h" | 10 #include "xfa/fwl/core/cfwl_event.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #define FWL_STYLEEXT_DTP_EditHFar (2L << 4) | 23 #define FWL_STYLEEXT_DTP_EditHFar (2L << 4) |
24 #define FWL_STYLEEXT_DTP_EditVNear (0L << 6) | 24 #define FWL_STYLEEXT_DTP_EditVNear (0L << 6) |
25 #define FWL_STYLEEXT_DTP_EditVCenter (1L << 6) | 25 #define FWL_STYLEEXT_DTP_EditVCenter (1L << 6) |
26 #define FWL_STYLEEXT_DTP_EditVFar (2L << 6) | 26 #define FWL_STYLEEXT_DTP_EditVFar (2L << 6) |
27 #define FWL_STYLEEXT_DTP_EditJustified (1L << 8) | 27 #define FWL_STYLEEXT_DTP_EditJustified (1L << 8) |
28 #define FWL_STYLEEXT_DTP_EditDistributed (2L << 8) | 28 #define FWL_STYLEEXT_DTP_EditDistributed (2L << 8) |
29 #define FWL_STYLEEXT_DTP_EditHAlignMask (3L << 4) | 29 #define FWL_STYLEEXT_DTP_EditHAlignMask (3L << 4) |
30 #define FWL_STYLEEXT_DTP_EditVAlignMask (3L << 6) | 30 #define FWL_STYLEEXT_DTP_EditVAlignMask (3L << 6) |
31 #define FWL_STYLEEXT_DTP_EditHAlignModeMask (3L << 8) | 31 #define FWL_STYLEEXT_DTP_EditHAlignModeMask (3L << 8) |
32 | 32 |
33 class IFWL_DateTimeCalendar; | |
34 class IFWL_DateTimeEdit; | 33 class IFWL_DateTimeEdit; |
35 class IFWL_FormProxy; | 34 class IFWL_FormProxy; |
36 | 35 |
37 FWL_EVENT_DEF(CFWL_Event_DtpDropDown, CFWL_EventType::DropDown) | 36 FWL_EVENT_DEF(CFWL_Event_DtpDropDown, CFWL_EventType::DropDown) |
38 | 37 |
39 FWL_EVENT_DEF(CFWL_Event_DtpCloseUp, CFWL_EventType::CloseUp) | 38 FWL_EVENT_DEF(CFWL_Event_DtpCloseUp, CFWL_EventType::CloseUp) |
40 | 39 |
41 FWL_EVENT_DEF(CFWL_Event_DtpEditChanged, | 40 FWL_EVENT_DEF(CFWL_Event_DtpEditChanged, |
42 CFWL_EventType::EditChanged, | 41 CFWL_EventType::EditChanged, |
43 CFX_WideString m_wsText;) | 42 CFX_WideString m_wsText;) |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 void InitProxyForm(); | 132 void InitProxyForm(); |
134 | 133 |
135 CFX_RectF m_rtBtn; | 134 CFX_RectF m_rtBtn; |
136 CFX_RectF m_rtClient; | 135 CFX_RectF m_rtClient; |
137 int32_t m_iBtnState; | 136 int32_t m_iBtnState; |
138 int32_t m_iYear; | 137 int32_t m_iYear; |
139 int32_t m_iMonth; | 138 int32_t m_iMonth; |
140 int32_t m_iDay; | 139 int32_t m_iDay; |
141 bool m_bLBtnDown; | 140 bool m_bLBtnDown; |
142 std::unique_ptr<IFWL_DateTimeEdit> m_pEdit; | 141 std::unique_ptr<IFWL_DateTimeEdit> m_pEdit; |
143 std::unique_ptr<IFWL_DateTimeCalendar> m_pMonthCal; | 142 std::unique_ptr<IFWL_MonthCalendar> m_pMonthCal; |
144 std::unique_ptr<IFWL_FormProxy> m_pForm; | 143 std::unique_ptr<IFWL_FormProxy> m_pForm; |
145 FX_FLOAT m_fBtn; | 144 FX_FLOAT m_fBtn; |
146 | 145 |
147 private: | 146 private: |
148 FWL_Error DisForm_Initialize(); | 147 FWL_Error DisForm_Initialize(); |
149 void DisForm_InitDateTimeCalendar(); | 148 void DisForm_InitMonthCalendar(); |
150 void DisForm_InitDateTimeEdit(); | 149 void DisForm_InitDateTimeEdit(); |
151 bool DisForm_IsMonthCalendarShowed(); | 150 bool DisForm_IsMonthCalendarShowed(); |
152 void DisForm_ShowMonthCalendar(bool bActivate); | 151 void DisForm_ShowMonthCalendar(bool bActivate); |
153 FWL_WidgetHit DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy); | 152 FWL_WidgetHit DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy); |
154 bool DisForm_IsNeedShowButton(); | 153 bool DisForm_IsNeedShowButton(); |
155 void DisForm_Update(); | 154 void DisForm_Update(); |
156 void DisForm_GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false); | 155 void DisForm_GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false); |
157 FWL_Error DisForm_GetBBox(CFX_RectF& rect); | 156 FWL_Error DisForm_GetBBox(CFX_RectF& rect); |
158 void DisForm_DrawWidget(CFX_Graphics* pGraphics, | 157 void DisForm_DrawWidget(CFX_Graphics* pGraphics, |
159 const CFX_Matrix* pMatrix = nullptr); | 158 const CFX_Matrix* pMatrix = nullptr); |
160 | 159 |
161 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); | 160 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); |
162 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 161 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
163 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 162 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
164 void OnMouseMove(CFWL_MsgMouse* pMsg); | 163 void OnMouseMove(CFWL_MsgMouse* pMsg); |
165 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 164 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
166 void DisForm_OnFocusChanged(CFWL_Message* pMsg, bool bSet); | 165 void DisForm_OnFocusChanged(CFWL_Message* pMsg, bool bSet); |
167 | 166 |
168 int32_t m_iCurYear; | 167 int32_t m_iCurYear; |
169 int32_t m_iCurMonth; | 168 int32_t m_iCurMonth; |
170 int32_t m_iCurDay; | 169 int32_t m_iCurDay; |
171 }; | 170 }; |
172 | 171 |
173 #endif // XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_ | 172 #endif // XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_ |
OLD | NEW |