1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef _FXFA_FORMFILLER_PUSHBUTTON_IMP_H
8 #define _FXFA_FORMFILLER_PUSHBUTTON_IMP_H
9 #define XFA_FWL_PSBSTYLEEXT_HiliteNone (0L << 0)
10 #define XFA_FWL_PSBSTYLEEXT_HiliteInverted (1L << 0)
11 #define XFA_FWL_PSBSTYLEEXT_HilitePush (2L << 0)
12 #define XFA_FWL_PSBSTYLEEXT_HiliteOutLine (4L << 0)
13 class CXFA_FFPushButton : public CXFA_FFField {
14  public:
15   CXFA_FFPushButton(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
16   virtual ~CXFA_FFPushButton();
17   virtual void RenderWidget(CFX_Graphics* pGS,
18                             CFX_Matrix* pMatrix = NULL,
19                             FX_DWORD dwStatus = 0,
20                             int32_t iRotate = 0);
21   virtual FX_BOOL LoadWidget();
22   virtual void UnloadWidget();
23   virtual FX_BOOL PerformLayout();
24   virtual void UpdateWidgetProperty();
25   virtual int32_t OnProcessMessage(CFWL_Message* pMessage);
26   virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent);
27   virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics,
28                                const CFX_Matrix* pMatrix = NULL);
29 
30  protected:
31   void LoadHighlightCaption();
32   void LayoutHighlightCaption();
33   void RenderHighlightCaption(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL);
34   FX_FLOAT GetLineWidth();
35   FX_ARGB GetLineColor();
36   FX_ARGB GetFillColor();
37   CXFA_TextLayout* m_pRolloverTextLayout;
38   CXFA_TextLayout* m_pDownTextLayout;
39   CXFA_TextProvider* m_pDownProvider;
40   CXFA_TextProvider* m_pRollProvider;
41   IFWL_WidgetDelegate* m_pOldDelegate;
42 };
43 #endif
44