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_CFWL_WIDGETMGR_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_WIDGETMGR_H_ |
8 #define XFA_FWL_CORE_CFWL_WIDGETMGR_H_ | 8 #define XFA_FWL_CORE_CFWL_WIDGETMGR_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 IFWL_Widget* GetOwnerWidget(IFWL_Widget* pWidget) const; | 55 IFWL_Widget* GetOwnerWidget(IFWL_Widget* pWidget) const; |
56 IFWL_Widget* GetFirstSiblingWidget(IFWL_Widget* pWidget) const; | 56 IFWL_Widget* GetFirstSiblingWidget(IFWL_Widget* pWidget) const; |
57 IFWL_Widget* GetPriorSiblingWidget(IFWL_Widget* pWidget) const; | 57 IFWL_Widget* GetPriorSiblingWidget(IFWL_Widget* pWidget) const; |
58 IFWL_Widget* GetNextSiblingWidget(IFWL_Widget* pWidget) const; | 58 IFWL_Widget* GetNextSiblingWidget(IFWL_Widget* pWidget) const; |
59 IFWL_Widget* GetLastSiblingWidget(IFWL_Widget* pWidget) const; | 59 IFWL_Widget* GetLastSiblingWidget(IFWL_Widget* pWidget) const; |
60 IFWL_Widget* GetFirstChildWidget(IFWL_Widget* pWidget) const; | 60 IFWL_Widget* GetFirstChildWidget(IFWL_Widget* pWidget) const; |
61 IFWL_Widget* GetLastChildWidget(IFWL_Widget* pWidget) const; | 61 IFWL_Widget* GetLastChildWidget(IFWL_Widget* pWidget) const; |
62 IFWL_Widget* GetSystemFormWidget(IFWL_Widget* pWidget) const; | 62 IFWL_Widget* GetSystemFormWidget(IFWL_Widget* pWidget) const; |
63 | 63 |
64 FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex); | 64 FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex); |
65 FWL_Error RepaintWidget(IFWL_Widget* pWidget, const CFX_RectF* pRect = NULL); | 65 FWL_Error RepaintWidget(IFWL_Widget* pWidget, |
| 66 const CFX_RectF* pRect = nullptr); |
66 | 67 |
67 void AddWidget(IFWL_Widget* pWidget); | 68 void AddWidget(IFWL_Widget* pWidget); |
68 void InsertWidget(IFWL_Widget* pParent, | 69 void InsertWidget(IFWL_Widget* pParent, |
69 IFWL_Widget* pChild, | 70 IFWL_Widget* pChild, |
70 int32_t nIndex = -1); | 71 int32_t nIndex = -1); |
71 void RemoveWidget(IFWL_Widget* pWidget); | 72 void RemoveWidget(IFWL_Widget* pWidget); |
72 void SetOwner(IFWL_Widget* pOwner, IFWL_Widget* pOwned); | 73 void SetOwner(IFWL_Widget* pOwner, IFWL_Widget* pOwned); |
73 void SetParent(IFWL_Widget* pParent, IFWL_Widget* pChild); | 74 void SetParent(IFWL_Widget* pParent, IFWL_Widget* pChild); |
74 FX_BOOL IsChild(IFWL_Widget* pChild, IFWL_Widget* pParent); | 75 FX_BOOL IsChild(IFWL_Widget* pChild, IFWL_Widget* pParent); |
75 FWL_Error SetWidgetRect_Native(IFWL_Widget* pWidget, const CFX_RectF& rect); | 76 FWL_Error SetWidgetRect_Native(IFWL_Widget* pWidget, const CFX_RectF& rect); |
(...skipping 16 matching lines...) Expand all Loading... |
92 FX_BOOL GetAdapterPopupPos(IFWL_Widget* pWidget, | 93 FX_BOOL GetAdapterPopupPos(IFWL_Widget* pWidget, |
93 FX_FLOAT fMinHeight, | 94 FX_FLOAT fMinHeight, |
94 FX_FLOAT fMaxHeight, | 95 FX_FLOAT fMaxHeight, |
95 const CFX_RectF& rtAnchor, | 96 const CFX_RectF& rtAnchor, |
96 CFX_RectF& rtPopup); | 97 CFX_RectF& rtPopup); |
97 | 98 |
98 protected: | 99 protected: |
99 int32_t TravelWidgetMgr(CFWL_WidgetMgrItem* pParent, | 100 int32_t TravelWidgetMgr(CFWL_WidgetMgrItem* pParent, |
100 int32_t* pIndex, | 101 int32_t* pIndex, |
101 CFWL_WidgetMgrItem* pItem, | 102 CFWL_WidgetMgrItem* pItem, |
102 IFWL_Widget** pWidget = NULL); | 103 IFWL_Widget** pWidget = nullptr); |
103 FX_BOOL IsAbleNative(IFWL_Widget* pWidget) const; | 104 FX_BOOL IsAbleNative(IFWL_Widget* pWidget) const; |
104 | 105 |
105 uint32_t m_dwCapability; | 106 uint32_t m_dwCapability; |
106 std::unique_ptr<CFWL_WidgetMgrDelegate> m_pDelegate; | 107 std::unique_ptr<CFWL_WidgetMgrDelegate> m_pDelegate; |
107 std::map<IFWL_Widget*, std::unique_ptr<CFWL_WidgetMgrItem>> m_mapWidgetItem; | 108 std::map<IFWL_Widget*, std::unique_ptr<CFWL_WidgetMgrItem>> m_mapWidgetItem; |
108 CXFA_FWLAdapterWidgetMgr* const m_pAdapter; | 109 CXFA_FWLAdapterWidgetMgr* const m_pAdapter; |
109 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) | 110 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) |
110 CFX_RectF m_rtScreen; | 111 CFX_RectF m_rtScreen; |
111 #endif | 112 #endif |
112 friend class CFWL_WidgetMgrDelegate; | 113 friend class CFWL_WidgetMgrDelegate; |
(...skipping 24 matching lines...) Expand all Loading... |
137 const CFX_Matrix* pMatrix); | 138 const CFX_Matrix* pMatrix); |
138 FX_BOOL IsNeedRepaint(IFWL_Widget* pWidget, | 139 FX_BOOL IsNeedRepaint(IFWL_Widget* pWidget, |
139 CFX_Matrix* pMatrix, | 140 CFX_Matrix* pMatrix, |
140 const CFX_RectF& rtDirty); | 141 const CFX_RectF& rtDirty); |
141 FX_BOOL bUseOffscreenDirect(IFWL_Widget* pWidget); | 142 FX_BOOL bUseOffscreenDirect(IFWL_Widget* pWidget); |
142 | 143 |
143 CFWL_WidgetMgr* m_pWidgetMgr; | 144 CFWL_WidgetMgr* m_pWidgetMgr; |
144 }; | 145 }; |
145 | 146 |
146 #endif // XFA_FWL_CORE_CFWL_WIDGETMGR_H_ | 147 #endif // XFA_FWL_CORE_CFWL_WIDGETMGR_H_ |
OLD | NEW |