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_CFWL_DATETIMEPICKER_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_DATETIMEPICKER_H_ |
8 #define XFA_FWL_CORE_CFWL_DATETIMEPICKER_H_ | 8 #define XFA_FWL_CORE_CFWL_DATETIMEPICKER_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 24 matching lines...) Expand all Loading... |
35 class CFWL_DateTimeEdit; | 35 class CFWL_DateTimeEdit; |
36 class CFWL_FormProxy; | 36 class CFWL_FormProxy; |
37 | 37 |
38 class CFWL_DateTimePicker : public CFWL_Widget { | 38 class CFWL_DateTimePicker : public CFWL_Widget { |
39 public: | 39 public: |
40 explicit CFWL_DateTimePicker(const CFWL_App* pApp); | 40 explicit CFWL_DateTimePicker(const CFWL_App* pApp); |
41 ~CFWL_DateTimePicker() override; | 41 ~CFWL_DateTimePicker() override; |
42 | 42 |
43 // CFWL_Widget | 43 // CFWL_Widget |
44 FWL_Type GetClassID() const override; | 44 FWL_Type GetClassID() const override; |
45 void GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false) override; | 45 void GetWidgetRect(CFX_RectF& rect, bool bAutoSize) override; |
46 void Update() override; | 46 void Update() override; |
47 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; | 47 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; |
48 void DrawWidget(CFX_Graphics* pGraphics, | 48 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) override; |
49 const CFX_Matrix* pMatrix = nullptr) override; | |
50 void SetThemeProvider(IFWL_ThemeProvider* pTP) override; | 49 void SetThemeProvider(IFWL_ThemeProvider* pTP) override; |
51 void OnProcessMessage(CFWL_Message* pMessage) override; | 50 void OnProcessMessage(CFWL_Message* pMessage) override; |
52 void OnDrawWidget(CFX_Graphics* pGraphics, | 51 void OnDrawWidget(CFX_Graphics* pGraphics, |
53 const CFX_Matrix* pMatrix) override; | 52 const CFX_Matrix* pMatrix) override; |
54 | 53 |
55 void GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay); | 54 void GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay); |
56 void SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay); | 55 void SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay); |
57 | 56 |
58 void SetEditText(const CFX_WideString& wsText); | 57 void SetEditText(const CFX_WideString& wsText); |
59 CFX_WideString GetEditText(int32_t nStart = 0, int32_t nCount = -1) const; | 58 CFX_WideString GetEditText(int32_t nStart = 0, int32_t nCount = -1) const; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 int32_t m_iMonth; | 106 int32_t m_iMonth; |
108 int32_t m_iDay; | 107 int32_t m_iDay; |
109 bool m_bLBtnDown; | 108 bool m_bLBtnDown; |
110 std::unique_ptr<CFWL_DateTimeEdit> m_pEdit; | 109 std::unique_ptr<CFWL_DateTimeEdit> m_pEdit; |
111 std::unique_ptr<CFWL_MonthCalendar> m_pMonthCal; | 110 std::unique_ptr<CFWL_MonthCalendar> m_pMonthCal; |
112 std::unique_ptr<CFWL_FormProxy> m_pForm; | 111 std::unique_ptr<CFWL_FormProxy> m_pForm; |
113 FX_FLOAT m_fBtn; | 112 FX_FLOAT m_fBtn; |
114 }; | 113 }; |
115 | 114 |
116 #endif // XFA_FWL_CORE_CFWL_DATETIMEPICKER_H_ | 115 #endif // XFA_FWL_CORE_CFWL_DATETIMEPICKER_H_ |
OLD | NEW |