| 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_MONTHCALENDAR_H_ | 7 #ifndef XFA_FWL_CFWL_MONTHCALENDAR_H_ |
| 8 #define XFA_FWL_CORE_CFWL_MONTHCALENDAR_H_ | 8 #define XFA_FWL_CFWL_MONTHCALENDAR_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "xfa/fgas/localization/fgas_datetime.h" | 12 #include "xfa/fgas/localization/fgas_datetime.h" |
| 13 #include "xfa/fwl/core/cfwl_event.h" | 13 #include "xfa/fwl/cfwl_event.h" |
| 14 #include "xfa/fwl/core/cfwl_widget.h" | 14 #include "xfa/fwl/cfwl_widget.h" |
| 15 #include "xfa/fwl/core/cfwl_widgetproperties.h" | 15 #include "xfa/fwl/cfwl_widgetproperties.h" |
| 16 | 16 |
| 17 #define FWL_STYLEEXT_MCD_MultiSelect (1L << 0) | 17 #define FWL_STYLEEXT_MCD_MultiSelect (1L << 0) |
| 18 #define FWL_STYLEEXT_MCD_NoToday (1L << 1) | 18 #define FWL_STYLEEXT_MCD_NoToday (1L << 1) |
| 19 #define FWL_STYLEEXT_MCD_NoTodayCircle (1L << 2) | 19 #define FWL_STYLEEXT_MCD_NoTodayCircle (1L << 2) |
| 20 #define FWL_STYLEEXT_MCD_WeekNumbers (1L << 3) | 20 #define FWL_STYLEEXT_MCD_WeekNumbers (1L << 3) |
| 21 #define FWL_ITEMSTATE_MCD_Nomal (0L << 0) | 21 #define FWL_ITEMSTATE_MCD_Nomal (0L << 0) |
| 22 #define FWL_ITEMSTATE_MCD_Flag (1L << 0) | 22 #define FWL_ITEMSTATE_MCD_Flag (1L << 0) |
| 23 #define FWL_ITEMSTATE_MCD_Selected (1L << 1) | 23 #define FWL_ITEMSTATE_MCD_Selected (1L << 1) |
| 24 #define FWL_ITEMSTATE_MCD_Focused (1L << 2) | 24 #define FWL_ITEMSTATE_MCD_Focused (1L << 2) |
| 25 | 25 |
| 26 class CFWL_MsgMouse; | 26 class CFWL_MessageMouse; |
| 27 class CFWL_Widget; | 27 class CFWL_Widget; |
| 28 | 28 |
| 29 class CFWL_MonthCalendar : public CFWL_Widget { | 29 class CFWL_MonthCalendar : public CFWL_Widget { |
| 30 public: | 30 public: |
| 31 CFWL_MonthCalendar(const CFWL_App* app, | 31 CFWL_MonthCalendar(const CFWL_App* app, |
| 32 std::unique_ptr<CFWL_WidgetProperties> properties, | 32 std::unique_ptr<CFWL_WidgetProperties> properties, |
| 33 CFWL_Widget* pOuter); | 33 CFWL_Widget* pOuter); |
| 34 ~CFWL_MonthCalendar() override; | 34 ~CFWL_MonthCalendar() override; |
| 35 | 35 |
| 36 // FWL_WidgetImp | 36 // FWL_WidgetImp |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 void RemoveSelDay(); | 151 void RemoveSelDay(); |
| 152 void AddSelDay(int32_t iDay); | 152 void AddSelDay(int32_t iDay); |
| 153 void JumpToToday(); | 153 void JumpToToday(); |
| 154 void GetHeadText(int32_t iYear, int32_t iMonth, CFX_WideString& wsHead); | 154 void GetHeadText(int32_t iYear, int32_t iMonth, CFX_WideString& wsHead); |
| 155 void GetTodayText(int32_t iYear, | 155 void GetTodayText(int32_t iYear, |
| 156 int32_t iMonth, | 156 int32_t iMonth, |
| 157 int32_t iDay, | 157 int32_t iDay, |
| 158 CFX_WideString& wsToday); | 158 CFX_WideString& wsToday); |
| 159 int32_t GetDayAtPoint(FX_FLOAT x, FX_FLOAT y); | 159 int32_t GetDayAtPoint(FX_FLOAT x, FX_FLOAT y); |
| 160 void GetDayRect(int32_t iDay, CFX_RectF& rtDay); | 160 void GetDayRect(int32_t iDay, CFX_RectF& rtDay); |
| 161 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 161 void OnLButtonDown(CFWL_MessageMouse* pMsg); |
| 162 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 162 void OnLButtonUp(CFWL_MessageMouse* pMsg); |
| 163 void DisForm_OnLButtonUp(CFWL_MsgMouse* pMsg); | 163 void DisForm_OnLButtonUp(CFWL_MessageMouse* pMsg); |
| 164 void OnMouseMove(CFWL_MsgMouse* pMsg); | 164 void OnMouseMove(CFWL_MessageMouse* pMsg); |
| 165 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 165 void OnMouseLeave(CFWL_MessageMouse* pMsg); |
| 166 | 166 |
| 167 bool m_bInitialized; | 167 bool m_bInitialized; |
| 168 CFX_RectF m_rtHead; | 168 CFX_RectF m_rtHead; |
| 169 CFX_RectF m_rtWeek; | 169 CFX_RectF m_rtWeek; |
| 170 CFX_RectF m_rtLBtn; | 170 CFX_RectF m_rtLBtn; |
| 171 CFX_RectF m_rtRBtn; | 171 CFX_RectF m_rtRBtn; |
| 172 CFX_RectF m_rtDates; | 172 CFX_RectF m_rtDates; |
| 173 CFX_RectF m_rtHSep; | 173 CFX_RectF m_rtHSep; |
| 174 CFX_RectF m_rtHeadText; | 174 CFX_RectF m_rtHeadText; |
| 175 CFX_RectF m_rtToday; | 175 CFX_RectF m_rtToday; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 FX_FLOAT m_fDateCellWid; | 217 FX_FLOAT m_fDateCellWid; |
| 218 FX_FLOAT m_fDateCellHei; | 218 FX_FLOAT m_fDateCellHei; |
| 219 FX_FLOAT m_fTodayWid; | 219 FX_FLOAT m_fTodayWid; |
| 220 FX_FLOAT m_fTodayHei; | 220 FX_FLOAT m_fTodayHei; |
| 221 FX_FLOAT m_fTodayFlagWid; | 221 FX_FLOAT m_fTodayFlagWid; |
| 222 FX_FLOAT m_fMCWid; | 222 FX_FLOAT m_fMCWid; |
| 223 FX_FLOAT m_fMCHei; | 223 FX_FLOAT m_fMCHei; |
| 224 bool m_bFlag; | 224 bool m_bFlag; |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 #endif // XFA_FWL_CORE_CFWL_MONTHCALENDAR_H_ | 227 #endif // XFA_FWL_CFWL_MONTHCALENDAR_H_ |
| OLD | NEW |