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

Side by Side Diff: xfa/fwl/core/ifwl_widget.h

Issue 2433103002: Remove SetDataProvider from IFWL_Widget (Closed)
Patch Set: 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/core/fwl_widgetimp.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FWL_CORE_IFWL_WIDGET_H_ 7 #ifndef XFA_FWL_CORE_IFWL_WIDGET_H_
8 #define XFA_FWL_CORE_IFWL_WIDGET_H_ 8 #define XFA_FWL_CORE_IFWL_WIDGET_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 FWL_Error UnlockUpdate(); 89 FWL_Error UnlockUpdate();
90 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy); 90 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy);
91 FWL_Error TransformTo(IFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy); 91 FWL_Error TransformTo(IFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy);
92 FWL_Error TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt); 92 FWL_Error TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt);
93 FWL_Error GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE); 93 FWL_Error GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE);
94 FWL_Error SetMatrix(const CFX_Matrix& matrix); 94 FWL_Error SetMatrix(const CFX_Matrix& matrix);
95 FWL_Error DrawWidget(CFX_Graphics* pGraphics, 95 FWL_Error DrawWidget(CFX_Graphics* pGraphics,
96 const CFX_Matrix* pMatrix = nullptr); 96 const CFX_Matrix* pMatrix = nullptr);
97 IFWL_ThemeProvider* GetThemeProvider(); 97 IFWL_ThemeProvider* GetThemeProvider();
98 FWL_Error SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); 98 FWL_Error SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
99 FWL_Error SetDataProvider(IFWL_DataProvider* pDataProvider);
100 IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); 99 IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate);
101 IFWL_App* GetOwnerApp() const; 100 IFWL_App* GetOwnerApp() const;
102 CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent); 101 CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent);
103 102
104 // These call into equivalent polymorphic methods of m_pImpl. There 103 // These call into equivalent polymorphic methods of m_pImpl. There
105 // should be no need to override these in subclasses. 104 // should be no need to override these in subclasses.
106 FWL_Error GetClassName(CFX_WideString& wsClass) const; 105 FWL_Error GetClassName(CFX_WideString& wsClass) const;
107 FWL_Type GetClassID() const; 106 FWL_Type GetClassID() const;
108 FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const; 107 FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
109 FWL_Error Initialize(); 108 FWL_Error Initialize();
110 FWL_Error Finalize(); 109 FWL_Error Finalize();
111 110
112 CFWL_WidgetImp* GetImpl() const { return m_pImpl.get(); } 111 CFWL_WidgetImp* GetImpl() const { return m_pImpl.get(); }
113 112
114 protected: 113 protected:
115 // Takes ownership of |pImpl|. 114 // Takes ownership of |pImpl|.
116 void SetImpl(CFWL_WidgetImp* pImpl) { m_pImpl.reset(pImpl); } 115 void SetImpl(CFWL_WidgetImp* pImpl) { m_pImpl.reset(pImpl); }
117 116
118 private: 117 private:
119 std::unique_ptr<CFWL_WidgetImp> m_pImpl; 118 std::unique_ptr<CFWL_WidgetImp> m_pImpl;
120 }; 119 };
121 120
122 #endif // XFA_FWL_CORE_IFWL_WIDGET_H_ 121 #endif // XFA_FWL_CORE_IFWL_WIDGET_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/fwl_widgetimp.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698