| 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" |
| 11 #include "xfa/fwl/core/cfwl_widgetimpproperties.h" | 11 #include "xfa/fwl/core/cfwl_widgetproperties.h" |
| 12 #include "xfa/fwl/core/ifwl_dataprovider.h" | 12 #include "xfa/fwl/core/ifwl_dataprovider.h" |
| 13 #include "xfa/fwl/core/ifwl_monthcalendar.h" | 13 #include "xfa/fwl/core/ifwl_monthcalendar.h" |
| 14 #include "xfa/fwl/core/ifwl_widget.h" | 14 #include "xfa/fwl/core/ifwl_widget.h" |
| 15 | 15 |
| 16 #define FWL_STYLEEXT_DTP_AllowEdit (1L << 0) | 16 #define FWL_STYLEEXT_DTP_AllowEdit (1L << 0) |
| 17 #define FWL_STYLEEXT_DTP_LongDateFormat (0L << 1) | 17 #define FWL_STYLEEXT_DTP_LongDateFormat (0L << 1) |
| 18 #define FWL_STYLEEXT_DTP_ShortDateFormat (1L << 1) | 18 #define FWL_STYLEEXT_DTP_ShortDateFormat (1L << 1) |
| 19 #define FWL_STYLEEXT_DTP_TimeFormat (2L << 1) | 19 #define FWL_STYLEEXT_DTP_TimeFormat (2L << 1) |
| 20 #define FWL_STYLEEXT_DTP_Spin (1L << 3) | 20 #define FWL_STYLEEXT_DTP_Spin (1L << 3) |
| 21 #define FWL_STYLEEXT_DTP_EditHNear (0L << 4) | 21 #define FWL_STYLEEXT_DTP_EditHNear (0L << 4) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 class IFWL_DateTimePickerDP : public IFWL_DataProvider { | 55 class IFWL_DateTimePickerDP : public IFWL_DataProvider { |
| 56 public: | 56 public: |
| 57 virtual FWL_Error GetToday(IFWL_Widget* pWidget, | 57 virtual FWL_Error GetToday(IFWL_Widget* pWidget, |
| 58 int32_t& iYear, | 58 int32_t& iYear, |
| 59 int32_t& iMonth, | 59 int32_t& iMonth, |
| 60 int32_t& iDay) = 0; | 60 int32_t& iDay) = 0; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 class IFWL_DateTimePicker : public IFWL_Widget { | 63 class IFWL_DateTimePicker : public IFWL_Widget { |
| 64 public: | 64 public: |
| 65 explicit IFWL_DateTimePicker(const IFWL_App* app, | 65 explicit IFWL_DateTimePicker( |
| 66 const CFWL_WidgetImpProperties& properties); | 66 const IFWL_App* app, |
| 67 std::unique_ptr<CFWL_WidgetProperties> properties); |
| 67 ~IFWL_DateTimePicker() override; | 68 ~IFWL_DateTimePicker() override; |
| 68 | 69 |
| 69 // IFWL_Widget | 70 // IFWL_Widget |
| 70 FWL_Type GetClassID() const override; | 71 FWL_Type GetClassID() const override; |
| 71 FWL_Error GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false) override; | 72 FWL_Error GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false) override; |
| 72 FWL_Error Update() override; | 73 FWL_Error Update() override; |
| 73 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; | 74 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; |
| 74 FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 75 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
| 75 const CFX_Matrix* pMatrix = nullptr) override; | 76 const CFX_Matrix* pMatrix = nullptr) override; |
| 76 FWL_Error SetThemeProvider(IFWL_ThemeProvider* pTP) override; | 77 FWL_Error SetThemeProvider(IFWL_ThemeProvider* pTP) override; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 171 |
| 171 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); | 172 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); |
| 172 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 173 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
| 173 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 174 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
| 174 void OnMouseMove(CFWL_MsgMouse* pMsg); | 175 void OnMouseMove(CFWL_MsgMouse* pMsg); |
| 175 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 176 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
| 176 void DisForm_OnFocusChanged(CFWL_Message* pMsg, bool bSet); | 177 void DisForm_OnFocusChanged(CFWL_Message* pMsg, bool bSet); |
| 177 }; | 178 }; |
| 178 | 179 |
| 179 #endif // XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_ | 180 #endif // XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_ |
| OLD | NEW |