OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FWL_CORE_CFWL_PICTUREBOX_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_PICTUREBOX_H_ |
8 #define XFA_FWL_CORE_CFWL_PICTUREBOX_H_ | 8 #define XFA_FWL_CORE_CFWL_PICTUREBOX_H_ |
9 | 9 |
10 #include "xfa/fwl/core/cfwl_widget.h" | 10 #include "xfa/fwl/core/cfwl_widget.h" |
11 #include "xfa/fwl/core/fwl_error.h" | |
12 #include "xfa/fwl/core/ifwl_picturebox.h" | 11 #include "xfa/fwl/core/ifwl_picturebox.h" |
13 | 12 |
14 class CFWL_PictureBox : public CFWL_Widget, public IFWL_PictureBoxDP { | 13 class CFWL_PictureBox : public CFWL_Widget, public IFWL_PictureBoxDP { |
15 public: | 14 public: |
16 CFWL_PictureBox(const IFWL_App*); | 15 explicit CFWL_PictureBox(const IFWL_App* pApp); |
17 ~CFWL_PictureBox() override; | 16 ~CFWL_PictureBox() override; |
18 | 17 |
19 void Initialize(); | 18 void Initialize(); |
20 | 19 |
21 // IFWL_DataProvider | 20 // IFWL_DataProvider |
22 void GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption) override; | 21 void GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption) override; |
23 | |
24 // IFWL_PictureBoxDP | |
25 CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget) override; | |
26 CFX_DIBitmap* GetErrorPicture(IFWL_Widget* pWidget) override; | |
27 CFX_DIBitmap* GetInitialPicture(IFWL_Widget* pWidget) override; | |
28 int32_t GetOpacity(IFWL_Widget* pWidget) override; | |
29 int32_t GetFlipMode(IFWL_Widget* pWidget) override; | |
30 void GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) override; | |
31 | |
32 CFX_DIBitmap* GetPicture(); | |
33 FWL_Error SetPicture(CFX_DIBitmap* pBitmap); | |
34 FX_FLOAT GetRotation(); | |
35 FWL_Error SetRotation(FX_FLOAT fRotation); | |
36 int32_t GetFlipMode(); | |
37 FWL_Error SetFlipMode(int32_t iFlipMode); | |
38 int32_t GetOpacity(); | |
39 FWL_Error SetOpacity(int32_t iOpacity); | |
40 FWL_Error GetScale(FX_FLOAT& fScaleX, FX_FLOAT& fScaleY); | |
41 FWL_Error SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY); | |
42 FWL_Error GetOffset(FX_FLOAT& fx, FX_FLOAT& fy); | |
43 FWL_Error SetOffset(FX_FLOAT fx, FX_FLOAT fy); | |
44 | |
45 | |
46 private: | |
47 CFX_DIBitmap* m_pBitmap; | |
48 int32_t m_iOpacity; | |
49 int32_t m_iFlipMode; | |
50 FX_FLOAT m_fRotation; | |
51 FX_FLOAT m_fScaleX; | |
52 FX_FLOAT m_fScaleY; | |
53 FX_FLOAT m_fOffSetX; | |
54 FX_FLOAT m_fOffSetY; | |
55 CFX_WideString m_wsData; | |
56 }; | 22 }; |
57 | 23 |
58 #endif // XFA_FWL_CORE_CFWL_PICTUREBOX_H_ | 24 #endif // XFA_FWL_CORE_CFWL_PICTUREBOX_H_ |
OLD | NEW |