Initial commit.
[pdfium.git] / fpdfsdk / include / pdfwindow / PWL_Icon.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 _PWL_ICON_H_\r
8 #define _PWL_ICON_H_\r
9 \r
10 class PWL_CLASS CPWL_Image : public CPWL_Wnd\r
11 {\r
12 public:\r
13         CPWL_Image();\r
14         virtual ~CPWL_Image();\r
15 \r
16         virtual CFX_ByteString                  GetImageAppStream();\r
17 \r
18         virtual void                                    GetScale(FX_FLOAT & fHScale,FX_FLOAT & fVScale);\r
19         virtual void                                    GetImageOffset(FX_FLOAT & x,FX_FLOAT & y);\r
20         virtual CPDF_Stream *                   GetPDFStream();\r
21 \r
22 public:\r
23         void                                                    SetPDFStream(CPDF_Stream* pStream);     \r
24         void                                                    GetImageSize(FX_FLOAT & fWidth,FX_FLOAT & fHeight);\r
25         CPDF_Matrix                                             GetImageMatrix();\r
26         CFX_ByteString                                  GetImageAlias();\r
27         void                                                    SetImageAlias(FX_LPCSTR sImageAlias);\r
28 \r
29 protected:\r
30         CPDF_Stream*                                    m_pPDFStream;\r
31         CFX_ByteString                                  m_sImageAlias;\r
32 };\r
33 \r
34 class PWL_CLASS CPWL_Icon : public CPWL_Image \r
35 {\r
36 public:\r
37         CPWL_Icon();\r
38         virtual ~CPWL_Icon();\r
39 \r
40         virtual CPDF_IconFit *                  GetIconFit(){return m_pIconFit;};\r
41 \r
42         virtual void                                    GetScale(FX_FLOAT & fHScale,FX_FLOAT & fVScale);\r
43         virtual void                                    GetImageOffset(FX_FLOAT & x,FX_FLOAT & y);\r
44 \r
45         FX_INT32                                                GetScaleMethod();\r
46         FX_BOOL                                                 IsProportionalScale();\r
47         void                                                    GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom);\r
48         FX_BOOL                                                 GetFittingBounds();\r
49 \r
50         void                                                    SetIconFit(CPDF_IconFit * pIconFit){m_pIconFit = pIconFit;};\r
51 \r
52 private:\r
53         CPDF_IconFit *                                  m_pIconFit;\r
54 };\r
55 \r
56 \r
57 #endif // !defined(AFX_PWL_BUTTON_H__5A6080AA_33C5_4FC9_91FC_D9644C41120A__INCLUDED_)\r
58 \r
59 \r