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_BASEWIDGET_IFWL_SPINBUTTON_H_ | 7 #ifndef XFA_FWL_BASEWIDGET_IFWL_SPINBUTTON_H_ |
8 #define XFA_FWL_BASEWIDGET_IFWL_SPINBUTTON_H_ | 8 #define XFA_FWL_BASEWIDGET_IFWL_SPINBUTTON_H_ |
9 | 9 |
10 #include "xfa/fwl/core/fwl_widgetimp.h" | 10 #include "xfa/fwl/core/fwl_widgetimp.h" |
11 | 11 |
12 #define FWL_CLASS_SpinButton L"FWL_SPINBUTTON" | 12 #define FWL_CLASS_SpinButton L"FWL_SPINBUTTON" |
13 #define FWL_CLASSHASH_SpinButton 3793043646 | 13 #define FWL_CLASSHASH_SpinButton 3793043646 |
14 #define FWL_STYLEEXE_SPB_Vert (1L << 0) | 14 #define FWL_STYLEEXE_SPB_Vert (1L << 0) |
15 #define FWL_WGTHITTEST_SPB_UpButton (FWL_WGTHITTEST_MAX + 1) | |
16 #define FWL_WGTHITTEST_SPB_DownButton (FWL_WGTHITTEST_MAX + 2) | |
17 | 15 |
18 BEGIN_FWL_EVENT_DEF(CFWL_EvtSpbClick, CFWL_EventType::Click) | 16 BEGIN_FWL_EVENT_DEF(CFWL_EvtSpbClick, CFWL_EventType::Click) |
19 FX_BOOL m_bUp; | 17 FX_BOOL m_bUp; |
20 END_FWL_EVENT_DEF | 18 END_FWL_EVENT_DEF |
21 | 19 |
22 class IFWL_SpinButton : public IFWL_Widget { | 20 class IFWL_SpinButton : public IFWL_Widget { |
23 public: | 21 public: |
24 static IFWL_SpinButton* Create(const CFWL_WidgetImpProperties& properties, | 22 static IFWL_SpinButton* Create(const CFWL_WidgetImpProperties& properties, |
25 IFWL_Widget* pOuter); | 23 IFWL_Widget* pOuter); |
26 | 24 |
27 FWL_ERR EnableButton(FX_BOOL bEnable, FX_BOOL bUp = TRUE); | 25 FWL_ERR EnableButton(FX_BOOL bEnable, FX_BOOL bUp = TRUE); |
28 FX_BOOL IsButtonEnable(FX_BOOL bUp = TRUE); | 26 FX_BOOL IsButtonEnable(FX_BOOL bUp = TRUE); |
29 | 27 |
30 protected: | 28 protected: |
31 IFWL_SpinButton(); | 29 IFWL_SpinButton(); |
32 }; | 30 }; |
33 | 31 |
34 #endif // XFA_FWL_BASEWIDGET_IFWL_SPINBUTTON_H_ | 32 #endif // XFA_FWL_BASEWIDGET_IFWL_SPINBUTTON_H_ |
OLD | NEW |