Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / include / fwl / basewidget / fwl_pushbutton.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_PUSHBUTTON_H\r
8 #define _FWL_PUSHBUTTON_H\r
9 class CFWL_WidgetImpProperties;\r
10 class IFWL_Widget;\r
11 class IFWL_PushButtonDP;\r
12 class IFWL_PushButton;\r
13 #define FWL_CLASS_PushButton            L"FWL_PUSHBUTTON"\r
14 #define FWL_CLASSHASH_PushButton        3521614244\r
15 #define FWL_STYLEEXT_PSB_Left           (0L << 0)\r
16 #define FWL_STYLEEXT_PSB_Center         (1L << 0)\r
17 #define FWL_STYLEEXT_PSB_Right          (2L << 0)\r
18 #define FWL_STYLEEXT_PSB_Top            (0L << 2)\r
19 #define FWL_STYLEEXT_PSB_VCenter        (1L << 2)\r
20 #define FWL_STYLEEXT_PSB_Bottom         (2L << 2)\r
21 #define FWL_STYLEEXT_PSB_TextOnly       (0L << 4)\r
22 #define FWL_STYLEEXT_PSB_IconOnly       (1L << 4)\r
23 #define FWL_STYLEEXT_PSB_TextIcon       (2L << 4)\r
24 #define FWL_STYLEEXT_PSB_HLayoutMask (3L << 0)\r
25 #define FWL_STYLEEXT_PSB_VLayoutMask (3L << 2)\r
26 #define FWL_STYLEEXT_PSB_ModeMask        (3L << 4)\r
27 #define FWL_STATE_PSB_Hovered           (1 << FWL_WGTSTATE_MAX)\r
28 #define FWL_STATE_PSB_Pressed           (1 << (FWL_WGTSTATE_MAX + 1))\r
29 #define FWL_STATE_PSB_Default           (1 << (FWL_WGTSTATE_MAX + 2))\r
30 #define FWL_WGTCAPACITY_PSB_Margin              (FWL_WGTCAPACITY_MAX + 1)\r
31 #define FWL_PART_PSB_Border                     1\r
32 #define FWL_PART_PSB_Edge                       2\r
33 #define FWL_PART_PSB_Background         3\r
34 #define FWL_PART_PSB_Caption            4\r
35 #define FWL_PARTSTATE_PSB_Normal        (0L << 0)\r
36 #define FWL_PARTSTATE_PSB_Pressed       (1L << 0)\r
37 #define FWL_PARTSTATE_PSB_Hovered       (2L << 0)\r
38 #define FWL_PARTSTATE_PSB_Default       (3L << 0)\r
39 #define FWL_PARTSTATE_PSB_Disabled      (4L << 0)\r
40 #define FWL_PARTSTATE_PSB_Focused       (1L << 3)\r
41 #define FWL_PARTSTATE_PSB_Mask          (7L << 0)\r
42 class IFWL_PushButtonDP : public IFWL_DataProvider\r
43 {\r
44 public:\r
45     virtual CFX_DIBitmap* GetPicture(IFWL_Widget *pWidget) = 0;\r
46 };\r
47 class IFWL_PushButton : public IFWL_Widget\r
48 {\r
49 public:\r
50     static IFWL_PushButton* Create();\r
51     FWL_ERR             Initialize(IFWL_Widget *pOuter = NULL);\r
52     FWL_ERR             Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);\r
53 protected:\r
54     IFWL_PushButton();\r
55     virtual ~IFWL_PushButton();\r
56 };\r
57 #endif\r