Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / include / fwl / basewidget / fwl_spinbutton.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _FWL_SPINBUTTON_H\r
8 #define _FWL_SPINBUTTON_H\r
9 class CFWL_WidgetImpProperties;\r
10 class IFWL_Widget;\r
11 class IFWL_SpinButton;\r
12 #define         FWL_CLASS_SpinButton                    L"FWL_SPINBUTTON"\r
13 #define         FWL_CLASSHASH_SpinButton                3793043646\r
14 #define         FWL_STYLEEXE_SPB_Vert                   (1L << 0)\r
15 #define         FWL_PART_SPB_Border                             1\r
16 #define         FWL_PART_SPB_Edge                               2\r
17 #define         FWL_PART_SPB_UpButton                   3\r
18 #define         FWL_PART_SPB_DownButton                 4\r
19 #define         FWL_PARTSTATE_SPB_Normal                (0L << 0)\r
20 #define         FWL_PARTSTATE_SPB_Hovered               (1L << 0)\r
21 #define         FWL_PARTSTATE_SPB_Pressed               (2L << 0)\r
22 #define         FWL_PARTSTATE_SPB_Disabled              (3L << 0)\r
23 #define         FWL_WGTHITTEST_SPB_UpButton             (FWL_WGTHITTEST_MAX + 1)\r
24 #define         FWL_WGTHITTEST_SPB_DownButton   (FWL_WGTHITTEST_MAX + 2)\r
25 #define FWL_EVT_SPB_Click                                       L"FWL_EVENT_SPB_Click"\r
26 #define FWL_EVTHASH_SPB_Click                           2927651187\r
27 BEGIN_FWL_EVENT_DEF(CFWL_EvtSpbClick, FWL_EVTHASH_SPB_Click)\r
28 FX_BOOL m_bUp;\r
29 END_FWL_EVENT_DEF\r
30 class IFWL_SpinButton : public IFWL_Widget\r
31 {\r
32 public:\r
33     static IFWL_SpinButton* Create();\r
34 \r
35     FWL_ERR             Initialize(IFWL_Widget *pOuter = NULL);\r
36     FWL_ERR             Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);\r
37     FWL_ERR             EnableButton(FX_BOOL bEnable, FX_BOOL bUp = TRUE);\r
38     FX_BOOL             IsButtonEnable(FX_BOOL bUp = TRUE);\r
39 protected:\r
40     IFWL_SpinButton();\r
41     virtual ~IFWL_SpinButton();\r
42 };\r
43 #endif\r