| 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 22 matching lines...) Expand all Loading... |
| 82 int32_t iDay, | 81 int32_t iDay, |
| 83 CFX_WideString& wsText); | 82 CFX_WideString& wsText); |
| 84 void ResetEditAlignment(); | 83 void ResetEditAlignment(); |
| 85 void InitProxyForm(); | 84 void InitProxyForm(); |
| 86 | 85 |
| 87 bool DisForm_IsMonthCalendarVisible() const; | 86 bool DisForm_IsMonthCalendarVisible() const; |
| 88 void DisForm_ShowMonthCalendar(bool bActivate); | 87 void DisForm_ShowMonthCalendar(bool bActivate); |
| 89 FWL_WidgetHit DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy) const; | 88 FWL_WidgetHit DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy) const; |
| 90 bool DisForm_IsNeedShowButton() const; | 89 bool DisForm_IsNeedShowButton() const; |
| 91 void DisForm_Update(); | 90 void DisForm_Update(); |
| 92 void DisForm_GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false); | 91 void DisForm_GetWidgetRect(CFX_RectF& rect, bool bAutoSize); |
| 93 void DisForm_GetBBox(CFX_RectF& rect) const; | 92 void DisForm_GetBBox(CFX_RectF& rect) const; |
| 94 void DisForm_DrawWidget(CFX_Graphics* pGraphics, | 93 void DisForm_DrawWidget(CFX_Graphics* pGraphics, |
| 95 const CFX_Matrix* pMatrix = nullptr); | 94 const CFX_Matrix* pMatrix = nullptr); |
| 96 void DisForm_OnFocusChanged(CFWL_Message* pMsg, bool bSet); | 95 void DisForm_OnFocusChanged(CFWL_Message* pMsg, bool bSet); |
| 97 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); | 96 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); |
| 98 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 97 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
| 99 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 98 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
| 100 void OnMouseMove(CFWL_MsgMouse* pMsg); | 99 void OnMouseMove(CFWL_MsgMouse* pMsg); |
| 101 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 100 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
| 102 | 101 |
| 103 CFX_RectF m_rtBtn; | 102 CFX_RectF m_rtBtn; |
| 104 CFX_RectF m_rtClient; | 103 CFX_RectF m_rtClient; |
| 105 int32_t m_iBtnState; | 104 int32_t m_iBtnState; |
| 106 int32_t m_iYear; | 105 int32_t m_iYear; |
| 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 |