]> git.saurik.com Git - wxWidgets.git/blame - samples/html/test/f.html
Move oleacc.lib from the VC++ projects/makefiles to libraries.h
[wxWidgets.git] / samples / html / test / f.html
CommitLineData
5526e819 1<HTML>
b377eda0
JS
2<head>
3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4<title>wxWindow</title></head>
5526e819
VS
5<BODY BGCOLOR="#FFFFFF">
6<A NAME="wxwindow"></A><CENTER>
7<A HREF="http://www.wx.org/wx.zip#zip:wx.htm#anchor">Contents</A> <A HREF="wx22.htm#classref">Up</A> <A HREF="wx259.htm#wxwave">&lt;&lt;</A> <A HREF="wx261.htm#wxwindowdc">&gt;&gt;</A> </CENTER><HR>
8
9<H2>wxWindow</H2>
10<P>
11wxWindow is the base class for all windows. Any
12children of the window will be deleted automatically by the destructor
13before the window itself is deleted.<P>
14<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
15<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><BR>
16
17<A HREF="wx158.htm#wxobject">wxObject</A><P>
18<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
19&lt;wx/window.h&gt;<P>
20<B><FONT COLOR="#FF0000">Window styles</FONT></B><P>
21The following styles can apply to all windows, although they will not always make sense for a particular
22window class.<P>
23
24<TABLE BORDER>
25
26
27<TR><TD VALIGN=TOP>
28<B>wxSIMPLE_BORDER</B>
29</TD>
30
31<TD VALIGN=TOP>
32Displays a thin border around the window. wxBORDER is the old name
33for this style.
34</TD></TR>
35
36
37<TR><TD VALIGN=TOP>
38<B>wxDOUBLE_BORDER</B>
39</TD>
40
41<TD VALIGN=TOP>
42Displays a double border. Windows only.
43</TD></TR>
44
45
46<TR><TD VALIGN=TOP>
47<B>wxSUNKEN_BORDER</B>
48</TD>
49
50<TD VALIGN=TOP>
51Displays a sunken border.
52</TD></TR>
53
54
55<TR><TD VALIGN=TOP>
56<B>wxRAISED_BORDER</B>
57</TD>
58
59<TD VALIGN=TOP>
60Displays a raised border.
61</TD></TR>
62
63
64<TR><TD VALIGN=TOP>
65<B>wxSTATIC_BORDER</B>
66</TD>
67
68<TD VALIGN=TOP>
69Displays a border suitable for a static control.
70</TD></TR>
71
72
73<TR><TD VALIGN=TOP>
74<B>wxTRANSPARENT_WINDOW</B>
75</TD>
76
77<TD VALIGN=TOP>
78The window is transparent, that is, it will not receive paint
79events. Windows only.
80</TD></TR>
81
82
83<TR><TD VALIGN=TOP>
84<B>wxNO_3D</B>
85</TD>
86
87<TD VALIGN=TOP>
88Prevents the children of this window taking on 3D styles, even though
89the application-wide policy is for 3D controls. Windows only.
90</TD></TR>
91
92
93<TR><TD VALIGN=TOP>
94<B>wxTAB_TRAVERSAL</B>
95</TD>
96
97<TD VALIGN=TOP>
98Use this to enable tab traversal for non-dialog windows.
99</TD></TR>
100
101
102<TR><TD VALIGN=TOP>
103<B>wxVSCROLL</B>
104</TD>
105
106<TD VALIGN=TOP>
107Use this style to enable a vertical scrollbar.
108</TD></TR>
109
110
111<TR><TD VALIGN=TOP>
112<B>wxHSCROLL</B>
113</TD>
114
115<TD VALIGN=TOP>
116Use this style to enable a horizontal scrollbar.
117</TD></TR>
118
119
120<TR><TD VALIGN=TOP>
121<B>wxCLIP_CHILDREN</B>
122</TD>
123
124<TD VALIGN=TOP>
125Use this style to eliminate flicker caused by the background being
126repainted, then children being painted over them. Windows-only.
127</TD></TR>
128
129
130</TABLE>
131<P>
132See also <A HREF="wx305.htm#windowstyles">window styles overview</A>.<P>
133<B><FONT COLOR="#FF0000">See also</FONT></B><P>
134<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
135<B><FONT COLOR="#FF0000">Members</FONT></B><P>
136<A HREF="#topic1026">wxWindow::wxWindow</A><BR>
137<A HREF="#topic1027">wxWindow::~wxWindow</A><BR>
138<A HREF="#topic1028">wxWindow::AddChild</A><BR>
139<A HREF="#wxwindowcapturemouse">wxWindow::CaptureMouse</A><BR>
140<A HREF="#wxwindowcenter">wxWindow::Center</A><BR>
141<A HREF="#wxwindowcentre">wxWindow::Centre</A><BR>
142<A HREF="#wxwindowclear">wxWindow::Clear</A><BR>
143<A HREF="#topic1029">wxWindow::ClientToScreen</A><BR>
144<A HREF="#wxwindowclose">wxWindow::Close</A><BR>
145<A HREF="#wxwindowconvertdialogtopixels">wxWindow::ConvertDialogToPixels</A><BR>
146<A HREF="#wxwindowconvertpixelstodialog">wxWindow::ConvertPixelsToDialog</A><BR>
147<A HREF="#wxwindowdestroy">wxWindow::Destroy</A><BR>
148<A HREF="#topic1030">wxWindow::DestroyChildren</A><BR>
149<A HREF="#wxwindowdragacceptfiles">wxWindow::DragAcceptFiles</A><BR>
150<A HREF="#wxwindowenable">wxWindow::Enable</A><BR>
151<A HREF="#wxwindowfindfocus">wxWindow::FindFocus</A><BR>
152<A HREF="#wxwindowfindwindow">wxWindow::FindWindow</A><BR>
153<A HREF="#wxwindowfit">wxWindow::Fit</A><BR>
154<A HREF="#wxwindowgetbackgroundcolour">wxWindow::GetBackgroundColour</A><BR>
155<A HREF="#topic1031">wxWindow::GetCharHeight</A><BR>
156<A HREF="#topic1032">wxWindow::GetCharWidth</A><BR>
157<A HREF="#topic1033">wxWindow::GetChildren</A><BR>
158<A HREF="#wxwindowgetclientsize">wxWindow::GetClientSize</A><BR>
159<A HREF="#wxwindowgetconstraints">wxWindow::GetConstraints</A><BR>
160<A HREF="#wxwindowgetdefaultitem">wxWindow::GetDefaultItem</A><BR>
161<A HREF="#wxwindowgetdroptarget">wxWindow::GetDropTarget</A><BR>
162<A HREF="#wxwindowgeteventhandler">wxWindow::GetEventHandler</A><BR>
163<A HREF="#wxwindowgetfont">wxWindow::GetFont</A><BR>
164<A HREF="#wxwindowgetforegroundcolour">wxWindow::GetForegroundColour</A><BR>
165<A HREF="#topic1034">wxWindow::GetGrandParent</A><BR>
166<A HREF="#topic1035">wxWindow::GetHandle</A><BR>
167<A HREF="#wxwindowgetid">wxWindow::GetId</A><BR>
168<A HREF="#topic1036">wxWindow::GetPosition</A><BR>
169<A HREF="#topic1037">wxWindow::GetLabel</A><BR>
170<A HREF="#wxwindowgetname">wxWindow::GetName</A><BR>
171<A HREF="#topic1038">wxWindow::GetParent</A><BR>
172<A HREF="#wxwindowgetrect">wxWindow::GetRect</A><BR>
173<A HREF="#wxwindowgetreturncode">wxWindow::GetReturnCode</A><BR>
174<A HREF="#wxwindowgetscrollthumb">wxWindow::GetScrollThumb</A><BR>
175<A HREF="#wxwindowgetscrollpos">wxWindow::GetScrollPos</A><BR>
176<A HREF="#wxwindowgetscrollrange">wxWindow::GetScrollRange</A><BR>
177<A HREF="#wxwindowgetsize">wxWindow::GetSize</A><BR>
178<A HREF="#topic1039">wxWindow::GetTextExtent</A><BR>
179<A HREF="#wxwindowgettitle">wxWindow::GetTitle</A><BR>
180<A HREF="#wxwindowgetupdateregion">wxWindow::GetUpdateRegion</A><BR>
181<A HREF="#topic1040">wxWindow::GetWindowStyleFlag</A><BR>
182<A HREF="#wxwindowinitdialog">wxWindow::InitDialog</A><BR>
183<A HREF="#wxwindowisenabled">wxWindow::IsEnabled</A><BR>
184<A HREF="#wxwindowisretained">wxWindow::IsRetained</A><BR>
185<A HREF="#wxwindowisshown">wxWindow::IsShown</A><BR>
186<A HREF="#wxwindowlayout">wxWindow::Layout</A><BR>
187<A HREF="#wxwindowloadfromresource">wxWindow::LoadFromResource</A><BR>
188<A HREF="#wxwindowlower">wxWindow::Lower</A><BR>
189<A HREF="#wxwindowmakemodal">wxWindow::MakeModal</A><BR>
190<A HREF="#wxwindowmove">wxWindow::Move</A><BR>
191<A HREF="#wxwindowonactivate">wxWindow::OnActivate</A><BR>
192<A HREF="#wxwindowonchar">wxWindow::OnChar</A><BR>
193<A HREF="#wxwindowoncharhook">wxWindow::OnCharHook</A><BR>
194<A HREF="#wxwindowoncommand">wxWindow::OnCommand</A><BR>
195<A HREF="#wxwindowonclose">wxWindow::OnClose</A><BR>
196<A HREF="#wxwindowonclosewindow">wxWindow::OnCloseWindow</A><BR>
197<A HREF="#wxwindowondropfiles">wxWindow::OnDropFiles</A><BR>
198<A HREF="#wxwindowonerasebackground">wxWindow::OnEraseBackground</A><BR>
199<A HREF="#wxwindowonkeydown">wxWindow::OnKeyDown</A><BR>
200<A HREF="#wxwindowonkeyup">wxWindow::OnKeyUp</A><BR>
201<A HREF="#wxwindowonkillfocus">wxWindow::OnKillFocus</A><BR>
202<A HREF="#wxwindowonidle">wxWindow::OnIdle</A><BR>
203<A HREF="#wxwindowoninitdialog">wxWindow::OnInitDialog</A><BR>
5526e819
VS
204<A HREF="#wxwindowonmenuhighlight">wxWindow::OnMenuHighlight</A><BR>
205<A HREF="#wxwindowonmouseevent">wxWindow::OnMouseEvent</A><BR>
206<A HREF="#wxwindowonmove">wxWindow::OnMove</A><BR>
207<A HREF="#wxwindowonpaint">wxWindow::OnPaint</A><BR>
208<A HREF="#wxwindowonscroll">wxWindow::OnScroll</A><BR>
209<A HREF="#wxwindowonsetfocus">wxWindow::OnSetFocus</A><BR>
210<A HREF="#wxwindowonsize">wxWindow::OnSize</A><BR>
211<A HREF="#wxwindowonsyscolourchanged">wxWindow::OnSysColourChanged</A><BR>
212<A HREF="#wxwindowpopeventhandler">wxWindow::PopEventHandler</A><BR>
213<A HREF="#wxwindowpopupmenu">wxWindow::PopupMenu</A><BR>
214<A HREF="#wxwindowpusheventhandler">wxWindow::PushEventHandler</A><BR>
215<A HREF="#wxwindowraise">wxWindow::Raise</A><BR>
216<A HREF="#wxwindowrefresh">wxWindow::Refresh</A><BR>
217<A HREF="#wxwindowreleasemouse">wxWindow::ReleaseMouse</A><BR>
218<A HREF="#wxwindowremovechild">wxWindow::RemoveChild</A><BR>
219<A HREF="#wxwindowscreentoclient">wxWindow::ScreenToClient</A><BR>
220<A HREF="#wxwindowscrollwindow">wxWindow::ScrollWindow</A><BR>
221<A HREF="#wxwindowsetacceleratortable">wxWindow::SetAcceleratorTable</A><BR>
222<A HREF="#wxwindowsetautolayout">wxWindow::SetAutoLayout</A><BR>
223<A HREF="#wxwindowsetbackgroundcolour">wxWindow::SetBackgroundColour</A><BR>
224<A HREF="#wxwindowsetclientsize">wxWindow::SetClientSize</A><BR>
225<A HREF="#wxwindowsetcursor">wxWindow::SetCursor</A><BR>
226<A HREF="#wxwindowseteventhandler">wxWindow::SetEventHandler</A><BR>
227<A HREF="#wxwindowsetconstraints">wxWindow::SetConstraints</A><BR>
228<A HREF="#wxwindowsetdroptarget">wxWindow::SetDropTarget</A><BR>
229<A HREF="#wxwindowsetfocus">wxWindow::SetFocus</A><BR>
230<A HREF="#wxwindowsetfont">wxWindow::SetFont</A><BR>
231<A HREF="#wxwindowsetforegroundcolour">wxWindow::SetForegroundColour</A><BR>
232<A HREF="#wxwindowsetid">wxWindow::SetId</A><BR>
233<A HREF="#wxwindowsetname">wxWindow::SetName</A><BR>
234<A HREF="#wxwindowsetpalette">wxWindow::SetPalette</A><BR>
235<A HREF="#wxwindowsetreturncode">wxWindow::SetReturnCode</A><BR>
236<A HREF="#wxwindowsetscrollbar">wxWindow::SetScrollbar</A><BR>
237<A HREF="#wxwindowsetscrollpos">wxWindow::SetScrollPos</A><BR>
238<A HREF="#wxwindowsetsize">wxWindow::SetSize</A><BR>
239<A HREF="#wxwindowsetsizehints">wxWindow::SetSizeHints</A><BR>
240<A HREF="#wxwindowsettitle">wxWindow::SetTitle</A><BR>
241<A HREF="#topic1041">wxWindow::Show</A><BR>
242<A HREF="#wxwindowtransferdatafromwindow">wxWindow::TransferDataFromWindow</A><BR>
243<A HREF="#wxwindowtransferdatatowindow">wxWindow::TransferDataToWindow</A><BR>
244<A HREF="#wxwindowvalidate">wxWindow::Validate</A><BR>
245<A HREF="#wxwindowwarppointer">wxWindow::WarpPointer</A><BR>
246<P>
247
248<HR>
249<A NAME="topic1026"></A>
250<H3>wxWindow::wxWindow</H3>
251<P>
252<B></B> <B>wxWindow</B>()<P>
253Default constructor.<P>
254<B></B> <B>wxWindow</B>(<B>wxWindow*</B><I> parent</I>, <B>wxWindowID </B><I>id</I>,
255 <B>const wxPoint&amp; </B><I>pos = wxDefaultPosition</I>,
256 <B>const wxSize&amp; </B><I>size = wxDefaultSize</I>,
257 <B>long </B><I>style = 0</I>,
258 <B>const wxString&amp; </B><I>name = wxPanelNameStr</I>)<P>
259Constructs a window, which can be a child of a frame, dialog or any other non-control window.<P>
260<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
261<I>parent</I><UL><UL>
262Pointer to a parent window.</UL></UL>
263<P>
264<I>id</I><UL><UL>
265Window identifier. If -1, will automatically create an identifier.</UL></UL>
266<P>
267<I>pos</I><UL><UL>
268Window position. wxDefaultPosition is (-1, -1) which indicates that wxWindows
269should generate a default position for the window. If using the wxWindow class directly, supply
270an actual position.</UL></UL>
271<P>
272<I>size</I><UL><UL>
273Window size. wxDefaultSize is (-1, -1) which indicates that wxWindows
274should generate a default size for the window.</UL></UL>
275<P>
276<I>style</I><UL><UL>
277Window style. For generic window styles, please see <A HREF="wx260.htm#wxwindow">wxWindow</A>.</UL></UL>
278<P>
279<I>name</I><UL><UL>
280Window name.</UL></UL>
281<P>
282
283<HR>
284<A NAME="topic1027"></A>
285<H3>wxWindow::~wxWindow</H3>
286<P>
287<B></B> <B>~wxWindow</B>()<P>
288Destructor. Deletes all subwindows, then deletes itself. Instead of using
289the <B>delete</B> operator explicitly, you should normally
290use <A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A> so that wxWindows
291can delete a window only when it is safe to do so, in idle time.<P>
292<B><FONT COLOR="#FF0000">See also</FONT></B><P>
293<A HREF="wx296.htm#windowdeletionoverview">Window deletion overview</A>,
294<A HREF="wx260.htm#wxwindowonclosewindow">wxWindow::OnCloseWindow</A>,
295<A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A>,
296<A HREF="wx45.htm#wxcloseevent">wxCloseEvent</A><P>
297
298<HR>
299<A NAME="topic1028"></A>
300<H3>wxWindow::AddChild</H3>
301<P>
302<B>virtual void</B> <B>AddChild</B>(<B>wxWindow* </B><I>child</I>)<P>
303Adds a child window. This is called automatically by window creation
304functions so should not be required by the application programmer.<P>
305<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
306<I>child</I><UL><UL>
307Child window to add.</UL></UL>
308<P>
309
310<HR>
311<A NAME="wxwindowcapturemouse"></A>
312<H3>wxWindow::CaptureMouse</H3>
313<P>
314<B>virtual void</B> <B>CaptureMouse</B>()<P>
315Directs all mouse input to this window. Call <A HREF="wx260.htm#wxwindowreleasemouse">wxWindow::ReleaseMouse</A> to
316release the capture.<P>
317<B><FONT COLOR="#FF0000">See also</FONT></B><P>
318<A HREF="wx260.htm#wxwindowreleasemouse">wxWindow::ReleaseMouse</A><P>
319
320<HR>
321<A NAME="wxwindowcenter"></A>
322<H3>wxWindow::Center</H3>
323<P>
324<B>void</B> <B>Center</B>(<B>int</B><I> direction</I>)<P>
325A synonym for <A HREF="wx260.htm#wxwindowcentre">Centre</A>.<P>
326
327<HR>
328<A NAME="wxwindowcentre"></A>
329<H3>wxWindow::Centre</H3>
330<P>
331<B>virtual void</B> <B>Centre</B>(<B>int</B><I> direction = wxHORIZONTAL</I>)<P>
332Centres the window.<P>
333<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
334<I>direction</I><UL><UL>
335Specifies the direction for the centering. May be <TT>wxHORIZONTAL</TT>, <TT>wxVERTICAL</TT>
336or <TT>wxBOTH</TT>.</UL></UL>
337<P>
338<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
339The actual behaviour depends on the derived window. For a frame or dialog box,
340centring is relative to the whole display. For a panel item, centring is
341relative to the panel.<P>
342<B><FONT COLOR="#FF0000">See also</FONT></B><P>
343<A HREF="wx260.htm#wxwindowcenter">wxWindow::Center</A><P>
344
345<HR>
346<A NAME="wxwindowclear"></A>
347<H3>wxWindow::Clear</H3>
348<P>
349<B>void</B> <B>Clear</B>()<P>
350Clears the window by filling it with the current background colour. Does not
351cause an erase background event to be generated.<P>
352
353<HR>
354<A NAME="topic1029"></A>
355<H3>wxWindow::ClientToScreen</H3>
356<P>
357<B>virtual void</B> <B>ClientToScreen</B>(<B>int* </B><I>x</I>, <B>int* </B><I>y</I>) <B>const</B><P>
358<B>virtual wxPoint</B> <B>ClientToScreen</B>(<B>const wxPoint&amp;</B><I> pt</I>) <B>const</B><P>
359Converts to screen coordinates from coordinates relative to this window.<P>
360<I>x</I><UL><UL>
361A pointer to a integer value for the x coordinate. Pass the client coordinate in, and
362a screen coordinate will be passed out.</UL></UL>
363<P>
364<I>y</I><UL><UL>
365A pointer to a integer value for the y coordinate. Pass the client coordinate in, and
366a screen coordinate will be passed out.</UL></UL>
367<P>
368<I>pt</I><UL><UL>
369The client position for the second form of the function.</UL></UL>
370<P>
371<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
372 In place of a single overloaded method name, wxPython
373implements the following methods:<P>
374
375<UL><UL>
376
377<TABLE>
378
379
380<TR><TD VALIGN=TOP>
381<B>ClientToScreen(point)</B>
382</TD>
383
384<TD VALIGN=TOP>
385Accepts and returns a wxPoint
386</TD></TR>
387
388
389<TR><TD VALIGN=TOP>
390<B>ClientToScreenXY(x, y)</B>
391</TD>
392
393<TD VALIGN=TOP>
394Returns a 2-tuple, (x, y)
395</TD></TR>
396
397
398</TABLE>
399</UL></UL>
400
401<P>
402
403
404<HR>
405<A NAME="wxwindowclose"></A>
406<H3>wxWindow::Close</H3>
407<P>
408<B>virtual bool</B> <B>Close</B>(<B>const bool</B><I> force = FALSE</I>)<P>
409The purpose of this call is to provide a safer way of destroying a window than using
410the <I>delete</I> operator.<P>
411<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
412<I>force</I><UL><UL>
413FALSE if the window's close handler should be able to veto the destruction
414of this window, TRUE if it cannot.</UL></UL>
415<P>
416<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
417Close calls the <A HREF="wx45.htm#wxcloseevent">close handler</A> for the window, providing an opportunity for the window to
418choose whether to destroy the window.<P>
419The close handler should check whether the window is being deleted forcibly,
420using <A HREF="wx45.htm#wxcloseeventgetforce">wxCloseEvent::GetForce</A>, in which case it should
421destroy the window using <A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A>.<P>
422Applies to managed windows (wxFrame and wxDialog classes) only.<P>
423<I>Note</I> that calling Close does not guarantee that the window will be destroyed; but it
424provides a way to simulate a manual close of a window, which may or may not be implemented by
425destroying the window. The default implementation of wxDialog::OnCloseWindow does not
426necessarily delete the dialog, since it will simply simulate an wxID_CANCEL event which
427itself only hides the dialog.<P>
428To guarantee that the window will be destroyed, call <A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A> instead.<P>
429<B><FONT COLOR="#FF0000">See also</FONT></B><P>
430<A HREF="wx296.htm#windowdeletionoverview">Window deletion overview</A>,
431<A HREF="wx260.htm#wxwindowonclosewindow">wxWindow::OnCloseWindow</A>,
432<A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A>,
433<A HREF="wx45.htm#wxcloseevent">wxCloseEvent</A><P>
434
435<HR>
436<A NAME="wxwindowconvertdialogtopixels"></A>
437<H3>wxWindow::ConvertDialogToPixels</H3>
438<P>
439<B>wxPoint</B> <B>ConvertDialogToPixels</B>(<B>const wxPoint&amp;</B><I> pt</I>)<P>
440<B>wxSize</B> <B>ConvertDialogToPixels</B>(<B>const wxSize&amp;</B><I> sz</I>)<P>
441Converts a point or size from dialog units to pixels.<P>
442For the x dimension, the dialog units are multiplied by the average character width
443and then divided by 4.<P>
444For the y dimension, the dialog units are multiplied by the average character height
445and then divided by 8.<P>
446<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
447Dialog units are used for maintaining a dialog's proportions even if the font changes.
448Dialogs created using Dialog Editor optionally use dialog units.<P>
449You can also use these functions programmatically. A convenience macro is defined:<P>
450<FONT SIZE=2>
451<PRE>
452#define wxDLG_UNIT(parent, pt) parent-&gt;ConvertDialogToPixels(pt)
453</PRE>
454</FONT><P>
455<B><FONT COLOR="#FF0000">See also</FONT></B><P>
456<A HREF="wx260.htm#wxwindowconvertpixelstodialog">wxWindow::ConvertPixelsToDialog</A><P>
457<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
458 In place of a single overloaded method name, wxPython
459implements the following methods:<P>
460
461<UL><UL>
462
463<TABLE>
464
465
466<TR><TD VALIGN=TOP>
467<B>ConvertDialogPointToPixels(point)</B>
468</TD>
469
470<TD VALIGN=TOP>
471Accepts and returns a wxPoint
472</TD></TR>
473
474
475<TR><TD VALIGN=TOP>
476<B>ConvertDialogSizeToPixels(size)</B>
477</TD>
478
479<TD VALIGN=TOP>
480Accepts and returns a wxSize
481</TD></TR>
482
483
484</TABLE>
485</UL></UL>
486<P>
487Additionally, the following helper functions are defined:<P>
488
489<UL><UL>
490
491<TABLE>
492
493
494<TR><TD VALIGN=TOP>
495<B>wxDLG_PNT(win, point)</B>
496</TD>
497
498<TD VALIGN=TOP>
499Converts a wxPoint from dialog
500units to pixels
501</TD></TR>
502
503
504<TR><TD VALIGN=TOP>
505<B>wxDLG_SZE(win, size)</B>
506</TD>
507
508<TD VALIGN=TOP>
509Converts a wxSize from dialog
510units to pixels
511</TD></TR>
512
513
514</TABLE>
515</UL></UL>
516
517<P>
518
519
520<HR>
521<A NAME="wxwindowconvertpixelstodialog"></A>
522<H3>wxWindow::ConvertPixelsToDialog</H3>
523<P>
524<B>wxPoint</B> <B>ConvertPixelsToDialog</B>(<B>const wxPoint&amp;</B><I> pt</I>)<P>
525<B>wxSize</B> <B>ConvertPixelsToDialog</B>(<B>const wxSize&amp;</B><I> sz</I>)<P>
526Converts a point or size from pixels to dialog units.<P>
527For the x dimension, the pixels are multiplied by 4 and then divided by the average
528character width.<P>
529For the y dimension, the pixels are multipled by 8 and then divided by the average
530character height.<P>
531<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
532Dialog units are used for maintaining a dialog's proportions even if the font changes.
533Dialogs created using Dialog Editor optionally use dialog units.<P>
534<B><FONT COLOR="#FF0000">See also</FONT></B><P>
535<A HREF="wx260.htm#wxwindowconvertdialogtopixels">wxWindow::ConvertDialogToPixels</A><P>
536
537<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
538 In place of a single overloaded method name, wxPython
539implements the following methods:<P>
540
541<UL><UL>
542
543<TABLE>
544
545
546<TR><TD VALIGN=TOP>
547<B>ConvertDialogPointToPixels(point)</B>
548</TD>
549
550<TD VALIGN=TOP>
551Accepts and returns a wxPoint
552</TD></TR>
553
554
555<TR><TD VALIGN=TOP>
556<B>ConvertDialogSizeToPixels(size)</B>
557</TD>
558
559<TD VALIGN=TOP>
560Accepts and returns a wxSize
561</TD></TR>
562
563
564</TABLE>
565</UL></UL>
566
567<P>
568
569<HR>
570<A NAME="wxwindowdestroy"></A>
571<H3>wxWindow::Destroy</H3>
572<P>
573<B>virtual bool</B> <B>Destroy</B>()<P>
574Destroys the window safely. Use this function instead of the delete operator, since
575different window classes can be destroyed differently. Frames and dialogs
576are not destroyed immediately when this function is called - they are added
577to a list of windows to be deleted on idle time, when all the window's events
578have been processed. This prevents problems with events being sent to non-existant
579windows.<P>
580<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
581TRUE if the window has either been successfully deleted, or it has been added
582to the list of windows pending real deletion.<P>
583
584<HR>
585<A NAME="topic1030"></A>
586<H3>wxWindow::DestroyChildren</H3>
587<P>
588<B>virtual void</B> <B>DestroyChildren</B>()<P>
589Destroys all children of a window. Called automatically by the destructor.<P>
590
591<HR>
592<A NAME="wxwindowdragacceptfiles"></A>
593<H3>wxWindow::DragAcceptFiles</H3>
594<P>
595<B>virtual void</B> <B>DragAcceptFiles</B>(<B>const bool</B><I> accept</I>)<P>
596Enables or disables elibility for drop file events (OnDropFiles).<P>
597<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
598<I>accept</I><UL><UL>
599If TRUE, the window is eligible for drop file events. If FALSE, the window
600will not accept drop file events.</UL></UL>
601<P>
602<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
603Windows only.<P>
604<B><FONT COLOR="#FF0000">See also</FONT></B><P>
605<A HREF="wx260.htm#wxwindowondropfiles">wxWindow::OnDropFiles</A><P>
606
607<HR>
608<A NAME="wxwindowenable"></A>
609<H3>wxWindow::Enable</H3>
610<P>
611<B>virtual void</B> <B>Enable</B>(<B>const bool</B><I> enable</I>)<P>
612Enable or disable the window for user input.<P>
613<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
614<I>enable</I><UL><UL>
615If TRUE, enables the window for input. If FALSE, disables the window.</UL></UL>
616<P>
617<B><FONT COLOR="#FF0000">See also</FONT></B><P>
618<A HREF="wx260.htm#wxwindowisenabled">wxWindow::IsEnabled</A><P>
619
620<HR>
621<A NAME="wxwindowfindfocus"></A>
622<H3>wxWindow::FindFocus</H3>
623<P>
624<B>static wxWindow*</B> <B>FindFocus</B>()<P>
625Finds the window or control which currently has the keyboard focus.<P>
626<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
627Note that this is a static function, so it can be called without needing a wxWindow pointer.<P>
628<B><FONT COLOR="#FF0000">See also</FONT></B><P>
629<A HREF="wx260.htm#wxwindowsetfocus">wxWindow::SetFocus</A><P>
630
631<HR>
632<A NAME="wxwindowfindwindow"></A>
633<H3>wxWindow::FindWindow</H3>
634<P>
635<B>wxWindow*</B> <B>FindWindow</B>(<B>long</B><I> id</I>)<P>
636Find a child of this window, by identifier.<P>
637<B>wxWindow*</B> <B>FindWindow</B>(<B>const wxString&amp;</B><I> name</I>)<P>
638Find a child of this window, by name.<P>
639<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
640 In place of a single overloaded method name, wxPython
641implements the following methods:<P>
642
643<UL><UL>
644
645<TABLE>
646
647
648<TR><TD VALIGN=TOP>
649<B>FindWindowById(id)</B>
650</TD>
651
652<TD VALIGN=TOP>
653Accepts an integer
654</TD></TR>
655
656
657<TR><TD VALIGN=TOP>
658<B>FindWindowByName(name)</B>
659</TD>
660
661<TD VALIGN=TOP>
662Accepts a string
663</TD></TR>
664
665
666</TABLE>
667</UL></UL>
668
669<P>
670
671<HR>
672<A NAME="wxwindowfit"></A>
673<H3>wxWindow::Fit</H3>
674<P>
675<B>virtual void</B> <B>Fit</B>()<P>
676Sizes the window so that it fits around its subwindows.<P>
677
678<HR>
679<A NAME="wxwindowgetbackgroundcolour"></A>
680<H3>wxWindow::GetBackgroundColour</H3>
681<P>
682<B>virtual wxColour</B> <B>GetBackgroundColour</B>() <B>const</B><P>
683Returns the background colour of the window.<P>
684<B><FONT COLOR="#FF0000">See also</FONT></B><P>
685<A HREF="wx260.htm#wxwindowsetbackgroundcolour">wxWindow::SetBackgroundColour</A>,
686<A HREF="wx260.htm#wxwindowsetforegroundcolour">wxWindow::SetForegroundColour</A>,
687<A HREF="wx260.htm#wxwindowgetforegroundcolour">wxWindow::GetForegroundColour</A>,
688<A HREF="wx260.htm#wxwindowonerasebackground">wxWindow::OnEraseBackground</A><P>
689
690<HR>
691<A NAME="topic1031"></A>
692<H3>wxWindow::GetCharHeight</H3>
693<P>
694<B>virtual int</B> <B>GetCharHeight</B>() <B>const</B><P>
695Returns the character height for this window.<P>
696
697<HR>
698<A NAME="topic1032"></A>
699<H3>wxWindow::GetCharWidth</H3>
700<P>
701<B>virtual int</B> <B>GetCharWidth</B>() <B>const</B><P>
702Returns the average character width for this window.<P>
703
704<HR>
705<A NAME="topic1033"></A>
706<H3>wxWindow::GetChildren</H3>
707<P>
708<B>wxList&amp;</B> <B>GetChildren</B>()<P>
709Returns a reference to the list of the window's children.<P>
710
711<HR>
712<A NAME="wxwindowgetclientsize"></A>
713<H3>wxWindow::GetClientSize</H3>
714<P>
715<B>virtual void</B> <B>GetClientSize</B>(<B>int* </B><I>width</I>, <B>int* </B><I>height</I>) <B>const</B><P>
716<B>virtual wxSize</B> <B>GetClientSize</B>() <B>const</B><P>
717This gets the size of the window 'client area' in pixels. The client area is the
718area which may be drawn on by the programmer, excluding title bar, border etc.<P>
719<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
720<I>width</I><UL><UL>
721Receives the client width in pixels.</UL></UL>
722<P>
723<I>height</I><UL><UL>
724Receives the client height in pixels.</UL></UL>
725<P>
726<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
727 In place of a single overloaded method name, wxPython
728implements the following methods:<P>
729
730<UL><UL>
731
732<TABLE>
733
734
735<TR><TD VALIGN=TOP>
736<B>wxGetClientSizeTuple()</B>
737</TD>
738
739<TD VALIGN=TOP>
740Returns a 2-tuple of (width, height)
741</TD></TR>
742
743
744<TR><TD VALIGN=TOP>
745<B>wxGetClientSize()</B>
746</TD>
747
748<TD VALIGN=TOP>
749Returns a wxSize object
750</TD></TR>
751
752
753</TABLE>
754</UL></UL>
755
756<P>
757
758<HR>
759<A NAME="wxwindowgetconstraints"></A>
760<H3>wxWindow::GetConstraints</H3>
761<P>
762<B>wxLayoutConstraints*</B> <B>GetConstraints</B>() <B>const</B><P>
763Returns a pointer to the window's layout constraints, or NULL if there are none.<P>
764
765<HR>
766<A NAME="wxwindowgetdefaultitem"></A>
767<H3>wxWindow::GetDefaultItem</H3>
768<P>
769<B>wxButton*</B> <B>GetDefaultItem</B>() <B>const</B><P>
770Returns a pointer to the button which is the default for this window, or NULL.<P>
771
772<HR>
773<A NAME="wxwindowgetdroptarget"></A>
774<H3>wxWindow::GetDropTarget</H3>
775<P>
776<B>wxDropTarget*</B> <B>GetDropTarget</B>() <B>const</B><P>
777Returns the associated drop target, which may be NULL.<P>
778<B><FONT COLOR="#FF0000">See also</FONT></B><P>
779<A HREF="wx260.htm#wxwindowsetdroptarget">wxWindow::SetDropTarget</A>,
780<A HREF="wx312.htm#wxdndoverview">Drag and drop overview</A><P>
781
782<HR>
783<A NAME="wxwindowgeteventhandler"></A>
784<H3>wxWindow::GetEventHandler</H3>
785<P>
786<B>wxEvtHandler*</B> <B>GetEventHandler</B>() <B>const</B><P>
787Returns the event handler for this window. By default, the window is its
788own event handler.<P>
789<B><FONT COLOR="#FF0000">See also</FONT></B><P>
790<A HREF="wx260.htm#wxwindowseteventhandler">wxWindow::SetEventHandler</A>,
791<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PushEventHandler</A>,
792<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PopEventHandler</A>,
793<A HREF="wx85.htm#wxevthandlerprocessevent">wxEvtHandler::ProcessEvent</A>,
794<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><P>
795
796<HR>
797<A NAME="wxwindowgetfont"></A>
798<H3>wxWindow::GetFont</H3>
799<P>
800<B>wxFont&amp;</B> <B>GetFont</B>() <B>const</B><P>
801Returns a reference to the font for this window.<P>
802<B><FONT COLOR="#FF0000">See also</FONT></B><P>
803<A HREF="wx260.htm#wxwindowsetfont">wxWindow::SetFont</A><P>
804
805<HR>
806<A NAME="wxwindowgetforegroundcolour"></A>
807<H3>wxWindow::GetForegroundColour</H3>
808<P>
809<B>virtual wxColour</B> <B>GetForegroundColour</B>()<P>
810Returns the foreground colour of the window.<P>
811<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
812The interpretation of foreground colour is open to interpretation according
813to the window class; it may be the text colour or other colour, or it may not
814be used at all.<P>
815<B><FONT COLOR="#FF0000">See also</FONT></B><P>
816<A HREF="wx260.htm#wxwindowsetforegroundcolour">wxWindow::SetForegroundColour</A>,
817<A HREF="wx260.htm#wxwindowsetbackgroundcolour">wxWindow::SetBackgroundColour</A>,
818<A HREF="wx260.htm#wxwindowgetbackgroundcolour">wxWindow::GetBackgroundColour</A><P>
819
820<HR>
821<A NAME="topic1034"></A>
822<H3>wxWindow::GetGrandParent</H3>
823<P>
824<B>wxWindow*</B> <B>GetGrandParent</B>() <B>const</B><P>
825Returns the grandparent of a window, or NULL if there isn't one.<P>
826
827<HR>
828<A NAME="topic1035"></A>
829<H3>wxWindow::GetHandle</H3>
830<P>
831<B>void*</B> <B>GetHandle</B>() <B>const</B><P>
832Returns the platform-specific handle of the physical window. Cast it to an appropriate
833handle, such as <B>HWND</B> for Windows or <B>Widget</B> for Motif.<P>
834
835<HR>
836<A NAME="wxwindowgetid"></A>
837<H3>wxWindow::GetId</H3>
838<P>
839<B>int</B> <B>GetId</B>() <B>const</B><P>
840Returns the identifier of the window.<P>
841<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
842Each window has an integer identifier. If the application has not provided one,
843an identifier will be generated.<P>
844<B><FONT COLOR="#FF0000">See also</FONT></B><P>
845<A HREF="wx260.htm#wxwindowsetid">wxWindow::SetId</A>
846<A HREF="wx299.htm#windowids">Window identifiers</A><P>
847
848<HR>
849<A NAME="topic1036"></A>
850<H3>wxWindow::GetPosition</H3>
851<P>
852<B>virtual void</B> <B>GetPosition</B>(<B>int* </B><I>x</I>, <B>int* </B><I>y</I>) <B>const</B><P>
853This gets the position of the window in pixels, relative to the parent window or
854if no parent, relative to the whole display.<P>
855<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
856<I>x</I><UL><UL>
857Receives the x position of the window.</UL></UL>
858<P>
859<I>y</I><UL><UL>
860Receives the y position of the window.</UL></UL>
861<P>
862<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
863 In place of a single overloaded method name, wxPython
864implements the following methods:<P>
865
866<UL><UL>
867
868<TABLE>
869
870
871<TR><TD VALIGN=TOP>
872<B>GetPosition()</B>
873</TD>
874
875<TD VALIGN=TOP>
876Returns a wxPoint
877</TD></TR>
878
879
880<TR><TD VALIGN=TOP>
881<B>GetPositionTuple()</B>
882</TD>
883
884<TD VALIGN=TOP>
885Returns a tuple (x, y)
886</TD></TR>
887
888
889</TABLE>
890</UL></UL>
891
892<P>
893
894<HR>
895<A NAME="topic1037"></A>
896<H3>wxWindow::GetLabel</H3>
897<P>
898<B>virtual wxString&amp; </B> <B>GetLabel</B>() <B>const</B><P>
899Generic way of getting a label from any window, for
900identification purposes.<P>
901<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
902The interpretation of this function differs from class to class.
903For frames and dialogs, the value returned is the title. For buttons or static text controls, it is
904the button text. This function can be useful for meta-programs (such as testing
905tools or special-needs access programs) which need to identify windows
906by name.<P>
907
908<HR>
909<A NAME="wxwindowgetname"></A>
910<H3>wxWindow::GetName</H3>
911<P>
912<B>virtual wxString&amp; </B> <B>GetName</B>() <B>const</B><P>
913Returns the window's name.<P>
914<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
915This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate
916name in the window constructor or via <A HREF="wx260.htm#wxwindowsetname">wxWindow::SetName</A>.<P>
917<B><FONT COLOR="#FF0000">See also</FONT></B><P>
918<A HREF="wx260.htm#wxwindowsetname">wxWindow::SetName</A><P>
919
920<HR>
921<A NAME="topic1038"></A>
922<H3>wxWindow::GetParent</H3>
923<P>
924<B>virtual wxWindow*</B> <B>GetParent</B>() <B>const</B><P>
925Returns the parent of the window, or NULL if there is no parent.<P>
926
927<HR>
928<A NAME="wxwindowgetrect"></A>
929<H3>wxWindow::GetRect</H3>
930<P>
931<B>virtual wxRect</B> <B>GetRect</B>() <B>const</B><P>
932Returns the size and position of the window as a <A HREF="wx193.htm#wxrect">wxRect</A> object.<P>
933
934<HR>
935<A NAME="wxwindowgetreturncode"></A>
936<H3>wxWindow::GetReturnCode</H3>
937<P>
938<B>int</B> <B>GetReturnCode</B>()<P>
939Gets the return code for this window.<P>
940<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
941A return code is normally associated with a modal dialog, where <A HREF="wx71.htm#wxdialogshowmodal">wxDialog::ShowModal</A> returns
942a code to the application.<P>
943<B><FONT COLOR="#FF0000">See also</FONT></B><P>
944<A HREF="wx260.htm#wxwindowsetreturncode">wxWindow::SetReturnCode</A>, <A HREF="wx71.htm#wxdialogshowmodal">wxDialog::ShowModal</A>,
945<A HREF="wx71.htm#wxdialogendmodal">wxDialog::EndModal</A><P>
946
947<HR>
948<A NAME="wxwindowgetscrollthumb"></A>
949<H3>wxWindow::GetScrollThumb</H3>
950<P>
951<B>virtual int</B> <B>GetScrollThumb</B>(<B>int </B><I>orientation</I>)<P>
952Returns the built-in scrollbar thumb size.<P>
953<B><FONT COLOR="#FF0000">See also</FONT></B><P>
954<A HREF="wx260.htm#wxwindowsetscrollbar">wxWindow::SetScrollbar</A><P>
955
956<HR>
957<A NAME="wxwindowgetscrollpos"></A>
958<H3>wxWindow::GetScrollPos</H3>
959<P>
960<B>virtual int</B> <B>GetScrollPos</B>(<B>int </B><I>orientation</I>)<P>
961Returns the built-in scrollbar position.<P>
962<B><FONT COLOR="#FF0000">See also</FONT></B><P>
963See <A HREF="wx260.htm#wxwindowsetscrollbar">wxWindow::SetScrollbar</A><P>
964
965<HR>
966<A NAME="wxwindowgetscrollrange"></A>
967<H3>wxWindow::GetScrollRange</H3>
968<P>
969<B>virtual int</B> <B>GetScrollRange</B>(<B>int </B><I>orientation</I>)<P>
970Returns the built-in scrollbar range.<P>
971<B><FONT COLOR="#FF0000">See also</FONT></B><P>
972<A HREF="wx260.htm#wxwindowsetscrollbar">wxWindow::SetScrollbar</A><P>
973
974<HR>
975<A NAME="wxwindowgetsize"></A>
976<H3>wxWindow::GetSize</H3>
977<P>
978<B>virtual void</B> <B>GetSize</B>(<B>int* </B><I>width</I>, <B>int* </B><I>height</I>) <B>const</B><P>
979<B>virtual wxSize</B> <B>GetSize</B>() <B>const</B><P>
980This gets the size of the entire window in pixels.<P>
981<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
982<I>width</I><UL><UL>
983Receives the window width.</UL></UL>
984<P>
985<I>height</I><UL><UL>
986Receives the window height.</UL></UL>
987<P>
988<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
989 In place of a single overloaded method name, wxPython
990implements the following methods:<P>
991
992<UL><UL>
993
994<TABLE>
995
996
997<TR><TD VALIGN=TOP>
998<B>GetSize()</B>
999</TD>
1000
1001<TD VALIGN=TOP>
1002Returns a wxSize
1003</TD></TR>
1004
1005
1006<TR><TD VALIGN=TOP>
1007<B>GetSizeTuple()</B>
1008</TD>
1009
1010<TD VALIGN=TOP>
1011Returns a 2-tuple (width, height)
1012</TD></TR>
1013
1014
1015</TABLE>
1016</UL></UL>
1017
1018<P>
1019
1020<HR>
1021<A NAME="topic1039"></A>
1022<H3>wxWindow::GetTextExtent</H3>
1023<P>
1024<B>virtual void</B> <B>GetTextExtent</B>(<B>const wxString&amp; </B><I>string</I>, <B>int* </B><I>x</I>, <B>int* </B><I>y</I>,
1025 <B>int* </B><I>descent = NULL</I>, <B>int* </B><I>externalLeading = NULL</I>,
1026 <B>const wxFont* </B><I>font = NULL</I>, <B>const bool</B><I> use16 = FALSE</I>) <B>const</B><P>
1027Gets the dimensions of the string as it would be drawn on the
1028window with the currently selected font.<P>
1029<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1030<I>string</I><UL><UL>
1031String whose extent is to be measured.</UL></UL>
1032<P>
1033<I>x</I><UL><UL>
1034Return value for width.</UL></UL>
1035<P>
1036<I>y</I><UL><UL>
1037Return value for height.</UL></UL>
1038<P>
1039<I>descent</I><UL><UL>
1040Return value for descent (optional).</UL></UL>
1041<P>
1042<I>externalLeading</I><UL><UL>
1043Return value for external leading (optional).</UL></UL>
1044<P>
1045<I>font</I><UL><UL>
1046Font to use instead of the current window font (optional).</UL></UL>
1047<P>
1048<I>use16</I><UL><UL>
1049If TRUE, <I>string</I> contains 16-bit characters. The default is FALSE.</UL></UL>
1050<P>
1051
1052<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
1053 In place of a single overloaded method name, wxPython
1054implements the following methods:<P>
1055
1056<UL><UL>
1057
1058<TABLE>
1059
1060
1061<TR><TD VALIGN=TOP>
1062<B>GetTextExtent(string)</B>
1063</TD>
1064
1065<TD VALIGN=TOP>
1066Returns a 2-tuple, (width, height)
1067</TD></TR>
1068
1069
1070<TR><TD VALIGN=TOP>
1071<B>GetFullTextExtent(string, font=NULL)</B>
1072</TD>
1073
1074<TD VALIGN=TOP>
1075Returns a
5e06d749 10764-tuple, (width, height, descent, externalLeading)
5526e819
VS
1077</TD></TR>
1078
1079
1080</TABLE>
1081</UL></UL>
1082
1083<P>
1084
1085
1086<HR>
1087<A NAME="wxwindowgettitle"></A>
1088<H3>wxWindow::GetTitle</H3>
1089<P>
1090<B>virtual wxString</B> <B>GetTitle</B>()<P>
1091Gets the window's title. Applicable only to frames and dialogs.<P>
1092<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1093<A HREF="wx260.htm#wxwindowsettitle">wxWindow::SetTitle</A><P>
1094
1095<HR>
1096<A NAME="wxwindowgetupdateregion"></A>
1097<H3>wxWindow::GetUpdateRegion</H3>
1098<P>
1099<B>virtual wxRegion</B> <B>GetUpdateRegion</B>() <B>const</B><P>
1100Returns the region specifying which parts of the window have been damaged. Should
1101only be called within an <A HREF="wx260.htm#wxwindowonpaint">OnPaint</A> event handler.<P>
1102<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1103<A HREF="wx195.htm#wxregion">wxRegion</A>, <A HREF="wx196.htm#wxregioniterator">wxRegionIterator</A>, <A HREF="wx260.htm#wxwindowonpaint">wxWindow::OnPaint</A><P>
1104
1105<HR>
1106<A NAME="topic1040"></A>
1107<H3>wxWindow::GetWindowStyleFlag</H3>
1108<P>
1109<B>long</B> <B>GetWindowStyleFlag</B>() <B>const</B><P>
1110Gets the window style that was passed to the consructor or <B>Create</B> member.<P>
1111
1112<HR>
1113<A NAME="wxwindowinitdialog"></A>
1114<H3>wxWindow::InitDialog</H3>
1115<P>
1116<B>void</B> <B>InitDialog</B>()<P>
1117Sends an <A HREF="wx260.htm#wxwindowoninitdialog">wxWindow::OnInitDialog</A> event, which
1118in turn transfers data to the dialog via validators.<P>
1119<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1120<A HREF="wx260.htm#wxwindowoninitdialog">wxWindow::OnInitDialog</A><P>
1121
1122<HR>
1123<A NAME="wxwindowisenabled"></A>
1124<H3>wxWindow::IsEnabled</H3>
1125<P>
1126<B>virtual bool</B> <B>IsEnabled</B>() <B>const</B><P>
1127Returns TRUE if the window is enabled for input, FALSE otherwise.<P>
1128<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1129<A HREF="wx260.htm#wxwindowenable">wxWindow::Enable</A><P>
1130
1131<HR>
1132<A NAME="wxwindowisretained"></A>
1133<H3>wxWindow::IsRetained</H3>
1134<P>
1135<B>virtual bool</B> <B>IsRetained</B>() <B>const</B><P>
1136Returns TRUE if the window is retained, FALSE otherwise.<P>
1137<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1138Retained windows are only available on X platforms.<P>
1139
1140<HR>
1141<A NAME="wxwindowisshown"></A>
1142<H3>wxWindow::IsShown</H3>
1143<P>
1144<B>virtual bool</B> <B>IsShown</B>() <B>const</B><P>
1145Returns TRUE if the window is shown, FALSE if it has been hidden.<P>
1146
1147<HR>
1148<A NAME="wxwindowlayout"></A>
1149<H3>wxWindow::Layout</H3>
1150<P>
1151<B>void</B> <B>Layout</B>()<P>
1152Invokes the constraint-based layout algorithm for this window. It is called
1153automatically by the default <B>wxWindow::OnSize</B> member.<P>
1154
1155<HR>
1156<A NAME="wxwindowloadfromresource"></A>
1157<H3>wxWindow::LoadFromResource</H3>
1158<P>
1159<B>virtual bool</B> <B>LoadFromResource</B>(<B>wxWindow* </B><I>parent</I>,
1160<B>const wxString&amp; </B><I>resourceName</I>, <B>const wxResourceTable* </B><I>resourceTable = NULL</I>)<P>
1161Loads a panel or dialog from a resource file.<P>
1162<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1163<I>parent</I><UL><UL>
1164Parent window.</UL></UL>
1165<P>
1166<I>resourceName</I><UL><UL>
1167The name of the resource to load.</UL></UL>
1168<P>
1169<I>resourceTable</I><UL><UL>
1170The resource table to load it from. If this is NULL, the
1171default resource table will be used.</UL></UL>
1172<P>
1173<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
1174TRUE if the operation succeeded, otherwise FALSE.<P>
1175
1176<HR>
1177<A NAME="wxwindowlower"></A>
1178<H3>wxWindow::Lower</H3>
1179<P>
1180<B>void</B> <B>Lower</B>()<P>
1181Lowers the window to the bottom of the window hierarchy if it is a managed window (dialog
1182or frame).<P>
1183
1184<HR>
1185<A NAME="wxwindowmakemodal"></A>
1186<H3>wxWindow::MakeModal</H3>
1187<P>
1188<B>virtual void</B> <B>MakeModal</B>(<B>const bool </B><I>flag</I>)<P>
1189Disables all other windows in the application so that
1190the user can only interact with this window.<P>
1191<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1192<I>flag</I><UL><UL>
1193If TRUE, this call disables all other windows in the application so that
1194the user can only interact with this window. If FALSE, the effect is reversed.</UL></UL>
1195<P>
1196
1197<HR>
1198<A NAME="wxwindowmove"></A>
1199<H3>wxWindow::Move</H3>
1200<P>
1201<B>void</B> <B>Move</B>(<B>int</B><I> x</I>, <B>int</B><I> y</I>)<P>
1202<B>void</B> <B>Move</B>(<B>const wxPoint&amp;</B><I> pt</I>)<P>
1203Moves the window to the given position.<P>
1204<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1205<I>x</I><UL><UL>
1206Required x position.</UL></UL>
1207<P>
1208<I>y</I><UL><UL>
1209Required y position.</UL></UL>
1210<P>
1211<I>pt</I><UL><UL>
1212<A HREF="wx171.htm#wxpoint">wxPoint</A> object representing the position.</UL></UL>
1213<P>
1214<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1215Implementations of SetSize can also implicitly implement the
1216wxWindow::Move function, which is defined in the base wxWindow class
1217as the call:<P>
1218<PRE>
1219 SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING);
1220</PRE>
1221<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1222<A HREF="wx260.htm#wxwindowsetsize">wxWindow::SetSize</A><P>
1223<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
1224 In place of a single overloaded method name, wxPython
1225implements the following methods:<P>
1226
1227<UL><UL>
1228
1229<TABLE>
1230
1231
1232<TR><TD VALIGN=TOP>
1233<B>Move(point)</B>
1234</TD>
1235
1236<TD VALIGN=TOP>
1237Accepts a wxPoint
1238</TD></TR>
1239
1240
1241<TR><TD VALIGN=TOP>
1242<B>MoveXY(x, y)</B>
1243</TD>
1244
1245<TD VALIGN=TOP>
1246Accepts a pair of integers
1247</TD></TR>
1248
1249
1250</TABLE>
1251</UL></UL>
1252
1253<P>
1254
1255<HR>
1256<A NAME="wxwindowonactivate"></A>
1257<H3>wxWindow::OnActivate</H3>
1258<P>
1259<B>void</B> <B>OnActivate</B>(<B>wxActivateEvent&amp;</B><I> event</I>)<P>
1260Called when a window is activated or deactivated.<P>
1261<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1262<I>event</I><UL><UL>
1263Object containing activation information.</UL></UL>
1264<P>
1265<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1266If the window is being activated, <A HREF="wx25.htm#wxactivateeventgetactive">wxActivateEvent::GetActive</A> returns TRUE,
1267otherwise it returns FALSE (it is being deactivated).<P>
1268<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1269<A HREF="wx25.htm#wxactivateevent">wxActivateEvent</A>,
1270<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1271
1272<HR>
1273<A NAME="wxwindowonchar"></A>
1274<H3>wxWindow::OnChar</H3>
1275<P>
1276<B>void</B> <B>OnChar</B>(<B>wxKeyEvent&amp;</B><I> event</I>)<P>
1277Called when the user has pressed a key that is not a modifier (SHIFT, CONTROL or ALT).<P>
1278<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1279<I>event</I><UL><UL>
1280Object containing keypress information. See <A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A> for
1281details about this class.</UL></UL>
1282<P>
1283<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1284This member function is called in response to a keypress. To intercept this event,
1285use the EVT_CHAR macro in an event table definition. Your <B>OnChar</B> handler may call this
1286default function to achieve default keypress functionality.<P>
1287Note that the ASCII values do not have explicit key codes: they are passed as ASCII
1288values.<P>
1289Note that not all keypresses can be intercepted this way. If you wish to intercept modifier
1290keypresses, then you will need to use <A HREF="wx260.htm#wxwindowonkeydown">wxWindow::OnKeyDown</A> or
1291<A HREF="wx260.htm#wxwindowonkeyup">wxWindow::OnKeyUp</A>.<P>
1292Most, but not all, windows allow keypresses to be intercepted.<P>
1293<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1294<A HREF="wx260.htm#wxwindowonkeydown">wxWindow::OnKeyDown</A>, <A HREF="wx260.htm#wxwindowonkeyup">wxWindow::OnKeyUp</A>,
1295<A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A>, <A HREF="wx260.htm#wxwindowoncharhook">wxWindow::OnCharHook</A>,
1296<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1297
1298<HR>
1299<A NAME="wxwindowoncharhook"></A>
1300<H3>wxWindow::OnCharHook</H3>
1301<P>
1302<B>void</B> <B>OnCharHook</B>(<B>wxKeyEvent&amp;</B><I> event</I>)<P>
1303This member is called to allow the window to intercept keyboard events
1304before they are processed by child windows.<P>
1305<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1306<I>event</I><UL><UL>
1307Object containing keypress information. See <A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A> for
1308details about this class.</UL></UL>
1309<P>
1310<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1311This member function is called in response to a keypress, if the window is active. To intercept this event,
1312use the EVT_CHAR_HOOK macro in an event table definition. If you do not process a particular
1313keypress, call <A HREF="wx84.htm#wxeventskip">wxEvent::Skip</A> to allow default processing.<P>
1314An example of using this function is in the implementation of escape-character processing for wxDialog,
1315where pressing ESC dismisses the dialog by <B>OnCharHook</B> 'forging' a cancel button press event.<P>
1316Note that the ASCII values do not have explicit key codes: they are passed as ASCII
1317values.<P>
1318This function is only relevant to top-level windows (frames and dialogs), and under
1319Windows only.<P>
1320<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1321<A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A>, <A HREF="wx260.htm#wxwindowoncharhook">wxWindow::OnCharHook</A>,
1322<A HREF="wx26.htm#wxapponcharhook">wxApp::OnCharHook</A>,
1323<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1324
1325<HR>
1326<A NAME="wxwindowoncommand"></A>
1327<H3>wxWindow::OnCommand</H3>
1328<P>
1329<B>virtual void</B> <B>OnCommand</B>(<B>wxEvtHandler&amp; </B><I>object</I>, <B>wxCommandEvent&amp; </B><I>event</I>)<P>
1330This virtual member function is called if the control does not handle the command event.<P>
1331<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1332<I>object</I><UL><UL>
1333Object receiving the command event.</UL></UL>
1334<P>
1335<I>event</I><UL><UL>
1336Command event</UL></UL>
1337<P>
1338<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1339This virtual function is provided mainly for backward compatibility. You can also intercept commands
1340from child controls by using an event table, with identifiers or identifier ranges to identify
1341the control(s) in question.<P>
1342<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1343<A HREF="wx52.htm#wxcommandevent">wxCommandEvent</A>,
1344<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1345
1346<HR>
1347<A NAME="wxwindowonclose"></A>
1348<H3>wxWindow::OnClose</H3>
1349<P>
1350<B>virtual bool</B> <B>OnClose</B>()<P>
1351Called when the user has tried to close a a frame
1352or dialog box using the window manager (X) or system menu (Windows).<P>
1353<B>Note:</B> This is an obsolete function.
1354It is superceded by the <A HREF="wx260.htm#wxwindowonclosewindow">wxWindow::OnCloseWindow</A> event
1355handler.<P>
1356<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
1357If TRUE is returned by OnClose, the window will be deleted by the system, otherwise the
1358attempt will be ignored. Do not delete the window from within this handler, although
1359you may delete other windows.<P>
1360<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1361<A HREF="wx296.htm#windowdeletionoverview">Window deletion overview</A>,
1362<A HREF="wx260.htm#wxwindowclose">wxWindow::Close</A>,
1363<A HREF="wx260.htm#wxwindowonclosewindow">wxWindow::OnCloseWindow</A>,
1364<A HREF="wx45.htm#wxcloseevent">wxCloseEvent</A><P>
1365
1366<HR>
1367<A NAME="wxwindowonclosewindow"></A>
1368<H3>wxWindow::OnCloseWindow</H3>
1369<P>
1370<B>void</B> <B>OnCloseWindow</B>(<B>wxCloseEvent&amp; </B><I>event</I>)<P>
1371This is an event handler function called when the user has tried to close a a frame
1372or dialog box using the window manager (X) or system menu (Windows). It is
1373called via the <A HREF="wx260.htm#wxwindowclose">wxWindow::Close</A> function, so
1374that the application can also invoke the handler programmatically.<P>
1375Use the EVT_CLOSE event table macro to handle close events.<P>
1376You should check whether the application is forcing the deletion of the window
1377using <A HREF="wx45.htm#wxcloseeventgetforce">wxCloseEvent::GetForce</A>. If this is TRUE,
1378destroy the window using <A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A>.
1379If not, it is up to you whether you respond by destroying the window.<P>
1380(Note: GetForce is now superceded by CanVeto. So to test whether forced destruction of
1381the window is required, test for the negative of CanVeto. If CanVeto returns FALSE,
1382it is not possible to skip window deletion.)<P>
1383If you don't destroy the window, you should call <A HREF="wx45.htm#wxcloseeventveto">wxCloseEvent::Veto</A> to
1384let the calling code know that you did not destroy the window. This allows the <A HREF="wx260.htm#wxwindowclose">wxWindow::Close</A> function
1385to return TRUE or FALSE depending on whether the close instruction was honoured or not.<P>
1386<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1387The <A HREF="wx260.htm#wxwindowonclose">wxWindow::OnClose</A> virtual function remains
1388for backward compatibility with earlier versions of wxWindows. The
1389default <B>OnCloseWindow</B> handler for wxFrame and wxDialog will call <B>OnClose</B>,
1390destroying the window if it returns TRUE or if the close is being forced.<P>
1391<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1392<A HREF="wx296.htm#windowdeletionoverview">Window deletion overview</A>,
1393<A HREF="wx260.htm#wxwindowclose">wxWindow::Close</A>,
1394<A HREF="wx260.htm#wxwindowonclose">wxWindow::OnClose</A>,
1395<A HREF="wx260.htm#wxwindowdestroy">wxWindow::Destroy</A>,
1396<A HREF="wx45.htm#wxcloseevent">wxCloseEvent</A>,
1397<A HREF="wx26.htm#wxapponqueryendsession">wxApp::OnQueryEndSession</A>,
1398<A HREF="wx26.htm#wxapponendsession">wxApp::OnEndSession</A><P>
1399
1400<HR>
1401<A NAME="wxwindowondropfiles"></A>
1402<H3>wxWindow::OnDropFiles</H3>
1403<P>
1404<B>void</B> <B>OnDropFiles</B>(<B>wxDropFilesEvent&amp;</B><I> event</I>)<P>
1405Called when files have been dragged from the file manager to the window.<P>
1406<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1407<I>event</I><UL><UL>
1408Drop files event. For more information, see <A HREF="wx80.htm#wxdropfilesevent">wxDropFilesEvent</A>.</UL></UL>
1409<P>
1410<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1411The window must have previously been enabled for dropping by calling
1412<A HREF="wx260.htm#wxwindowdragacceptfiles">wxWindow::DragAcceptFiles</A>.<P>
1413This event is only generated under Windows.<P>
1414To intercept this event, use the EVT_DROP_FILES macro in an event table definition.<P>
1415<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1416<A HREF="wx80.htm#wxdropfilesevent">wxDropFilesEvent</A>, <A HREF="wx260.htm#wxwindowdragacceptfiles">wxWindow::DragAcceptFiles</A>,
1417<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1418
1419<HR>
1420<A NAME="wxwindowonerasebackground"></A>
1421<H3>wxWindow::OnEraseBackground</H3>
1422<P>
1423<B>void</B> <B>OnEraseBackground</B>(<B>wxEraseEvent&amp;</B><I> event</I>)<P>
1424Called when the background of the window needs to be erased.<P>
1425<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1426<I>event</I><UL><UL>
1427Erase background event. For more information, see <A HREF="wx83.htm#wxeraseevent">wxEraseEvent</A>.</UL></UL>
1428<P>
1429<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1430This event is only generated under Windows.<P>
1431To intercept this event, use the EVT_ERASE_BACKGROUND macro in an event table definition.<P>
1432<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1433<A HREF="wx83.htm#wxeraseevent">wxEraseEvent</A>, <A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1434
1435<HR>
1436<A NAME="wxwindowonkeydown"></A>
1437<H3>wxWindow::OnKeyDown</H3>
1438<P>
1439<B>void</B> <B>OnKeyDown</B>(<B>wxKeyEvent&amp;</B><I> event</I>)<P>
1440Called when the user has pressed a key, before it is translated into an ASCII value using other
1441modifier keys that might be pressed at the same time.<P>
1442<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1443<I>event</I><UL><UL>
1444Object containing keypress information. See <A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A> for
1445details about this class.</UL></UL>
1446<P>
1447<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1448This member function is called in response to a key down event. To intercept this event,
1449use the EVT_KEY_DOWN macro in an event table definition. Your <B>OnKeyDown</B> handler may call this
1450default function to achieve default keypress functionality.<P>
1451Note that not all keypresses can be intercepted this way. If you wish to intercept special
1452keys, such as shift, control, and function keys, then you will need to use <A HREF="wx260.htm#wxwindowonkeydown">wxWindow::OnKeyDown</A> or
1453<A HREF="wx260.htm#wxwindowonkeyup">wxWindow::OnKeyUp</A>.<P>
1454Most, but not all, windows allow keypresses to be intercepted.<P>
1455<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1456<A HREF="wx260.htm#wxwindowonchar">wxWindow::OnChar</A>, <A HREF="wx260.htm#wxwindowonkeyup">wxWindow::OnKeyUp</A>,
1457<A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A>, <A HREF="wx260.htm#wxwindowoncharhook">wxWindow::OnCharHook</A>,
1458<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1459
1460<HR>
1461<A NAME="wxwindowonkeyup"></A>
1462<H3>wxWindow::OnKeyUp</H3>
1463<P>
1464<B>void</B> <B>OnKeyUp</B>(<B>wxKeyEvent&amp;</B><I> event</I>)<P>
1465Called when the user has released a key.<P>
1466<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1467<I>event</I><UL><UL>
1468Object containing keypress information. See <A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A> for
1469details about this class.</UL></UL>
1470<P>
1471<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1472This member function is called in response to a key up event. To intercept this event,
1473use the EVT_KEY_UP macro in an event table definition. Your <B>OnKeyUp</B> handler may call this
1474default function to achieve default keypress functionality.<P>
1475Note that not all keypresses can be intercepted this way. If you wish to intercept special
1476keys, such as shift, control, and function keys, then you will need to use <A HREF="wx260.htm#wxwindowonkeydown">wxWindow::OnKeyDown</A> or
1477<A HREF="wx260.htm#wxwindowonkeyup">wxWindow::OnKeyUp</A>.<P>
1478Most, but not all, windows allow key up events to be intercepted.<P>
1479<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1480<A HREF="wx260.htm#wxwindowonchar">wxWindow::OnChar</A>, <A HREF="wx260.htm#wxwindowonkeydown">wxWindow::OnKeyDown</A>,
1481<A HREF="wx124.htm#wxkeyevent">wxKeyEvent</A>, <A HREF="wx260.htm#wxwindowoncharhook">wxWindow::OnCharHook</A>,
1482<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1483
1484<HR>
1485<A NAME="wxwindowonkillfocus"></A>
1486<H3>wxWindow::OnKillFocus</H3>
1487<P>
1488<B>void</B> <B>OnKillFocus</B>(<B>wxFocusEvent&amp; </B><I>event</I>)<P>
1489Called when a window's focus is being killed.<P>
1490<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1491<I>event</I><UL><UL>
1492The focus event. For more information, see <A HREF="wx99.htm#wxfocusevent">wxFocusEvent</A>.</UL></UL>
1493<P>
1494<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1495To intercept this event, use the macro EVT_KILL_FOCUS in an event table definition.<P>
1496Most, but not all, windows respond to this event.<P>
1497<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1498<A HREF="wx99.htm#wxfocusevent">wxFocusEvent</A>, <A HREF="wx260.htm#wxwindowonsetfocus">wxWindow::OnSetFocus</A>,
1499<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1500
1501<HR>
1502<A NAME="wxwindowonidle"></A>
1503<H3>wxWindow::OnIdle</H3>
1504<P>
1505<B>void</B> <B>OnIdle</B>(<B>wxIdleEvent&amp; </B><I>event</I>)<P>
1506Provide this member function for any processing which needs to be done
1507when the application is idle.<P>
1508<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1509<A HREF="wx26.htm#wxapponidle">wxApp::OnIdle</A>, <A HREF="wx113.htm#wxidleevent">wxIdleEvent</A><P>
1510
1511<HR>
1512<A NAME="wxwindowoninitdialog"></A>
1513<H3>wxWindow::OnInitDialog</H3>
1514<P>
1515<B>void</B> <B>OnInitDialog</B>(<B>wxInitDialogEvent&amp;</B><I> event</I>)<P>
1516Default handler for the wxEVT_INIT_DIALOG event. Calls <A HREF="wx260.htm#wxwindowtransferdatatowindow">wxWindow::TransferDataToWindow</A>.<P>
1517<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1518<I>event</I><UL><UL>
1519Dialog initialisation event.</UL></UL>
1520<P>
1521<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1522Gives the window the default behaviour of transferring data to child controls via
1523the validator that each control has.<P>
1524<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1525<A HREF="wx255.htm#wxvalidator">wxValidator</A>, <A HREF="wx260.htm#wxwindowtransferdatatowindow">wxWindow::TransferDataToWindow</A><P>
1526
5526e819
VS
1527<HR>
1528<A NAME="wxwindowonmenuhighlight"></A>
1529<H3>wxWindow::OnMenuHighlight</H3>
1530<P>
1531<B>void</B> <B>OnMenuHighlight</B>(<B>wxMenuEvent&amp; </B><I>event</I>)<P>
1532Called when a menu select is received from a menu bar: that is, the
1533mouse cursor is over a menu item, but the left mouse button has not been
1534pressed.<P>
1535<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1536<I>event</I><UL><UL>
1537The menu highlight event. For more information, see <A HREF="wx143.htm#wxmenuevent">wxMenuEvent</A>.</UL></UL>
1538<P>
1539<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1540You can choose any member function to receive
1541menu select events, using the EVT_MENU_HIGHLIGHT macro for individual menu items or EVT_MENU_HIGHLIGHT_ALL macro
1542for all menu items.<P>
1543The default implementation for <A HREF="wx104.htm#wxframeonmenuhighlight">wxFrame::OnMenuHighlight</A> displays help
1544text in the first field of the status bar.<P>
1545This function was known as <B>OnMenuSelect</B> in earlier versions of wxWindows, but this was confusing
1546since a selection is normally a left-click action.<P>
1547<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1548<A HREF="wx143.htm#wxmenuevent">wxMenuEvent</A>,
5526e819
VS
1549<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1550
1551
1552<HR>
1553<A NAME="wxwindowonmouseevent"></A>
1554<H3>wxWindow::OnMouseEvent</H3>
1555<P>
1556<B>void</B> <B>OnMouseEvent</B>(<B>wxMouseEvent&amp;</B><I> event</I>)<P>
1557Called when the user has initiated an event with the
1558mouse.<P>
1559<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1560<I>event</I><UL><UL>
1561The mouse event. See <A HREF="wx150.htm#wxmouseevent">wxMouseEvent</A> for
1562more details.</UL></UL>
1563<P>
1564<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1565Most, but not all, windows respond to this event.<P>
1566To intercept this event, use the EVT_MOUSE_EVENTS macro in an event table definition, or individual
1567mouse event macros such as EVT_LEFT_DOWN.<P>
1568<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1569<A HREF="wx150.htm#wxmouseevent">wxMouseEvent</A>,
1570<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1571
1572<HR>
1573<A NAME="wxwindowonmove"></A>
1574<H3>wxWindow::OnMove</H3>
1575<P>
1576<B>void</B> <B>OnMove</B>(<B>wxMoveEvent&amp; </B><I>event</I>)<P>
1577Called when a window is moved.<P>
1578<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1579<I>event</I><UL><UL>
1580The move event. For more information, see <A HREF="wx151.htm#wxmoveevent">wxMoveEvent</A>.</UL></UL>
1581<P>
1582<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1583Use the EVT_MOVE macro to intercept move events.<P>
1584<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1585Not currently implemented.<P>
1586<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1587<A HREF="wx151.htm#wxmoveevent">wxMoveEvent</A>,
1588<A HREF="wx104.htm#wxframeonsize">wxFrame::OnSize</A>,
1589<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1590
1591<HR>
1592<A NAME="wxwindowonpaint"></A>
1593<H3>wxWindow::OnPaint</H3>
1594<P>
1595<B>void</B> <B>OnPaint</B>(<B>wxPaintEvent&amp; </B><I>event</I>)<P>
1596Sent to the event handler when the window must be refreshed.<P>
1597<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1598<I>event</I><UL><UL>
1599Paint event. For more information, see <A HREF="wx164.htm#wxpaintevent">wxPaintEvent</A>.</UL></UL>
1600<P>
1601<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1602Use the EVT_PAINT macro in an event table definition to intercept paint events.<P>
1603In a paint event handler, the application should always create a <A HREF="wx163.htm#wxpaintdc">wxPaintDC</A> object.<P>
1604For example:<P>
1605<FONT SIZE=2><PRE>
1606 void MyWindow::OnPaint(wxPaintEvent& event)
1607 {
1608 wxPaintDC dc(this);
1609
1610 DrawMyDocument(dc);
1611 }
1612</PRE>
1613</FONT>You can optimize painting by retrieving the rectangles
1614that have been damaged and only repainting these. The rectangles are in
1615terms of the client area, and are unscrolled, so you will need to do
1616some calculations using the current view position to obtain logical,
1617scrolled units.<P>
1618Here is an example of using the <A HREF="wx196.htm#wxregioniterator">wxRegionIterator</A> class:<P>
1619<FONT SIZE=2><PRE>
1620// Called when window needs to be repainted.
1621void MyWindow::OnPaint(wxPaintEvent& event)
1622{
1623 wxPaintDC dc(this);
1624
1625 // Find Out where the window is scrolled to
1626 int vbX,vbY; // Top left corner of client
1627 ViewStart(&vbX,&vbY);
1628
1629 int vX,vY,vW,vH; // Dimensions of client area in pixels
1630 wxRegionIterator upd(GetUpdateRegion()); // get the update rect list
1631
1632 while (upd)
1633 {
1634 vX = upd.GetX();
1635 vY = upd.GetY();
1636 vW = upd.GetW();
1637 vH = upd.GetH();
1638
1639 // Alternatively we can do this:
1640 // wxRect rect;
1641 // upd.GetRect(&rect);
1642
1643 // Repaint this rectangle
1644 ...some code...
1645
1646 upd ++ ;
1647 }
1648}
1649</PRE>
1650</FONT><B><FONT COLOR="#FF0000">See also</FONT></B><P>
1651<A HREF="wx164.htm#wxpaintevent">wxPaintEvent</A>,
1652<A HREF="wx163.htm#wxpaintdc">wxPaintDC</A>,
1653<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1654
1655<HR>
1656<A NAME="wxwindowonscroll"></A>
1657<H3>wxWindow::OnScroll</H3>
1658<P>
1659<B>void</B> <B>OnScroll</B>(<B>wxScrollEvent&amp; </B><I>event</I>)<P>
1660Called when a scroll event is received from one of the window's built-in scrollbars.<P>
1661<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1662<I>event</I><UL><UL>
1663Command event. Retrieve the new scroll position by
1664calling <A HREF="wx202.htm#wxscrolleventgetposition">wxScrollEvent::GetPosition</A>, and the
1665scrollbar orientation by calling <A HREF="wx202.htm#wxscrolleventgetorientation">wxScrollEvent::GetOrientation</A>.</UL></UL>
1666<P>
1667<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1668Note that it is not possible to distinguish between horizontal and vertical scrollbars
1669until the function is executing (you can't have one function for vertical, another
1670for horizontal events).<P>
1671<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1672<A HREF="wx202.htm#wxscrollevent">wxScrollEvent</A>,
1673<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1674
1675<HR>
1676<A NAME="wxwindowonsetfocus"></A>
1677<H3>wxWindow::OnSetFocus</H3>
1678<P>
1679<B>void</B> <B>OnSetFocus</B>(<B>wxFocusEvent&amp; </B><I>event</I>)<P>
1680Called when a window's focus is being set.<P>
1681<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1682<I>event</I><UL><UL>
1683The focus event. For more information, see <A HREF="wx99.htm#wxfocusevent">wxFocusEvent</A>.</UL></UL>
1684<P>
1685<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1686To intercept this event, use the macro EVT_SET_FOCUS in an event table definition.<P>
1687Most, but not all, windows respond to this event.<P>
1688<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1689<A HREF="wx99.htm#wxfocusevent">wxFocusEvent</A>, <A HREF="wx260.htm#wxwindowonkillfocus">wxWindow::OnKillFocus</A>,
1690<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1691
1692<HR>
1693<A NAME="wxwindowonsize"></A>
1694<H3>wxWindow::OnSize</H3>
1695<P>
1696<B>void</B> <B>OnSize</B>(<B>wxSizeEvent&amp; </B><I>event</I>)<P>
1697Called when the window has been resized.<P>
1698<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1699<I>event</I><UL><UL>
1700Size event. For more information, see <A HREF="wx206.htm#wxsizeevent">wxSizeEvent</A>.</UL></UL>
1701<P>
1702<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1703You may wish to use this for frames to resize their child windows as appropriate.<P>
1704Note that the size passed is of
1705the whole window: call <A HREF="wx260.htm#wxwindowgetclientsize">wxWindow::GetClientSize</A> for the area which may be
1706used by the application.<P>
1707<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1708<A HREF="wx206.htm#wxsizeevent">wxSizeEvent</A>,
1709<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1710
1711<HR>
1712<A NAME="wxwindowonsyscolourchanged"></A>
1713<H3>wxWindow::OnSysColourChanged</H3>
1714<P>
1715<B>void</B> <B>OnSysColourChanged</B>(<B>wxOnSysColourChangedEvent&amp; </B><I>event</I>)<P>
1716Called when the user has changed the system colours.<P>
1717<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1718<I>event</I><UL><UL>
1719System colour change event. For more information, see <A HREF="wx227.htm#wxsyscolourchangedevent">wxSysColourChangedEvent</A>.</UL></UL>
1720<P>
1721<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1722<A HREF="wx227.htm#wxsyscolourchangedevent">wxSysColourChangedEvent</A>,
1723<A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
1724
1725<HR>
1726<A NAME="wxwindowpopeventhandler"></A>
1727<H3>wxWindow::PopEventHandler</H3>
1728<P>
1729<B>wxEvtHandler*</B> <B>PopEventHandler</B>(<B>bool </B><I>deleteHandler = FALSE</I>) <B>const</B><P>
1730Removes and returns the top-most event handler on the event handler stack.<P>
1731<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1732<I>deleteHandler</I><UL><UL>
1733If this is TRUE, the handler will be deleted after it is removed. The
1734default value is FALSE.</UL></UL>
1735<P>
1736<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1737<A HREF="wx260.htm#wxwindowseteventhandler">wxWindow::SetEventHandler</A>,
1738<A HREF="wx260.htm#wxwindowgeteventhandler">wxWindow::GetEventHandler</A>,
1739<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PushEventHandler</A>,
1740<A HREF="wx85.htm#wxevthandlerprocessevent">wxEvtHandler::ProcessEvent</A>,
1741<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><P>
1742
1743<HR>
1744<A NAME="wxwindowpopupmenu"></A>
1745<H3>wxWindow::PopupMenu</H3>
1746<P>
1747<B>virtual bool</B> <B>PopupMenu</B>(<B>wxMenu* </B><I>menu</I>, <B>int </B><I>x</I>, <B>int </B><I>y</I>)<P>
1748Pops up the given menu at the specified coordinates, relative to this
1749window, and returns control when the user has dismissed the menu. If a
1750menu item is selected, the callback defined for the menu is called with
1751wxMenu and wxCommandEvent reference arguments. The callback should access
1752the commandInt member of the event to check the selected menu identifier.<P>
1753<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1754<I>menu</I><UL><UL>
1755Menu to pop up.</UL></UL>
1756<P>
1757<I>x</I><UL><UL>
1758Required x position for the menu to appear.</UL></UL>
1759<P>
1760<I>y</I><UL><UL>
1761Required y position for the menu to appear.</UL></UL>
1762<P>
1763<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1764<A HREF="wx140.htm#wxmenu">wxMenu</A><P>
1765<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1766Just before the menu is popped up, <A HREF="wx140.htm#wxmenuupdateui">wxMenu::UpdateUI</A> is called
1767to ensure that the menu items are in the correct state.<P>
1768
1769<HR>
1770<A NAME="wxwindowpusheventhandler"></A>
1771<H3>wxWindow::PushEventHandler</H3>
1772<P>
1773<B>void</B> <B>PushEventHandler</B>(<B>wxEvtHandler* </B><I>handler</I>)<P>
1774Pushes this event handler onto the event stack for the window.<P>
1775<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1776<I>handler</I><UL><UL>
1777Specifies the handler to be pushed.</UL></UL>
1778<P>
1779<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1780An event handler is an object that is capable of processing the events
1781sent to a window. By default, the window is its own event handler, but
1782an application may wish to substitute another, for example to allow
1783central implementation of event-handling for a variety of different
1784window classes.<P>
1785<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PushEventHandler</A> allows
1786an application to set up a chain of event handlers, where an event not handled by one event handler is
1787handed to the next one in the chain. Use <A HREF="wx260.htm#wxwindowpopeventhandler">wxWindow::PopEventHandler</A> to
1788remove the event handler.<P>
1789<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1790<A HREF="wx260.htm#wxwindowseteventhandler">wxWindow::SetEventHandler</A>,
1791<A HREF="wx260.htm#wxwindowgeteventhandler">wxWindow::GetEventHandler</A>,
1792<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PopEventHandler</A>,
1793<A HREF="wx85.htm#wxevthandlerprocessevent">wxEvtHandler::ProcessEvent</A>,
1794<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><P>
1795
1796<HR>
1797<A NAME="wxwindowraise"></A>
1798<H3>wxWindow::Raise</H3>
1799<P>
1800<B>void</B> <B>Raise</B>()<P>
1801Raises the window to the top of the window hierarchy if it is a managed window (dialog
1802or frame).<P>
1803
1804<HR>
1805<A NAME="wxwindowrefresh"></A>
1806<H3>wxWindow::Refresh</H3>
1807<P>
1808<B>virtual void</B> <B>Refresh</B>(<B>const bool</B><I> eraseBackground = TRUE</I>, <B>const wxRect* </B><I>rect
1809= NULL</I>)<P>
1810Causes a message or event to be generated to repaint the
1811window.<P>
1812<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1813<I>eraseBackground</I><UL><UL>
1814If TRUE, the background will be
1815erased.</UL></UL>
1816<P>
1817<I>rect</I><UL><UL>
1818If non-NULL, only the given rectangle will
1819be treated as damaged.</UL></UL>
1820<P>
1821
1822<HR>
1823<A NAME="wxwindowreleasemouse"></A>
1824<H3>wxWindow::ReleaseMouse</H3>
1825<P>
1826<B>virtual void</B> <B>ReleaseMouse</B>()<P>
1827Releases mouse input captured with <A HREF="wx260.htm#wxwindowcapturemouse">wxWindow::CaptureMouse</A>.<P>
1828<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1829<A HREF="wx260.htm#wxwindowcapturemouse">wxWindow::CaptureMouse</A><P>
1830
1831<HR>
1832<A NAME="wxwindowremovechild"></A>
1833<H3>wxWindow::RemoveChild</H3>
1834<P>
1835<B>virtual void</B> <B>RemoveChild</B>(<B>wxWindow* </B><I>child</I>)<P>
1836Removes a child window. This is called automatically by window deletion
1837functions so should not be required by the application programmer.<P>
1838<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1839<I>child</I><UL><UL>
1840Child window to remove.</UL></UL>
1841<P>
1842
1843<HR>
1844<A NAME="wxwindowscreentoclient"></A>
1845<H3>wxWindow::ScreenToClient</H3>
1846<P>
1847<B>virtual void</B> <B>ScreenToClient</B>(<B>int* </B><I>x</I>, <B>int* </B><I>y</I>) <B>const</B><P>
1848<B>virtual wxPoint</B> <B>ScreenToClient</B>(<B>const wxPoint&amp; </B><I>pt</I>) <B>const</B><P>
1849Converts from screen to client window coordinates.<P>
1850<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1851<I>x</I><UL><UL>
1852Stores the screen x coordinate and receives the client x coordinate.</UL></UL>
1853<P>
1854<I>y</I><UL><UL>
1855Stores the screen x coordinate and receives the client x coordinate.</UL></UL>
1856<P>
1857<I>pt</I><UL><UL>
1858The screen position for the second form of the function.</UL></UL>
1859<P>
1860<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
1861 In place of a single overloaded method name, wxPython
1862implements the following methods:<P>
1863
1864<UL><UL>
1865
1866<TABLE>
1867
1868
1869<TR><TD VALIGN=TOP>
1870<B>ScreenToClient(point)</B>
1871</TD>
1872
1873<TD VALIGN=TOP>
1874Accepts and returns a wxPoint
1875</TD></TR>
1876
1877
1878<TR><TD VALIGN=TOP>
1879<B>ScreenToClientXY(x, y)</B>
1880</TD>
1881
1882<TD VALIGN=TOP>
1883Returns a 2-tuple, (x, y)
1884</TD></TR>
1885
1886
1887</TABLE>
1888</UL></UL>
1889
1890<P>
1891
1892
1893<HR>
1894<A NAME="wxwindowscrollwindow"></A>
1895<H3>wxWindow::ScrollWindow</H3>
1896<P>
1897<B>virtual void</B> <B>ScrollWindow</B>(<B>int </B><I>dx</I>, <B>int </B><I>dy</I>, <B>const wxRect*</B><I> rect = NULL</I>)<P>
1898Physically scrolls the pixels in the window.<P>
1899<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1900<I>dx</I><UL><UL>
1901Amount to scroll horizontally.</UL></UL>
1902<P>
1903<I>dy</I><UL><UL>
1904Amount to scroll vertically.</UL></UL>
1905<P>
1906<I>rect</I><UL><UL>
1907Rectangle to invalidate. If this is NULL, the whole window is invalidated. If you
1908pass a rectangle corresponding to the area of the window exposed by the scroll, your painting handler
1909can optimise painting by checking for the invalidated region.</UL></UL>
1910<P>
1911<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1912Available only under Windows.<P>
1913Use this function to optimise your scrolling implementations, to minimise the area that must be
1914redrawn.<P>
1915
1916<HR>
1917<A NAME="wxwindowsetacceleratortable"></A>
1918<H3>wxWindow::SetAcceleratorTable</H3>
1919<P>
1920<B>virtual void</B> <B>SetAcceleratorTable</B>(<B>const wxAcceleratorTable&amp;</B><I> accel</I>)<P>
1921Sets the accelerator table for this window. See <A HREF="wx24.htm#wxacceleratortable">wxAcceleratorTable</A>.<P>
1922
1923<HR>
1924<A NAME="wxwindowsetautolayout"></A>
1925<H3>wxWindow::SetAutoLayout</H3>
1926<P>
1927<B>void</B> <B>SetAutoLayout</B>(<B>const bool</B><I> autoLayout</I>)<P>
1928Determines whether the <A HREF="wx260.htm#wxwindowlayout">wxWindow::Layout</A> function will
1929be called automatically when the window is resized.<P>
1930<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1931<I>autoLayout</I><UL><UL>
1932Set this to TRUE if you wish the Layout function to be called
1933from within wxWindow::OnSize functions.</UL></UL>
1934<P>
1935<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1936<A HREF="wx260.htm#wxwindowsetconstraints">wxWindow::SetConstraints</A><P>
1937
1938<HR>
1939<A NAME="wxwindowsetbackgroundcolour"></A>
1940<H3>wxWindow::SetBackgroundColour</H3>
1941<P>
1942<B>virtual void</B> <B>SetBackgroundColour</B>(<B>const wxColour&amp; </B><I>colour</I>)<P>
1943Sets the background colour of the window.<P>
1944<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1945<I>colour</I><UL><UL>
1946The colour to be used as the background colour.</UL></UL>
1947<P>
1948<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
1949The background colour is usually painted by the default
1950<A HREF="wx260.htm#wxwindowonerasebackground">wxWindow::OnEraseBackground</A> event handler function.<P>
1951Note that setting the background colour does not cause an immediate refresh, so you
1952may wish to call <A HREF="wx260.htm#wxwindowclear">wxWindow::Clear</A> or <A HREF="wx260.htm#wxwindowrefresh">wxWindow::Refresh</A> after
1953calling this function.<P>
1954<B><FONT COLOR="#FF0000">See also</FONT></B><P>
1955<A HREF="wx260.htm#wxwindowgetbackgroundcolour">wxWindow::GetBackgroundColour</A>,
1956<A HREF="wx260.htm#wxwindowsetforegroundcolour">wxWindow::SetForegroundColour</A>,
1957<A HREF="wx260.htm#wxwindowgetforegroundcolour">wxWindow::GetForegroundColour</A>,
1958<A HREF="wx260.htm#wxwindowclear">wxWindow::Clear</A>,
1959<A HREF="wx260.htm#wxwindowrefresh">wxWindow::Refresh</A>,
1960<A HREF="wx260.htm#wxwindowonerasebackground">wxWindow::OnEraseBackground</A><P>
1961
1962<HR>
1963<A NAME="wxwindowsetclientsize"></A>
1964<H3>wxWindow::SetClientSize</H3>
1965<P>
1966<B>virtual void</B> <B>SetClientSize</B>(<B>int</B><I> width</I>, <B>int</B><I> height</I>)<P>
1967<B>virtual void</B> <B>SetClientSize</B>(<B>const wxSize&amp;</B><I> size</I>)<P>
1968This sets the size of the window client area in pixels. Using this function to size a window
1969tends to be more device-independent than <A HREF="wx260.htm#wxwindowsetsize">wxWindow::SetSize</A>, since the application need not
1970worry about what dimensions the border or title bar have when trying to fit the window
1971around panel items, for example.<P>
1972<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
1973<I>width</I><UL><UL>
1974The required client area width.</UL></UL>
1975<P>
1976<I>height</I><UL><UL>
1977The required client area height.</UL></UL>
1978<P>
1979<I>size</I><UL><UL>
1980The required client size.</UL></UL>
1981<P>
1982<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
1983 In place of a single overloaded method name, wxPython
1984implements the following methods:<P>
1985
1986<UL><UL>
1987
1988<TABLE>
1989
1990
1991<TR><TD VALIGN=TOP>
1992<B>SetClientSize(size)</B>
1993</TD>
1994
1995<TD VALIGN=TOP>
1996Accepts a wxSize
1997</TD></TR>
1998
1999
2000<TR><TD VALIGN=TOP>
2001<B>SetClientSizeWH(width, height)</B>
2002</TD>
2003
2004<TD VALIGN=TOP>
2005
2006</TD></TR>
2007
2008
2009</TABLE>
2010</UL></UL>
2011
2012<P>
2013
2014<HR>
2015<A NAME="wxwindowsetcursor"></A>
2016<H3>wxWindow::SetCursor</H3>
2017<P>
2018<B>virtual void</B> <B>SetCursor</B>(<B>const wxCursor&amp;</B><I>cursor</I>)<P>
2019Sets the window's cursor. Notice that setting the cursor for this window does
2020not set it for its children so you'll need to explicitly call SetCursor() for
2021them too if you need it.<P>
2022<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2023<I>cursor</I><UL><UL>
2024Specifies the cursor that the window should normally display.</UL></UL>
2025<P>
2026<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2027<A HREF="wx268.htm#wxsetcursor">::wxSetCursor</A>, <A HREF="wx59.htm#wxcursor">wxCursor</A><P>
2028
2029<HR>
2030<A NAME="wxwindowseteventhandler"></A>
2031<H3>wxWindow::SetEventHandler</H3>
2032<P>
2033<B>void</B> <B>SetEventHandler</B>(<B>wxEvtHandler* </B><I>handler</I>)<P>
2034Sets the event handler for this window.<P>
2035<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2036<I>handler</I><UL><UL>
2037Specifies the handler to be set.</UL></UL>
2038<P>
2039<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2040An event handler is an object that is capable of processing the events
2041sent to a window. By default, the window is its own event handler, but
2042an application may wish to substitute another, for example to allow
2043central implementation of event-handling for a variety of different
2044window classes.<P>
2045It is usually better to use <A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PushEventHandler</A> since
2046this sets up a chain of event handlers, where an event not handled by one event handler is
2047handed to the next one in the chain.<P>
2048<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2049<A HREF="wx260.htm#wxwindowgeteventhandler">wxWindow::GetEventHandler</A>,
2050<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PushEventHandler</A>,
2051<A HREF="wx260.htm#wxwindowpusheventhandler">wxWindow::PopEventHandler</A>,
2052<A HREF="wx85.htm#wxevthandlerprocessevent">wxEvtHandler::ProcessEvent</A>,
2053<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><P>
2054
2055<HR>
2056<A NAME="wxwindowsetconstraints"></A>
2057<H3>wxWindow::SetConstraints</H3>
2058<P>
2059<B>void</B> <B>SetConstraints</B>(<B>wxLayoutConstraints* </B><I>constraints</I>)<P>
2060Sets the window to have the given layout constraints. The window
2061will then own the object, and will take care of its deletion.
2062If an existing layout constraints object is already owned by the
2063window, it will be deleted.<P>
2064<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2065<I>constraints</I><UL><UL>
2066The constraints to set. Pass NULL to disassociate and delete the window's
2067constraints.</UL></UL>
2068<P>
2069<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2070You must call <A HREF="wx260.htm#wxwindowsetautolayout">wxWindow::SetAutoLayout</A> to tell a window to use
2071the constraints automatically in OnSize; otherwise, you must
2072override OnSize and call Layout explicitly.<P>
2073
2074<HR>
2075<A NAME="wxwindowsetdroptarget"></A>
2076<H3>wxWindow::SetDropTarget</H3>
2077<P>
2078<B>void</B> <B>SetDropTarget</B>(<B>wxDropTarget*</B><I> target</I>)<P>
2079Associates a drop target with this window.<P>
2080If the window already has a drop target, it is deleted.<P>
2081<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2082<A HREF="wx260.htm#wxwindowgetdroptarget">wxWindow::GetDropTarget</A>,
2083<A HREF="wx312.htm#wxdndoverview">Drag and drop overview</A><P>
2084
2085<HR>
2086<A NAME="wxwindowsetfocus"></A>
2087<H3>wxWindow::SetFocus</H3>
2088<P>
2089<B>virtual void</B> <B>SetFocus</B>()<P>
2090This sets the window to receive keyboard input.<P>
2091
2092<HR>
2093<A NAME="wxwindowsetfont"></A>
2094<H3>wxWindow::SetFont</H3>
2095<P>
2096<B>void</B> <B>SetFont</B>(<B>const wxFont&amp; </B><I>font</I>)<P>
2097Sets the font for this window.<P>
2098<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2099<I>font</I><UL><UL>
2100Font to associate with this window.</UL></UL>
2101<P>
2102<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2103<A HREF="wx260.htm#wxwindowgetfont">wxWindow::GetFont</A><P>
2104
2105<HR>
2106<A NAME="wxwindowsetforegroundcolour"></A>
2107<H3>wxWindow::SetForegroundColour</H3>
2108<P>
2109<B>virtual void</B> <B>SetForegroundColour</B>(<B>const wxColour&amp; </B><I>colour</I>)<P>
2110Sets the foreground colour of the window.<P>
2111<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2112<I>colour</I><UL><UL>
2113The colour to be used as the foreground colour.</UL></UL>
2114<P>
2115<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2116The interpretation of foreground colour is open to interpretation according
2117to the window class; it may be the text colour or other colour, or it may not
2118be used at all.<P>
2119<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2120<A HREF="wx260.htm#wxwindowgetforegroundcolour">wxWindow::GetForegroundColour</A>,
2121<A HREF="wx260.htm#wxwindowsetbackgroundcolour">wxWindow::SetBackgroundColour</A>,
2122<A HREF="wx260.htm#wxwindowgetbackgroundcolour">wxWindow::GetBackgroundColour</A><P>
2123
2124<HR>
2125<A NAME="wxwindowsetid"></A>
2126<H3>wxWindow::SetId</H3>
2127<P>
2128<B>void</B> <B>SetId</B>(<B>int</B><I> id</I>)<P>
2129Sets the identifier of the window.<P>
2130<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2131Each window has an integer identifier. If the application has not provided one,
2132an identifier will be generated. Normally, the identifier should be provided
2133on creation and should not be modified subsequently.<P>
2134<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2135<A HREF="wx260.htm#wxwindowgetid">wxWindow::GetId</A>,
2136<A HREF="wx299.htm#windowids">Window identifiers</A><P>
2137
2138<HR>
2139<A NAME="wxwindowsetname"></A>
2140<H3>wxWindow::SetName</H3>
2141<P>
2142<B>virtual void</B> <B>SetName</B>(<B>const wxString&amp; </B><I>name</I>)<P>
2143Sets the window's name.<P>
2144<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2145<I>name</I><UL><UL>
2146A name to set for the window.</UL></UL>
2147<P>
2148<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2149<A HREF="wx260.htm#wxwindowgetname">wxWindow::GetName</A><P>
2150
2151<HR>
2152<A NAME="wxwindowsetpalette"></A>
2153<H3>wxWindow::SetPalette</H3>
2154<P>
2155<B>virtual void</B> <B>SetPalette</B>(<B>wxPalette* </B><I>palette</I>)<P>
2156Obsolete - use <A HREF="wx65.htm#wxdcsetpalette">wxDC::SetPalette</A> instead.<P>
2157
2158<HR>
2159<A NAME="wxwindowsetreturncode"></A>
2160<H3>wxWindow::SetReturnCode</H3>
2161<P>
2162<B>void</B> <B>SetReturnCode</B>(<B>int </B><I>retCode</I>)<P>
2163Sets the return code for this window.<P>
2164<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2165<I>retCode</I><UL><UL>
2166The integer return code, usually a control identifier.</UL></UL>
2167<P>
2168<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2169A return code is normally associated with a modal dialog, where <A HREF="wx71.htm#wxdialogshowmodal">wxDialog::ShowModal</A> returns
2170a code to the application. The function <A HREF="wx71.htm#wxdialogendmodal">wxDialog::EndModal</A> calls <B>SetReturnCode</B>.<P>
2171<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2172<A HREF="wx260.htm#wxwindowgetreturncode">wxWindow::GetReturnCode</A>, <A HREF="wx71.htm#wxdialogshowmodal">wxDialog::ShowModal</A>,
2173<A HREF="wx71.htm#wxdialogendmodal">wxDialog::EndModal</A><P>
2174
2175<HR>
2176<A NAME="wxwindowsetscrollbar"></A>
2177<H3>wxWindow::SetScrollbar</H3>
2178<P>
2179<B>virtual void</B> <B>SetScrollbar</B>(<B>int </B><I>orientation</I>, <B>int </B><I>position</I>,
2180<B>int </B><I>thumbSize</I>, <B>int </B><I>range</I>,
2181<B>const bool </B><I>refresh = TRUE</I>)<P>
2182Sets the scrollbar properties of a built-in scrollbar.<P>
2183<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2184<I>orientation</I><UL><UL>
2185Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL or wxVERTICAL.</UL></UL>
2186<P>
2187<I>position</I><UL><UL>
2188The position of the scrollbar in scroll units.</UL></UL>
2189<P>
2190<I>thumbSize</I><UL><UL>
2191The size of the thumb, or visible portion of the scrollbar, in scroll units.</UL></UL>
2192<P>
2193<I>range</I><UL><UL>
2194The maximum position of the scrollbar.</UL></UL>
2195<P>
2196<I>refresh</I><UL><UL>
2197TRUE to redraw the scrollbar, FALSE otherwise.</UL></UL>
2198<P>
2199<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2200Let's say you wish to display 50 lines of text, using the same font.
2201The window is sized so that you can only see 16 lines at a time.<P>
2202You would use:<P>
2203<FONT SIZE=2><PRE>
2204 SetScrollbar(wxVERTICAL, 0, 16, 50);
2205</PRE>
2206</FONT><P>
2207Note that with the window at this size, the thumb position can never go
2208above 50 minus 16, or 34.<P>
2209You can determine how many lines are currently visible by dividing the current view
2210size by the character height in pixels.<P>
2211When defining your own scrollbar behaviour, you will always need to recalculate
2212the scrollbar settings when the window size changes. You could therefore put your
2213scrollbar calculations and SetScrollbar
2214call into a function named AdjustScrollbars, which can be called initially and also
2215from your <A HREF="wx260.htm#wxwindowonsize">wxWindow::OnSize</A> event handler function.<P>
2216<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2217<A HREF="wx297.htm#scrollingoverview">Scrolling overview</A>,
2218<A HREF="wx201.htm#wxscrollbar">wxScrollBar</A>, <A HREF="wx203.htm#wxscrolledwindow">wxScrolledWindow</A><P>
2219
2220<HR>
2221<A NAME="wxwindowsetscrollpos"></A>
2222<H3>wxWindow::SetScrollPos</H3>
2223<P>
2224<B>virtual void</B> <B>SetScrollPos</B>(<B>int </B><I>orientation</I>, <B>int </B><I>pos</I>, <B>const bool </B><I>refresh = TRUE</I>)<P>
2225Sets the position of one of the built-in scrollbars.<P>
2226<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2227<I>orientation</I><UL><UL>
2228Determines the scrollbar whose position is to be set. May be wxHORIZONTAL or wxVERTICAL.</UL></UL>
2229<P>
2230<I>pos</I><UL><UL>
2231Position in scroll units.</UL></UL>
2232<P>
2233<I>refresh</I><UL><UL>
2234TRUE to redraw the scrollbar, FALSE otherwise.</UL></UL>
2235<P>
2236<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2237This function does not directly affect the contents of the window: it is up to the
2238application to take note of scrollbar attributes and redraw contents accordingly.<P>
2239<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2240<A HREF="wx260.htm#wxwindowsetscrollbar">wxWindow::SetScrollbar</A>,
2241<A HREF="wx260.htm#wxwindowsetscrollpos">wxWindow::GetScrollPos</A>,
2242<A HREF="wx260.htm#wxwindowgetscrollthumb">wxWindow::GetScrollThumb</A>,
2243<A HREF="wx201.htm#wxscrollbar">wxScrollBar</A>, <A HREF="wx203.htm#wxscrolledwindow">wxScrolledWindow</A><P>
2244
2245<HR>
2246<A NAME="wxwindowsetsize"></A>
2247<H3>wxWindow::SetSize</H3>
2248<P>
2249<B>virtual void</B> <B>SetSize</B>(<B>int</B><I> x</I>, <B>int</B><I> y</I>, <B>int</B><I> width</I>, <B>int</B><I> height</I>,
2250 <B>int</B><I> sizeFlags = wxSIZE_AUTO</I>)<P>
2251<B>virtual void</B> <B>SetSize</B>(<B>const wxRect&amp;</B><I> rect</I>)<P>
2252Sets the size and position of the window in pixels.<P>
2253<B>virtual void</B> <B>SetSize</B>(<B>int</B><I> width</I>, <B>int</B><I> height</I>)<P>
2254<B>virtual void</B> <B>SetSize</B>(<B>const wxSize&amp;</B><I> size</I>)<P>
2255Sets the size of the window in pixels.<P>
2256<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2257<I>x</I><UL><UL>
2258Required x position in pixels, or -1 to indicate that the existing
2259value should be used.</UL></UL>
2260<P>
2261<I>y</I><UL><UL>
2262Required y position in pixels, or -1 to indicate that the existing
2263value should be used.</UL></UL>
2264<P>
2265<I>width</I><UL><UL>
2266Required width in pixels, or -1 to indicate that the existing
2267value should be used.</UL></UL>
2268<P>
2269<I>height</I><UL><UL>
2270Required height position in pixels, or -1 to indicate that the existing
2271value should be used.</UL></UL>
2272<P>
2273<I>size</I><UL><UL>
2274<A HREF="wx205.htm#wxsize">wxSize</A> object for setting the size.</UL></UL>
2275<P>
2276<I>rect</I><UL><UL>
2277<A HREF="wx193.htm#wxrect">wxRect</A> object for setting the position and size.</UL></UL>
2278<P>
2279<I>sizeFlags</I><UL><UL>
2280Indicates the interpretation of other parameters. It is a bit list of the following:<P>
2281<B>wxSIZE_AUTO_WIDTH</B>: a -1 width value is taken to indicate
2282a wxWindows-supplied default width.<BR>
2283
2284<B>wxSIZE_AUTO_HEIGHT</B>: a -1 height value is taken to indicate
2285a wxWindows-supplied default width.<BR>
2286
2287<B>wxSIZE_AUTO</B>: -1 size values are taken to indicate
2288a wxWindows-supplied default size.<BR>
2289
2290<B>wxSIZE_USE_EXISTING</B>: existing dimensions should be used
2291if -1 values are supplied.<BR>
2292
2293<B>wxSIZE_ALLOW_MINUS_ONE</B>: allow dimensions of -1 and less to be interpreted
2294as real dimensions, not default values.
2295</UL></UL>
2296<P>
2297<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2298The second form is a convenience for calling the first form with default
2299x and y parameters, and must be used with non-default width and height values.<P>
2300The first form sets the position and optionally size, of the window.
2301Parameters may be -1 to indicate either that a default should be supplied
2302by wxWindows, or that the current value of the dimension should be used.<P>
2303<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2304<A HREF="wx260.htm#wxwindowmove">wxWindow::Move</A><P>
2305<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
2306 In place of a single overloaded method name, wxPython
2307implements the following methods:<P>
2308
2309<UL><UL>
2310
2311<TABLE>
2312
2313
2314<TR><TD VALIGN=TOP>
2315<B>SetDimensions(x, y, width, height, sizeFlags=wxSIZE_AUTO)</B>
2316</TD>
2317
2318<TD VALIGN=TOP>
2319
2320</TD></TR>
2321
2322
2323<TR><TD VALIGN=TOP>
2324<B>SetSize(size)</B>
2325</TD>
2326
2327<TD VALIGN=TOP>
2328
2329</TD></TR>
2330
2331
2332<TR><TD VALIGN=TOP>
2333<B>SetPosition(point)</B>
2334</TD>
2335
2336<TD VALIGN=TOP>
2337
2338</TD></TR>
2339
2340
2341</TABLE>
2342</UL></UL>
2343
2344<P>
2345
2346<HR>
2347<A NAME="wxwindowsetsizehints"></A>
2348<H3>wxWindow::SetSizeHints</H3>
2349<P>
2350<B>virtual void</B> <B>SetSizeHints</B>(<B>int</B><I> minW=-1</I>, <B>int</B><I> minH=-1</I>, <B>int</B><I> maxW=-1</I>, <B>int</B><I> maxH=-1</I>,
2351 <B>int</B><I> incW=-1</I>, <B>int</B><I> incH=-1</I>)<P>
2352Allows specification of minimum and maximum window sizes, and window size increments.
2353If a pair of values is not set (or set to -1), the default values will be used.<P>
2354<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2355<I>minW</I><UL><UL>
2356Specifies the minimum width allowable.</UL></UL>
2357<P>
2358<I>minH</I><UL><UL>
2359Specifies the minimum height allowable.</UL></UL>
2360<P>
2361<I>maxW</I><UL><UL>
2362Specifies the maximum width allowable.</UL></UL>
2363<P>
2364<I>maxH</I><UL><UL>
2365Specifies the maximum height allowable.</UL></UL>
2366<P>
2367<I>incW</I><UL><UL>
2368Specifies the increment for sizing the width (Motif/Xt only).</UL></UL>
2369<P>
2370<I>incH</I><UL><UL>
2371Specifies the increment for sizing the height (Motif/Xt only).</UL></UL>
2372<P>
2373<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
2374If this function is called, the user will not be able to size the window outside the
2375given bounds.<P>
2376The resizing increments are only significant under Motif or Xt.<P>
2377
2378<HR>
2379<A NAME="wxwindowsettitle"></A>
2380<H3>wxWindow::SetTitle</H3>
2381<P>
2382<B>virtual void</B> <B>SetTitle</B>(<B>const wxString&amp; </B><I>title</I>)<P>
2383Sets the window's title. Applicable only to frames and dialogs.<P>
2384<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2385<I>title</I><UL><UL>
2386The window's title.</UL></UL>
2387<P>
2388<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2389<A HREF="wx260.htm#wxwindowgettitle">wxWindow::GetTitle</A><P>
2390
2391<HR>
2392<A NAME="topic1041"></A>
2393<H3>wxWindow::Show</H3>
2394<P>
2395<B>virtual bool</B> <B>Show</B>(<B>const bool</B><I> show</I>)<P>
2396Shows or hides the window.<P>
2397<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2398<I>show</I><UL><UL>
2399If TRUE, displays the window and brings it to the front. Otherwise,
2400hides the window.</UL></UL>
2401<P>
2402<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2403<A HREF="wx260.htm#wxwindowisshown">wxWindow::IsShown</A><P>
2404
2405<HR>
2406<A NAME="wxwindowtransferdatafromwindow"></A>
2407<H3>wxWindow::TransferDataFromWindow</H3>
2408<P>
2409<B>virtual bool</B> <B>TransferDataFromWindow</B>()<P>
2410Transfers values from child controls to data areas specified by their validators. Returns
2411FALSE if a transfer failed.<P>
2412<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2413<A HREF="wx260.htm#wxwindowtransferdatatowindow">wxWindow::TransferDataToWindow</A>,
2414<A HREF="wx255.htm#wxvalidator">wxValidator</A>, <A HREF="wx260.htm#wxwindowvalidate">wxWindow::Validate</A><P>
2415
2416<HR>
2417<A NAME="wxwindowtransferdatatowindow"></A>
2418<H3>wxWindow::TransferDataToWindow</H3>
2419<P>
2420<B>virtual bool</B> <B>TransferDataToWindow</B>()<P>
2421Transfers values to child controls from data areas specified by their validators.<P>
2422<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
2423Returns FALSE if a transfer failed.<P>
2424<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2425<A HREF="wx260.htm#wxwindowtransferdatafromwindow">wxWindow::TransferDataFromWindow</A>,
2426<A HREF="wx255.htm#wxvalidator">wxValidator</A>, <A HREF="wx260.htm#wxwindowvalidate">wxWindow::Validate</A><P>
2427
2428<HR>
2429<A NAME="wxwindowvalidate"></A>
2430<H3>wxWindow::Validate</H3>
2431<P>
2432<B>virtual bool</B> <B>Validate</B>()<P>
2433Validates the current values of the child controls using their validators.<P>
2434<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
2435Returns FALSE if any of the validations failed.<P>
2436<B><FONT COLOR="#FF0000">See also</FONT></B><P>
2437<A HREF="wx260.htm#wxwindowtransferdatafromwindow">wxWindow::TransferDataFromWindow</A>,
2438<A HREF="wx260.htm#wxwindowtransferdatafromwindow">wxWindow::TransferDataFromWindow</A>,
2439<A HREF="wx255.htm#wxvalidator">wxValidator</A><P>
2440
2441<HR>
2442<A NAME="wxwindowwarppointer"></A>
2443<H3>wxWindow::WarpPointer</H3>
2444<P>
2445<B>void</B> <B>WarpPointer</B>(<B>int</B><I> x</I>, <B>int</B><I> y</I>)<P>
2446Moves the pointer to the given position on the window.<P>
2447<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
2448<I>x</I><UL><UL>
2449The new x position for the cursor.</UL></UL>
2450<P>
2451<I>y</I><UL><UL>
2452The new y position for the cursor.</UL></UL>
2453<P>
2454
2455</BODY></HTML>