summaryrefslogtreecommitdiff
path: root/xfa/fwl/lightwidget/cfwl_picturebox.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-18 06:21:57 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-18 06:21:57 -0700
commit4ce94e118d66064715de5baebeb4b2b580dcac66 (patch)
treeba74181eb90675172d3c7f4be8e71ada3fbc9125 /xfa/fwl/lightwidget/cfwl_picturebox.h
parent2fad11a8d9d2704cd9ee28b02373ad7ce19c65e3 (diff)
downloadpdfium-4ce94e118d66064715de5baebeb4b2b580dcac66.tar.xz
Make code compile with clang_use_chrome_plugin (part VI)
This change mainly contains files in xfa/fwl directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2070583003
Diffstat (limited to 'xfa/fwl/lightwidget/cfwl_picturebox.h')
-rw-r--r--xfa/fwl/lightwidget/cfwl_picturebox.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/xfa/fwl/lightwidget/cfwl_picturebox.h b/xfa/fwl/lightwidget/cfwl_picturebox.h
index 8b0b13de24..95a0117224 100644
--- a/xfa/fwl/lightwidget/cfwl_picturebox.h
+++ b/xfa/fwl/lightwidget/cfwl_picturebox.h
@@ -13,7 +13,11 @@
class CFWL_PictureBox : public CFWL_Widget {
public:
+ CFWL_PictureBox();
+ ~CFWL_PictureBox() override;
+
static CFWL_PictureBox* Create();
+
FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = NULL);
CFX_DIBitmap* GetPicture();
FWL_Error SetPicture(CFX_DIBitmap* pBitmap);
@@ -27,28 +31,24 @@ class CFWL_PictureBox : public CFWL_Widget {
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);
- 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_Error 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_Error GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix);
+ 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;
@@ -59,6 +59,7 @@ class CFWL_PictureBox : public CFWL_Widget {
FX_FLOAT m_fOffSetY;
CFX_WideString m_wsData;
};
+
CFWL_PictureBoxDP m_PictureBoxDP;
};