| 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_SPINBUTTON_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_SPINBUTTON_H_ | 
| 8 #define XFA_FWL_CORE_IFWL_SPINBUTTON_H_ | 8 #define XFA_FWL_CORE_IFWL_SPINBUTTON_H_ | 
| 9 | 9 | 
| 10 #include "xfa/fwl/core/cfwl_event.h" | 10 #include "xfa/fwl/core/cfwl_event.h" | 
| 11 #include "xfa/fwl/core/ifwl_timer.h" | 11 #include "xfa/fwl/core/ifwl_timer.h" | 
| 12 #include "xfa/fwl/core/ifwl_widget.h" | 12 #include "xfa/fwl/core/ifwl_widget.h" | 
| 13 #include "xfa/fxfa/cxfa_eventparam.h" | 13 #include "xfa/fxfa/cxfa_eventparam.h" | 
| 14 | 14 | 
| 15 #define FWL_CLASS_SpinButton L"FWL_SPINBUTTON" | 15 #define FWL_CLASS_SpinButton L"FWL_SPINBUTTON" | 
| 16 #define FWL_STYLEEXE_SPB_Vert (1L << 0) | 16 #define FWL_STYLEEXE_SPB_Vert (1L << 0) | 
| 17 | 17 | 
| 18 class CFWL_MsgMouse; | 18 class CFWL_MsgMouse; | 
| 19 class CFWL_SpinButtonImpDelegate; | 19 class CFWL_SpinButtonImpDelegate; | 
| 20 class CFWL_WidgetImpProperties; | 20 class CFWL_WidgetImpProperties; | 
| 21 | 21 | 
| 22 FWL_EVENT_DEF(CFWL_EvtSpbClick, CFWL_EventType::Click, FX_BOOL m_bUp;) | 22 FWL_EVENT_DEF(CFWL_EvtSpbClick, CFWL_EventType::Click, FX_BOOL m_bUp;) | 
| 23 | 23 | 
| 24 class IFWL_SpinButton : public IFWL_Widget, public IFWL_Timer { | 24 class IFWL_SpinButton : public IFWL_Widget, public IFWL_Timer { | 
| 25  public: | 25  public: | 
| 26   static IFWL_SpinButton* Create(const CFWL_WidgetImpProperties& properties, | 26   explicit IFWL_SpinButton(const CFWL_WidgetImpProperties& properties); | 
| 27                                  IFWL_Widget* pOuter); |  | 
| 28 |  | 
| 29   IFWL_SpinButton(const CFWL_WidgetImpProperties& properties, |  | 
| 30                   IFWL_Widget* pOuter); |  | 
| 31   ~IFWL_SpinButton() override; | 27   ~IFWL_SpinButton() override; | 
| 32 | 28 | 
| 33   // IFWL_Widget | 29   // IFWL_Widget | 
| 34   FWL_Error GetClassName(CFX_WideString& wsClass) const override; | 30   FWL_Error GetClassName(CFX_WideString& wsClass) const override; | 
| 35   FWL_Type GetClassID() const override; | 31   FWL_Type GetClassID() const override; | 
| 36   FWL_Error Initialize() override; | 32   FWL_Error Initialize() override; | 
| 37   FWL_Error Finalize() override; | 33   FWL_Error Finalize() override; | 
| 38   FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; | 34   FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; | 
| 39   FWL_Error Update() override; | 35   FWL_Error Update() override; | 
| 40   FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; | 36   FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 79   void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); | 75   void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); | 
| 80   void OnLButtonDown(CFWL_MsgMouse* pMsg); | 76   void OnLButtonDown(CFWL_MsgMouse* pMsg); | 
| 81   void OnLButtonUp(CFWL_MsgMouse* pMsg); | 77   void OnLButtonUp(CFWL_MsgMouse* pMsg); | 
| 82   void OnMouseMove(CFWL_MsgMouse* pMsg); | 78   void OnMouseMove(CFWL_MsgMouse* pMsg); | 
| 83   void OnMouseLeave(CFWL_MsgMouse* pMsg); | 79   void OnMouseLeave(CFWL_MsgMouse* pMsg); | 
| 84   void OnKeyDown(CFWL_MsgKey* pMsg); | 80   void OnKeyDown(CFWL_MsgKey* pMsg); | 
| 85   IFWL_SpinButton* m_pOwner; | 81   IFWL_SpinButton* m_pOwner; | 
| 86 }; | 82 }; | 
| 87 | 83 | 
| 88 #endif  // XFA_FWL_CORE_IFWL_SPINBUTTON_H_ | 84 #endif  // XFA_FWL_CORE_IFWL_SPINBUTTON_H_ | 
| OLD | NEW | 
|---|