| 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_MONTHCALENDAR_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_MONTHCALENDAR_H_ | 
| 8 #define XFA_FWL_CORE_IFWL_MONTHCALENDAR_H_ | 8 #define XFA_FWL_CORE_IFWL_MONTHCALENDAR_H_ | 
| 9 | 9 | 
| 10 #include "xfa/fgas/localization/fgas_datetime.h" | 10 #include "xfa/fgas/localization/fgas_datetime.h" | 
| 11 #include "xfa/fwl/core/cfwl_event.h" | 11 #include "xfa/fwl/core/cfwl_event.h" | 
| 12 #include "xfa/fwl/core/cfwl_widgetimpproperties.h" | 12 #include "xfa/fwl/core/cfwl_widgetimpproperties.h" | 
| 13 #include "xfa/fwl/core/ifwl_dataprovider.h" | 13 #include "xfa/fwl/core/ifwl_dataprovider.h" | 
| 14 #include "xfa/fwl/core/ifwl_widget.h" | 14 #include "xfa/fwl/core/ifwl_widget.h" | 
| 15 | 15 | 
| 16 #define FWL_CLASS_MonthCalendar L"FWL_MONTHCALENDAR" |  | 
| 17 #define FWL_STYLEEXT_MCD_MultiSelect (1L << 0) | 16 #define FWL_STYLEEXT_MCD_MultiSelect (1L << 0) | 
| 18 #define FWL_STYLEEXT_MCD_NoToday (1L << 1) | 17 #define FWL_STYLEEXT_MCD_NoToday (1L << 1) | 
| 19 #define FWL_STYLEEXT_MCD_NoTodayCircle (1L << 2) | 18 #define FWL_STYLEEXT_MCD_NoTodayCircle (1L << 2) | 
| 20 #define FWL_STYLEEXT_MCD_WeekNumbers (1L << 3) | 19 #define FWL_STYLEEXT_MCD_WeekNumbers (1L << 3) | 
| 21 #define FWL_ITEMSTATE_MCD_Nomal (0L << 0) | 20 #define FWL_ITEMSTATE_MCD_Nomal (0L << 0) | 
| 22 #define FWL_ITEMSTATE_MCD_Flag (1L << 0) | 21 #define FWL_ITEMSTATE_MCD_Flag (1L << 0) | 
| 23 #define FWL_ITEMSTATE_MCD_Selected (1L << 1) | 22 #define FWL_ITEMSTATE_MCD_Selected (1L << 1) | 
| 24 #define FWL_ITEMSTATE_MCD_Focused (1L << 2) | 23 #define FWL_ITEMSTATE_MCD_Focused (1L << 2) | 
| 25 | 24 | 
| 26 FWL_EVENT_DEF(CFWL_Event_McdDateSelected, | 25 FWL_EVENT_DEF(CFWL_Event_McdDateSelected, | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 51   virtual int32_t GetCurYear(IFWL_Widget* pWidget) = 0; | 50   virtual int32_t GetCurYear(IFWL_Widget* pWidget) = 0; | 
| 52 }; | 51 }; | 
| 53 | 52 | 
| 54 class IFWL_MonthCalendar : public IFWL_Widget { | 53 class IFWL_MonthCalendar : public IFWL_Widget { | 
| 55  public: | 54  public: | 
| 56   IFWL_MonthCalendar(const CFWL_WidgetImpProperties& properties, | 55   IFWL_MonthCalendar(const CFWL_WidgetImpProperties& properties, | 
| 57                      IFWL_Widget* pOuter); | 56                      IFWL_Widget* pOuter); | 
| 58   ~IFWL_MonthCalendar() override; | 57   ~IFWL_MonthCalendar() override; | 
| 59 | 58 | 
| 60   // FWL_WidgetImp | 59   // FWL_WidgetImp | 
| 61   FWL_Error GetClassName(CFX_WideString& wsClass) const override; |  | 
| 62   FWL_Type GetClassID() const override; | 60   FWL_Type GetClassID() const override; | 
| 63   FWL_Error Initialize() override; | 61   FWL_Error Initialize() override; | 
| 64   FWL_Error Finalize() override; | 62   void Finalize() override; | 
| 65   FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; | 63   FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; | 
| 66   FWL_Error Update() override; | 64   FWL_Error Update() override; | 
| 67   FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 65   FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 
| 68                        const CFX_Matrix* pMatrix = nullptr) override; | 66                        const CFX_Matrix* pMatrix = nullptr) override; | 
| 69   int32_t CountSelect(); | 67   int32_t CountSelect(); | 
| 70   FX_BOOL GetSelect(int32_t& iYear, | 68   FX_BOOL GetSelect(int32_t& iYear, | 
| 71                     int32_t& iMonth, | 69                     int32_t& iMonth, | 
| 72                     int32_t& iDay, | 70                     int32_t& iDay, | 
| 73                     int32_t nIndex = 0); | 71                     int32_t nIndex = 0); | 
| 74   FX_BOOL SetSelect(int32_t iYear, int32_t iMonth, int32_t iDay); | 72   FX_BOOL SetSelect(int32_t iYear, int32_t iMonth, int32_t iDay); | 
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 268   void OnActivate(CFWL_Message* pMsg); | 266   void OnActivate(CFWL_Message* pMsg); | 
| 269   void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); | 267   void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); | 
| 270   void OnLButtonDown(CFWL_MsgMouse* pMsg); | 268   void OnLButtonDown(CFWL_MsgMouse* pMsg); | 
| 271   void OnLButtonUp(CFWL_MsgMouse* pMsg); | 269   void OnLButtonUp(CFWL_MsgMouse* pMsg); | 
| 272   void OnMouseMove(CFWL_MsgMouse* pMsg); | 270   void OnMouseMove(CFWL_MsgMouse* pMsg); | 
| 273   void OnMouseLeave(CFWL_MsgMouse* pMsg); | 271   void OnMouseLeave(CFWL_MsgMouse* pMsg); | 
| 274   IFWL_MonthCalendar* m_pOwner; | 272   IFWL_MonthCalendar* m_pOwner; | 
| 275 }; | 273 }; | 
| 276 | 274 | 
| 277 #endif  // XFA_FWL_CORE_IFWL_MONTHCALENDAR_H_ | 275 #endif  // XFA_FWL_CORE_IFWL_MONTHCALENDAR_H_ | 
| OLD | NEW | 
|---|