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