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

Side by Side Diff: xfa/fwl/cfwl_widget.h

Issue 2559643004: Change layout item in CFWL_Widget type from void (Closed)
Patch Set: Created 4 years 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/cfwl_edit.cpp ('k') | xfa/fxfa/app/xfa_fwladapter.cpp » ('j') | 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_CFWL_WIDGET_H_ 7 #ifndef XFA_FWL_CFWL_WIDGET_H_
8 #define XFA_FWL_CFWL_WIDGET_H_ 8 #define XFA_FWL_CFWL_WIDGET_H_
9 #include <memory> 9 #include <memory>
10 10
(...skipping 25 matching lines...) Expand all
36 SpinButton, 36 SpinButton,
37 ToolTip 37 ToolTip
38 }; 38 };
39 39
40 class CFWL_App; 40 class CFWL_App;
41 class CFWL_AppImp; 41 class CFWL_AppImp;
42 class CFWL_MessageKey; 42 class CFWL_MessageKey;
43 class CFWL_Widget; 43 class CFWL_Widget;
44 class CFWL_WidgetMgr; 44 class CFWL_WidgetMgr;
45 class CFWL_WidgetProperties; 45 class CFWL_WidgetProperties;
46 class CXFA_FFWidget;
46 class IFWL_ThemeProvider; 47 class IFWL_ThemeProvider;
47 48
48 class CFWL_Widget : public IFWL_WidgetDelegate { 49 class CFWL_Widget : public IFWL_WidgetDelegate {
49 public: 50 public:
50 ~CFWL_Widget() override; 51 ~CFWL_Widget() override;
51 52
52 virtual FWL_Type GetClassID() const = 0; 53 virtual FWL_Type GetClassID() const = 0;
53 virtual bool IsInstance(const CFX_WideStringC& wsClass) const; 54 virtual bool IsInstance(const CFX_WideStringC& wsClass) const;
54 virtual CFX_RectF GetAutosizedWidgetRect(); 55 virtual CFX_RectF GetAutosizedWidgetRect();
55 virtual CFX_RectF GetWidgetRect(); 56 virtual CFX_RectF GetWidgetRect();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 return m_pDelegate ? m_pDelegate : this; 99 return m_pDelegate ? m_pDelegate : this;
99 } 100 }
100 const IFWL_WidgetDelegate* GetDelegate() const { 101 const IFWL_WidgetDelegate* GetDelegate() const {
101 return m_pDelegate ? m_pDelegate : this; 102 return m_pDelegate ? m_pDelegate : this;
102 } 103 }
103 104
104 const CFWL_App* GetOwnerApp() const { return m_pOwnerApp; } 105 const CFWL_App* GetOwnerApp() const { return m_pOwnerApp; }
105 uint32_t GetEventKey() const { return m_nEventKey; } 106 uint32_t GetEventKey() const { return m_nEventKey; }
106 void SetEventKey(uint32_t key) { m_nEventKey = key; } 107 void SetEventKey(uint32_t key) { m_nEventKey = key; }
107 108
108 void* GetLayoutItem() const { return m_pLayoutItem; } 109 CXFA_FFWidget* GetLayoutItem() const { return m_pLayoutItem; }
109 void SetLayoutItem(void* pItem) { m_pLayoutItem = pItem; } 110 void SetLayoutItem(CXFA_FFWidget* pItem) { m_pLayoutItem = pItem; }
110 111
111 void SetFocus(bool bFocus); 112 void SetFocus(bool bFocus);
112 void RepaintRect(const CFX_RectF& pRect); 113 void RepaintRect(const CFX_RectF& pRect);
113 void Repaint(); 114 void Repaint();
114 115
115 protected: 116 protected:
116 CFWL_Widget(const CFWL_App* app, 117 CFWL_Widget(const CFWL_App* app,
117 std::unique_ptr<CFWL_WidgetProperties> properties, 118 std::unique_ptr<CFWL_WidgetProperties> properties,
118 CFWL_Widget* pOuter); 119 CFWL_Widget* pOuter);
119 120
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 const CFX_RectF& rtAnchor, 183 const CFX_RectF& rtAnchor,
183 CFX_RectF& rtPopup); 184 CFX_RectF& rtPopup);
184 bool GetScreenSize(FX_FLOAT& fx, FX_FLOAT& fy); 185 bool GetScreenSize(FX_FLOAT& fx, FX_FLOAT& fy);
185 void DrawBackground(CFX_Graphics* pGraphics, 186 void DrawBackground(CFX_Graphics* pGraphics,
186 CFWL_Part iPartBk, 187 CFWL_Part iPartBk,
187 IFWL_ThemeProvider* pTheme, 188 IFWL_ThemeProvider* pTheme,
188 const CFX_Matrix* pMatrix); 189 const CFX_Matrix* pMatrix);
189 void NotifyDriver(); 190 void NotifyDriver();
190 bool IsParent(CFWL_Widget* pParent); 191 bool IsParent(CFWL_Widget* pParent);
191 192
192 void* m_pLayoutItem; 193 CXFA_FFWidget* m_pLayoutItem;
193 uint32_t m_nEventKey; 194 uint32_t m_nEventKey;
194 IFWL_WidgetDelegate* m_pDelegate; // Not owned. 195 IFWL_WidgetDelegate* m_pDelegate; // Not owned.
195 }; 196 };
196 197
197 #endif // XFA_FWL_CFWL_WIDGET_H_ 198 #endif // XFA_FWL_CFWL_WIDGET_H_
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_edit.cpp ('k') | xfa/fxfa/app/xfa_fwladapter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698