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_IFWL_PICTUREBOX_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_PICTUREBOX_H_ |
8 #define XFA_FWL_CORE_IFWL_PICTUREBOX_H_ | 8 #define XFA_FWL_CORE_IFWL_PICTUREBOX_H_ |
9 | 9 |
10 #include "xfa/fwl/core/cfwl_widgetimpproperties.h" | 10 #include "xfa/fwl/core/cfwl_widgetimpproperties.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 virtual CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget) = 0; | 38 virtual CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget) = 0; |
39 virtual CFX_DIBitmap* GetErrorPicture(IFWL_Widget* pWidget) = 0; | 39 virtual CFX_DIBitmap* GetErrorPicture(IFWL_Widget* pWidget) = 0; |
40 virtual CFX_DIBitmap* GetInitialPicture(IFWL_Widget* pWidget) = 0; | 40 virtual CFX_DIBitmap* GetInitialPicture(IFWL_Widget* pWidget) = 0; |
41 virtual int32_t GetOpacity(IFWL_Widget* pWidget) = 0; | 41 virtual int32_t GetOpacity(IFWL_Widget* pWidget) = 0; |
42 virtual int32_t GetFlipMode(IFWL_Widget* pWidget) = 0; | 42 virtual int32_t GetFlipMode(IFWL_Widget* pWidget) = 0; |
43 virtual FWL_Error GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) = 0; | 43 virtual FWL_Error GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) = 0; |
44 }; | 44 }; |
45 | 45 |
46 class IFWL_PictureBox : public IFWL_Widget { | 46 class IFWL_PictureBox : public IFWL_Widget { |
47 public: | 47 public: |
48 static IFWL_PictureBox* Create(const CFWL_WidgetImpProperties& properties, | 48 explicit IFWL_PictureBox(const CFWL_WidgetImpProperties& properties); |
49 IFWL_Widget* pOuter); | |
50 | |
51 IFWL_PictureBox(const CFWL_WidgetImpProperties& properties, | |
52 IFWL_Widget* pOuter); | |
53 ~IFWL_PictureBox() override; | 49 ~IFWL_PictureBox() override; |
54 | 50 |
55 // IFWL_Widget | 51 // IFWL_Widget |
56 FWL_Error GetClassName(CFX_WideString& wsClass) const override; | 52 FWL_Error GetClassName(CFX_WideString& wsClass) const override; |
57 FWL_Type GetClassID() const override; | 53 FWL_Type GetClassID() const override; |
58 FWL_Error Initialize() override; | 54 FWL_Error Initialize() override; |
59 FWL_Error Finalize() override; | 55 FWL_Error Finalize() override; |
60 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; | 56 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; |
61 FWL_Error Update() override; | 57 FWL_Error Update() override; |
62 FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 58 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
(...skipping 19 matching lines...) Expand all Loading... |
82 public: | 78 public: |
83 CFWL_PictureBoxImpDelegate(IFWL_PictureBox* pOwner); | 79 CFWL_PictureBoxImpDelegate(IFWL_PictureBox* pOwner); |
84 void OnDrawWidget(CFX_Graphics* pGraphics, | 80 void OnDrawWidget(CFX_Graphics* pGraphics, |
85 const CFX_Matrix* pMatrix = nullptr) override; | 81 const CFX_Matrix* pMatrix = nullptr) override; |
86 | 82 |
87 protected: | 83 protected: |
88 IFWL_PictureBox* m_pOwner; | 84 IFWL_PictureBox* m_pOwner; |
89 }; | 85 }; |
90 | 86 |
91 #endif // XFA_FWL_CORE_IFWL_PICTUREBOX_H_ | 87 #endif // XFA_FWL_CORE_IFWL_PICTUREBOX_H_ |
OLD | NEW |