OLD | NEW |
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 virtual FWL_Error SetDataProvider(IFWL_DataProvider* pDataProvider); | 73 virtual FWL_Error SetDataProvider(IFWL_DataProvider* pDataProvider); |
74 virtual IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); | 74 virtual IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); |
75 virtual IFWL_App* GetOwnerApp() const; | 75 virtual IFWL_App* GetOwnerApp() const; |
76 | 76 |
77 FWL_Error SetOwnerApp(CFWL_AppImp* pOwnerApp); | 77 FWL_Error SetOwnerApp(CFWL_AppImp* pOwnerApp); |
78 IFWL_Widget* GetInterface() const; | 78 IFWL_Widget* GetInterface() const; |
79 void SetInterface(IFWL_Widget* pInterface); | 79 void SetInterface(IFWL_Widget* pInterface); |
80 CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent); | 80 CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent); |
81 uint32_t GetEventKey() const; | 81 uint32_t GetEventKey() const; |
82 void SetEventKey(uint32_t key); | 82 void SetEventKey(uint32_t key); |
| 83 void* GetLayoutItem() const; |
| 84 void SetLayoutItem(void* pItem); |
83 | 85 |
84 protected: | 86 protected: |
85 friend class CFWL_WidgetImpDelegate; | 87 friend class CFWL_WidgetImpDelegate; |
86 | 88 |
87 CFWL_WidgetImp(const CFWL_WidgetImpProperties& properties, | 89 CFWL_WidgetImp(const CFWL_WidgetImpProperties& properties, |
88 IFWL_Widget* pOuter); | 90 IFWL_Widget* pOuter); |
89 | 91 |
90 FX_BOOL IsEnabled() const; | 92 FX_BOOL IsEnabled() const; |
91 FX_BOOL IsVisible() const; | 93 FX_BOOL IsVisible() const; |
92 FX_BOOL IsActive() const; | 94 FX_BOOL IsActive() const; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 FX_BOOL IsParent(IFWL_Widget* pParent); | 157 FX_BOOL IsParent(IFWL_Widget* pParent); |
156 | 158 |
157 CFWL_WidgetMgr* m_pWidgetMgr; | 159 CFWL_WidgetMgr* m_pWidgetMgr; |
158 CFWL_AppImp* m_pOwnerApp; | 160 CFWL_AppImp* m_pOwnerApp; |
159 CFWL_WidgetImpProperties* m_pProperties; | 161 CFWL_WidgetImpProperties* m_pProperties; |
160 CFX_PrivateData* m_pPrivateData; | 162 CFX_PrivateData* m_pPrivateData; |
161 IFWL_WidgetDelegate* m_pDelegate; | 163 IFWL_WidgetDelegate* m_pDelegate; |
162 IFWL_WidgetDelegate* m_pCurDelegate; | 164 IFWL_WidgetDelegate* m_pCurDelegate; |
163 IFWL_Widget* m_pOuter; | 165 IFWL_Widget* m_pOuter; |
164 IFWL_Widget* m_pInterface; | 166 IFWL_Widget* m_pInterface; |
| 167 void* m_pLayoutItem; |
165 int32_t m_iLock; | 168 int32_t m_iLock; |
166 uint32_t m_nEventKey; | 169 uint32_t m_nEventKey; |
167 }; | 170 }; |
168 | 171 |
169 class CFWL_WidgetImpDelegate : public IFWL_WidgetDelegate { | 172 class CFWL_WidgetImpDelegate : public IFWL_WidgetDelegate { |
170 public: | 173 public: |
171 CFWL_WidgetImpDelegate(); | 174 CFWL_WidgetImpDelegate(); |
172 ~CFWL_WidgetImpDelegate() override {} | 175 ~CFWL_WidgetImpDelegate() override {} |
173 void OnProcessMessage(CFWL_Message* pMessage) override; | 176 void OnProcessMessage(CFWL_Message* pMessage) override; |
174 void OnProcessEvent(CFWL_Event* pEvent) override; | 177 void OnProcessEvent(CFWL_Event* pEvent) override; |
175 void OnDrawWidget(CFX_Graphics* pGraphics, | 178 void OnDrawWidget(CFX_Graphics* pGraphics, |
176 const CFX_Matrix* pMatrix = NULL) override; | 179 const CFX_Matrix* pMatrix = NULL) override; |
177 }; | 180 }; |
178 | 181 |
179 #endif // XFA_FWL_CORE_FWL_WIDGETIMP_H_ | 182 #endif // XFA_FWL_CORE_FWL_WIDGETIMP_H_ |
OLD | NEW |