blob: 43b535eb72e7318ae35351be858dbde47dcf9728 [file] [log] [blame]
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001// 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.
Lei Zhanga6d9f0e2015-06-13 00:48:38 -07004
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07005// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
Dan Sinclairc411eb92017-07-25 09:39:30 -04007#ifndef FPDFSDK_PWL_CPWL_WND_H_
8#define FPDFSDK_PWL_CPWL_WND_H_
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07009
Tom Sepez6fe32f82018-10-25 23:25:58 +000010#include <memory>
Tom Sepezab277682016-02-17 10:07:21 -080011#include <vector>
12
Tom Sepezb813c162019-08-09 19:23:10 +000013#include "core/fxcrt/cfx_timer.h"
Tom Sepez27c350f2019-06-11 23:52:35 +000014#include "core/fxcrt/observed_ptr.h"
Dan Sinclairaee0db02017-09-21 16:53:58 -040015#include "core/fxcrt/unowned_ptr.h"
Dan Sinclair7f55a542017-07-13 14:17:10 -040016#include "core/fxge/cfx_color.h"
Lei Zhang8a5d97c2019-05-28 18:51:45 +000017#include "core/fxge/cfx_renderdevice.h"
Tom Sepezea9130d2019-08-06 21:55:57 +000018#include "fpdfsdk/pwl/ipwl_systemhandler.h"
Tom Sepez870292c2015-04-07 16:12:46 -070019
Lei Zhang4183f202017-07-07 16:10:06 -070020class CPWL_Edit;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070021class CPWL_MsgControl;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070022class CPWL_ScrollBar;
dsinclairc7a73492016-04-05 12:01:42 -070023class IPVT_FontMap;
Dan Sinclairfb00ec22017-07-05 09:28:15 -040024struct PWL_SCROLL_INFO;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070025
Nico Weber9d8ec5a2015-08-04 13:00:21 -070026// window styles
27#define PWS_CHILD 0x80000000L
28#define PWS_BORDER 0x40000000L
29#define PWS_BACKGROUND 0x20000000L
30#define PWS_HSCROLL 0x10000000L
31#define PWS_VSCROLL 0x08000000L
32#define PWS_VISIBLE 0x04000000L
Nico Weber9d8ec5a2015-08-04 13:00:21 -070033#define PWS_READONLY 0x01000000L
34#define PWS_AUTOFONTSIZE 0x00800000L
35#define PWS_AUTOTRANSPARENT 0x00400000L
36#define PWS_NOREFRESHCLIP 0x00200000L
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070037
Nico Weber9d8ec5a2015-08-04 13:00:21 -070038// edit and label styles
39#define PES_MULTILINE 0x0001L
40#define PES_PASSWORD 0x0002L
41#define PES_LEFT 0x0004L
42#define PES_RIGHT 0x0008L
43#define PES_MIDDLE 0x0010L
44#define PES_TOP 0x0020L
45#define PES_BOTTOM 0x0040L
46#define PES_CENTER 0x0080L
47#define PES_CHARARRAY 0x0100L
48#define PES_AUTOSCROLL 0x0200L
49#define PES_AUTORETURN 0x0400L
50#define PES_UNDO 0x0800L
51#define PES_RICH 0x1000L
52#define PES_SPELLCHECK 0x2000L
53#define PES_TEXTOVERFLOW 0x4000L
54#define PES_NOREAD 0x8000L
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070055
Nico Weber9d8ec5a2015-08-04 13:00:21 -070056// listbox styles
57#define PLBS_MULTIPLESEL 0x0001L
58#define PLBS_HOVERSEL 0x0008L
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070059
Nico Weber9d8ec5a2015-08-04 13:00:21 -070060// combobox styles
61#define PCBS_ALLOWCUSTOMTEXT 0x0001L
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070062
Lei Zhang7fdc2112018-12-13 22:30:17 +000063// Cursor style. These must match the values in public/fpdf_formfill.h
64#define FXCT_ARROW 0
65#define FXCT_NESW 1
66#define FXCT_NWSE 2
67#define FXCT_VBEAM 3
68#define FXCT_HBEAM 4
69#define FXCT_HAND 5
70
Nico Weber9d8ec5a2015-08-04 13:00:21 -070071struct CPWL_Dash {
weili625ad662016-06-15 11:21:33 -070072 CPWL_Dash() : nDash(0), nGap(0), nPhase(0) {}
Nico Weber9d8ec5a2015-08-04 13:00:21 -070073 CPWL_Dash(int32_t dash, int32_t gap, int32_t phase)
74 : nDash(dash), nGap(gap), nPhase(phase) {}
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070075
Dan Sinclairbc8dcc32017-01-19 13:53:02 -050076 void Reset() {
77 nDash = 0;
78 nGap = 0;
79 nPhase = 0;
80 }
81
Nico Weber9d8ec5a2015-08-04 13:00:21 -070082 int32_t nDash;
83 int32_t nGap;
84 int32_t nPhase;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070085};
86
Nico Weber9d8ec5a2015-08-04 13:00:21 -070087#define PWL_SCROLLBAR_WIDTH 12.0f
Dan Sinclairfc54e052017-02-23 09:59:05 -050088#define PWL_SCROLLBAR_TRANSPARENCY 150
Dan Sinclair8e7f9322017-10-16 11:35:42 -040089#define PWL_DEFAULT_BLACKCOLOR CFX_Color(CFX_Color::kGray, 0)
90#define PWL_DEFAULT_WHITECOLOR CFX_Color(CFX_Color::kGray, 1)
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070091
Tom Sepez9fb05952019-08-06 22:33:54 +000092class CPWL_Wnd : public Observable {
Nico Weber9d8ec5a2015-08-04 13:00:21 -070093 public:
Tom Sepezd8ae8f82019-06-12 17:58:33 +000094 class ProviderIface : public Observable {
Tom Sepez134ac912017-09-15 15:32:01 -070095 public:
Tom Sepez39cf6a72018-10-04 23:33:30 +000096 virtual ~ProviderIface() = default;
Tom Sepez134ac912017-09-15 15:32:01 -070097
98 // get a matrix which map user space to CWnd client space
Tom Sepezea9130d2019-08-06 21:55:57 +000099 virtual CFX_Matrix GetWindowMatrix(
100 const IPWL_SystemHandler::PerWindowData* pAttached) = 0;
Tom Sepez134ac912017-09-15 15:32:01 -0700101 };
102
103 class FocusHandlerIface {
104 public:
Tom Sepez39cf6a72018-10-04 23:33:30 +0000105 virtual ~FocusHandlerIface() = default;
Tom Sepez134ac912017-09-15 15:32:01 -0700106 virtual void OnSetFocus(CPWL_Edit* pEdit) = 0;
107 };
108
109 class CreateParams {
Tom Sepezbf157302017-09-15 13:26:32 -0700110 public:
111 CreateParams();
112 CreateParams(const CreateParams& other);
Tom Sepez134ac912017-09-15 15:32:01 -0700113 ~CreateParams();
Tom Sepezbf157302017-09-15 13:26:32 -0700114
Lei Zhang99f44ba2020-06-18 17:41:38 +0000115 // Required:
116 CFX_FloatRect rcRectWnd;
Tom Sepez8a5699d2020-10-13 21:23:53 +0000117 ObservedPtr<CFX_Timer::HandlerIface> pTimerHandler;
Lei Zhang99f44ba2020-06-18 17:41:38 +0000118 UnownedPtr<IPWL_SystemHandler> pSystemHandler;
119 UnownedPtr<IPVT_FontMap> pFontMap;
120 ObservedPtr<ProviderIface> pProvider;
121 // Optional:
122 UnownedPtr<FocusHandlerIface> pFocusHandler;
123 uint32_t dwFlags = 0;
124 CFX_Color sBackgroundColor;
125 BorderStyle nBorderStyle = BorderStyle::kSolid;
126 int32_t dwBorderWidth = 1;
127 CFX_Color sBorderColor;
128 CFX_Color sTextColor;
129 int32_t nTransparency = 255;
130 float fFontSize;
131 CPWL_Dash sDash;
132 // Ignore:
133 CPWL_MsgControl* pMsgControl = nullptr;
134 int32_t eCursorType = FXCT_ARROW;
135 CFX_Matrix mtChild;
Tom Sepezbf157302017-09-15 13:26:32 -0700136 };
137
Tom Sepez43f012f2019-08-02 16:16:46 +0000138 static bool IsSHIFTKeyDown(uint32_t nFlag);
139 static bool IsCTRLKeyDown(uint32_t nFlag);
140 static bool IsALTKeyDown(uint32_t nFlag);
141
Tom Sepezea9130d2019-08-06 21:55:57 +0000142 CPWL_Wnd(const CreateParams& cp,
143 std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
Tom Sepez9fb05952019-08-06 22:33:54 +0000144 virtual ~CPWL_Wnd();
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700145
Henrique Nakashima55469ae2017-10-04 11:08:45 -0400146 // Returns |true| iff this instance is still allocated.
Tom Sepez30346152020-10-15 17:47:53 +0000147 virtual bool InvalidateRect(const CFX_FloatRect* pRect);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700148
tsepez4cf55152016-11-02 14:37:54 -0700149 virtual bool OnKeyDown(uint16_t nChar, uint32_t nFlag);
tsepez4cf55152016-11-02 14:37:54 -0700150 virtual bool OnChar(uint16_t nChar, uint32_t nFlag);
Lei Zhangbe912092020-04-17 18:03:33 +0000151 virtual bool OnLButtonDblClk(uint32_t nFlag, const CFX_PointF& point);
152 virtual bool OnLButtonDown(uint32_t nFlag, const CFX_PointF& point);
153 virtual bool OnLButtonUp(uint32_t nFlag, const CFX_PointF& point);
154 virtual bool OnRButtonDown(uint32_t nFlag, const CFX_PointF& point);
155 virtual bool OnRButtonUp(uint32_t nFlag, const CFX_PointF& point);
156 virtual bool OnMouseMove(uint32_t nFlag, const CFX_PointF& point);
157 virtual bool OnMouseWheel(uint32_t nFlag,
Dan Sinclairf528eee2017-02-14 11:52:07 -0500158 const CFX_PointF& point,
Lei Zhangbe912092020-04-17 18:03:33 +0000159 const CFX_Vector& delta);
Dan Sinclairfb00ec22017-07-05 09:28:15 -0400160 virtual void SetScrollInfo(const PWL_SCROLL_INFO& info);
Dan Sinclair7e0336e2017-07-05 09:39:50 -0400161 virtual void SetScrollPosition(float pos);
Dan Sinclair63fbd8d2017-07-05 14:10:36 -0400162 virtual void ScrollWindowVertically(float pos);
Dan Sinclair7f6bec92017-07-05 14:13:16 -0400163 virtual void NotifyLButtonDown(CPWL_Wnd* child, const CFX_PointF& pos);
164 virtual void NotifyLButtonUp(CPWL_Wnd* child, const CFX_PointF& pos);
165 virtual void NotifyMouseMove(CPWL_Wnd* child, const CFX_PointF& pos);
Dan Sinclair90b73262017-02-23 14:38:48 -0500166 virtual void SetFocus();
167 virtual void KillFocus();
168 virtual void SetCursor();
Henrique Nakashima55469ae2017-10-04 11:08:45 -0400169
170 // Returns |true| iff this instance is still allocated.
171 virtual bool SetVisible(bool bVisible);
Dan Sinclair05df0752017-03-14 14:43:42 -0400172 virtual void SetFontSize(float fFontSize);
173 virtual float GetFontSize() const;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700174
Lei Zhang3900ddb2018-04-17 14:54:40 +0000175 virtual WideString GetText();
Ryan Harrison275e2602017-09-18 14:23:18 -0400176 virtual WideString GetSelectedText();
177 virtual void ReplaceSelection(const WideString& text);
Lei Zhanga6105362020-06-22 20:09:56 +0000178 virtual bool SelectAllText();
Lei Zhangee967722018-04-19 20:55:54 +0000179
180 virtual bool CanUndo();
181 virtual bool CanRedo();
182 virtual bool Undo();
183 virtual bool Redo();
184
Tom Sepez281a9ea2016-02-26 14:24:28 -0800185 virtual CFX_FloatRect GetFocusRect() const;
Tom Sepez281a9ea2016-02-26 14:24:28 -0800186 virtual CFX_FloatRect GetClientRect() const;
Dan Sinclair90b73262017-02-23 14:38:48 -0500187
Tom Sepez9590dee2018-10-26 22:08:43 +0000188 void AddChild(std::unique_ptr<CPWL_Wnd> pWnd);
Tom Sepez7df950a2018-10-26 19:42:40 +0000189 void RemoveChild(CPWL_Wnd* pWnd);
Tom Sepezb7c4a022018-10-26 23:56:27 +0000190 void Realize();
Dan Sinclair90b73262017-02-23 14:38:48 -0500191 void Destroy();
Henrique Nakashima55469ae2017-10-04 11:08:45 -0400192 bool Move(const CFX_FloatRect& rcNew, bool bReset, bool bRefresh);
Dan Sinclair90b73262017-02-23 14:38:48 -0500193
Tom Sepez7df950a2018-10-26 19:42:40 +0000194 void InvalidateFocusHandler(FocusHandlerIface* handler);
195 void InvalidateProvider(ProviderIface* provider);
Dan Sinclair90b73262017-02-23 14:38:48 -0500196 void SetCapture();
197 void ReleaseCapture();
Lei Zhangeb14e042017-08-15 13:56:43 -0700198 void DrawAppearance(CFX_RenderDevice* pDevice,
199 const CFX_Matrix& mtUser2Device);
Dan Sinclair90b73262017-02-23 14:38:48 -0500200
Dan Sinclair7f55a542017-07-13 14:17:10 -0400201 CFX_Color GetBackgroundColor() const;
202 void SetBackgroundColor(const CFX_Color& color);
203 CFX_Color GetBorderColor() const;
204 CFX_Color GetTextColor() const;
205 void SetTextColor(const CFX_Color& color);
206 CFX_Color GetBorderLeftTopColor(BorderStyle nBorderStyle) const;
207 CFX_Color GetBorderRightBottomColor(BorderStyle nBorderStyle) const;
Dan Sinclair90b73262017-02-23 14:38:48 -0500208
Andrew Weintraubce4e27f2019-06-13 18:49:18 +0000209 void SetBorderStyle(BorderStyle nBorderStyle);
Dan Sinclair90b73262017-02-23 14:38:48 -0500210 BorderStyle GetBorderStyle() const;
211 const CPWL_Dash& GetBorderDash() const;
212
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700213 int32_t GetBorderWidth() const;
Dan Sinclair90b73262017-02-23 14:38:48 -0500214 int32_t GetInnerBorderWidth() const;
215 CFX_FloatRect GetWindowRect() const;
216 CFX_PointF GetCenterPoint() const;
217
tsepez4cf55152016-11-02 14:37:54 -0700218 bool IsVisible() const { return m_bVisible; }
219 bool HasFlag(uint32_t dwFlags) const;
tsepezc3255f52016-03-25 14:52:27 -0700220 void AddFlag(uint32_t dwFlags);
221 void RemoveFlag(uint32_t dwFlags);
Dan Sinclair90b73262017-02-23 14:38:48 -0500222
223 void SetClipRect(const CFX_FloatRect& rect);
Tom Sepez281a9ea2016-02-26 14:24:28 -0800224 const CFX_FloatRect& GetClipRect() const;
Dan Sinclair90b73262017-02-23 14:38:48 -0500225
Tom Sepez8fba2612018-10-26 21:27:41 +0000226 CPWL_Wnd* GetParentWindow() const { return m_pParent.Get(); }
Tom Sepezea9130d2019-08-06 21:55:57 +0000227 const IPWL_SystemHandler::PerWindowData* GetAttachedData() const {
228 return m_pAttachedData.get();
229 }
230 std::unique_ptr<IPWL_SystemHandler::PerWindowData> CloneAttachedData() const;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700231
Dan Sinclairf528eee2017-02-14 11:52:07 -0500232 bool WndHitTest(const CFX_PointF& point) const;
233 bool ClientHitTest(const CFX_PointF& point) const;
tsepez4cf55152016-11-02 14:37:54 -0700234 bool IsCaptureMouse() const;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700235
Dan Sinclair90b73262017-02-23 14:38:48 -0500236 void EnableWindow(bool bEnable);
237 bool IsEnabled() const { return m_bEnabled; }
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700238 const CPWL_Wnd* GetFocused() const;
tsepez4cf55152016-11-02 14:37:54 -0700239 bool IsFocused() const;
240 bool IsReadOnly() const;
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700241 CPWL_ScrollBar* GetVScrollBar() const;
Lei Zhanga6d9f0e2015-06-13 00:48:38 -0700242
Tom Sepez5b63fd92018-08-20 20:27:01 +0000243 IPVT_FontMap* GetFontMap() const { return m_CreationParams.pFontMap.Get(); }
244 ProviderIface* GetProvider() const {
245 return m_CreationParams.pProvider.Get();
246 }
247 FocusHandlerIface* GetFocusHandler() const {
248 return m_CreationParams.pFocusHandler.Get();
249 }
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700250
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700251 int32_t GetTransparency();
252 void SetTransparency(int32_t nTransparency);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700253
Tom Sepez60d909e2015-12-10 15:34:55 -0800254 CFX_Matrix GetChildToRoot() const;
255 CFX_Matrix GetChildMatrix() const;
256 void SetChildMatrix(const CFX_Matrix& mt);
257 CFX_Matrix GetWindowMatrix() const;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700258
Dan Sinclair6dc4fb82017-10-17 09:08:26 -0400259 virtual void OnSetFocus();
260 virtual void OnKillFocus();
Dan Sinclair90b73262017-02-23 14:38:48 -0500261
Dan Sinclair6dc4fb82017-10-17 09:08:26 -0400262 protected:
Tom Sepezbf157302017-09-15 13:26:32 -0700263 virtual void CreateChildWnd(const CreateParams& cp);
Henrique Nakashima55469ae2017-10-04 11:08:45 -0400264
265 // Returns |true| iff this instance is still allocated.
266 virtual bool RePosChildWnd();
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700267
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700268 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
Lei Zhangeb14e042017-08-15 13:56:43 -0700269 const CFX_Matrix& mtUser2Device);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700270
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700271 virtual void OnCreated();
272 virtual void OnDestroy();
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700273
tsepez4cf55152016-11-02 14:37:54 -0700274 bool IsNotifying() const { return m_bNotifying; }
Tom Sepezbf157302017-09-15 13:26:32 -0700275 bool IsValid() const { return m_bCreated; }
Tom Sepezea08d172018-10-29 17:29:06 +0000276 CreateParams* GetCreationParams() { return &m_CreationParams; }
Tom Sepez8a5699d2020-10-13 21:23:53 +0000277 CFX_Timer::HandlerIface* GetTimerHandler() const {
Tom Sepez7c2d1102019-08-07 22:25:50 +0000278 return m_CreationParams.pTimerHandler.Get();
279 }
Tom Sepez9fb05952019-08-06 22:33:54 +0000280 IPWL_SystemHandler* GetSystemHandler() const {
281 return m_CreationParams.pSystemHandler.Get();
282 }
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700283
Henrique Nakashima55469ae2017-10-04 11:08:45 -0400284 // Returns |true| iff this instance is still allocated.
285 bool InvalidateRectMove(const CFX_FloatRect& rcOld,
Tom Sepez281a9ea2016-02-26 14:24:28 -0800286 const CFX_FloatRect& rcNew);
Lei Zhanga6d9f0e2015-06-13 00:48:38 -0700287
tsepez4cf55152016-11-02 14:37:54 -0700288 bool IsWndCaptureMouse(const CPWL_Wnd* pWnd) const;
289 bool IsWndCaptureKeyboard(const CPWL_Wnd* pWnd) const;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700290
Lei Zhang60fa2fc2017-07-21 17:42:19 -0700291 static bool IsCTRLpressed(uint32_t nFlag) {
Tom Sepez43f012f2019-08-02 16:16:46 +0000292 return CPWL_Wnd::IsCTRLKeyDown(nFlag);
Lei Zhang60fa2fc2017-07-21 17:42:19 -0700293 }
294 static bool IsSHIFTpressed(uint32_t nFlag) {
Tom Sepez43f012f2019-08-02 16:16:46 +0000295 return CPWL_Wnd::IsSHIFTKeyDown(nFlag);
Lei Zhang60fa2fc2017-07-21 17:42:19 -0700296 }
297 static bool IsALTpressed(uint32_t nFlag) {
Tom Sepez43f012f2019-08-02 16:16:46 +0000298 return CPWL_Wnd::IsALTKeyDown(nFlag);
Lei Zhang60fa2fc2017-07-21 17:42:19 -0700299 }
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700300
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700301 private:
Dan Sinclair90b73262017-02-23 14:38:48 -0500302 CFX_PointF ParentToChild(const CFX_PointF& point) const;
303 CFX_FloatRect ParentToChild(const CFX_FloatRect& rect) const;
304
Lei Zhangeb14e042017-08-15 13:56:43 -0700305 void DrawChildAppearance(CFX_RenderDevice* pDevice,
306 const CFX_Matrix& mtUser2Device);
Dan Sinclair90b73262017-02-23 14:38:48 -0500307
Lei Zhang77f9bff2017-08-29 11:34:12 -0700308 CFX_FloatRect PWLtoWnd(const CFX_FloatRect& rect) const;
Dan Sinclair1f403ce2017-02-21 12:56:24 -0500309
Tom Sepezbf157302017-09-15 13:26:32 -0700310 void CreateScrollBar(const CreateParams& cp);
311 void CreateVScrollBar(const CreateParams& cp);
Lei Zhanga6d9f0e2015-06-13 00:48:38 -0700312
Lei Zhang62b2e912015-08-14 21:49:19 -0700313 void AdjustStyle();
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700314 void CreateMsgControl();
315 void DestroyMsgControl();
Lei Zhanga6d9f0e2015-06-13 00:48:38 -0700316
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700317 CPWL_MsgControl* GetMsgControl() const;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700318
Tom Sepezbf157302017-09-15 13:26:32 -0700319 CreateParams m_CreationParams;
Tom Sepezea9130d2019-08-06 21:55:57 +0000320 std::unique_ptr<IPWL_SystemHandler::PerWindowData> m_pAttachedData;
Tom Sepez8fba2612018-10-26 21:27:41 +0000321 UnownedPtr<CPWL_Wnd> m_pParent;
Tom Sepeza9a582b2018-10-26 23:04:45 +0000322 std::vector<std::unique_ptr<CPWL_Wnd>> m_Children;
Dan Sinclairaee0db02017-09-21 16:53:58 -0400323 UnownedPtr<CPWL_ScrollBar> m_pVScrollBar;
Tom Sepez281a9ea2016-02-26 14:24:28 -0800324 CFX_FloatRect m_rcWindow;
325 CFX_FloatRect m_rcClip;
Tom Sepez6fe32f82018-10-25 23:25:58 +0000326 bool m_bCreated = false;
327 bool m_bVisible = false;
328 bool m_bNotifying = false;
329 bool m_bEnabled = true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700330};
331
Dan Sinclairc411eb92017-07-25 09:39:30 -0400332#endif // FPDFSDK_PWL_CPWL_WND_H_