summaryrefslogtreecommitdiff
path: root/xfa/fwl/lightwidget/cfwl_picturebox.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-03-29 12:38:01 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-29 12:38:01 -0700
commit7f432a1c87014d6673ee69ff0ffa3724f237acf4 (patch)
tree517afad0bed7a3706b9cafa35f0b4944ebc68f76 /xfa/fwl/lightwidget/cfwl_picturebox.h
parent90d87793cf55f3c4e57e9db6c8de692ebef41e29 (diff)
downloadpdfium-7f432a1c87014d6673ee69ff0ffa3724f237acf4.tar.xz
Move xfa/include/fwl/{theme,lightwidget} to xfa/fwl
This CL moves and splits the remaining FWL files out of xfa/include and into their proper locations. Review URL: https://codereview.chromium.org/1834323003
Diffstat (limited to 'xfa/fwl/lightwidget/cfwl_picturebox.h')
-rw-r--r--xfa/fwl/lightwidget/cfwl_picturebox.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/xfa/fwl/lightwidget/cfwl_picturebox.h b/xfa/fwl/lightwidget/cfwl_picturebox.h
new file mode 100644
index 0000000000..8fa985acd8
--- /dev/null
+++ b/xfa/fwl/lightwidget/cfwl_picturebox.h
@@ -0,0 +1,64 @@
+// 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_LIGHTWIDGET_CFWL_PICTUREBOX_H_
+#define XFA_FWL_LIGHTWIDGET_CFWL_PICTUREBOX_H_
+
+#include "xfa/fwl/basewidget/ifwl_picturebox.h"
+#include "xfa/fwl/core/fwl_error.h"
+#include "xfa/fwl/lightwidget/cfwl_widget.h"
+
+class CFWL_PictureBox : public CFWL_Widget {
+ public:
+ static CFWL_PictureBox* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ CFX_DIBitmap* GetPicture();
+ FWL_ERR SetPicture(CFX_DIBitmap* pBitmap);
+ FX_FLOAT GetRotation();
+ FWL_ERR SetRotation(FX_FLOAT fRotation);
+ int32_t GetFlipMode();
+ FWL_ERR SetFlipMode(int32_t iFlipMode);
+ int32_t GetOpacity();
+ FWL_ERR SetOpacity(int32_t iOpacity);
+ FWL_ERR GetScale(FX_FLOAT& fScaleX, FX_FLOAT& fScaleY);
+ FWL_ERR SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY);
+ FWL_ERR GetOffset(FX_FLOAT& fx, FX_FLOAT& fy);
+ FWL_ERR SetOffset(FX_FLOAT fx, FX_FLOAT fy);
+ CFWL_PictureBox();
+ virtual ~CFWL_PictureBox();
+
+ protected:
+ class CFWL_PictureBoxDP : public IFWL_PictureBoxDP {
+ public:
+ CFWL_PictureBoxDP() {
+ m_fRotation = 0.0f;
+ m_fScaleX = 1.0f;
+ m_fScaleY = 1.0f;
+ m_fOffSetX = 0.0f;
+ m_fOffSetY = 0.0f;
+ m_pBitmap = NULL;
+ }
+ virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
+ virtual CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget);
+ virtual CFX_DIBitmap* GetErrorPicture(IFWL_Widget* pWidget);
+ virtual CFX_DIBitmap* GetInitialPicture(IFWL_Widget* pWidget);
+ virtual int32_t GetOpacity(IFWL_Widget* pWidget);
+ virtual int32_t GetFlipMode(IFWL_Widget* pWidget);
+ virtual FWL_ERR GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix);
+ 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_LIGHTWIDGET_CFWL_PICTUREBOX_H_