| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef XFA_INCLUDE_FWL_CORE_FWL_WIDGETMGR_H_ | |
| 8 #define XFA_INCLUDE_FWL_CORE_FWL_WIDGETMGR_H_ | |
| 9 | |
| 10 #include "xfa/include/fwl/core/fwl_note.h" | |
| 11 | |
| 12 class IFWL_Widget; | |
| 13 | |
| 14 #define FWL_WGTMGR_DisableThread 0x00000001 | |
| 15 #define FWL_WGTMGR_DisableForm 0x00000002 | |
| 16 | |
| 17 enum FWL_WGTRELATION { | |
| 18 FWL_WGTRELATION_Parent = 0, | |
| 19 FWL_WGTRELATION_Owner, | |
| 20 FWL_WGTRELATION_FirstSibling, | |
| 21 FWL_WGTRELATION_PriorSibling, | |
| 22 FWL_WGTRELATION_NextSibling, | |
| 23 FWL_WGTRELATION_LastSibling, | |
| 24 FWL_WGTRELATION_FirstChild, | |
| 25 FWL_WGTRELATION_LastChild, | |
| 26 FWL_WGTRELATION_SystemForm | |
| 27 }; | |
| 28 | |
| 29 class IFWL_WidgetMgr { | |
| 30 public: | |
| 31 virtual ~IFWL_WidgetMgr() {} | |
| 32 virtual int32_t CountWidgets(IFWL_Widget* pParent = NULL) = 0; | |
| 33 virtual IFWL_Widget* GetWidget(int32_t nIndex, | |
| 34 IFWL_Widget* pParent = NULL) = 0; | |
| 35 virtual IFWL_Widget* GetWidget(IFWL_Widget* pWidget, | |
| 36 FWL_WGTRELATION eRelation) = 0; | |
| 37 virtual int32_t GetWidgetIndex(IFWL_Widget* pWidget) = 0; | |
| 38 virtual FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex) = 0; | |
| 39 virtual FWL_ERR RepaintWidget(IFWL_Widget* pWidget, | |
| 40 const CFX_RectF* pRect = NULL) = 0; | |
| 41 virtual FX_DWORD GetCapability() = 0; | |
| 42 }; | |
| 43 IFWL_WidgetMgr* FWL_GetWidgetMgr(); | |
| 44 FX_BOOL FWL_WidgetIsChild(IFWL_Widget* parent, IFWL_Widget* find); | |
| 45 | |
| 46 class IFWL_WidgetMgrDelegate { | |
| 47 public: | |
| 48 virtual ~IFWL_WidgetMgrDelegate() {} | |
| 49 virtual FWL_ERR OnSetCapability( | |
| 50 FX_DWORD dwCapability = FWL_WGTMGR_DisableThread) = 0; | |
| 51 virtual int32_t OnProcessMessageToForm(CFWL_Message* pMessage) = 0; | |
| 52 virtual FWL_ERR OnDrawWidget(IFWL_Widget* pWidget, | |
| 53 CFX_Graphics* pGraphics, | |
| 54 const CFX_Matrix* pMatrix = NULL) = 0; | |
| 55 }; | |
| 56 FWL_ERR FWL_WidgetMgrSnapshot(IFWL_Widget* pWidget, | |
| 57 const CFX_WideString* saveFile, | |
| 58 const CFX_Matrix* pMatrix = NULL); | |
| 59 | |
| 60 #endif // XFA_INCLUDE_FWL_CORE_FWL_WIDGETMGR_H_ | |
| OLD | NEW |