Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fwl / src / basewidget / include / fwl_pictureboximp.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_PICTUREBOX_IMP_H\r
8 #define _FWL_PICTUREBOX_IMP_H\r
9 class CFWL_WidgetImp;\r
10 class CFWL_WidgetImpProperties;\r
11 class CFWL_WidgetImpDelegate;\r
12 class IFWL_Widget;\r
13 class CFWL_PictureBoxImp;\r
14 class CFWL_PictureBoxImpDelegate;\r
15 class CFWL_PictureBoxImp : public CFWL_WidgetImp\r
16 {\r
17 public:\r
18     CFWL_PictureBoxImp(IFWL_Widget *pOuter = NULL);\r
19     CFWL_PictureBoxImp(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);\r
20     ~CFWL_PictureBoxImp();\r
21     virtual FWL_ERR             GetClassName(CFX_WideString &wsClass) const;\r
22     virtual FX_DWORD    GetClassID() const;\r
23     virtual FWL_ERR             Initialize();\r
24     virtual FWL_ERR             Finalize();\r
25     virtual FWL_ERR             GetWidgetRect(CFX_RectF &rect, FX_BOOL bAutoSize = FALSE);\r
26     virtual     FWL_ERR         Update();\r
27     virtual FWL_ERR             DrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);\r
28 protected:\r
29     void                DrawBkground(CFX_Graphics *pGraphics, IFWL_ThemeProvider *pTheme, const CFX_Matrix *pMatrix = NULL);\r
30     FX_BOOL     VStyle(FX_BOOL dwStyle);\r
31     CFX_RectF           m_rtClient;\r
32     CFX_RectF           m_rtImage;\r
33     CFX_Matrix          m_matrix;\r
34     FX_BOOL         m_bTop;\r
35     FX_BOOL         m_bVCenter;\r
36     FX_BOOL         m_bButton;\r
37     friend class CFWL_PictureBoxImpDelegate;\r
38 };\r
39 class CFWL_PictureBoxImpDelegate : public CFWL_WidgetImpDelegate\r
40 {\r
41 public:\r
42     CFWL_PictureBoxImpDelegate(CFWL_PictureBoxImp *pOwner);\r
43     virtual FWL_ERR             OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);\r
44 protected:\r
45     CFWL_PictureBoxImp *m_pOwner;\r
46 };\r
47 #endif\r