Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fxfa / src / app / xfa_ffpushbutton.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 _FXFA_FORMFILLER_PUSHBUTTON_IMP_H\r
8 #define _FXFA_FORMFILLER_PUSHBUTTON_IMP_H\r
9 #define XFA_FWL_PSBSTYLEEXT_HiliteNone          (0L << 0)\r
10 #define XFA_FWL_PSBSTYLEEXT_HiliteInverted      (1L << 0)\r
11 #define XFA_FWL_PSBSTYLEEXT_HilitePush          (2L << 0)\r
12 #define XFA_FWL_PSBSTYLEEXT_HiliteOutLine       (4L << 0)\r
13 class CXFA_FFPushButton : public CXFA_FFField\r
14 {\r
15 public:\r
16     CXFA_FFPushButton(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);\r
17     virtual ~CXFA_FFPushButton();\r
18     virtual void        RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);\r
19     virtual FX_BOOL LoadWidget();\r
20     virtual void        UnloadWidget();\r
21     virtual     FX_BOOL LayoutWidget();\r
22     virtual void        UpdateWidgetProperty();\r
23     virtual FX_INT32    OnProcessMessage(CFWL_Message *pMessage);\r
24     virtual FWL_ERR             OnProcessEvent(CFWL_Event *pEvent);\r
25     virtual FWL_ERR             OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);\r
26 protected:\r
27     void        LoadHighlightCaption();\r
28     void        LayoutHighlightCaption();\r
29     void        RenderHighlightCaption(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL);\r
30     FX_FLOAT GetLineWidth();\r
31     FX_ARGB  GetLineColor();\r
32     FX_ARGB      GetFillColor();\r
33     CXFA_TextLayout             *m_pRolloverTextLayout;\r
34     CXFA_TextLayout             *m_pDownTextLayout;\r
35     CXFA_TextProvider   *m_pDownProvider;\r
36     CXFA_TextProvider   *m_pRollProvider;\r
37     IFWL_WidgetDelegate *m_pOldDelegate;\r
38 };\r
39 #endif\r