Initial commit.
[pdfium.git] / fpdfsdk / include / pdfwindow / PWL_Wnd.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4  \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _PWL_WND_H_\r
8 #define _PWL_WND_H_\r
9 \r
10 class IPWL_Provider;\r
11 class CPWL_Wnd;\r
12 class CPWL_MsgControl;\r
13 class CPWL_Wnd;\r
14 class CPWL_ScrollBar;\r
15 class CPWL_Timer;\r
16 class CPWL_TimerHandler;\r
17 class IPWL_SpellCheck;\r
18 class IFX_SystemHandler;\r
19 \r
20 #ifdef FX_READER_DLL\r
21         #ifdef PWL_EXPORT\r
22                         #define PWL_CLASS               __declspec(dllexport)\r
23                         #define PWL_FUNCTION    PWL_CLASS       \r
24                 #else\r
25                         #define PWL_CLASS\r
26                         #define PWL_FUNCTION\r
27         #endif\r
28 #else\r
29         #define PWL_CLASS\r
30         #define PWL_FUNCTION\r
31 #endif\r
32 \r
33 //window styles\r
34 #define PWS_CHILD                                                       0x80000000L\r
35 #define PWS_BORDER                                                      0x40000000L\r
36 #define PWS_BACKGROUND                                          0x20000000L\r
37 #define PWS_HSCROLL                                                     0x10000000L\r
38 #define PWS_VSCROLL                                                     0x08000000L\r
39 #define PWS_VISIBLE                                                     0x04000000L\r
40 #define PWS_DISABLE                                                     0x02000000L\r
41 #define PWS_READONLY                                            0x01000000L\r
42 #define PWS_AUTOFONTSIZE                                        0x00800000L\r
43 #define PWS_AUTOTRANSPARENT                                     0x00400000L\r
44 #define PWS_NOREFRESHCLIP                                       0x00200000L\r
45 \r
46 //edit and label styles\r
47 #define PES_MULTILINE                                           0x0001L\r
48 #define PES_PASSWORD                                            0x0002L\r
49 #define PES_LEFT                                                        0x0004L\r
50 #define PES_RIGHT                                                       0x0008L\r
51 #define PES_MIDDLE                                                      0x0010L\r
52 #define PES_TOP                                                         0x0020L\r
53 #define PES_BOTTOM                                                      0x0040L\r
54 #define PES_CENTER                                                      0x0080L\r
55 #define PES_CHARARRAY                                           0x0100L\r
56 #define PES_AUTOSCROLL                                          0x0200L\r
57 #define PES_AUTORETURN                                          0x0400L\r
58 #define PES_UNDO                                                        0x0800L\r
59 #define PES_RICH                                                        0x1000L\r
60 #define PES_SPELLCHECK                                          0x2000L\r
61 #define PES_TEXTOVERFLOW                                        0x4000L\r
62 #define PES_NOREAD                                                      0x8000L\r
63 \r
64 //listbox styles\r
65 #define PLBS_MULTIPLESEL                                        0x0001L\r
66 #define PLBS_HOVERSEL                                           0x0008L\r
67 \r
68 //combobox styles\r
69 #define PCBS_ALLOWCUSTOMTEXT                            0x0001L\r
70 \r
71 //richedit styles\r
72 #define PRES_MULTILINE                                          0x0001L\r
73 #define PRES_AUTORETURN                                         0x0002L\r
74 #define PRES_AUTOSCROLL                                         0x0004L\r
75 #define PRES_SPELLCHECK                                         0x0008L\r
76 #define PRES_UNDO                                                       0x0100L\r
77 #define PRES_MULTIPAGES                                         0x0200L\r
78 #define PRES_TEXTOVERFLOW                                       0x0400L\r
79 \r
80 //border style\r
81 #define PBS_SOLID                                                       0\r
82 #define PBS_DASH                                                        1\r
83 #define PBS_BEVELED                                                     2\r
84 #define PBS_INSET                                                       3\r
85 #define PBS_UNDERLINED                                          4\r
86 #define PBS_SHADOW                                                      5\r
87 \r
88 //notification messages\r
89 #define PNM_ADDCHILD                                            0x00000000L\r
90 #define PNM_REMOVECHILD                                         0x00000001L\r
91 #define PNM_SETSCROLLINFO                                       0x00000002L\r
92 #define PNM_SETSCROLLPOS                                        0x00000003L\r
93 #define PNM_SCROLLWINDOW                                        0x00000004L\r
94 #define PNM_LBUTTONDOWN                                         0x00000005L\r
95 #define PNM_LBUTTONUP                                           0x00000006L\r
96 #define PNM_MOUSEMOVE                                           0x00000007L\r
97 #define PNM_NOTERESET                                           0x00000008L\r
98 #define PNM_SETCARETINFO                                        0x00000009L\r
99 #define PNM_SELCHANGED                                          0x0000000AL\r
100 #define PNM_NOTEEDITCHANGED                                     0x0000000BL\r
101 \r
102 #define PWL_CLASSNAME_EDIT                                      "CPWL_Edit"\r
103 \r
104 struct CPWL_Dash\r
105 {\r
106         CPWL_Dash(FX_INT32 dash, FX_INT32 gap, FX_INT32 phase) : nDash(dash), nGap(gap), nPhase(phase)\r
107         {}\r
108 \r
109         FX_INT32                        nDash;\r
110         FX_INT32                        nGap;\r
111         FX_INT32                        nPhase;\r
112 };\r
113 \r
114 struct PWL_CLASS CPWL_Color\r
115 {\r
116         CPWL_Color(FX_INT32 type = COLORTYPE_TRANSPARENT, FX_FLOAT color1 = 0.0f, FX_FLOAT color2 = 0.0f, FX_FLOAT color3 = 0.0f, FX_FLOAT color4 = 0.0f)\r
117                 : nColorType(type), fColor1(color1), fColor2(color2), fColor3(color3), fColor4(color4)\r
118         {}\r
119 \r
120         CPWL_Color(FX_INT32 r, FX_INT32 g, FX_INT32 b) :\r
121                 nColorType(COLORTYPE_RGB), fColor1(r/255.0f), fColor2(g/255.0f), fColor3(b/255.0f), fColor4(0)\r
122         {}\r
123         \r
124         void ConvertColorType(FX_INT32 nColorType);\r
125 \r
126         /*\r
127         COLORTYPE_TRANSPARENT\r
128         COLORTYPE_RGB\r
129         COLORTYPE_CMYK\r
130         COLORTYPE_GRAY\r
131         */\r
132         FX_INT32                                        nColorType; \r
133         FX_FLOAT                                        fColor1,fColor2,fColor3,fColor4;\r
134 };\r
135 \r
136 inline FX_BOOL operator == (const CPWL_Color &c1, const CPWL_Color &c2)\r
137 {\r
138         return c1.nColorType == c2.nColorType && \r
139                 c1.fColor1 - c2.fColor1 < 0.0001 && c1.fColor1 - c2.fColor1 > -0.0001 &&\r
140                 c1.fColor2 - c2.fColor2 < 0.0001 && c1.fColor2 - c2.fColor2 > -0.0001 &&\r
141                 c1.fColor3 - c2.fColor3 < 0.0001 && c1.fColor3 - c2.fColor3 > -0.0001 &&\r
142                 c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0.0001;\r
143 }\r
144 \r
145 inline FX_BOOL operator != (const CPWL_Color &c1, const CPWL_Color &c2)\r
146 {\r
147         return !operator == (c1, c2);\r
148 }\r
149 \r
150 #define PWL_SCROLLBAR_WIDTH                                     12.0f\r
151 #define PWL_SCROLLBAR_BUTTON_WIDTH                      9.0f\r
152 #define PWL_SCROLLBAR_POSBUTTON_MINWIDTH        2.0f\r
153 #define PWL_SCROLLBAR_TRANSPARANCY                      150\r
154 #define PWL_SCROLLBAR_BKCOLOR                           CPWL_Color(COLORTYPE_RGB,220.0f/255.0f,220.0f/255.0f,220.0f/255.0f)\r
155 #define PWL_DEFAULT_SELTEXTCOLOR                        CPWL_Color(COLORTYPE_RGB,1,1,1)\r
156 #define PWL_DEFAULT_SELBACKCOLOR                        CPWL_Color(COLORTYPE_RGB,0,51.0f/255.0f,113.0f/255.0f)\r
157 #define PWL_DEFAULT_BACKCOLOR                           PWL_DEFAULT_SELTEXTCOLOR\r
158 #define PWL_DEFAULT_TEXTCOLOR                           CPWL_Color(COLORTYPE_RGB,0,0,0)\r
159 #define PWL_DEFAULT_FONTSIZE                            9.0f\r
160 #define PWL_DEFAULT_BLACKCOLOR                          CPWL_Color(COLORTYPE_GRAY,0)\r
161 #define PWL_DEFAULT_WHITECOLOR                          CPWL_Color(COLORTYPE_GRAY,1)\r
162 #define PWL_DEFAULT_HEAVYGRAYCOLOR                      CPWL_Color(COLORTYPE_GRAY,0.50)\r
163 #define PWL_DEFAULT_LIGHTGRAYCOLOR                      CPWL_Color(COLORTYPE_GRAY,0.75)\r
164 #define PWL_TRIANGLE_HALFLEN                            2.0f\r
165 #define PWL_CBBUTTON_TRIANGLE_HALFLEN           3.0f\r
166 #define PWL_INVALIDATE_INFLATE                          2\r
167 \r
168 class IPWL_SpellCheck\r
169 {\r
170 public:\r
171         virtual FX_BOOL                                                 CheckWord(FX_LPCSTR sWord) = 0;\r
172         virtual void                                                    SuggestWords(FX_LPCSTR sWord, CFX_ByteStringArray & sSuggest) = 0;      \r
173 };\r
174 \r
175 class IPWL_Provider\r
176 {\r
177 public:\r
178         //get a matrix which map user space to CWnd client space\r
179         virtual CPDF_Matrix                                             GetWindowMatrix(void* pAttachedData) = 0;\r
180 \r
181         /*\r
182         0 L"&Undo\tCtrl+Z"\r
183         1 L"&Redo\tCtrl+Shift+Z"\r
184         2 L"Cu&t\tCtrl+X"\r
185         3 L"&Copy\tCtrl+C"\r
186         4 L"&Paste\tCtrl+V"\r
187         5 L"&Delete"\r
188         6  L"&Select All\tCtrl+A"\r
189         */\r
190         virtual CFX_WideString                                  LoadPopupMenuString(FX_INT32 nIndex) = 0;\r
191 };\r
192 \r
193 class IPWL_FocusHandler\r
194 {\r
195 public:\r
196         virtual void                                                    OnSetFocus(CPWL_Wnd* pWnd) = 0;\r
197         virtual void                                                    OnKillFocus(CPWL_Wnd* pWnd) = 0;\r
198 };\r
199 \r
200 struct PWL_CREATEPARAM\r
201 {\r
202 public:\r
203         PWL_CREATEPARAM() : rcRectWnd(0,0,0,0),\r
204                 pSystemHandler(NULL),\r
205                 pFontMap(NULL),\r
206                 pProvider(NULL),\r
207                 pFocusHandler(NULL),\r
208                 dwFlags(0),\r
209                 sBackgroundColor(),\r
210                 hAttachedWnd(NULL),\r
211                 pSpellCheck(NULL),\r
212                 nBorderStyle(PBS_SOLID),\r
213                 dwBorderWidth(1),\r
214                 sBorderColor(),\r
215                 sTextColor(),\r
216                 sTextStrokeColor(),\r
217                 nTransparency(255),\r
218                 fFontSize(PWL_DEFAULT_FONTSIZE),\r
219                 sDash(3,0,0),   \r
220                 pAttachedData(NULL),\r
221                 pParentWnd(NULL),\r
222                 pMsgControl(NULL),\r
223                 eCursorType(FXCT_ARROW),\r
224                 mtChild(1,0,0,1,0,0)\r
225         {\r
226         }\r
227 \r
228         CPDF_Rect                               rcRectWnd;                              //required      \r
229         IFX_SystemHandler*              pSystemHandler;                 //required\r
230         IFX_Edit_FontMap*               pFontMap;                               //required for text window\r
231         IPWL_Provider*                  pProvider;                              //required for self coordinate\r
232         IPWL_FocusHandler*              pFocusHandler;                  //optional\r
233         FX_DWORD                                dwFlags;                                //optional\r
234         CPWL_Color                              sBackgroundColor;               //optional\r
235         FX_HWND                                 hAttachedWnd;                   //required for no-reader framework\r
236         IPWL_SpellCheck*                pSpellCheck;                    //required for spellchecking\r
237         FX_INT32                                nBorderStyle;                   //optional\r
238         FX_INT32                                dwBorderWidth;                  //optional\r
239         CPWL_Color                              sBorderColor;                   //optional\r
240         CPWL_Color                              sTextColor;                             //optional\r
241         CPWL_Color                              sTextStrokeColor;               //optional\r
242         FX_INT32                                nTransparency;                  //optional\r
243         FX_FLOAT                                fFontSize;                              //optional\r
244         CPWL_Dash                               sDash;                                  //optional\r
245         void*                                   pAttachedData;                  //optional\r
246         CPWL_Wnd*                               pParentWnd;                             //ignore\r
247         CPWL_MsgControl*                pMsgControl;                    //ignore\r
248         FX_INT32                                eCursorType;                    //ignore\r
249         CPDF_Matrix                             mtChild;                                //ignore\r
250 };\r
251 \r
252 class CPWL_Timer\r
253 {\r
254 public:\r
255         CPWL_Timer(CPWL_TimerHandler* pAttached, IFX_SystemHandler* pSystemHandler);\r
256         virtual ~CPWL_Timer();\r
257 \r
258         FX_INT32                                                        SetPWLTimer(FX_INT32 nElapse);\r
259         void                                                            KillPWLTimer();\r
260         static void                                             TimerProc(FX_INT32 idEvent);\r
261 \r
262 private:\r
263         FX_INT32                                                        m_nTimerID;     \r
264         CPWL_TimerHandler*                                      m_pAttached;\r
265         IFX_SystemHandler*                                      m_pSystemHandler;\r
266 };\r
267 \r
268 class PWL_CLASS CPWL_TimerHandler\r
269 {\r
270 public:\r
271         CPWL_TimerHandler();\r
272         virtual ~CPWL_TimerHandler();\r
273 \r
274         void                                                            BeginTimer(FX_INT32 nElapse);\r
275         void                                                            EndTimer();\r
276         virtual void                                            TimerProc();\r
277         virtual IFX_SystemHandler*                      GetSystemHandler() const = 0;\r
278 \r
279 private:\r
280         CPWL_Timer*                                                     m_pTimer;\r
281 };\r
282 \r
283 class PWL_CLASS CPWL_Wnd : public CPWL_TimerHandler\r
284 {\r
285         friend class CPWL_MsgControl;\r
286 public:\r
287         CPWL_Wnd();\r
288         virtual ~CPWL_Wnd();\r
289 \r
290         void                                                    Create(const PWL_CREATEPARAM & cp);\r
291         virtual CFX_ByteString                  GetClassName() const;   \r
292         void                                                    Destroy();\r
293         void                                                    Move(const CPDF_Rect & rcNew,FX_BOOL bReset,FX_BOOL bRefresh);\r
294         virtual void                                    InvalidateRect(CPDF_Rect* pRect = NULL);\r
295 \r
296         void                                                    GetAppearanceStream(CFX_ByteString & sAppStream);\r
297         void                                                    DrawAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);\r
298 \r
299         virtual FX_BOOL                                 OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);\r
300         virtual FX_BOOL                                 OnKeyUp(FX_WORD nChar, FX_DWORD nFlag);\r
301         virtual FX_BOOL                                 OnChar(FX_WORD nChar, FX_DWORD nFlag);\r
302         virtual FX_BOOL                                 OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag);\r
303         virtual FX_BOOL                                 OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);\r
304         virtual FX_BOOL                                 OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);\r
305         virtual FX_BOOL                                 OnMButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag);\r
306         virtual FX_BOOL                                 OnMButtonDown(const CPDF_Point & point, FX_DWORD nFlag);\r
307         virtual FX_BOOL                                 OnMButtonUp(const CPDF_Point & point, FX_DWORD nFlag);\r
308         virtual FX_BOOL                                 OnRButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag);\r
309         virtual FX_BOOL                                 OnRButtonDown(const CPDF_Point & point, FX_DWORD nFlag);\r
310         virtual FX_BOOL                                 OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag);\r
311         virtual FX_BOOL                                 OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);\r
312         virtual FX_BOOL                                 OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);\r
313 \r
314         virtual void                                    SetFocus();\r
315         virtual void                                    KillFocus();\r
316         void                                                    SetCapture();\r
317         void                                                    ReleaseCapture();\r
318 \r
319         virtual void                                    OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);\r
320         virtual void                                    SetTextColor(const CPWL_Color & color);\r
321         virtual void                                    SetTextStrokeColor(const CPWL_Color & color);\r
322         virtual void                                    SetVisible(FX_BOOL bVisible);\r
323 \r
324         virtual CPDF_Rect                               GetFocusRect() const;\r
325         virtual CPWL_Color                              GetBackgroundColor() const;\r
326         virtual CPWL_Color                              GetBorderColor() const;\r
327         virtual CPWL_Color                              GetTextColor() const;\r
328         virtual CPWL_Color                              GetTextStrokeColor() const;\r
329         virtual FX_FLOAT                                GetFontSize() const;\r
330         virtual FX_INT32                                GetInnerBorderWidth() const;\r
331         virtual CPWL_Color                              GetBorderLeftTopColor(FX_INT32 nBorderStyle) const;\r
332         virtual CPWL_Color                              GetBorderRightBottomColor(FX_INT32 nBorderStyle) const;\r
333 \r
334         virtual FX_BOOL                                 IsModified() const {return FALSE;}\r
335 \r
336         virtual void                                    SetFontSize(FX_FLOAT fFontSize);        \r
337 \r
338         void                                                    SetBackgroundColor(const CPWL_Color & color);           \r
339         void                                                    SetBorderColor(const CPWL_Color & color);\r
340         void                                                    SetBorderWidth(FX_INT32 nBorderWidth);\r
341         void                                                    SetClipRect(const CPDF_Rect & rect);\r
342         void                                                    SetBorderStyle(FX_INT32 eBorderStyle);  \r
343         void                                                    SetBorderDash(const CPWL_Dash & sDash);\r
344 \r
345         CPDF_Rect                                               GetOriginWindowRect() const;\r
346         virtual CPDF_Rect                               GetWindowRect() const;\r
347         virtual CPDF_Rect                               GetClientRect() const;\r
348         CPDF_Point                                              GetCenterPoint() const;\r
349         CPDF_Rect                                               GetClientCenterSquare() const;\r
350         CPDF_Rect                                               GetWindowCenterSquare() const;          \r
351         FX_INT32                                                GetBorderWidth() const;         \r
352         FX_BOOL                                                 IsVisible() const {return m_bVisible;}  \r
353         FX_BOOL                                                 HasFlag(FX_DWORD dwFlags) const;\r
354         void                                                    AddFlag(FX_DWORD dwFlags);\r
355         void                                                    RemoveFlag(FX_DWORD dwFlags);\r
356         CPDF_Rect                                               GetClipRect() const;            \r
357         CPWL_Wnd*                                               GetParentWindow() const;                \r
358         FX_INT32                                                GetBorderStyle() const; \r
359         CPWL_Dash                                               GetBorderDash() const;\r
360         void*                                                   GetAttachedData() const;\r
361         \r
362         FX_BOOL                                                 WndHitTest(const CPDF_Point & point) const;\r
363         FX_BOOL                                                 ClientHitTest(const CPDF_Point & point) const;\r
364         FX_BOOL                                                 IsCaptureMouse() const;\r
365 \r
366         const CPWL_Wnd*                                 GetFocused() const;\r
367         FX_BOOL                                                 IsFocused() const;\r
368         FX_BOOL                                                 IsReadOnly() const;\r
369         CPWL_ScrollBar*                                 GetVScrollBar() const;\r
370 \r
371         IFX_Edit_FontMap*                               GetFontMap() const;\r
372         IPWL_Provider*                                  GetProvider() const;\r
373         virtual IFX_SystemHandler*              GetSystemHandler() const;\r
374         IPWL_FocusHandler*                              GetFocusHandler() const;\r
375         \r
376         FX_INT32                                                GetTransparency();\r
377         void                                                    SetTransparency(FX_INT32 nTransparency);\r
378 \r
379         CPDF_Matrix                                             GetChildToRoot() const;\r
380         CPDF_Matrix                                             GetChildMatrix() const;\r
381         void                                                    SetChildMatrix(const CPDF_Matrix& mt);\r
382         CPDF_Matrix                                             GetWindowMatrix() const;\r
383 \r
384         virtual CPDF_Point                              ChildToParent(const CPDF_Point& point) const;\r
385         virtual CPDF_Rect                               ChildToParent(const CPDF_Rect& rect) const;\r
386         virtual CPDF_Point                              ParentToChild(const CPDF_Point& point) const;\r
387         virtual CPDF_Rect                               ParentToChild(const CPDF_Rect& rect) const;\r
388 \r
389         //those methods only implemented by listctrl item\r
390         virtual FX_FLOAT                                GetItemHeight(FX_FLOAT fLimitWidth) {return 0;} \r
391         virtual FX_FLOAT                                GetItemLeftMargin() {return 0;} \r
392         virtual FX_FLOAT                                GetItemRightMargin() {return 0;} \r
393 \r
394         void                                                    EnableWindow(FX_BOOL bEnable);\r
395         FX_BOOL                                                 IsEnabled();\r
396         virtual void                                    SetCursor();\r
397 \r
398 protected:      \r
399         virtual void                                    CreateChildWnd(const PWL_CREATEPARAM & cp);\r
400         virtual void                                    RePosChildWnd();\r
401         void                                                    GetAppearanceStream(CFX_ByteTextBuf & sAppStream);\r
402         virtual void                                    GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream);\r
403         virtual void                                    GetChildAppearanceStream(CFX_ByteTextBuf & sAppStream);\r
404 \r
405         virtual void                                    DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);\r
406         virtual void                                    DrawChildAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);\r
407 \r
408         virtual void                                    OnCreate(PWL_CREATEPARAM & cp);\r
409         virtual void                                    OnCreated();\r
410         virtual void                                    OnDestroy();\r
411 \r
412         virtual void                                    OnSetFocus();\r
413         virtual void                                    OnKillFocus();\r
414 \r
415         virtual void                                    OnEnabled();\r
416         virtual void                                    OnDisabled();\r
417 \r
418         void                                                    SetNotifyFlag(FX_BOOL bNotifying = TRUE){m_bNotifying = bNotifying;};\r
419  \r
420         FX_BOOL                                                 IsValid() const;\r
421         PWL_CREATEPARAM                                 GetCreationParam() const;               \r
422         FX_BOOL                                                 IsNotifying() const {return m_bNotifying;}      \r
423         \r
424         void                                                    InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rcNew);\r
425 \r
426         void                                                    PWLtoWnd(const CPDF_Point & point, FX_INT32& x, FX_INT32& y) const;\r
427         FX_RECT                                                 PWLtoWnd(const CPDF_Rect & rect) const; \r
428         FX_HWND                                                 GetAttachedHWnd() const;\r
429         \r
430         FX_BOOL                                                 IsWndCaptureMouse(const CPWL_Wnd * pWnd) const;\r
431         FX_BOOL                                                 IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const;      \r
432         const CPWL_Wnd*                                 GetRootWnd() const;     \r
433 \r
434         FX_BOOL                                                 IsCTRLpressed(FX_DWORD nFlag) const;\r
435         FX_BOOL                                                 IsSHIFTpressed(FX_DWORD nFlag) const;\r
436         FX_BOOL                                                 IsALTpressed(FX_DWORD nFlag) const;\r
437         FX_BOOL                                                 IsINSERTpressed(FX_DWORD nFlag) const;\r
438 \r
439 private:\r
440         void                                                    AddChild(CPWL_Wnd * pWnd);\r
441         void                                                    RemoveChild(CPWL_Wnd * pWnd);\r
442 \r
443         void                                                    CreateScrollBar(const PWL_CREATEPARAM & cp);\r
444         void                                                    CreateVScrollBar(const PWL_CREATEPARAM & cp);   \r
445 \r
446         void                                                    AjustStyle();   \r
447         void                                                    CreateMsgControl();\r
448         void                                                    DestroyMsgControl();\r
449         \r
450         CPWL_MsgControl*                                GetMsgControl() const;  \r
451         \r
452 protected:\r
453         CFX_ArrayTemplate<CPWL_Wnd*>    m_aChildren;\r
454 \r
455 private:\r
456         PWL_CREATEPARAM                                 m_sPrivateParam;\r
457         \r
458         CPWL_ScrollBar*                                 m_pVScrollBar;\r
459 \r
460         CPDF_Rect                                               m_rcWindow;\r
461         CPDF_Rect                                               m_rcClip;\r
462 \r
463         FX_BOOL                                                 m_bCreated;                     \r
464         FX_BOOL                                                 m_bVisible;\r
465         FX_BOOL                                                 m_bNotifying;   \r
466         FX_BOOL                                                 m_bEnabled;\r
467 };\r
468 \r
469 // #ifndef VK_END\r
470 // \r
471 // #define VK_END            0x23\r
472 // #define VK_HOME           0x24\r
473 // #define VK_LEFT           0x25\r
474 // #define VK_UP             0x26\r
475 // #define VK_RIGHT          0x27\r
476 // #define VK_DOWN           0x28\r
477 // #define VK_INSERT         0x2D\r
478 // #define VK_DELETE         0x2E\r
479 // \r
480 // #define VK_BACK           0x08\r
481 // #define VK_TAB            0x09\r
482 // \r
483 // #define VK_CLEAR          0x0C\r
484 // #define VK_RETURN         0x0D\r
485 // #define VK_ESCAPE         0x1B\r
486 // #define VK_SPACE          0x20\r
487 // #endif\r
488 // \r
489 // #define VK_NONE                        0\r
490 \r
491 #endif // !defined(AFX_PWL_WND_H__D32812AD_A875_4E08_9D3C_0A57020987C6__INCLUDED_)\r
492 \r
493 \r