Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / include / fwl / theme / checkboxtp.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_CHECKBOXTP_H\r
8 #define _FWL_CHECKBOXTP_H\r
9 class CFWL_WidgetTP;\r
10 class CFWL_CheckBoxTP;\r
11 class CFWL_CheckBoxTP : public CFWL_WidgetTP\r
12 {\r
13 public:\r
14     CFWL_CheckBoxTP();\r
15     virtual ~CFWL_CheckBoxTP();\r
16     virtual FX_BOOL             IsValidWidget(IFWL_Widget *pWidget);\r
17     virtual FX_DWORD    SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);\r
18     virtual FX_BOOL             DrawText(CFWL_ThemeText *pParams);\r
19     virtual FX_BOOL             DrawBackground(CFWL_ThemeBackground *pParams);\r
20     virtual FWL_ERR             Initialize();\r
21     virtual FWL_ERR             Finalize();\r
22 protected:\r
23     void        DrawBoxBk(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_RectF *pRect, FX_DWORD dwStates, CFX_Matrix *pMatrix = NULL);\r
24     void        DrawSign(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_RectF *pRtBox, FX_DWORD dwStates, CFX_Matrix *pMatrix = NULL);\r
25     void        DrawSignNeutral(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, CFX_Matrix *pMatrix = NULL);\r
26     void        DrawSignCheck(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);\r
27     void        DrawSignCircle(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);\r
28     void        DrawSignCross(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);\r
29     void        DrawSignDiamond(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);\r
30     void        DrawSignSquare(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);\r
31     void        DrawSignStar(CFX_Graphics *pGraphics, const CFX_RectF *pRtSign, FX_ARGB argbFill, CFX_Matrix *pMatrix = NULL);\r
32     void        DrawSignBorder(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_RectF *pRtBox, FX_BOOL bDisable = FALSE, CFX_Matrix *pMatrix = NULL);\r
33     void        SetThemeData(FX_DWORD dwID);\r
34     void        initCheckPath(FX_FLOAT fCheckLen);\r
35     struct CKBThemeData : public CFX_Object {\r
36     public:\r
37         FX_ARGB clrBoxBk[13][2];\r
38         FX_ARGB clrSignBorderNormal;\r
39         FX_ARGB clrSignBorderDisable;\r
40         FX_ARGB clrSignCheck;\r
41         FX_ARGB clrSignNeutral;\r
42         FX_ARGB clrSignNeutralNormal;\r
43         FX_ARGB clrSignNeutralHover;\r
44         FX_ARGB clrSignNeutralPressed;\r
45     } *m_pThemeData;\r
46     CFX_Path *m_pCheckPath;\r
47 };\r
48 #endif\r