Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: xfa/fwl/lightwidget/cfwl_picturebox.h

Issue 2430923006: Move fwl/lightwidget to fwl/core (Closed)
Patch Set: Rebase to master Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_listbox.cpp ('k') | xfa/fwl/lightwidget/cfwl_picturebox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef XFA_FWL_LIGHTWIDGET_CFWL_PICTUREBOX_H_
8 #define XFA_FWL_LIGHTWIDGET_CFWL_PICTUREBOX_H_
9
10 #include "xfa/fwl/core/fwl_error.h"
11 #include "xfa/fwl/core/ifwl_picturebox.h"
12 #include "xfa/fwl/lightwidget/cfwl_widget.h"
13
14 class CFWL_PictureBox : public CFWL_Widget {
15 public:
16 CFWL_PictureBox();
17 ~CFWL_PictureBox() override;
18
19 IFWL_PictureBox* GetWidget() override;
20 const IFWL_PictureBox* GetWidget() const override;
21
22 FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr);
23 CFX_DIBitmap* GetPicture();
24 FWL_Error SetPicture(CFX_DIBitmap* pBitmap);
25 FX_FLOAT GetRotation();
26 FWL_Error SetRotation(FX_FLOAT fRotation);
27 int32_t GetFlipMode();
28 FWL_Error SetFlipMode(int32_t iFlipMode);
29 int32_t GetOpacity();
30 FWL_Error SetOpacity(int32_t iOpacity);
31 FWL_Error GetScale(FX_FLOAT& fScaleX, FX_FLOAT& fScaleY);
32 FWL_Error SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY);
33 FWL_Error GetOffset(FX_FLOAT& fx, FX_FLOAT& fy);
34 FWL_Error SetOffset(FX_FLOAT fx, FX_FLOAT fy);
35
36 protected:
37 class CFWL_PictureBoxDP : public IFWL_PictureBoxDP {
38 public:
39 CFWL_PictureBoxDP();
40
41 // IFWL_DataProvider
42 FWL_Error GetCaption(IFWL_Widget* pWidget,
43 CFX_WideString& wsCaption) override;
44
45 // IFWL_PictureBoxDP
46 CFX_DIBitmap* GetPicture(IFWL_Widget* pWidget) override;
47 CFX_DIBitmap* GetErrorPicture(IFWL_Widget* pWidget) override;
48 CFX_DIBitmap* GetInitialPicture(IFWL_Widget* pWidget) override;
49 int32_t GetOpacity(IFWL_Widget* pWidget) override;
50 int32_t GetFlipMode(IFWL_Widget* pWidget) override;
51 FWL_Error GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) override;
52
53 CFX_DIBitmap* m_pBitmap;
54 int32_t m_iOpacity;
55 int32_t m_iFlipMode;
56 FX_FLOAT m_fRotation;
57 FX_FLOAT m_fScaleX;
58 FX_FLOAT m_fScaleY;
59 FX_FLOAT m_fOffSetX;
60 FX_FLOAT m_fOffSetY;
61 CFX_WideString m_wsData;
62 };
63
64 CFWL_PictureBoxDP m_PictureBoxDP;
65 };
66
67 #endif // XFA_FWL_LIGHTWIDGET_CFWL_PICTUREBOX_H_
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_listbox.cpp ('k') | xfa/fwl/lightwidget/cfwl_picturebox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698