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

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

Issue 2016743002: Add back-pointer to "Associated widget" to CFWL_WidgetImp. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@opaque_layout_item
Patch Set: Initialize m_pAssociate. Created 4 years, 6 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 | « core/fxcrt/include/fx_basic.h ('k') | xfa/fwl/core/fwl_widgetimp.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_CORE_FWL_WIDGETIMP_H_ 7 #ifndef XFA_FWL_CORE_FWL_WIDGETIMP_H_
8 #define XFA_FWL_CORE_FWL_WIDGETIMP_H_ 8 #define XFA_FWL_CORE_FWL_WIDGETIMP_H_
9 9
10 #include "core/fxcrt/include/fx_coordinates.h" 10 #include "core/fxcrt/include/fx_coordinates.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 virtual FWL_Error SetOwner(IFWL_Widget* pOwner); 45 virtual FWL_Error SetOwner(IFWL_Widget* pOwner);
46 virtual IFWL_Widget* GetOuter(); 46 virtual IFWL_Widget* GetOuter();
47 virtual uint32_t GetStyles(); 47 virtual uint32_t GetStyles();
48 virtual FWL_Error ModifyStyles(uint32_t dwStylesAdded, 48 virtual FWL_Error ModifyStyles(uint32_t dwStylesAdded,
49 uint32_t dwStylesRemoved); 49 uint32_t dwStylesRemoved);
50 virtual uint32_t GetStylesEx(); 50 virtual uint32_t GetStylesEx();
51 virtual FWL_Error ModifyStylesEx(uint32_t dwStylesExAdded, 51 virtual FWL_Error ModifyStylesEx(uint32_t dwStylesExAdded,
52 uint32_t dwStylesExRemoved); 52 uint32_t dwStylesExRemoved);
53 virtual uint32_t GetStates(); 53 virtual uint32_t GetStates();
54 virtual void SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE); 54 virtual void SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE);
55 virtual FWL_Error SetPrivateData(void* module_id,
56 void* pData,
57 PD_CALLBACK_FREEDATA callback);
58 virtual void* GetPrivateData(void* module_id);
59 virtual FWL_Error Update(); 55 virtual FWL_Error Update();
60 virtual FWL_Error LockUpdate(); 56 virtual FWL_Error LockUpdate();
61 virtual FWL_Error UnlockUpdate(); 57 virtual FWL_Error UnlockUpdate();
62 virtual FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy); 58 virtual FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy);
63 virtual FWL_Error TransformTo(IFWL_Widget* pWidget, 59 virtual FWL_Error TransformTo(IFWL_Widget* pWidget,
64 FX_FLOAT& fx, 60 FX_FLOAT& fx,
65 FX_FLOAT& fy); 61 FX_FLOAT& fy);
66 virtual FWL_Error TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt); 62 virtual FWL_Error TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt);
67 virtual FWL_Error GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE); 63 virtual FWL_Error GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE);
68 virtual FWL_Error SetMatrix(const CFX_Matrix& matrix); 64 virtual FWL_Error SetMatrix(const CFX_Matrix& matrix);
69 virtual FWL_Error DrawWidget(CFX_Graphics* pGraphics, 65 virtual FWL_Error DrawWidget(CFX_Graphics* pGraphics,
70 const CFX_Matrix* pMatrix = NULL); 66 const CFX_Matrix* pMatrix = NULL);
71 virtual IFWL_ThemeProvider* GetThemeProvider(); 67 virtual IFWL_ThemeProvider* GetThemeProvider();
72 virtual FWL_Error SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); 68 virtual FWL_Error SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
73 virtual FWL_Error SetDataProvider(IFWL_DataProvider* pDataProvider); 69 virtual FWL_Error SetDataProvider(IFWL_DataProvider* pDataProvider);
74 virtual IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); 70 virtual IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate);
75 virtual IFWL_App* GetOwnerApp() const; 71 virtual IFWL_App* GetOwnerApp() const;
76 72
77 FWL_Error SetOwnerApp(CFWL_AppImp* pOwnerApp); 73 FWL_Error SetOwnerApp(CFWL_AppImp* pOwnerApp);
78 IFWL_Widget* GetInterface() const; 74 IFWL_Widget* GetInterface() const;
79 void SetInterface(IFWL_Widget* pInterface); 75 void SetInterface(IFWL_Widget* pInterface);
80 CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent); 76 CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent);
81 uint32_t GetEventKey() const; 77 uint32_t GetEventKey() const;
82 void SetEventKey(uint32_t key); 78 void SetEventKey(uint32_t key);
83 void* GetLayoutItem() const; 79 void* GetLayoutItem() const;
84 void SetLayoutItem(void* pItem); 80 void SetLayoutItem(void* pItem);
81 void* GetAssociateWidget() const;
82 void SetAssociateWidget(void* pAssociate);
85 83
86 protected: 84 protected:
87 friend class CFWL_WidgetImpDelegate; 85 friend class CFWL_WidgetImpDelegate;
88 86
89 CFWL_WidgetImp(const CFWL_WidgetImpProperties& properties, 87 CFWL_WidgetImp(const CFWL_WidgetImpProperties& properties,
90 IFWL_Widget* pOuter); 88 IFWL_Widget* pOuter);
91 89
92 FX_BOOL IsEnabled() const; 90 FX_BOOL IsEnabled() const;
93 FX_BOOL IsVisible() const; 91 FX_BOOL IsVisible() const;
94 FX_BOOL IsActive() const; 92 FX_BOOL IsActive() const;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 CFWL_Part iPartEdge, 150 CFWL_Part iPartEdge,
153 IFWL_ThemeProvider* pTheme, 151 IFWL_ThemeProvider* pTheme,
154 const CFX_Matrix* pMatrix = NULL); 152 const CFX_Matrix* pMatrix = NULL);
155 void NotifyDriver(); 153 void NotifyDriver();
156 154
157 FX_BOOL IsParent(IFWL_Widget* pParent); 155 FX_BOOL IsParent(IFWL_Widget* pParent);
158 156
159 CFWL_WidgetMgr* m_pWidgetMgr; 157 CFWL_WidgetMgr* m_pWidgetMgr;
160 CFWL_AppImp* m_pOwnerApp; 158 CFWL_AppImp* m_pOwnerApp;
161 CFWL_WidgetImpProperties* m_pProperties; 159 CFWL_WidgetImpProperties* m_pProperties;
162 CFX_PrivateData* m_pPrivateData;
163 IFWL_WidgetDelegate* m_pDelegate; 160 IFWL_WidgetDelegate* m_pDelegate;
164 IFWL_WidgetDelegate* m_pCurDelegate; 161 IFWL_WidgetDelegate* m_pCurDelegate;
165 IFWL_Widget* m_pOuter; 162 IFWL_Widget* m_pOuter;
166 IFWL_Widget* m_pInterface; 163 IFWL_Widget* m_pInterface;
167 void* m_pLayoutItem; 164 void* m_pLayoutItem;
165 void* m_pAssociate;
168 int32_t m_iLock; 166 int32_t m_iLock;
169 uint32_t m_nEventKey; 167 uint32_t m_nEventKey;
170 }; 168 };
171 169
172 class CFWL_WidgetImpDelegate : public IFWL_WidgetDelegate { 170 class CFWL_WidgetImpDelegate : public IFWL_WidgetDelegate {
173 public: 171 public:
174 CFWL_WidgetImpDelegate(); 172 CFWL_WidgetImpDelegate();
175 ~CFWL_WidgetImpDelegate() override {} 173 ~CFWL_WidgetImpDelegate() override {}
176 void OnProcessMessage(CFWL_Message* pMessage) override; 174 void OnProcessMessage(CFWL_Message* pMessage) override;
177 void OnProcessEvent(CFWL_Event* pEvent) override; 175 void OnProcessEvent(CFWL_Event* pEvent) override;
178 void OnDrawWidget(CFX_Graphics* pGraphics, 176 void OnDrawWidget(CFX_Graphics* pGraphics,
179 const CFX_Matrix* pMatrix = NULL) override; 177 const CFX_Matrix* pMatrix = NULL) override;
180 }; 178 };
181 179
182 #endif // XFA_FWL_CORE_FWL_WIDGETIMP_H_ 180 #endif // XFA_FWL_CORE_FWL_WIDGETIMP_H_
OLDNEW
« no previous file with comments | « core/fxcrt/include/fx_basic.h ('k') | xfa/fwl/core/fwl_widgetimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698