Merge to XFA: Use stdint.h types throughout PDFium.
[pdfium.git] / xfa / src / fxfa / src / app / xfa_fwltheme.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 _XFA_FWL_THEME_IMP_H\r
8 #define _XFA_FWL_THEME_IMP_H\r
9 class CXFA_FWLTheme : public IFWL_ThemeProvider\r
10 {\r
11 public:\r
12     CXFA_FWLTheme(CXFA_FFApp *pApp);\r
13     virtual~CXFA_FWLTheme();\r
14     virtual FWL_ERR                     Release()\r
15     {\r
16         delete this;\r
17         return FWL_ERR_Succeeded;\r
18     }\r
19     virtual IFWL_Target*        Retain()\r
20     {\r
21         return NULL;\r
22     }\r
23     virtual FWL_ERR                     GetClassName(CFX_WideString &wsClass) const\r
24     {\r
25         return FWL_ERR_Succeeded;\r
26     }\r
27     virtual FX_DWORD            GetHashCode() const\r
28     {\r
29         return 0;\r
30     }\r
31     virtual FWL_ERR                     Initialize();\r
32     virtual FWL_ERR                     Finalize();\r
33     virtual FX_BOOL             IsValidWidget(IFWL_Widget *pWidget);\r
34     virtual FX_DWORD    GetThemeID(IFWL_Widget *pWidget);\r
35     virtual FX_DWORD    SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);\r
36     virtual FX_BOOL             DrawBackground(CFWL_ThemeBackground *pParams);\r
37     virtual FX_BOOL             DrawText(CFWL_ThemeText *pParams);\r
38     virtual FX_LPVOID   GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);\r
39     virtual FX_BOOL             IsCustomizedLayout(IFWL_Widget *pWidget);\r
40     virtual FWL_ERR             GetPartRect(CFWL_ThemePart* pThemePart);\r
41     virtual FX_BOOL             IsInPart(CFWL_ThemePart* pThemePart, FX_FLOAT fx, FX_FLOAT fy);\r
42 \r
43     virtual     FX_BOOL         CalcTextRect(CFWL_ThemeText *pParams, CFX_RectF &rect);\r
44     virtual FWL_ERR             GetThemeMatrix(IFWL_Widget *pWidget, CFX_Matrix &matrix)\r
45     {\r
46         return FWL_ERR_Succeeded;\r
47     }\r
48     virtual FWL_ERR             SetThemeMatrix(IFWL_Widget *pWidget, const CFX_Matrix &matrix)\r
49     {\r
50         return FWL_ERR_Succeeded;\r
51     }\r
52     virtual FWL_ERR             GetPartRect(CFWL_ThemePart *pThemePart, CFX_RectF &rtPart)\r
53     {\r
54         return FWL_ERR_Succeeded;\r
55     }\r
56 protected:\r
57     CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget);\r
58     CFWL_CheckBoxTP*            m_pCheckBoxTP;\r
59     CFWL_ListBoxTP*                     m_pListBoxTP;\r
60     CFWL_PictureBoxTP*          m_pPictureBoxTP;\r
61     CFWL_ScrollBarTP*           m_pSrollBarTP;\r
62     CFWL_EditTP*                        m_pEditTP;\r
63     CFWL_ComboBoxTP*            m_pComboBoxTP;\r
64     CFWL_MonthCalendarTP*       m_pMonthCalendarTP;\r
65     CFWL_DateTimePickerTP*      m_pDateTimePickerTP;\r
66     CFWL_PushButtonTP*          m_pPushButtonTP;\r
67     CFWL_CaretTP*                       m_pCaretTP;\r
68     CFWL_BarcodeTP*                     m_pBarcodeTP;\r
69     IFDE_TextOut*                       m_pTextOut;\r
70     FX_FLOAT                            m_fCapacity;\r
71     FX_DWORD                            m_dwCapacity;\r
72     IFX_Font*                           m_pCalendarFont;\r
73     CFX_WideString                      m_wsResource;\r
74     CXFA_FFApp*                         m_pApp;\r
75     CFX_RectF                           m_Rect;\r
76     CFX_SizeF                           m_SizeAboveBelow;\r
77 };\r
78 class CXFA_FWLCheckBoxTP : public CFWL_CheckBoxTP\r
79 {\r
80 public:\r
81     CXFA_FWLCheckBoxTP();\r
82     virtual FX_BOOL             DrawBackground(CFWL_ThemeBackground *pParams);\r
83 protected:\r
84     void        DrawCheckSign(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_RectF *pRtBox, int32_t iState, CFX_Matrix* pMatrix);\r
85 };\r
86 class CXFA_FWLEditTP : public CFWL_EditTP\r
87 {\r
88 public:\r
89     CXFA_FWLEditTP();\r
90     virtual ~CXFA_FWLEditTP();\r
91 public:\r
92     virtual FX_BOOL             DrawBackground(CFWL_ThemeBackground *pParams);\r
93 };\r
94 #endif\r