summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_picturebox.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-07 10:28:47 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-07 10:28:47 -0800
commiteb3f68cc7f25a1e28464eb251161b8f08fcd04bc (patch)
tree36e565bac1a7760e605b181b7da4c08bda151cdd /xfa/fwl/core/cfwl_picturebox.h
parenta97fc7c6392c0adbd702bdf898cb9e20cee00a3e (diff)
downloadpdfium-eb3f68cc7f25a1e28464eb251161b8f08fcd04bc.tar.xz
Fold DataProviders into parent classes
This CL removes the data provider classes and folds the code into the parent classes. Review-Url: https://codereview.chromium.org/2480233003
Diffstat (limited to 'xfa/fwl/core/cfwl_picturebox.h')
-rw-r--r--xfa/fwl/core/cfwl_picturebox.h53
1 files changed, 23 insertions, 30 deletions
diff --git a/xfa/fwl/core/cfwl_picturebox.h b/xfa/fwl/core/cfwl_picturebox.h
index f8fcdfbb13..5cd7c6fffc 100644
--- a/xfa/fwl/core/cfwl_picturebox.h
+++ b/xfa/fwl/core/cfwl_picturebox.h
@@ -11,7 +11,7 @@
#include "xfa/fwl/core/fwl_error.h"
#include "xfa/fwl/core/ifwl_picturebox.h"
-class CFWL_PictureBox : public CFWL_Widget {
+class CFWL_PictureBox : public CFWL_Widget, public IFWL_PictureBoxDP {
public:
CFWL_PictureBox(const IFWL_App*);
~CFWL_PictureBox() override;
@@ -31,35 +31,28 @@ class CFWL_PictureBox : public CFWL_Widget {
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;
+ // 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;
+
+ private:
+ 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;
};
#endif // XFA_FWL_CORE_CFWL_PICTUREBOX_H_