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_WIDGETMGRIMP_H_ | 7 #ifndef XFA_FWL_CORE_FWL_WIDGETMGRIMP_H_ |
8 #define XFA_FWL_CORE_FWL_WIDGETMGRIMP_H_ | 8 #define XFA_FWL_CORE_FWL_WIDGETMGRIMP_H_ |
9 | 9 |
10 #include "xfa/fwl/core/ifwl_widgetmgr.h" | 10 #include "xfa/fwl/core/ifwl_widgetmgr.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 // IFWL_WidgetMgr: | 60 // IFWL_WidgetMgr: |
61 int32_t CountWidgets(IFWL_Widget* pParent = NULL) override; | 61 int32_t CountWidgets(IFWL_Widget* pParent = NULL) override; |
62 IFWL_Widget* GetWidget(int32_t nIndex, IFWL_Widget* pParent = NULL) override; | 62 IFWL_Widget* GetWidget(int32_t nIndex, IFWL_Widget* pParent = NULL) override; |
63 IFWL_Widget* GetWidget(IFWL_Widget* pWidget, | 63 IFWL_Widget* GetWidget(IFWL_Widget* pWidget, |
64 FWL_WGTRELATION eRelation) override; | 64 FWL_WGTRELATION eRelation) override; |
65 int32_t GetWidgetIndex(IFWL_Widget* pWidget) override; | 65 int32_t GetWidgetIndex(IFWL_Widget* pWidget) override; |
66 FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex) override; | 66 FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex) override; |
67 FWL_ERR RepaintWidget(IFWL_Widget* pWidget, | 67 FWL_ERR RepaintWidget(IFWL_Widget* pWidget, |
68 const CFX_RectF* pRect = NULL) override; | 68 const CFX_RectF* pRect = NULL) override; |
69 FX_DWORD GetCapability() override { return m_dwCapability; } | 69 uint32_t GetCapability() override { return m_dwCapability; } |
70 | 70 |
71 void AddWidget(IFWL_Widget* pWidget); | 71 void AddWidget(IFWL_Widget* pWidget); |
72 void InsertWidget(IFWL_Widget* pParent, | 72 void InsertWidget(IFWL_Widget* pParent, |
73 IFWL_Widget* pChild, | 73 IFWL_Widget* pChild, |
74 int32_t nIndex = -1); | 74 int32_t nIndex = -1); |
75 void RemoveWidget(IFWL_Widget* pWidget); | 75 void RemoveWidget(IFWL_Widget* pWidget); |
76 void SetOwner(IFWL_Widget* pOwner, IFWL_Widget* pOwned); | 76 void SetOwner(IFWL_Widget* pOwner, IFWL_Widget* pOwned); |
77 void SetParent(IFWL_Widget* pParent, IFWL_Widget* pChild); | 77 void SetParent(IFWL_Widget* pParent, IFWL_Widget* pChild); |
78 FX_BOOL IsChild(IFWL_Widget* pChild, IFWL_Widget* pParent); | 78 FX_BOOL IsChild(IFWL_Widget* pChild, IFWL_Widget* pParent); |
79 FWL_ERR CreateWidget_Native(IFWL_Widget* pWidget); | 79 FWL_ERR CreateWidget_Native(IFWL_Widget* pWidget); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 protected: | 123 protected: |
124 int32_t TravelWidgetMgr(CFWL_WidgetMgrItem* pParent, | 124 int32_t TravelWidgetMgr(CFWL_WidgetMgrItem* pParent, |
125 int32_t* pIndex, | 125 int32_t* pIndex, |
126 CFWL_WidgetMgrItem* pItem, | 126 CFWL_WidgetMgrItem* pItem, |
127 IFWL_Widget** pWidget = NULL); | 127 IFWL_Widget** pWidget = NULL); |
128 FX_BOOL IsAbleNative(IFWL_Widget* pWidget); | 128 FX_BOOL IsAbleNative(IFWL_Widget* pWidget); |
129 CFX_MapPtrToPtr m_mapWidgetItem; | 129 CFX_MapPtrToPtr m_mapWidgetItem; |
130 IFWL_AdapterWidgetMgr* m_pAdapter; | 130 IFWL_AdapterWidgetMgr* m_pAdapter; |
131 CFWL_WidgetMgrDelegate* m_pDelegate; | 131 CFWL_WidgetMgrDelegate* m_pDelegate; |
132 friend class CFWL_WidgetMgrDelegate; | 132 friend class CFWL_WidgetMgrDelegate; |
133 FX_DWORD m_dwCapability; | 133 uint32_t m_dwCapability; |
134 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) | 134 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) |
135 CFX_RectF m_rtScreen; | 135 CFX_RectF m_rtScreen; |
136 #endif | 136 #endif |
137 }; | 137 }; |
138 | 138 |
139 class CFWL_WidgetMgrDelegate : public IFWL_WidgetMgrDelegate { | 139 class CFWL_WidgetMgrDelegate : public IFWL_WidgetMgrDelegate { |
140 public: | 140 public: |
141 CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr); | 141 CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr); |
142 ~CFWL_WidgetMgrDelegate() override {} | 142 ~CFWL_WidgetMgrDelegate() override {} |
143 | 143 |
144 // IFWL_WidgetMgrDelegate: | 144 // IFWL_WidgetMgrDelegate: |
145 FWL_ERR OnSetCapability( | 145 FWL_ERR OnSetCapability( |
146 FX_DWORD dwCapability = FWL_WGTMGR_DisableThread) override; | 146 uint32_t dwCapability = FWL_WGTMGR_DisableThread) override; |
147 int32_t OnProcessMessageToForm(CFWL_Message* pMessage) override; | 147 int32_t OnProcessMessageToForm(CFWL_Message* pMessage) override; |
148 FWL_ERR OnDrawWidget(IFWL_Widget* pWidget, | 148 FWL_ERR OnDrawWidget(IFWL_Widget* pWidget, |
149 CFX_Graphics* pGraphics, | 149 CFX_Graphics* pGraphics, |
150 const CFX_Matrix* pMatrix) override; | 150 const CFX_Matrix* pMatrix) override; |
151 | 151 |
152 protected: | 152 protected: |
153 void DrawChild(IFWL_Widget* pParent, | 153 void DrawChild(IFWL_Widget* pParent, |
154 const CFX_RectF& rtClip, | 154 const CFX_RectF& rtClip, |
155 CFX_Graphics* pGraphics, | 155 CFX_Graphics* pGraphics, |
156 const CFX_Matrix* pMatrix); | 156 const CFX_Matrix* pMatrix); |
157 CFX_Graphics* DrawWidgetBefore(IFWL_Widget* pWidget, | 157 CFX_Graphics* DrawWidgetBefore(IFWL_Widget* pWidget, |
158 CFX_Graphics* pGraphics, | 158 CFX_Graphics* pGraphics, |
159 const CFX_Matrix* pMatrix); | 159 const CFX_Matrix* pMatrix); |
160 void DrawWidgetAfter(IFWL_Widget* pWidget, | 160 void DrawWidgetAfter(IFWL_Widget* pWidget, |
161 CFX_Graphics* pGraphics, | 161 CFX_Graphics* pGraphics, |
162 CFX_RectF& rtClip, | 162 CFX_RectF& rtClip, |
163 const CFX_Matrix* pMatrix); | 163 const CFX_Matrix* pMatrix); |
164 FX_BOOL IsNeedRepaint(IFWL_Widget* pWidget, | 164 FX_BOOL IsNeedRepaint(IFWL_Widget* pWidget, |
165 CFX_Matrix* pMatrix, | 165 CFX_Matrix* pMatrix, |
166 const CFX_RectF& rtDirty); | 166 const CFX_RectF& rtDirty); |
167 FX_BOOL bUseOffscreenDirect(IFWL_Widget* pWidget); | 167 FX_BOOL bUseOffscreenDirect(IFWL_Widget* pWidget); |
168 | 168 |
169 CFWL_WidgetMgr* m_pWidgetMgr; | 169 CFWL_WidgetMgr* m_pWidgetMgr; |
170 }; | 170 }; |
171 | 171 |
172 #endif // XFA_FWL_CORE_FWL_WIDGETMGRIMP_H_ | 172 #endif // XFA_FWL_CORE_FWL_WIDGETMGRIMP_H_ |
OLD | NEW |