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_CFWL_WIDGETMGR_H_ |
8 #define XFA_FWL_CORE_FWL_WIDGETMGRIMP_H_ | 8 #define XFA_FWL_CORE_CFWL_WIDGETMGR_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 | 12 |
13 #include "core/fxcrt/include/fx_system.h" | 13 #include "core/fxcrt/include/fx_system.h" |
14 #include "xfa/fwl/core/fwl_error.h" | 14 #include "xfa/fwl/core/fwl_error.h" |
15 #include "xfa/fxgraphics/include/cfx_graphics.h" | 15 #include "xfa/fxgraphics/include/cfx_graphics.h" |
16 | 16 |
17 #define FWL_WGTMGR_DisableThread 0x00000001 | 17 #define FWL_WGTMGR_DisableThread 0x00000001 |
18 #define FWL_WGTMGR_DisableForm 0x00000002 | 18 #define FWL_WGTMGR_DisableForm 0x00000002 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 std::map<IFWL_Widget*, std::unique_ptr<CFWL_WidgetMgrItem>> m_mapWidgetItem; | 120 std::map<IFWL_Widget*, std::unique_ptr<CFWL_WidgetMgrItem>> m_mapWidgetItem; |
121 CXFA_FWLAdapterWidgetMgr* const m_pAdapter; | 121 CXFA_FWLAdapterWidgetMgr* const m_pAdapter; |
122 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) | 122 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) |
123 CFX_RectF m_rtScreen; | 123 CFX_RectF m_rtScreen; |
124 #endif | 124 #endif |
125 friend class CFWL_WidgetMgrDelegate; | 125 friend class CFWL_WidgetMgrDelegate; |
126 }; | 126 }; |
127 | 127 |
128 class CFWL_WidgetMgrDelegate { | 128 class CFWL_WidgetMgrDelegate { |
129 public: | 129 public: |
130 CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr); | 130 explicit CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr); |
131 ~CFWL_WidgetMgrDelegate() {} | 131 ~CFWL_WidgetMgrDelegate() {} |
132 | 132 |
133 FWL_Error OnSetCapability(uint32_t dwCapability = FWL_WGTMGR_DisableThread); | 133 FWL_Error OnSetCapability(uint32_t dwCapability = FWL_WGTMGR_DisableThread); |
134 void OnProcessMessageToForm(CFWL_Message* pMessage); | 134 void OnProcessMessageToForm(CFWL_Message* pMessage); |
135 void OnDrawWidget(IFWL_Widget* pWidget, | 135 void OnDrawWidget(IFWL_Widget* pWidget, |
136 CFX_Graphics* pGraphics, | 136 CFX_Graphics* pGraphics, |
137 const CFX_Matrix* pMatrix); | 137 const CFX_Matrix* pMatrix); |
138 | 138 |
139 protected: | 139 protected: |
140 void DrawChild(IFWL_Widget* pParent, | 140 void DrawChild(IFWL_Widget* pParent, |
141 const CFX_RectF& rtClip, | 141 const CFX_RectF& rtClip, |
142 CFX_Graphics* pGraphics, | 142 CFX_Graphics* pGraphics, |
143 const CFX_Matrix* pMatrix); | 143 const CFX_Matrix* pMatrix); |
144 CFX_Graphics* DrawWidgetBefore(IFWL_Widget* pWidget, | 144 CFX_Graphics* DrawWidgetBefore(IFWL_Widget* pWidget, |
145 CFX_Graphics* pGraphics, | 145 CFX_Graphics* pGraphics, |
146 const CFX_Matrix* pMatrix); | 146 const CFX_Matrix* pMatrix); |
147 void DrawWidgetAfter(IFWL_Widget* pWidget, | 147 void DrawWidgetAfter(IFWL_Widget* pWidget, |
148 CFX_Graphics* pGraphics, | 148 CFX_Graphics* pGraphics, |
149 CFX_RectF& rtClip, | 149 CFX_RectF& rtClip, |
150 const CFX_Matrix* pMatrix); | 150 const CFX_Matrix* pMatrix); |
151 FX_BOOL IsNeedRepaint(IFWL_Widget* pWidget, | 151 FX_BOOL IsNeedRepaint(IFWL_Widget* pWidget, |
152 CFX_Matrix* pMatrix, | 152 CFX_Matrix* pMatrix, |
153 const CFX_RectF& rtDirty); | 153 const CFX_RectF& rtDirty); |
154 FX_BOOL bUseOffscreenDirect(IFWL_Widget* pWidget); | 154 FX_BOOL bUseOffscreenDirect(IFWL_Widget* pWidget); |
155 | 155 |
156 CFWL_WidgetMgr* m_pWidgetMgr; | 156 CFWL_WidgetMgr* m_pWidgetMgr; |
157 }; | 157 }; |
158 | 158 |
159 #endif // XFA_FWL_CORE_FWL_WIDGETMGRIMP_H_ | 159 #endif // XFA_FWL_CORE_CFWL_WIDGETMGR_H_ |
OLD | NEW |