| 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) override; | |
| 46 void Update() override; | 45 void Update() override; |
| 47 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; | 46 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; |
| 48 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) override; | 47 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) override; |
| 49 void SetThemeProvider(IFWL_ThemeProvider* pTP) override; | 48 void SetThemeProvider(IFWL_ThemeProvider* pTP) override; |
| 50 void OnProcessMessage(CFWL_Message* pMessage) override; | 49 void OnProcessMessage(CFWL_Message* pMessage) override; |
| 51 void OnDrawWidget(CFX_Graphics* pGraphics, | 50 void OnDrawWidget(CFX_Graphics* pGraphics, |
| 52 const CFX_Matrix* pMatrix) override; | 51 const CFX_Matrix* pMatrix) override; |
| 53 | 52 |
| 54 void GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay); | 53 void GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay); |
| 55 void SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay); | 54 void SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 86 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 85 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
| 87 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 86 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
| 88 void OnMouseMove(CFWL_MsgMouse* pMsg); | 87 void OnMouseMove(CFWL_MsgMouse* pMsg); |
| 89 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 88 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
| 90 | 89 |
| 91 bool DisForm_IsMonthCalendarVisible() const; | 90 bool DisForm_IsMonthCalendarVisible() const; |
| 92 void DisForm_ShowMonthCalendar(bool bActivate); | 91 void DisForm_ShowMonthCalendar(bool bActivate); |
| 93 FWL_WidgetHit DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy) const; | 92 FWL_WidgetHit DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy) const; |
| 94 bool DisForm_IsNeedShowButton() const; | 93 bool DisForm_IsNeedShowButton() const; |
| 95 void DisForm_Update(); | 94 void DisForm_Update(); |
| 96 void DisForm_GetWidgetRect(CFX_RectF& rect, bool bAutoSize); | |
| 97 void DisForm_GetBBox(CFX_RectF& rect) const; | 95 void DisForm_GetBBox(CFX_RectF& rect) const; |
| 98 void DisForm_DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix); | 96 void DisForm_DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix); |
| 99 void DisForm_OnFocusChanged(CFWL_Message* pMsg, bool bSet); | 97 void DisForm_OnFocusChanged(CFWL_Message* pMsg, bool bSet); |
| 100 | 98 |
| 101 CFX_RectF m_rtBtn; | 99 CFX_RectF m_rtBtn; |
| 102 CFX_RectF m_rtClient; | 100 CFX_RectF m_rtClient; |
| 103 int32_t m_iBtnState; | 101 int32_t m_iBtnState; |
| 104 int32_t m_iYear; | 102 int32_t m_iYear; |
| 105 int32_t m_iMonth; | 103 int32_t m_iMonth; |
| 106 int32_t m_iDay; | 104 int32_t m_iDay; |
| 107 bool m_bLBtnDown; | 105 bool m_bLBtnDown; |
| 108 std::unique_ptr<CFWL_DateTimeEdit> m_pEdit; | 106 std::unique_ptr<CFWL_DateTimeEdit> m_pEdit; |
| 109 std::unique_ptr<CFWL_MonthCalendar> m_pMonthCal; | 107 std::unique_ptr<CFWL_MonthCalendar> m_pMonthCal; |
| 110 std::unique_ptr<CFWL_FormProxy> m_pForm; | 108 std::unique_ptr<CFWL_FormProxy> m_pForm; |
| 111 FX_FLOAT m_fBtn; | 109 FX_FLOAT m_fBtn; |
| 112 }; | 110 }; |
| 113 | 111 |
| 114 #endif // XFA_FWL_CORE_CFWL_DATETIMEPICKER_H_ | 112 #endif // XFA_FWL_CORE_CFWL_DATETIMEPICKER_H_ |
| OLD | NEW |