summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_picturebox.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-20 09:59:48 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-20 09:59:48 -0700
commit05259e98f7416b59da18ee6059b48a23fddca8af (patch)
tree8af6be4a43aa37e8cd36023ffd36262c04c26ff7 /xfa/fwl/core/cfwl_picturebox.h
parent73895de7dea3737d1a25801001b8efe186c6f5a3 (diff)
downloadpdfium-05259e98f7416b59da18ee6059b48a23fddca8af.tar.xz
Move fwl/lightwidget to fwl/core
This CL moves the code from fwl/lightwidget into fwl/core. In anticipation of merging the two hierarchies. Review-Url: https://chromiumcodereview.appspot.com/2430923006
Diffstat (limited to 'xfa/fwl/core/cfwl_picturebox.h')
-rw-r--r--xfa/fwl/core/cfwl_picturebox.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/xfa/fwl/core/cfwl_picturebox.h b/xfa/fwl/core/cfwl_picturebox.h
new file mode 100644
index 0000000000..584950f045
--- /dev/null
+++ b/xfa/fwl/core/cfwl_picturebox.h
@@ -0,0 +1,67 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef XFA_FWL_CORE_CFWL_PICTUREBOX_H_
+#define XFA_FWL_CORE_CFWL_PICTUREBOX_H_
+
+#include "xfa/fwl/core/cfwl_widget.h"
+#include "xfa/fwl/core/fwl_error.h"
+#include "xfa/fwl/core/ifwl_picturebox.h"
+
+class CFWL_PictureBox : public CFWL_Widget {
+ public:
+ CFWL_PictureBox();
+ ~CFWL_PictureBox() override;
+
+ IFWL_PictureBox* GetWidget() override;
+ const IFWL_PictureBox* GetWidget() const override;
+
+ FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr);
+ CFX_DIBitmap* GetPicture();
+ FWL_Error SetPicture(CFX_DIBitmap* pBitmap);
+ FX_FLOAT GetRotation();
+ FWL_Error SetRotation(FX_FLOAT fRotation);
+ int32_t GetFlipMode();
+ FWL_Error SetFlipMode(int32_t iFlipMode);
+ int32_t GetOpacity();
+ FWL_Error SetOpacity(int32_t iOpacity);
+ FWL_Error GetScale(FX_FLOAT& fScaleX, FX_FLOAT& fScaleY);
+ FWL_Error SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY);
+ FWL_Error GetOffset(FX_FLOAT& fx, FX_FLOAT& fy);
+ FWL_Error SetOffset(FX_FLOAT fx, FX_FLOAT fy);
+
+ protected:
+ class CFWL_PictureBoxDP : public IFWL_PictureBoxDP {
+ public:
+ CFWL_PictureBoxDP();
+
+ // IFWL_DataProvider
+ FWL_Error GetCaption(IFWL_Widget* pWidget,
+ CFX_WideString& wsCaption) override;
+
+ // IFWL_PictureBoxDP
+ CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget) override;
+ CFX_DIBitmap* GetErrorPicture(IFWL_Widget* pWidget) override;
+ CFX_DIBitmap* GetInitialPicture(IFWL_Widget* pWidget) override;
+ int32_t GetOpacity(IFWL_Widget* pWidget) override;
+ int32_t GetFlipMode(IFWL_Widget* pWidget) override;
+ FWL_Error GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) override;
+
+ CFX_DIBitmap* m_pBitmap;
+ int32_t m_iOpacity;
+ int32_t m_iFlipMode;
+ FX_FLOAT m_fRotation;
+ FX_FLOAT m_fScaleX;
+ FX_FLOAT m_fScaleY;
+ FX_FLOAT m_fOffSetX;
+ FX_FLOAT m_fOffSetY;
+ CFX_WideString m_wsData;
+ };
+
+ CFWL_PictureBoxDP m_PictureBoxDP;
+};
+
+#endif // XFA_FWL_CORE_CFWL_PICTUREBOX_H_