Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / include / fwl / lightwidget / theme.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_THEME_LIGHT_H\r
8 #define _FWL_THEME_LIGHT_H\r
9 class CFWL_ThemeBackground;\r
10 class CFWL_ThemeText;\r
11 class CFWL_ThemePart;\r
12 class CFWL_WidgetTP;\r
13 class IFWL_Widget;\r
14 class CFWL_Theme;\r
15 class CFWL_Theme : public CFX_Object\r
16 {\r
17 public:\r
18     virtual FX_BOOL             IsValidWidget(IFWL_Widget *pWidget);\r
19     virtual FX_DWORD    GetThemeID(IFWL_Widget *pWidget);\r
20     virtual FX_DWORD    SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);\r
21     virtual FWL_ERR             GetThemeMatrix(IFWL_Widget *pWidget, CFX_Matrix &matrix);\r
22     virtual FWL_ERR             SetThemeMatrix(IFWL_Widget *pWidget, const CFX_Matrix &matrix);\r
23     virtual FX_BOOL             DrawBackground(CFWL_ThemeBackground *pParams);\r
24     virtual FX_BOOL             DrawText(CFWL_ThemeText *pParams);\r
25     virtual FX_LPVOID   GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);\r
26     virtual FX_BOOL             IsCustomizedLayout(IFWL_Widget *pWidget);\r
27     virtual FWL_ERR             GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF &rtPart);\r
28     virtual FX_BOOL             IsInPart(CFWL_ThemePart* pThemePart, FX_FLOAT fx, FX_FLOAT fy);\r
29     virtual     FX_BOOL         CalcTextRect(CFWL_ThemeText *pParams, CFX_RectF &rect);\r
30     virtual FWL_ERR             Initialize();\r
31     virtual FWL_ERR             Finalize();\r
32     CFWL_Theme();\r
33     virtual ~CFWL_Theme();\r
34     FWL_ERR             SetFont(IFWL_Widget *pWidget, FX_LPCWSTR strFont, FX_FLOAT fFontSize, FX_ARGB rgbFont);\r
35     CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget);\r
36 protected:\r
37     CFX_PtrArray        m_arrThemes;\r
38 };\r
39 #endif\r