Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: xfa/fwl/core/fwl_widgetmgrimp.h

Issue 1943413002: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@bcdattribute
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/fwl_widgetimp.cpp ('k') | xfa/fwl/core/fwl_widgetmgrimp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "core/fxcrt/include/fx_system.h" 10 #include "core/fxcrt/include/fx_system.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 CFWL_WidgetMgr(IFWL_AdapterNative* pAdapterNative); 64 CFWL_WidgetMgr(IFWL_AdapterNative* pAdapterNative);
65 ~CFWL_WidgetMgr() override; 65 ~CFWL_WidgetMgr() override;
66 66
67 // IFWL_WidgetMgr: 67 // IFWL_WidgetMgr:
68 int32_t CountWidgets(IFWL_Widget* pParent = NULL) override; 68 int32_t CountWidgets(IFWL_Widget* pParent = NULL) override;
69 IFWL_Widget* GetWidget(int32_t nIndex, IFWL_Widget* pParent = NULL) override; 69 IFWL_Widget* GetWidget(int32_t nIndex, IFWL_Widget* pParent = NULL) override;
70 IFWL_Widget* GetWidget(IFWL_Widget* pWidget, 70 IFWL_Widget* GetWidget(IFWL_Widget* pWidget,
71 FWL_WGTRELATION eRelation) override; 71 FWL_WGTRELATION eRelation) override;
72 int32_t GetWidgetIndex(IFWL_Widget* pWidget) override; 72 int32_t GetWidgetIndex(IFWL_Widget* pWidget) override;
73 FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex) override; 73 FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex) override;
74 FWL_ERR RepaintWidget(IFWL_Widget* pWidget, 74 FWL_Error RepaintWidget(IFWL_Widget* pWidget,
75 const CFX_RectF* pRect = NULL) override; 75 const CFX_RectF* pRect = NULL) override;
76 uint32_t GetCapability() override { return m_dwCapability; } 76 uint32_t GetCapability() override { return m_dwCapability; }
77 77
78 void AddWidget(IFWL_Widget* pWidget); 78 void AddWidget(IFWL_Widget* pWidget);
79 void InsertWidget(IFWL_Widget* pParent, 79 void InsertWidget(IFWL_Widget* pParent,
80 IFWL_Widget* pChild, 80 IFWL_Widget* pChild,
81 int32_t nIndex = -1); 81 int32_t nIndex = -1);
82 void RemoveWidget(IFWL_Widget* pWidget); 82 void RemoveWidget(IFWL_Widget* pWidget);
83 void SetOwner(IFWL_Widget* pOwner, IFWL_Widget* pOwned); 83 void SetOwner(IFWL_Widget* pOwner, IFWL_Widget* pOwned);
84 void SetParent(IFWL_Widget* pParent, IFWL_Widget* pChild); 84 void SetParent(IFWL_Widget* pParent, IFWL_Widget* pChild);
85 FX_BOOL IsChild(IFWL_Widget* pChild, IFWL_Widget* pParent); 85 FX_BOOL IsChild(IFWL_Widget* pChild, IFWL_Widget* pParent);
86 FWL_ERR CreateWidget_Native(IFWL_Widget* pWidget); 86 FWL_Error CreateWidget_Native(IFWL_Widget* pWidget);
87 FWL_ERR DestroyWidget_Native(IFWL_Widget* pWidget); 87 FWL_Error DestroyWidget_Native(IFWL_Widget* pWidget);
88 FWL_ERR GetWidgetRect_Native(IFWL_Widget* pWidget, CFX_RectF& rect); 88 FWL_Error GetWidgetRect_Native(IFWL_Widget* pWidget, CFX_RectF& rect);
89 FWL_ERR SetWidgetRect_Native(IFWL_Widget* pWidget, const CFX_RectF& rect); 89 FWL_Error SetWidgetRect_Native(IFWL_Widget* pWidget, const CFX_RectF& rect);
90 FWL_ERR SetWidgetPosition_Native(IFWL_Widget* pWidget, 90 FWL_Error SetWidgetPosition_Native(IFWL_Widget* pWidget,
91 FX_FLOAT fx, 91 FX_FLOAT fx,
92 FX_FLOAT fy); 92 FX_FLOAT fy);
93 FWL_ERR SetWidgetIcon_Native(IFWL_Widget* pWidget, 93 FWL_Error SetWidgetIcon_Native(IFWL_Widget* pWidget,
94 const CFX_DIBitmap* pIcon, 94 const CFX_DIBitmap* pIcon,
95 FX_BOOL bBig); 95 FX_BOOL bBig);
96 FWL_ERR SetWidgetCaption_Native(IFWL_Widget* pWidget, 96 FWL_Error SetWidgetCaption_Native(IFWL_Widget* pWidget,
97 const CFX_WideStringC& wsCaption); 97 const CFX_WideStringC& wsCaption);
98 FWL_ERR SetBorderRegion_Native(IFWL_Widget* pWidget, CFX_Path* pPath); 98 FWL_Error SetBorderRegion_Native(IFWL_Widget* pWidget, CFX_Path* pPath);
99 FWL_ERR ShowWidget_Native(IFWL_Widget* pWidget); 99 FWL_Error ShowWidget_Native(IFWL_Widget* pWidget);
100 FWL_ERR HideWidget_Native(IFWL_Widget* pWidget); 100 FWL_Error HideWidget_Native(IFWL_Widget* pWidget);
101 FWL_ERR SetNormal_Native(IFWL_Widget* pWidget); 101 FWL_Error SetNormal_Native(IFWL_Widget* pWidget);
102 FWL_ERR SetMaximize_Native(IFWL_Widget* pWidget); 102 FWL_Error SetMaximize_Native(IFWL_Widget* pWidget);
103 FWL_ERR SetMinimize_Native(IFWL_Widget* pWidget); 103 FWL_Error SetMinimize_Native(IFWL_Widget* pWidget);
104 FX_BOOL CheckMessage_Native(); 104 FX_BOOL CheckMessage_Native();
105 FWL_ERR DispatchMessage_Native(); 105 FWL_Error DispatchMessage_Native();
106 FX_BOOL IsIdleMessage_Native(); 106 FX_BOOL IsIdleMessage_Native();
107 FWL_ERR Exit_Native(int32_t iExitCode); 107 FWL_Error Exit_Native(int32_t iExitCode);
108 FWL_ERR CreateWidgetWithNativeId_Native(IFWL_Widget* pWidget, void* vp); 108 FWL_Error CreateWidgetWithNativeId_Native(IFWL_Widget* pWidget, void* vp);
109 IFWL_Widget* GetWidgetAtPoint(IFWL_Widget* pParent, FX_FLOAT fx, FX_FLOAT fy); 109 IFWL_Widget* GetWidgetAtPoint(IFWL_Widget* pParent, FX_FLOAT fx, FX_FLOAT fy);
110 void NotifySizeChanged(IFWL_Widget* pForm, FX_FLOAT fx, FX_FLOAT fy); 110 void NotifySizeChanged(IFWL_Widget* pForm, FX_FLOAT fx, FX_FLOAT fy);
111 IFWL_Widget* nextTab(IFWL_Widget* parent, IFWL_Widget* focus, FX_BOOL& bFind); 111 IFWL_Widget* nextTab(IFWL_Widget* parent, IFWL_Widget* focus, FX_BOOL& bFind);
112 int32_t CountRadioButtonGroup(IFWL_Widget* pFirst); 112 int32_t CountRadioButtonGroup(IFWL_Widget* pFirst);
113 IFWL_Widget* GetSiblingRadioButton(IFWL_Widget* pWidget, FX_BOOL bNext); 113 IFWL_Widget* GetSiblingRadioButton(IFWL_Widget* pWidget, FX_BOOL bNext);
114 IFWL_Widget* GetRadioButtonGroupHeader(IFWL_Widget* pRadioButton); 114 IFWL_Widget* GetRadioButtonGroupHeader(IFWL_Widget* pRadioButton);
115 void GetSameGroupRadioButton(IFWL_Widget* pRadioButton, 115 void GetSameGroupRadioButton(IFWL_Widget* pRadioButton,
116 CFX_ArrayTemplate<IFWL_Widget*>& group); 116 CFX_ArrayTemplate<IFWL_Widget*>& group);
117 IFWL_Widget* GetDefaultButton(IFWL_Widget* pParent); 117 IFWL_Widget* GetDefaultButton(IFWL_Widget* pParent);
118 void AddRedrawCounts(IFWL_Widget* pWidget); 118 void AddRedrawCounts(IFWL_Widget* pWidget);
(...skipping 23 matching lines...) Expand all
142 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) 142 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_)
143 CFX_RectF m_rtScreen; 143 CFX_RectF m_rtScreen;
144 #endif 144 #endif
145 }; 145 };
146 146
147 class CFWL_WidgetMgrDelegate { 147 class CFWL_WidgetMgrDelegate {
148 public: 148 public:
149 CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr); 149 CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr);
150 ~CFWL_WidgetMgrDelegate() {} 150 ~CFWL_WidgetMgrDelegate() {}
151 151
152 FWL_ERR OnSetCapability(uint32_t dwCapability = FWL_WGTMGR_DisableThread); 152 FWL_Error OnSetCapability(uint32_t dwCapability = FWL_WGTMGR_DisableThread);
153 int32_t OnProcessMessageToForm(CFWL_Message* pMessage); 153 void OnProcessMessageToForm(CFWL_Message* pMessage);
154 FWL_ERR OnDrawWidget(IFWL_Widget* pWidget, 154 void OnDrawWidget(IFWL_Widget* pWidget,
155 CFX_Graphics* pGraphics, 155 CFX_Graphics* pGraphics,
156 const CFX_Matrix* pMatrix); 156 const CFX_Matrix* pMatrix);
157 157
158 protected: 158 protected:
159 void DrawChild(IFWL_Widget* pParent, 159 void DrawChild(IFWL_Widget* pParent,
160 const CFX_RectF& rtClip, 160 const CFX_RectF& rtClip,
161 CFX_Graphics* pGraphics, 161 CFX_Graphics* pGraphics,
162 const CFX_Matrix* pMatrix); 162 const CFX_Matrix* pMatrix);
163 CFX_Graphics* DrawWidgetBefore(IFWL_Widget* pWidget, 163 CFX_Graphics* DrawWidgetBefore(IFWL_Widget* pWidget,
164 CFX_Graphics* pGraphics, 164 CFX_Graphics* pGraphics,
165 const CFX_Matrix* pMatrix); 165 const CFX_Matrix* pMatrix);
166 void DrawWidgetAfter(IFWL_Widget* pWidget, 166 void DrawWidgetAfter(IFWL_Widget* pWidget,
167 CFX_Graphics* pGraphics, 167 CFX_Graphics* pGraphics,
168 CFX_RectF& rtClip, 168 CFX_RectF& rtClip,
169 const CFX_Matrix* pMatrix); 169 const CFX_Matrix* pMatrix);
170 FX_BOOL IsNeedRepaint(IFWL_Widget* pWidget, 170 FX_BOOL IsNeedRepaint(IFWL_Widget* pWidget,
171 CFX_Matrix* pMatrix, 171 CFX_Matrix* pMatrix,
172 const CFX_RectF& rtDirty); 172 const CFX_RectF& rtDirty);
173 FX_BOOL bUseOffscreenDirect(IFWL_Widget* pWidget); 173 FX_BOOL bUseOffscreenDirect(IFWL_Widget* pWidget);
174 174
175 CFWL_WidgetMgr* m_pWidgetMgr; 175 CFWL_WidgetMgr* m_pWidgetMgr;
176 }; 176 };
177 177
178 #endif // XFA_FWL_CORE_FWL_WIDGETMGRIMP_H_ 178 #endif // XFA_FWL_CORE_FWL_WIDGETMGRIMP_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/fwl_widgetimp.cpp ('k') | xfa/fwl/core/fwl_widgetmgrimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698