| 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" |
| 11 #include "core/fxcrt/include/fx_system.h" | 11 #include "core/fxcrt/include/fx_system.h" |
| 12 #include "xfa/fwl/core/cfwl_event.h" | 12 #include "xfa/fwl/core/cfwl_event.h" |
| 13 #include "xfa/fwl/core/cfwl_themepart.h" | 13 #include "xfa/fwl/core/cfwl_themepart.h" |
| 14 #include "xfa/fwl/core/ifwl_widgetdelegate.h" | 14 #include "xfa/fwl/core/ifwl_widgetdelegate.h" |
| 15 #include "xfa/fwl/core/include/fwl_widgethit.h" | 15 #include "xfa/fwl/core/include/fwl_widgethit.h" |
| 16 #include "xfa/fwl/theme/cfwl_widgettp.h" | 16 #include "xfa/fwl/theme/cfwl_widgettp.h" |
| 17 | 17 |
| 18 class CFWL_AppImp; | 18 class CFWL_AppImp; |
| 19 class CFWL_MsgKey; | 19 class CFWL_MsgKey; |
| 20 class CFWL_WidgetImpProperties; | 20 class CFWL_WidgetImpProperties; |
| 21 class CFWL_WidgetMgr; | 21 class CFWL_WidgetMgr; |
| 22 class CXFA_FFWidget; |
| 22 class IFWL_App; | 23 class IFWL_App; |
| 23 class IFWL_DataProvider; | 24 class IFWL_DataProvider; |
| 24 class IFWL_ThemeProvider; | 25 class IFWL_ThemeProvider; |
| 25 class IFWL_Widget; | 26 class IFWL_Widget; |
| 26 enum class FWL_Type; | 27 enum class FWL_Type; |
| 27 | 28 |
| 28 class CFWL_WidgetImp { | 29 class CFWL_WidgetImp { |
| 29 public: | 30 public: |
| 30 virtual ~CFWL_WidgetImp(); | 31 virtual ~CFWL_WidgetImp(); |
| 31 | 32 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 virtual FWL_Error SetDataProvider(IFWL_DataProvider* pDataProvider); | 74 virtual FWL_Error SetDataProvider(IFWL_DataProvider* pDataProvider); |
| 74 virtual IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); | 75 virtual IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); |
| 75 virtual IFWL_App* GetOwnerApp() const; | 76 virtual IFWL_App* GetOwnerApp() const; |
| 76 | 77 |
| 77 FWL_Error SetOwnerApp(CFWL_AppImp* pOwnerApp); | 78 FWL_Error SetOwnerApp(CFWL_AppImp* pOwnerApp); |
| 78 IFWL_Widget* GetInterface() const; | 79 IFWL_Widget* GetInterface() const; |
| 79 void SetInterface(IFWL_Widget* pInterface); | 80 void SetInterface(IFWL_Widget* pInterface); |
| 80 CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent); | 81 CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent); |
| 81 uint32_t GetEventKey() const; | 82 uint32_t GetEventKey() const; |
| 82 void SetEventKey(uint32_t key); | 83 void SetEventKey(uint32_t key); |
| 83 void* GetLayoutItem() const; | 84 CXFA_FFWidget* GetLayoutItem() const; |
| 84 void SetLayoutItem(void* pItem); | 85 void SetLayoutItem(CXFA_FFWidget* pItem); |
| 85 | 86 |
| 86 protected: | 87 protected: |
| 87 friend class CFWL_WidgetImpDelegate; | 88 friend class CFWL_WidgetImpDelegate; |
| 88 | 89 |
| 89 CFWL_WidgetImp(const CFWL_WidgetImpProperties& properties, | 90 CFWL_WidgetImp(const CFWL_WidgetImpProperties& properties, |
| 90 IFWL_Widget* pOuter); | 91 IFWL_Widget* pOuter); |
| 91 | 92 |
| 92 FX_BOOL IsEnabled() const; | 93 FX_BOOL IsEnabled() const; |
| 93 FX_BOOL IsVisible() const; | 94 FX_BOOL IsVisible() const; |
| 94 FX_BOOL IsActive() const; | 95 FX_BOOL IsActive() const; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 FX_BOOL IsParent(IFWL_Widget* pParent); | 158 FX_BOOL IsParent(IFWL_Widget* pParent); |
| 158 | 159 |
| 159 CFWL_WidgetMgr* m_pWidgetMgr; | 160 CFWL_WidgetMgr* m_pWidgetMgr; |
| 160 CFWL_AppImp* m_pOwnerApp; | 161 CFWL_AppImp* m_pOwnerApp; |
| 161 CFWL_WidgetImpProperties* m_pProperties; | 162 CFWL_WidgetImpProperties* m_pProperties; |
| 162 CFX_PrivateData* m_pPrivateData; | 163 CFX_PrivateData* m_pPrivateData; |
| 163 IFWL_WidgetDelegate* m_pDelegate; | 164 IFWL_WidgetDelegate* m_pDelegate; |
| 164 IFWL_WidgetDelegate* m_pCurDelegate; | 165 IFWL_WidgetDelegate* m_pCurDelegate; |
| 165 IFWL_Widget* m_pOuter; | 166 IFWL_Widget* m_pOuter; |
| 166 IFWL_Widget* m_pInterface; | 167 IFWL_Widget* m_pInterface; |
| 167 void* m_pLayoutItem; | 168 CXFA_FFWidget* m_pLayoutItem; |
| 168 int32_t m_iLock; | 169 int32_t m_iLock; |
| 169 uint32_t m_nEventKey; | 170 uint32_t m_nEventKey; |
| 170 }; | 171 }; |
| 171 | 172 |
| 172 class CFWL_WidgetImpDelegate : public IFWL_WidgetDelegate { | 173 class CFWL_WidgetImpDelegate : public IFWL_WidgetDelegate { |
| 173 public: | 174 public: |
| 174 CFWL_WidgetImpDelegate(); | 175 CFWL_WidgetImpDelegate(); |
| 175 ~CFWL_WidgetImpDelegate() override {} | 176 ~CFWL_WidgetImpDelegate() override {} |
| 176 void OnProcessMessage(CFWL_Message* pMessage) override; | 177 void OnProcessMessage(CFWL_Message* pMessage) override; |
| 177 void OnProcessEvent(CFWL_Event* pEvent) override; | 178 void OnProcessEvent(CFWL_Event* pEvent) override; |
| 178 void OnDrawWidget(CFX_Graphics* pGraphics, | 179 void OnDrawWidget(CFX_Graphics* pGraphics, |
| 179 const CFX_Matrix* pMatrix = NULL) override; | 180 const CFX_Matrix* pMatrix = NULL) override; |
| 180 }; | 181 }; |
| 181 | 182 |
| 182 #endif // XFA_FWL_CORE_FWL_WIDGETIMP_H_ | 183 #endif // XFA_FWL_CORE_FWL_WIDGETIMP_H_ |
| OLD | NEW |