Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / include / fwl / lightwidget / picturebox.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_LIGHT_H\r
8 #define _FWL_PICTUREBOX_LIGHT_H\r
9 class CFWL_Widget;\r
10 class CFWL_WidgetProperties;\r
11 class IFWL_PictureBoxDP;\r
12 class CFWL_PictureBox;\r
13 class CFWL_PictureBoxDP;\r
14 class CFWL_PictureBox : public CFWL_Widget\r
15 {\r
16 public:\r
17     static CFWL_PictureBox* Create();\r
18     FWL_ERR                     Initialize(const CFWL_WidgetProperties *pProperties = NULL);\r
19     CFX_DIBitmap*       GetPicture();\r
20     FWL_ERR                     SetPicture(CFX_DIBitmap *pBitmap);\r
21     FX_FLOAT            GetRotation();\r
22     FWL_ERR                     SetRotation(FX_FLOAT fRotation);\r
23     FX_INT32            GetFlipMode();\r
24     FWL_ERR                     SetFlipMode(FX_INT32 iFlipMode);\r
25     FX_INT32            GetOpacity();\r
26     FWL_ERR                     SetOpacity(FX_INT32 iOpacity);\r
27     FWL_ERR                     GetScale(FX_FLOAT &fScaleX, FX_FLOAT &fScaleY);\r
28     FWL_ERR                     SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY);\r
29     FWL_ERR                     GetOffset(FX_FLOAT &fx, FX_FLOAT &fy);\r
30     FWL_ERR                     SetOffset(FX_FLOAT fx, FX_FLOAT fy);\r
31     CFWL_PictureBox();\r
32     virtual ~CFWL_PictureBox();\r
33 protected:\r
34     class CFWL_PictureBoxDP : public IFWL_PictureBoxDP\r
35     {\r
36     public:\r
37         CFWL_PictureBoxDP()\r
38         {\r
39             m_fRotation = 0.0f;\r
40             m_fScaleX = 1.0f;\r
41             m_fScaleY = 1.0f;\r
42             m_fOffSetX = 0.0f;\r
43             m_fOffSetY = 0.0f;\r
44             m_pBitmap = NULL;\r
45         };\r
46         virtual FWL_ERR                 GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);\r
47         virtual CFX_DIBitmap*   GetPicture(IFWL_Widget *pWidget);\r
48         virtual CFX_DIBitmap*   GetErrorPicture(IFWL_Widget *pWidget);\r
49         virtual CFX_DIBitmap*   GetInitialPicture(IFWL_Widget *pWidget);\r
50         virtual FX_INT32                GetOpacity(IFWL_Widget *pWidget);\r
51         virtual FX_INT32                GetFlipMode(IFWL_Widget *pWidget);\r
52         virtual FWL_ERR                 GetMatrix(IFWL_Widget *pWidget, CFX_Matrix &matrix);\r
53         CFX_DIBitmap    *m_pBitmap;\r
54         FX_INT32                m_iOpacity;\r
55         FX_INT32                m_iFlipMode;\r
56         FX_FLOAT                m_fRotation;\r
57         FX_FLOAT                m_fScaleX;\r
58         FX_FLOAT                m_fScaleY;\r
59         FX_FLOAT                m_fOffSetX;\r
60         FX_FLOAT                m_fOffSetY;\r
61         CFX_WideString  m_wsData;\r
62     };\r
63     CFWL_PictureBoxDP m_PictureBoxDP;\r
64 };\r
65 #endif\r