]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/window.tex
wxImageList ctor now takes the same arguments as the MSW version (but it's
[wxWidgets.git] / docs / latex / wx / window.tex
1 \section{\class{wxWindow}}\label{wxwindow}
2
3 wxWindow is the base class for all windows. Any
4 children of the window will be deleted automatically by the destructor
5 before the window itself is deleted.
6
7 \wxheading{Derived from}
8
9 \helpref{wxEvtHandler}{wxevthandler}\\
10 \helpref{wxObject}{wxobject}
11
12 \wxheading{Window styles}
13
14 The following styles can apply to all windows, although they will not always make sense for a particular
15 window class.
16
17 \twocolwidtha{5cm}%
18 \begin{twocollist}\itemsep=0pt
19 \twocolitem{\windowstyle{wxSIMPLE\_BORDER}}{Displays a thin border around the window. wxBORDER is the old name
20 for this style.}
21 \twocolitem{\windowstyle{wxDOUBLE\_BORDER}}{Displays a double border. Windows only.}
22 \twocolitem{\windowstyle{wxSUNKEN\_BORDER}}{Displays a sunken border.}
23 \twocolitem{\windowstyle{wxRAISED\_BORDER}}{Displays a sunken border.}
24 \twocolitem{\windowstyle{wxSTATIC\_BORDER}}{Displays a border suitable for a static control.}
25 \twocolitem{\windowstyle{wxTRANSPARENT\_WINDOW}}{The window is transparent, that is, it will not receive paint
26 events. Windows only.}
27 \twocolitem{\windowstyle{wxNO\_3D}}{Prevents the children of this window taking on 3D styles, even though
28 the application-wide policy is for 3D controls. Windows only.}
29 \twocolitem{\windowstyle{wxTAB\_TRAVERSAL}}{Use this to enable tab traversal for non-dialog windows.}
30 \twocolitem{\windowstyle{wxVSCROLL}}{Use this style to enable a vertical scrollbar.}
31 \twocolitem{\windowstyle{wxHSCROLL}}{Use this style to enable a horizontal scrollbar.}
32 \end{twocollist}
33
34 See also \helpref{window styles overview}{windowstyles}.
35
36 \wxheading{See also}
37
38 \helpref{Event handling overview}{eventhandlingoverview}
39
40 \latexignore{\rtfignore{\wxheading{Members}}}
41
42 \membersection{wxWindow::wxWindow}
43
44 \func{}{wxWindow}{\void}
45
46 Default constructor.
47
48 \func{}{wxWindow}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},
49 \param{const wxPoint\& }{pos = wxDefaultPosition},
50 \param{const wxSize\& }{size = wxDefaultSize},
51 \param{long }{style = 0},
52 \param{const wxString\& }{name = wxPanelNameStr}}
53
54 Constructs a window, which can be a child of a frame, dialog or any other non-control window.
55
56 \wxheading{Parameters}
57
58 \docparam{parent}{Pointer to a parent window.}
59
60 \docparam{id}{Window identifier. If -1, will automatically create an identifier.}
61
62 \docparam{pos}{Window position. wxDefaultPosition is (-1, -1) which indicates that wxWindows
63 should generate a default position for the window. If using the wxWindow class directly, supply
64 an actual position.}
65
66 \docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxWindows
67 should generate a default size for the window.}
68
69 \docparam{style}{Window style. For generic window styles, please see \helpref{wxWindow}{wxwindow}.}
70
71 \docparam{name}{Window name.}
72
73 \membersection{wxWindow::\destruct{wxWindow}}
74
75 \func{}{\destruct{wxWindow}}{\void}
76
77 Destructor. Deletes all subwindows, then deletes itself. Instead of using
78 the {\bf delete} operator explicitly, you should normally
79 use \helpref{wxWindow::Destroy}{wxwindowdestroy} so that wxWindows
80 can delete a window only when it is safe to do so, in idle time.
81
82 \wxheading{See also}
83
84 \helpref{Window deletion overview}{windowdeletionoverview},\rtfsp
85 \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
86 \helpref{wxWindow::Destroy}{wxwindowdestroy},\rtfsp
87 \helpref{wxCloseEvent}{wxcloseevent}
88
89 \membersection{wxWindow::AddChild}
90
91 \func{virtual void}{AddChild}{\param{wxWindow* }{child}}
92
93 Adds a child window. This is called automatically by window creation
94 functions so should not be required by the application programmer.
95
96 \wxheading{Parameters}
97
98 \docparam{child}{Child window to add.}
99
100 \membersection{wxWindow::CaptureMouse}\label{wxwindowcapturemouse}
101
102 \func{virtual void}{CaptureMouse}{\void}
103
104 Directs all mouse input to this window. Call \helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse} to
105 release the capture.
106
107 \wxheading{See also}
108
109 \helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse}
110
111 \membersection{wxWindow::Center}\label{wxwindowcenter}
112
113 \func{void}{Center}{\param{int}{ direction}}
114
115 A synonym for \helpref{Centre}{wxwindowcentre}.
116
117 \membersection{wxWindow::Centre}\label{wxwindowcentre}
118
119 \func{virtual void}{Centre}{\param{int}{ direction = wxHORIZONTAL}}
120
121 Centres the window.
122
123 \wxheading{Parameters}
124
125 \docparam{direction}{Specifies the direction for the centering. May be {\tt wxHORIZONTAL}, {\tt wxVERTICAL}\rtfsp
126 or {\tt wxBOTH}.}
127
128 \wxheading{Remarks}
129
130 The actual behaviour depends on the derived window. For a frame or dialog box,
131 centring is relative to the whole display. For a panel item, centring is
132 relative to the panel.
133
134 \wxheading{See also}
135
136 \helpref{wxWindow::Center}{wxwindowcenter}
137
138 \membersection{wxWindow::Clear}\label{wxwindowclear}
139
140 \func{void}{Clear}{\void}
141
142 Clears the window by filling it with the current background colour.
143
144 \membersection{wxWindow::ClientToScreen}
145
146 \constfunc{virtual void}{ClientToScreen}{\param{int* }{x}, \param{int* }{y}}
147
148 Converts to screen coordinates from coordinates relative to this window.
149
150 \docparam{x}{A pointer to a integer value for the x coordinate. Pass the client coordinate in, and
151 a screen coordinate will be passed out.}
152
153 \docparam{y}{A pointer to a integer value for the y coordinate. Pass the client coordinate in, and
154 a screen coordinate will be passed out.}
155
156 \membersection{wxWindow::Close}\label{wxwindowclose}
157
158 \func{virtual bool}{Close}{\param{const bool}{ force = FALSE}}
159
160 The purpose of this call is to provide a safer way of destroying a window than using
161 the {\it delete} operator.
162
163 \wxheading{Parameters}
164
165 \docparam{force}{FALSE if the window's close handler should be able to veto the destruction
166 of this window, TRUE if it cannot.}
167
168 \wxheading{Remarks}
169
170 Close calls the \helpref{close handler}{wxcloseevent} for the window, providing an opportunity for the window to
171 choose whether to destroy the window.
172
173 The close handler should check whether the window is being deleted forcibly,
174 using \helpref{wxCloseEvent::GetForce}{wxcloseeventgetforce}, in which case it should
175 destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.
176
177 Applies to managed windows (wxFrame and wxDialog classes) only.
178
179 \wxheading{See also}
180
181 \helpref{Window deletion overview}{windowdeletionoverview},\rtfsp
182 \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
183 \helpref{wxWindow::Destroy}{wxwindowdestroy},\rtfsp
184 \helpref{wxCloseEvent}{wxcloseevent}
185
186 \membersection{wxWindow::Destroy}\label{wxwindowdestroy}
187
188 \func{virtual bool}{Destroy}{\void}
189
190 Destroys the window safely. Use this function instead of the delete operator, since
191 different window classes can be destroyed differently. Frames and dialogs
192 are not destroyed immediately when this function is called - they are added
193 to a list of windows to be deleted on idle time, when all the window's events
194 have been processed. This prevents problems with events being sent to non-existant
195 windows.
196
197 \wxheading{Return value}
198
199 TRUE if the window has either been successfully deleted, or it has been added
200 to the list of windows pending real deletion.
201
202 \membersection{wxWindow::DestroyChildren}
203
204 \func{virtual void}{DestroyChildren}{\void}
205
206 Destroys all children of a window. Called automatically by the destructor.
207
208 \membersection{wxWindow::DragAcceptFiles}\label{wxwindowdragacceptfiles}
209
210 \func{virtual void}{DragAcceptFiles}{\param{const bool}{ accept}}
211
212 Enables or disables elibility for drop file events (OnDropFiles).
213
214 \wxheading{Parameters}
215
216 \docparam{accept}{If TRUE, the window is eligible for drop file events. If FALSE, the window
217 will not accept drop file events.}
218
219 \wxheading{Remarks}
220
221 Windows only.
222
223 \wxheading{See also}
224
225 \helpref{wxWindow::OnDropFiles}{wxwindowondropfiles}
226
227 \membersection{wxWindow::Enable}\label{wxwindowenable}
228
229 \func{virtual void}{Enable}{\param{const bool}{ enable}}
230
231 Enable or disable the window for user input.
232
233 \wxheading{Parameters}
234
235 \docparam{enable}{If TRUE, enables the window for input. If FALSE, disables the window.}
236
237 \wxheading{See also}
238
239 \helpref{wxWindow::IsEnabled}{wxwindowisenabled}
240
241 \membersection{wxWindow::FakePopupMenu}\label{wxwindowfakepopupmenu}
242
243 \func{virtual bool}{FakePopupMenu}{\param{wxMenu* }{menu}, \param{int }{x}, \param{int }{y}}
244
245 A replacement for wxWindow::PopupMenu for cases where the PopupMenu implementation
246 does not work correctly, in particular on Motif platforms.
247
248 \wxheading{Parameters}
249
250 \docparam{menu}{Menu to pop up.}
251
252 \docparam{x}{Required x position for the menu to appear.}
253
254 \docparam{y}{Required y position for the menu to appear.}
255
256 \wxheading{Remarks}
257
258 This is a cut-down version of PopupMenu using a dialog and listbox; pull-right menus
259 are not supported.
260
261 \wxheading{See also}
262
263 \helpref{wxMenu}{wxmenu}, \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu}
264
265 \membersection{wxWindow::FindFocus}\label{wxwindowfindfocus}
266
267 \func{static wxWindow*}{FindFocus}{\void}
268
269 Finds the window or control which currently has the keyboard focus.
270
271 \wxheading{Remarks}
272
273 Note that this is a static function, so it can be called without needing a wxWindow pointer.
274
275 \wxheading{See also}
276
277 \helpref{wxWindow::SetFocus}{wxwindowsetfocus}
278
279 \membersection{wxWindow::Fit}\label{wxwindowfit}
280
281 \func{virtual void}{Fit}{\void}
282
283 Sizes the window so that it fits around its subwindows.
284
285 \membersection{wxWindow::GetBackgroundColour}\label{wxwindowgetbackgroundcolour}
286
287 \constfunc{virtual wxColour}{GetBackgroundColour}{\void}
288
289 Returns the background colour of the window.
290
291 \wxheading{See also}
292
293 \helpref{wxWindow::SetBackgroundColour}{wxwindowsetbackgroundcolour},\rtfsp
294 \helpref{wxWindow::SetForegroundColour}{wxwindowsetforegroundcolour},\rtfsp
295 \helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour},\rtfsp
296 \helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground}
297
298 \membersection{wxWindow::GetCharHeight}
299
300 \constfunc{virtual int}{GetCharHeight}{\void}
301
302 Returns the character height for this window.
303
304 \membersection{wxWindow::GetCharWidth}
305
306 \constfunc{virtual int}{GetCharWidth}{\void}
307
308 Returns the average character width for this window.
309
310 \membersection{wxWindow::GetChildren}
311
312 \func{wxList*}{GetChildren}{\void}
313
314 Returns a pointer to the list of the window's children.
315
316 \membersection{wxWindow::GetClientSize}\label{wxwindowgetclientsize}
317
318 \constfunc{virtual void}{GetClientSize}{\param{int* }{width}, \param{int* }{height}}
319
320 This gets the size of the window `client area' in pixels. The client area is the
321 area which may be drawn on by the programmer, excluding title bar, border etc.
322
323 \wxheading{Parameters}
324
325 \docparam{width}{Receives the client width in pixels.}
326
327 \docparam{height}{Receives the client height in pixels.}
328
329 \membersection{wxWindow::GetConstraints}\label{wxwindowgetconstraints}
330
331 \constfunc{wxLayoutConstraints*}{GetConstraints}{\void}
332
333 Returns a pointer to the window's layout constraints, or NULL if there are none.
334
335 \membersection{wxWindow::GetDefaultItem}\label{wxwindowgetdefaultitem}
336
337 \constfunc{wxButton*}{GetDefaultItem}{\void}
338
339 Returns a pointer to the button which is the default for this window, or NULL.
340
341 \membersection{wxWindow::GetEventHandler}\label{wxwindowgeteventhandler}
342
343 \constfunc{wxEvtHandler*}{GetEventHandler}{\void}
344
345 Returns the event handler for this window. By default, the window is its
346 own event handler.
347
348 \wxheading{See also}
349
350 \helpref{wxWindow::SetEventHandler}{wxwindowseteventhandler},\rtfsp
351 \helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
352 \helpref{wxWindow::PopEventHandler}{wxwindowpusheventhandler},\rtfsp
353 \helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp
354 \helpref{wxEvtHandler}{wxevthandler}\rtfsp
355
356 \membersection{wxWindow::GetFont}\label{wxwindowgetfont}
357
358 \constfunc{wxFont*}{GetFont}{\void}
359
360 Returns a pointer to the font for this window.
361
362 \wxheading{See also}
363
364 \helpref{wxWindow::SetFont}{wxwindowsetfont}
365
366 \membersection{wxWindow::GetForegroundColour}\label{wxwindowgetforegroundcolour}
367
368 \func{virtual wxColour}{GetForegroundColour}{\void}
369
370 Returns the foreground colour of the window.
371
372 \wxheading{Remarks}
373
374 The interpretation of foreground colour is open to interpretation according
375 to the window class; it may be the text colour or other colour, or it may not
376 be used at all.
377
378 \wxheading{See also}
379
380 \helpref{wxWindow::SetForegroundColour}{wxwindowsetforegroundcolour},\rtfsp
381 \helpref{wxWindow::SetBackgroundColour}{wxwindowsetbackgroundcolour},\rtfsp
382 \helpref{wxWindow::GetBackgroundColour}{wxwindowgetbackgroundcolour}
383
384 \membersection{wxWindow::GetGrandParent}
385
386 \constfunc{wxWindow*}{GetGrandParent}{\void}
387
388 Returns the grandparent of a window, or NULL if there isn't one.
389
390 \membersection{wxWindow::GetHandle}
391
392 \constfunc{void*}{GetHandle}{\void}
393
394 Returns the platform-specific handle of the physical window. Cast it to an appropriate
395 handle, such as {\bf HWND} for Windows or {\bf Widget} for Motif.
396
397 \membersection{wxWindow::GetId}\label{wxwindowgetid}
398
399 \constfunc{int}{GetId}{\void}
400
401 Returns the identifier of the window.
402
403 \wxheading{Remarks}
404
405 Each window has an integer identifier. If the application has not provided one,
406 an identifier will be generated.
407
408 TODO: perhaps there should be a default identifier for each class, rather
409 choosing one, which could clash with other ones.
410
411 \wxheading{See also}
412
413 \helpref{wxWindow::SetId}{wxwindowsetid}
414
415 \membersection{wxWindow::GetPosition}
416
417 \constfunc{virtual void}{GetPosition}{\param{int* }{x}, \param{int* }{y}}
418
419 This gets the position of the window in pixels, relative to the parent window or
420 if no parent, relative to the whole display.
421
422 \wxheading{Parameters}
423
424 \docparam{x}{Receives the x position of the window.}
425
426 \docparam{y}{Receives the y position of the window.}
427
428 \membersection{wxWindow::GetLabel}
429
430 \constfunc{virtual wxString\& }{GetLabel}{\void}
431
432 Generic way of getting a label from any window, for
433 identification purposes.
434
435 \wxheading{Remarks}
436
437 The interpretation of this function differs from class to class.
438 For frames and dialogs, the value returned is the title. For buttons or static text controls, it is
439 the button text. This function can be useful for meta-programs (such as testing
440 tools or special-needs access programs) which need to identify windows
441 by name.
442
443 \membersection{wxWindow::GetName}\label{wxwindowgetname}
444
445 \constfunc{virtual wxString\& }{GetName}{\void}
446
447 Returns the window's name.
448
449 \wxheading{Remarks}
450
451 This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate
452 name in the window constructor or via \helpref{wxWindow::SetName}{wxwindowsetname}.
453
454 \wxheading{See also}
455
456 \helpref{wxWindow::SetName}{wxwindowsetname}
457
458 \membersection{wxWindow::GetParent}
459
460 \constfunc{virtual wxWindow*}{GetParent}{\void}
461
462 Returns the parent of the window, or NULL if there is no parent.
463
464 \membersection{wxWindow::GetReturnCode}\label{wxwindowgetreturncode}
465
466 \func{int}{GetReturnCode}{\void}
467
468 Gets the return code for this window.
469
470 \wxheading{Remarks}
471
472 A return code is normally associated with a modal dialog, where \helpref{wxDialog::ShowModal}{wxdialogshowmodal} returns
473 a code to the application.
474
475 \wxheading{See also}
476
477 \helpref{wxWindow::SetReturnCode}{wxwindowsetreturncode}, \helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp
478 \helpref{wxDialog::EndModal}{wxdialogendmodal}
479
480 \membersection{wxWindow::GetScrollThumb}\label{wxwindowgetscrollthumb}
481
482 \func{virtual int}{GetScrollThumb}{\param{int }{orientation}}
483
484 Returns the built-in scrollbar thumb size.
485
486 \wxheading{See also}
487
488 \helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar}
489
490 \membersection{wxWindow::GetScrollPos}\label{wxwindowgetscrollpos}
491
492 \func{virtual int}{GetScrollPos}{\param{int }{orientation}}
493
494 Returns the built-in scrollbar position.
495
496 \wxheading{See also}
497
498 See \helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar}
499
500 \membersection{wxWindow::GetScrollRange}\label{wxwindowgetscrollrange}
501
502 \func{virtual int}{GetScrollRange}{\param{int }{orientation}}
503
504 Returns the built-in scrollbar range.
505
506 \wxheading{See also}
507
508 \helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar}
509
510 \membersection{wxWindow::GetSize}
511
512 \constfunc{virtual void}{GetSize}{\param{int* }{width}, \param{int* }{height}}
513
514 This gets the size of the entire window in pixels.
515
516 \wxheading{Parameters}
517
518 \docparam{width}{Receives the window width.}
519
520 \docparam{height}{Receives the window height.}
521
522 \membersection{wxWindow::GetTextExtent}
523
524 \constfunc{virtual void}{GetTextExtent}{\param{const wxString\& }{string}, \param{int* }{x}, \param{int* }{y},
525 \param{int* }{descent = NULL}, \param{int* }{externalLeading = NULL},
526 \param{const wxFont* }{font = NULL}, \param{const bool}{ use16 = FALSE}}
527
528 Gets the dimensions of the string as it would be drawn on the
529 window with the currently selected font.
530
531 \wxheading{Parameters}
532
533 \docparam{string}{String whose extent is to be measured.}
534
535 \docparam{x}{Return value for width.}
536
537 \docparam{y}{Return value for height.}
538
539 \docparam{descent}{Return value for descent (optional).}
540
541 \docparam{externalLeading}{Return value for external leading (optional).}
542
543 \docparam{font}{Font to use instead of the current window font (optional).}
544
545 \docparam{use16}{If TRUE, {\it string} contains 16-bit characters. The default is FALSE.}
546
547 \membersection{wxWindow::GetTitle}\label{wxwindowgettitle}
548
549 \func{virtual wxString}{GetTitle}{\void}
550
551 Gets the window's title. Applicable only to frames and dialogs.
552
553 \wxheading{See also}
554
555 \helpref{wxWindow::SetTitle}{wxwindowsettitle}
556
557 \membersection{wxWindow::GetWindowStyleFlag}
558
559 \constfunc{long}{GetWindowStyleFlag}{\void}
560
561 Gets the window style that was passed to the consructor or {\bf Create} member.
562
563 \membersection{wxWindow::InitDialog}\label{wxwindowinitdialog}
564
565 \func{void}{InitDialog}{\void}
566
567 Sends an \helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog} event, which
568 in turn transfers data to the dialog via validators.
569
570 \wxheading{See also}
571
572 \helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog}
573
574 \membersection{wxWindow::IsEnabled}\label{wxwindowisenabled}
575
576 \constfunc{virtual bool}{IsEnabled}{\void}
577
578 Returns TRUE if the window is enabled for input, FALSE otherwise.
579
580 \wxheading{See also}
581
582 \helpref{wxWindow::Enable}{wxwindowenable}
583
584 \membersection{wxWindow::IsRetained}\label{wxwindowisretained}
585
586 \constfunc{virtual bool}{IsRetained}{\void}
587
588 Returns TRUE if the window is retained, FALSE otherwise.
589
590 \wxheading{Remarks}
591
592 Retained windows are only available on X platforms.
593
594 \membersection{wxWindow::IsShown}\label{wxwindowisshown}
595
596 \constfunc{virtual bool}{IsShown}{\void}
597
598 Returns TRUE if the window is shown, FALSE if it has been hidden.
599
600 \membersection{wxWindow::Layout}\label{wxwindowlayout}
601
602 \func{void}{Layout}{\void}
603
604 Invokes the constraint-based layout algorithm for this window. It is called
605 automatically by the default {\bf wxWindow::OnSize} member.
606
607 \membersection{wxWindow::LoadFromResource}\label{wxwindowloadfromresource}
608
609 \func{virtual bool}{LoadFromResource}{\param{wxWindow* }{parent},\rtfsp
610 \param{const wxString\& }{resourceName}, \param{const wxResourceTable* }{resourceTable = NULL}}
611
612 Loads a panel or dialog from a resource file.
613
614 \wxheading{Parameters}
615
616 \docparam{parent}{Parent window.}
617
618 \docparam{resourceName}{The name of the resource to load.}
619
620 \docparam{resourceTable}{The resource table to load it from. If this is NULL, the
621 default resource table will be used.}
622
623 \wxheading{Return value}
624
625 TRUE if the operation succeeded, otherwise FALSE.
626
627 \wxheading{Remarks}
628
629 TODO
630
631 \wxheading{See also}
632
633 TODO
634
635 \membersection{wxWindow::Lower}\label{wxwindowlower}
636
637 \func{void}{Lower}{\void}
638
639 Lowers the window to the bottom of the window hierarchy if it is a managed window (dialog
640 or frame).
641
642 \membersection{wxWindow::MakeModal}\label{wxwindowmakemodal}
643
644 \func{virtual void}{MakeModal}{\param{const bool }{flag}}
645
646 Disables all other windows in the application so that
647 the user can only interact with this window.
648
649 \wxheading{Parameters}
650
651 \docparam{flag}{If TRUE, this call disables all other windows in the application so that
652 the user can only interact with this window. If FALSE, the effect is reversed.}
653
654 \membersection{wxWindow::Move}\label{wxwindowmove}
655
656 \func{void}{Move}{\param{int}{ x}, \param{int}{ y}}
657
658 Moves the window to the given position.
659
660 \wxheading{Parameters}
661
662 \docparam{x}{Required x position.}
663
664 \docparam{y}{Required y position.}
665
666 \wxheading{Remarks}
667
668 Implementations of SetSize can also implicitly implement the
669 wxWindow::Move function, which is defined in the base wxWindow class
670 as the call:
671
672 \begin{verbatim}
673 SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING);
674 \end{verbatim}
675
676 \wxheading{See also}
677
678 \helpref{wxWindow::SetSize}{wxwindowsetsize}
679
680 \membersection{wxWindow::OnActivate}\label{wxwindowonactivate}
681
682 \func{void}{OnActivate}{\param{wxActivateEvent\&}{ event}}
683
684 Called when a window is activated or deactivated.
685
686 \wxheading{Parameters}
687
688 \docparam{event}{Object containing activation information.}
689
690 \wxheading{Remarks}
691
692 If the window is being activated, \helpref{wxActivateEvent::GetActive}{wxactivateeventgetactive} returns TRUE,
693 otherwise it returns FALSE (it is being deactivated).
694
695 \wxheading{See also}
696
697 \helpref{wxActivateEvent}{wxactivateevent},\rtfsp
698 \helpref{Event handling overview}{eventhandlingoverview}
699
700 \membersection{wxWindow::OnChar}\label{wxwindowonchar}
701
702 \func{void}{OnChar}{\param{wxKeyEvent\&}{ event}}
703
704 Called when the user has pressed a key.
705
706 \wxheading{Parameters}
707
708 \docparam{event}{Object containing keypress information. See \helpref{wxKeyEvent}{wxkeyevent} for
709 details about this class.}
710
711 \wxheading{Remarks}
712
713 This member function is called in response to a keypress. To intercept this event,
714 use the EVT\_CHAR macro in an event table definition. Your {\bf OnChar} handler may call this
715 default function to achieve default keypress functionality.
716
717 Note that the ASCII values do not have explicit key codes: they are passed as ASCII
718 values.
719
720 Most, but not all, windows allow keypresses to be intercepted.
721
722 \wxheading{See also}
723
724 \helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnCharHook}{wxwindowoncharhook},\rtfsp
725 \helpref{Event handling overview}{eventhandlingoverview}
726
727 \membersection{wxWindow::OnCharHook}\label{wxwindowoncharhook}
728
729 \func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}}
730
731 This member is called to allow the window to intercept keyboard events
732 before they are processed by child windows.
733
734 \wxheading{Parameters}
735
736 \docparam{event}{Object containing keypress information. See \helpref{wxKeyEvent}{wxkeyevent} for
737 details about this class.}
738
739 \wxheading{Remarks}
740
741 This member function is called in response to a keypress, if the window is active. To intercept this event,
742 use the EVT\_CHAR\_HOOK macro in an event table definition. If you do not process a particular
743 keypress, call \helpref{wxEvent::Skip}{wxeventskip} to allow default processing.
744
745 An example of using this function is in the implementation of escape-character processing for wxDialog,
746 where pressing ESC dismisses the dialog by {\bf OnCharHook} 'forging' a cancel button press event.
747
748 Note that the ASCII values do not have explicit key codes: they are passed as ASCII
749 values.
750
751 This function is only relevant to top-level windows (frames and dialogs), and under
752 Windows only.
753
754 \wxheading{See also}
755
756 \helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnCharHook}{wxwindowoncharhook},\rtfsp
757 \helpref{wxApp::OnCharHook}{wxapponcharhook},\rtfsp
758 \helpref{Event handling overview}{eventhandlingoverview}
759
760 \membersection{wxWindow::OnCommand}\label{wxwindowoncommand}
761
762 \func{virtual void}{OnCommand}{\param{wxEvtHandler\& }{object}, \param{wxCommandEvent\& }{event}}
763
764 This virtual member function is called if the control does not handle the command event.
765
766 \wxheading{Parameters}
767
768 \docparam{object}{Object receiving the command event.}
769
770 \docparam{event}{Command event}
771
772 \wxheading{Remarks}
773
774 This virtual function is provided mainly for backward compatibility. You can also intercept commands
775 from child controls by using an event table, with identifiers or identifier ranges to identify
776 the control(s) in question.
777
778 \wxheading{See also}
779
780 \helpref{wxCommandEvent}{wxcommandevent},\rtfsp
781 \helpref{Event handling overview}{eventhandlingoverview}
782
783 \membersection{wxWindow::OnClose}\label{wxwindowonclose}
784
785 \func{virtual bool}{OnClose}{\void}
786
787 Called when the user has tried to close a a frame
788 or dialog box using the window manager (X) or system menu (Windows).
789
790 {\bf Note:} This is an obsolete function retained for backward compatibility.
791 It is superceded by the \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow} event
792 handler.
793
794 \wxheading{Return value}
795
796 If TRUE is returned by OnClose, the window will be deleted by the system, otherwise the
797 attempt will be ignored. Do not delete the window from within this handler, although
798 you may delete other windows.
799
800 \wxheading{Remarks}
801
802 Derive your own class to handle this message. The default handler returns FALSE.
803
804 \wxheading{See also}
805
806 \helpref{Window deletion overview}{windowdeletionoverview},\rtfsp
807 \helpref{wxWindow::Close}{wxwindowclose},\rtfsp
808 \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
809 \helpref{wxCloseEvent}{wxcloseevent}
810
811 \membersection{wxWindow::OnCloseWindow}\label{wxwindowonclosewindow}
812
813 \func{void}{OnCloseWindow}{\param{wxCloseEvent\& }{event}}
814
815 This is an event handler function called when the user has tried to close a a frame
816 or dialog box using the window manager (X) or system menu (Windows). It is
817 called via the \helpref{wxWindow::Close}{wxwindowclose} function, so
818 that the application can also invoke the handler programmatically.
819
820 Use the EVT\_CLOSE event table macro to handle close events.
821
822 You should check whether the application is forcing the deletion of the window
823 using \helpref{wxCloseEvent::GetForce}{wxcloseeventgetforce}. If this is TRUE,
824 destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.
825 If not, it is up to you whether you respond by destroying the window.
826
827 \wxheading{Remarks}
828
829 The \helpref{wxWindow::OnClose}{wxwindowonclose} virtual function remains
830 for backward compatibility with earlier versions of wxWindows. The
831 default {\bf OnCloseWindow} handler for wxFrame and wxDialog will call {\bf OnClose},
832 destroying the window if it returns TRUE or if the close is being forced.
833
834 \wxheading{See also}
835
836 \helpref{Window deletion overview}{windowdeletionoverview},\rtfsp
837 \helpref{wxWindow::Close}{wxwindowclose},\rtfsp
838 \helpref{wxWindow::OnClose}{wxwindowonclose},\rtfsp
839 \helpref{wxWindow::Destroy}{wxwindowdestroy},\rtfsp
840 \helpref{wxCloseEvent}{wxcloseevent}
841
842 \membersection{wxWindow::OnDefaultAction}\label{wxwindowondefaultaction}
843
844 \func{virtual void}{OnDefaultAction}{\param{wxControl* }{control}}
845
846 Called when the user initiates the default action for a panel or
847 dialog box, for example by double clicking on a listbox.
848
849 \wxheading{Parameters}
850
851 \docparam{control}{The control which caused the default action.}
852
853 \wxheading{Remarks}
854
855 TODO: eliminate this?? Or keep it for backward compatibility?
856
857 \membersection{wxWindow::OnDropFiles}\label{wxwindowondropfiles}
858
859 \func{void}{OnDropFiles}{\param{wxDropFilesEvent\&}{ event}}
860
861 Called when files have been dragged from the file manager to the window.
862
863 \wxheading{Parameters}
864
865 \docparam{event}{Drop files event. For more information, see \helpref{wxDropFilesEvent}{wxdropfilesevent}.}
866
867 \wxheading{Remarks}
868
869 The window must have previously been enabled for dropping by calling
870 \rtfsp\helpref{wxWindow::DragAcceptFiles}{wxwindowdragacceptfiles}.
871
872 This event is only generated under Windows.
873
874 To intercept this event, use the EVT\_DROP\_FILES macro in an event table definition.
875
876 \wxheading{See also}
877
878 \helpref{wxDropFilesEvent}{wxdropfilesevent}, \helpref{wxWindow::DragAcceptFiles}{wxwindowdragacceptfiles},\rtfsp
879 \helpref{Event handling overview}{eventhandlingoverview}
880
881 \membersection{wxWindow::OnEraseBackground}\label{wxwindowonerasebackground}
882
883 \func{void}{OnEraseBackground}{\param{wxEraseEvent\&}{ event}}
884
885 Called when the background of the window needs to be erased.
886
887 \wxheading{Parameters}
888
889 \docparam{event}{Erase background event. For more information, see \helpref{wxEraseEvent}{wxeraseevent}.}
890
891 \wxheading{Remarks}
892
893 This event is only generated under Windows.
894
895 To intercept this event, use the EVT\_ERASE\_BACKGROUND macro in an event table definition.
896
897 \wxheading{See also}
898
899 \helpref{wxEraseEvent}{wxeraseevent}, \helpref{Event handling overview}{eventhandlingoverview}
900
901 \membersection{wxWindow::OnKillFocus}\label{wxwindowonkillfocus}
902
903 \func{void}{OnKillFocus}{\param{wxFocusEvent\& }{event}}
904
905 Called when a window's focus is being killed.
906
907 \wxheading{Parameters}
908
909 \docparam{event}{The focus event. For more information, see \helpref{wxFocusEvent}{wxfocusevent}.}
910
911 \wxheading{Remarks}
912
913 To intercept this event, use the macro EVT\_KILL\_FOCUS in an event table definition.
914
915 Most, but not all, windows respond to this event.
916
917 \wxheading{See also}
918
919 \helpref{wxFocusEvent}{wxfocusevent}, \helpref{wxWindow::OnSetFocus}{wxwindowonsetfocus},\rtfsp
920 \helpref{Event handling overview}{eventhandlingoverview}
921
922 \membersection{wxWindow::OnIdle}\label{wxwindowonidle}
923
924 \func{void}{Onidle}{\param{wxIdleEvent\& }{event}}
925
926 Provide this member function for any processing which needs to be done
927 when the application is idle.
928
929 \wxheading{See also}
930
931 \helpref{wxApp::OnIdle}{wxapponidle}, \helpref{wxIdleEvent}{wxidleevent}
932
933 \membersection{wxWindow::OnInitDialog}\label{wxwindowoninitdialog}
934
935 \func{void}{OnInitDialog}{\param{wxInitDialogEvent\&}{ event}}
936
937 Default handler for the wxEVT\_INIT\_DIALOG event. Calls \helpref{wxWindow::TransferDataToWindow}{wxwindowtransferdatatowindow}.
938
939 \wxheading{Parameters}
940
941 \docparam{event}{Dialog initialisation event.}
942
943 \wxheading{Remarks}
944
945 Gives the window the default behaviour of transferring data to child controls via
946 the validator that each control has.
947
948 \wxheading{See also}
949
950 \helpref{wxValidator}{wxvalidator}, \helpref{wxWindow::TransferDataToWindow}{wxwindowtransferdatatowindow}
951
952 \membersection{wxWindow::OnMenuCommand}\label{wxwindowonmenucommand}
953
954 \func{void}{OnMenuCommand}{\param{wxCommandEvent\& }{event}}
955
956 Called when a menu command is received from a menu bar.
957
958 \wxheading{Parameters}
959
960 \docparam{event}{The menu command event. For more information, see \helpref{wxCommandEvent}{wxcommandevent}.}
961
962 \wxheading{Remarks}
963
964 A function with this name doesn't actually exist; you can choose any member function to receive
965 menu command events, using the EVT\_COMMAND macro for individual commands or EVT\_COMMAND\_RANGE for
966 a range of commands.
967
968 \wxheading{See also}
969
970 \helpref{wxCommandEvent}{wxcommandevent},\rtfsp
971 \helpref{wxWindow::OnMenuHighlight}{wxwindowonmenuhighlight},\rtfsp
972 \helpref{Event handling overview}{eventhandlingoverview}
973
974 \membersection{wxWindow::OnMenuHighlight}\label{wxwindowonmenuhighlight}
975
976 \func{void}{OnMenuHighlight}{\param{wxMenuEvent\& }{event}}
977
978 Called when a menu select is received from a menu bar: that is, the
979 mouse cursor is over a menu item, but the left mouse button has not been
980 pressed.
981
982 \wxheading{Parameters}
983
984 \docparam{event}{The menu highlight event. For more information, see \helpref{wxMenuEvent}{wxmenuevent}.}
985
986 \wxheading{Remarks}
987
988 You can choose any member function to receive
989 menu select events, using the EVT\_MENU\_HIGHLIGHT macro for individual menu items or EVT\_MENU\_HIGHLIGHT\_ALL macro
990 for all menu items.
991
992 The default implementation for \helpref{wxFrame::OnMenuHighlight}{wxframeonmenuhighlight} displays help
993 text in the first field of the status bar.
994
995 This function was known as {\bf OnMenuSelect} in earlier versions of wxWindows, but this was confusing
996 since a selection is normally a left-click action.
997
998 \wxheading{See also}
999
1000 \helpref{wxMenuEvent}{wxmenuevent},\rtfsp
1001 \helpref{wxWindow::OnMenuCommand}{wxwindowonmenucommand},\rtfsp
1002 \helpref{Event handling overview}{eventhandlingoverview}
1003
1004
1005 \membersection{wxWindow::OnMouseEvent}\label{wxwindowonmouseevent}
1006
1007 \func{void}{OnMouseEvent}{\param{wxMouseEvent\&}{ event}}
1008
1009 Called when the user has initiated an event with the
1010 mouse.
1011
1012 \wxheading{Parameters}
1013
1014 \docparam{event}{The mouse event. See \helpref{wxMouseEvent}{wxmouseevent} for
1015 more details.}
1016
1017 \wxheading{Remarks}
1018
1019 Most, but not all, windows respond to this event.
1020
1021 To intercept this event, use the EVT\_MOUSE\_EVENTS macro in an event table definition, or individual
1022 mouse event macros such as EVT\_LEFT\_DOWN.
1023
1024 \wxheading{See also}
1025
1026 \helpref{wxMouseEvent}{wxmouseevent},\rtfsp
1027 \helpref{Event handling overview}{eventhandlingoverview}
1028
1029 \membersection{wxWindow::OnMove}\label{wxwindowonmove}
1030
1031 \func{void}{OnMove}{\param{wxMoveEvent\& }{event}}
1032
1033 Called when a window is moved.
1034
1035 \wxheading{Parameters}
1036
1037 \docparam{event}{The move event. For more information, see \helpref{wxMoveEvent}{wxmoveevent}.}
1038
1039 \wxheading{Remarks}
1040
1041 Use the EVT\_MOVE macro to intercept move events.
1042
1043 \wxheading{Remarks}
1044
1045 Not currently implemented.
1046
1047 \wxheading{See also}
1048
1049 \helpref{wxMoveEvent}{wxmoveevent},\rtfsp
1050 \helpref{wxFrame::OnSize}{wxframeonsize},\rtfsp
1051 \helpref{Event handling overview}{eventhandlingoverview}
1052
1053 \membersection{wxWindow::OnPaint}\label{wxwindowonpaint}
1054
1055 \func{void}{OnPaint}{\param{wxPaintEvent\& }{event}}
1056
1057 Sent to the event handler when the window must be refreshed.
1058
1059 \wxheading{Parameters}
1060
1061 \docparam{event}{Paint event. For more information, see \helpref{wxPaintEvent}{wxpaintevent}.}
1062
1063 \wxheading{Remarks}
1064
1065 Use the EVT\_PAINT macro in an event table definition to intercept paint events.
1066
1067 In a paint event handler, the application should always create a \helpref{wxPaintDC}{wxpaintdc} object.
1068
1069 For example:
1070
1071 \small{%
1072 \begin{verbatim}
1073 void MyWindow::OnPaint(wxPaintEvent& event)
1074 {
1075 wxPaintDC dc(this);
1076
1077 DrawMyDocument(dc);
1078 }
1079 \end{verbatim}
1080 }%
1081
1082 You can optimize painting by retrieving the rectangles
1083 that have been damaged and only repainting these. The rectangles are in
1084 terms of the client area, and are unscrolled, so you will need to do
1085 some calculations using the current view position to obtain logical,
1086 scrolled units.
1087
1088 Here is an example of using the \helpref{wxUpdateIterator}{wxupdateiterator} class:
1089
1090 {\small%
1091 \begin{verbatim}
1092 // Called when window needs to be repainted.
1093 void MyWindow::OnPaint(wxPaintEvent& event)
1094 {
1095 wxPaintDC dc(this);
1096
1097 // Find Out where the window is scrolled to
1098 int vbX,vbY; // Top left corner of client
1099 ViewStart(&vbX,&vbY);
1100
1101 int vX,vY,vW,vH; // Dimensions of client area in pixels
1102 wxUpdateIterator upd(this); // get the update rect list
1103
1104 while (upd)
1105 {
1106 vX = upd.GetX();
1107 vY = upd.GetY();
1108 vW = upd.GetW();
1109 vH = upd.GetH();
1110
1111 // Alternatively we can do this:
1112 // wxRect rect;
1113 // upd.GetRect(&rect);
1114
1115 // Repaint this rectangle
1116 ...some code...
1117
1118 upd ++ ;
1119 }
1120 }
1121 \end{verbatim}
1122 }%
1123
1124 \wxheading{See also}
1125
1126 \helpref{wxPaintEvent}{wxpaintevent},\rtfsp
1127 \helpref{wxPaintDC}{wxpaintdc},\rtfsp
1128 \helpref{Event handling overview}{eventhandlingoverview}
1129
1130 \membersection{wxWindow::OnScroll}\label{wxwindowonscroll}
1131
1132 \func{void}{OnScroll}{\param{wxScrollEvent\& }{event}}
1133
1134 Called when a scroll event is received from one of the window's built-in scrollbars.
1135
1136 \wxheading{Parameters}
1137
1138 \docparam{event}{Command event. Retrieve the new scroll position by
1139 calling \helpref{wxScrollEvent::GetPosition}{wxscrolleventgetposition}, and the
1140 scrollbar orientation by calling \helpref{wxScrollEvent::GetOrientation}{wxscrolleventgetorientation}.}
1141
1142 \wxheading{Remarks}
1143
1144 Note that it is not possible to distinguish between horizontal and vertical scrollbars
1145 until the function is executing (you can't have one function for vertical, another
1146 for horizontal events).
1147
1148 \wxheading{See also}
1149
1150 \helpref{wxScrollEvent}{wxscrollevent},\rtfsp
1151 \helpref{Event handling overview}{eventhandlingoverview}
1152
1153 \membersection{wxWindow::OnSetFocus}\label{wxwindowonsetfocus}
1154
1155 \func{void}{OnSetFocus}{\param{wxFocusEvent\& }{event}}
1156
1157 Called when a window's focus is being set.
1158
1159 \wxheading{Parameters}
1160
1161 \docparam{event}{The focus event. For more information, see \helpref{wxFocusEvent}{wxfocusevent}.}
1162
1163 \wxheading{Remarks}
1164
1165 To intercept this event, use the macro EVT\_SET\_FOCUS in an event table definition.
1166
1167 Most, but not all, windows respond to this event.
1168
1169 \wxheading{See also}
1170
1171 \helpref{wxFocusEvent}{wxfocusevent}, \helpref{wxWindow::OnKillFocus}{wxwindowonkillfocus},\rtfsp
1172 \helpref{Event handling overview}{eventhandlingoverview}
1173
1174 \membersection{wxWindow::OnSize}\label{wxwindowonsize}
1175
1176 \func{void}{OnSize}{\param{wxSizeEvent\& }{event}}
1177
1178 Called when the window has been resized.
1179
1180 \wxheading{Parameters}
1181
1182 \docparam{event}{Size event. For more information, see \helpref{wxSizeEvent}{wxsizeevent}.}
1183
1184 \wxheading{Remarks}
1185
1186 You may wish to use this for frames to resize their child windows as appropriate.
1187
1188 Note that the size passed is of
1189 the whole window: call \helpref{wxWindow::GetClientSize}{wxwindowgetclientsize} for the area which may be
1190 used by the application.
1191
1192 \wxheading{See also}
1193
1194 \helpref{wxSizeEvent}{wxsizeevent},\rtfsp
1195 \helpref{Event handling overview}{eventhandlingoverview}
1196
1197 \membersection{wxWindow::OnSysColourChanged}\label{wxwindowonsyscolourchanged}
1198
1199 \func{void}{OnSysColourChanged}{\param{wxOnSysColourChangedEvent\& }{event}}
1200
1201 Called when the user has changed the system colours.
1202
1203 \wxheading{Parameters}
1204
1205 \docparam{event}{System colour change event. For more information, see \helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}.}
1206
1207 \wxheading{See also}
1208
1209 \helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent},\rtfsp
1210 \helpref{Event handling overview}{eventhandlingoverview}
1211
1212 \membersection{wxWindow::PopEventHandler}\label{wxwindowpopeventhandler}
1213
1214 \constfunc{wxEvtHandler*}{PopEventHandler}{\param{bool }{deleteHandler = FALSE}}
1215
1216 Removes and returns the top-most event handler on the event handler stack.
1217
1218 \wxheading{Parameters}
1219
1220 \docparam{deleteHandler}{If this is TRUE, the handler will be deleted after it is removed. The
1221 default value is FALSE.}
1222
1223 \wxheading{See also}
1224
1225 \helpref{wxWindow::SetEventHandler}{wxwindowseteventhandler},\rtfsp
1226 \helpref{wxWindow::GetEventHandler}{wxwindowgeteventhandler},\rtfsp
1227 \helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
1228 \helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp
1229 \helpref{wxEvtHandler}{wxevthandler}\rtfsp
1230
1231 \membersection{wxWindow::PopupMenu}\label{wxwindowpopupmenu}
1232
1233 \func{virtual bool}{PopupMenu}{\param{wxMenu* }{menu}, \param{int }{x}, \param{int }{y}}
1234
1235 Pops up the given menu at the specified coordinates, relative to this
1236 window, and returns control when the user has dismissed the menu. If a
1237 menu item is selected, the callback defined for the menu is called with
1238 wxMenu and wxCommandEvent reference arguments. The callback should access
1239 the commandInt member of the event to check the selected menu identifier.
1240
1241 \wxheading{Parameters}
1242
1243 \docparam{menu}{Menu to pop up.}
1244
1245 \docparam{x}{Required x position for the menu to appear.}
1246
1247 \docparam{y}{Required y position for the menu to appear.}
1248
1249 \wxheading{See also}
1250
1251 \helpref{wxMenu}{wxmenu}, \helpref{wxWindow::FakePopupMenu}{wxwindowfakepopupmenu}
1252
1253 \membersection{wxWindow::PushEventHandler}\label{wxwindowpusheventhandler}
1254
1255 \func{void}{PushEventHandler}{\param{wxEvtHandler* }{handler}}
1256
1257 Pushes this event handler onto the event stack for the window.
1258
1259 \wxheading{Parameters}
1260
1261 \docparam{handler}{Specifies the handler to be pushed.}
1262
1263 \wxheading{Remarks}
1264
1265 An event handler is an object that is capable of processing the events
1266 sent to a window. By default, the window is its own event handler, but
1267 an application may wish to substitute another, for example to allow
1268 central implementation of event-handling for a variety of different
1269 window classes.
1270
1271 \helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler} allows
1272 an application to set up a chain of event handlers, where an event not handled by one event handler is
1273 handed to the next one in the chain. Use \helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler} to
1274 remove the event handler.
1275
1276 \wxheading{See also}
1277
1278 \helpref{wxWindow::SetEventHandler}{wxwindowseteventhandler},\rtfsp
1279 \helpref{wxWindow::GetEventHandler}{wxwindowgeteventhandler},\rtfsp
1280 \helpref{wxWindow::PopEventHandler}{wxwindowpusheventhandler},\rtfsp
1281 \helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp
1282 \helpref{wxEvtHandler}{wxevthandler}
1283
1284 \membersection{wxWindow::Raise}\label{wxwindowraise}
1285
1286 \func{void}{Raise}{\void}
1287
1288 Raises the window to the top of the window hierarchy if it is a managed window (dialog
1289 or frame).
1290
1291 \membersection{wxWindow::Refresh}\label{wxwindowrefresh}
1292
1293 \func{virtual void}{Refresh}{\param{const bool}{ eraseBackground = TRUE}, \param{const wxRect* }{rect
1294 = NULL}}
1295
1296 Causes a message or event to be generated to repaint the
1297 window.
1298
1299 \wxheading{Parameters}
1300
1301 \docparam{eraseBackground}{If TRUE, the background will be
1302 erased.}
1303
1304 \docparam{rect}{If non-NULL, only the given rectangle will
1305 be treated as damaged.}
1306
1307 \membersection{wxWindow::ReleaseMouse}\label{wxwindowreleasemouse}
1308
1309 \func{virtual void}{ReleaseMouse}{\void}
1310
1311 Releases mouse input captured with \helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse}.
1312
1313 \wxheading{See also}
1314
1315 \helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse}
1316
1317 \membersection{wxWindow::RemoveChild}\label{wxwindowremovechild}
1318
1319 \func{virtual void}{RemoveChild}{\param{wxWindow* }{child}}
1320
1321 Removes a child window. This is called automatically by window deletion
1322 functions so should not be required by the application programmer.
1323
1324 \wxheading{Parameters}
1325
1326 \docparam{child}{Child window to remove.}
1327
1328 \membersection{wxWindow::ScreenToClient}
1329
1330 \constfunc{virtual void}{ScreenToClient}{\param{int* }{x}, \param{int* }{y}}
1331
1332 Converts from screen to client window coordinates.
1333
1334 \wxheading{Parameters}
1335
1336 \docparam{x}{Stores the screen x coordinate and receives the client x coordinate.}
1337
1338 \docparam{y}{Stores the screen x coordinate and receives the client x coordinate.}
1339
1340 \membersection{wxWindow::ScrollWindow}\label{wxwindowscrollwindow}
1341
1342 \func{virtual void}{ScrollWindow}{\param{int }{dx}, \param{int }{dy}, \param{const wxRect*}{ rect = NULL}}
1343
1344 Physically scrolls the pixels in the window.
1345
1346 \wxheading{Parameters}
1347
1348 \docparam{dx}{Amount to scroll horizontally.}
1349
1350 \docparam{dy}{Amount to scroll vertically.}
1351
1352 \docparam{rect}{Rectangle to invalidate. If this is NULL, the whole window is invalidated. If you
1353 pass a rectangle corresponding to the area of the window exposed by the scroll, your painting handler
1354 can optimise painting by checking for the invalidated region.}
1355
1356 \wxheading{Remarks}
1357
1358 Available only under Windows.
1359
1360 Use this function to optimise your scrolling implementations, to minimise the area that must be
1361 redrawn.
1362
1363 \membersection{wxWindow::SetAutoLayout}\label{wxwindowsetautolayout}
1364
1365 \func{void}{SetAutoLayout}{\param{const bool}{ autoLayout}}
1366
1367 Determines whether the \helpref{wxWindow::Layout}{wxwindowlayout} function will
1368 be called automatically when the window is resized.
1369
1370 \wxheading{Parameters}
1371
1372 \docparam{autoLayout}{Set this to TRUE if you wish the Layout function to be called
1373 from within wxWindow::OnSize functions.}
1374
1375 \wxheading{See also}
1376
1377 \helpref{wxWindow::SetConstraints}{wxwindowsetconstraints}
1378
1379 \membersection{wxWindow::SetBackgroundColour}\label{wxwindowsetbackgroundcolour}
1380
1381 \func{virtual void}{SetBackgroundColour}{\param{const wxColour\& }{colour}}
1382
1383 Sets the background colour of the window.
1384
1385 \wxheading{Parameters}
1386
1387 \docparam{colour}{The colour to be used as the background colour.}
1388
1389 \wxheading{Remarks}
1390
1391 The background colour is usually painted by the default\rtfsp
1392 \helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground} event handler function.
1393
1394 \wxheading{See also}
1395
1396 \helpref{wxWindow::GetBackgroundColour}{wxwindowgetbackgroundcolour},\rtfsp
1397 \helpref{wxWindow::SetForegroundColour}{wxwindowsetforegroundcolour},\rtfsp
1398 \helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour},\rtfsp
1399 \helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground}
1400
1401 \membersection{wxWindow::SetConstraints}\label{wxwindowsetconstraints}
1402
1403 \func{void}{SetConstraints}{\param{wxLayoutConstraints* }{constraints}}
1404
1405 Sets the window to have the given layout constraints. The window
1406 will then own the object, and will take care of its deletion.
1407 If an existing layout constraints object is already owned by the
1408 window, it will be deleted.
1409
1410 \wxheading{Parameters}
1411
1412 \docparam{constraints}{The constraints to set. Pass NULL to disassociate and delete the window's
1413 constraints.}
1414
1415 \wxheading{Remarks}
1416
1417 You must call \helpref{wxWindow::SetAutoLayout}{wxwindowsetautolayout} to tell a window to use
1418 the constraints automatically in OnSize; otherwise, you must
1419 override OnSize and call Layout explicitly.
1420
1421 \membersection{wxWindow::SetFocus}\label{wxwindowsetfocus}
1422
1423 \func{virtual void}{SetFocus}{\void}
1424
1425 This sets the window to receive keyboard input.
1426
1427 \membersection{wxWindow::SetFont}\label{wxwindowsetfont}
1428
1429 \func{void}{SetFont}{\param{const wxFont\& }{font}}
1430
1431 Sets the font for this window.
1432
1433 \wxheading{Parameters}
1434
1435 \docparam{font}{Font to associate with this window.}
1436
1437 \wxheading{See also}
1438
1439 \helpref{wxWindow::GetFont}{wxwindowgetfont}
1440
1441 \membersection{wxWindow::SetForegroundColour}\label{wxwindowsetforegroundcolour}
1442
1443 \func{virtual void}{SetForegroundColour}{\param{const wxColour\& }{colour}}
1444
1445 Sets the foreground colour of the window.
1446
1447 \wxheading{Parameters}
1448
1449 \docparam{colour}{The colour to be used as the foreground colour.}
1450
1451 \wxheading{Remarks}
1452
1453 The interpretation of foreground colour is open to interpretation according
1454 to the window class; it may be the text colour or other colour, or it may not
1455 be used at all.
1456
1457 \wxheading{See also}
1458
1459 \helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour},\rtfsp
1460 \helpref{wxWindow::SetBackgroundColour}{wxwindowsetbackgroundcolour},\rtfsp
1461 \helpref{wxWindow::GetBackgroundColour}{wxwindowgetbackgroundcolour}
1462
1463 \membersection{wxWindow::SetId}\label{wxwindowsetid}
1464
1465 \func{void}{SetId}{\param{int}{ id}}
1466
1467 Sets the identifier of the window.
1468
1469 \wxheading{Remarks}
1470
1471 Each window has an integer identifier. If the application has not provided one,
1472 an identifier will be generated. Normally, the identifier should be provided
1473 on creation and should not be modified subsequently.
1474
1475 TODO: perhaps there should be a default identifier for each class, rather
1476 choosing one, which could clash with other ones.
1477
1478 \wxheading{See also}
1479
1480 \helpref{wxWindow::GetId}{wxwindowgetid}
1481
1482
1483 \membersection{wxWindow::SetName}\label{wxwindowsetname}
1484
1485 \func{virtual void}{SetName}{\param{const wxString\& }{name}}
1486
1487 Sets the window's name.
1488
1489 \wxheading{Parameters}
1490
1491 \docparam{name}{A name to set for the window.}
1492
1493 \wxheading{See also}
1494
1495 \helpref{wxWindow::GetName}{wxwindowgetname}
1496
1497 \membersection{wxWindow::SetReturnCode}\label{wxwindowsetreturncode}
1498
1499 \func{void}{SetReturnCode}{\param{int }{retCode}}
1500
1501 Sets the return code for this window.
1502
1503 \wxheading{Parameters}
1504
1505 \docparam{retCode}{The integer return code, usually a control identifier.}
1506
1507 \wxheading{Remarks}
1508
1509 A return code is normally associated with a modal dialog, where \helpref{wxDialog::ShowModal}{wxdialogshowmodal} returns
1510 a code to the application. The function \helpref{wxDialog::EndModal}{wxdialogendmodal} calls {\bf SetReturnCode}.
1511
1512 \wxheading{See also}
1513
1514 \helpref{wxWindow::GetReturnCode}{wxwindowgetreturncode}, \helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp
1515 \helpref{wxDialog::EndModal}{wxdialogendmodal}
1516
1517 \membersection{wxWindow::SetScrollbar}\label{wxwindowsetscrollbar}
1518
1519 \func{virtual void}{SetScrollbar}{\param{int }{orientation}, \param{int }{position},\rtfsp
1520 \param{int }{thumbSize}, \param{int }{range},\rtfsp
1521 \param{const bool }{refresh = TRUE}}
1522
1523 Sets the scrollbar properties of a built-in scrollbar.
1524
1525 \wxheading{Parameters}
1526
1527 \docparam{orientation}{Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL or wxVERTICAL.}
1528
1529 \docparam{position}{The position of the scrollbar in scroll units.}
1530
1531 \docparam{thumbSize}{The size of the thumb, or visible portion of the scrollbar, in scroll units.}
1532
1533 \docparam{range}{The maximum position of the scrollbar.}
1534
1535 \docparam{refresh}{TRUE to redraw the scrollbar, FALSE otherwise.}
1536
1537 \wxheading{Remarks}
1538
1539 Let's say you wish to display 50 lines of text, using the same font.
1540 The window is sized so that you can only see 16 lines at a time.
1541
1542 You would use:
1543
1544 {\small%
1545 \begin{verbatim}
1546 SetScrollbar(wxVERTICAL, 0, 16, 50);
1547 \end{verbatim}
1548 }
1549
1550 Note that with the window at this size, the thumb position can never go
1551 above 50 minus 16, or 34.
1552
1553 You can determine how many lines are currently visible by dividing the current view
1554 size by the character height in pixels.
1555
1556 When defining your own scrollbar behaviour, you will always need to recalculate
1557 the scrollbar settings when the window size changes. You could therefore put your
1558 scrollbar calculations and SetScrollbar
1559 call into a function named AdjustScrollbars, which can be called initially and also
1560 from your \helpref{wxWindow::OnSize}{wxwindowonsize} event handler function.
1561
1562 \wxheading{See also}
1563
1564 \helpref{Scrolling overview}{scrollingoverview},\rtfsp
1565 \helpref{wxScrollBar}{wxscrollbar}, \helpref{wxScrolledWindow}{wxscrolledwindow}
1566
1567 \begin{comment}
1568 \membersection{wxWindow::SetScrollPage}\label{wxwindowsetscrollpage}
1569
1570 \func{virtual void}{SetScrollPage}{\param{int }{orientation}, \param{int }{pageSize}, \param{const bool }{refresh = TRUE}}
1571
1572 Sets the page size of one of the built-in scrollbars.
1573
1574 \wxheading{Parameters}
1575
1576 \docparam{orientation}{Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL or wxVERTICAL.}
1577
1578 \docparam{pageSize}{Page size in scroll units.}
1579
1580 \docparam{refresh}{TRUE to redraw the scrollbar, FALSE otherwise.}
1581
1582 \wxheading{Remarks}
1583
1584 The page size of a scrollbar is the number of scroll units that the scroll thumb travels when you
1585 click on the area above/left of or below/right of the thumb. Normally you will want a whole visible
1586 page to be scrolled, i.e. the size of the current view (perhaps the window client size). This
1587 value has to be adjusted when the window is resized, since the page size will have changed.
1588
1589 In addition to specifying how far the scroll thumb travels when paging, in Motif and some versions of Windows
1590 the thumb changes size to reflect the page size relative to the length of the document. When the
1591 document size is only slightly bigger than the current view (window) size, almost all of the scrollbar
1592 will be taken up by the thumb. When the two values become the same, the scrollbar will (on some systems)
1593 disappear.
1594
1595 Currently, this function should be called before SetPageRange, because of a quirk in the Windows
1596 handling of pages and ranges.
1597
1598 \wxheading{See also}
1599
1600 \helpref{wxWindow::SetScrollPos}{wxwindowsetscrollpos},\rtfsp
1601 \helpref{wxWindow::SetScrollRange}{wxwindowsetscrollpage},\rtfsp
1602 \helpref{wxWindow::GetScrollPos}{wxwindowsetscrollpos},\rtfsp
1603 \helpref{wxWindow::GetScrollRange}{wxwindowsetscrollrange},\rtfsp
1604 \helpref{wxWindow::GetScrollPage}{wxwindowsetscrollrange},\rtfsp
1605 \helpref{wxScrollBar}{wxscrollbar}, \helpref{wxScrolledWindow}{wxscrolledwindow}
1606 \end{comment}
1607
1608 \membersection{wxWindow::SetScrollPos}\label{wxwindowsetscrollpos}
1609
1610 \func{virtual void}{SetScrollPos}{\param{int }{orientation}, \param{int }{pos}, \param{const bool }{refresh = TRUE}}
1611
1612 Sets the position of one of the built-in scrollbars.
1613
1614 \wxheading{Parameters}
1615
1616 \docparam{orientation}{Determines the scrollbar whose position is to be set. May be wxHORIZONTAL or wxVERTICAL.}
1617
1618 \docparam{pos}{Position in scroll units.}
1619
1620 \docparam{refresh}{TRUE to redraw the scrollbar, FALSE otherwise.}
1621
1622 \wxheading{Remarks}
1623
1624 This function does not directly affect the contents of the window: it is up to the
1625 application to take note of scrollbar attributes and redraw contents accordingly.
1626
1627 \wxheading{See also}
1628
1629 \helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar},\rtfsp
1630 \helpref{wxWindow::GetScrollPos}{wxwindowsetscrollpos},\rtfsp
1631 \helpref{wxWindow::GetScrollRange}{wxwindowsetscrollrange},\rtfsp
1632 \helpref{wxWindow::GetScrollThumb}{wxwindowsetscrollthumb},\rtfsp
1633 \helpref{wxScrollBar}{wxscrollbar}, \helpref{wxScrolledWindow}{wxscrolledwindow}
1634
1635 \begin{comment}
1636 \membersection{wxWindow::SetScrollRange}\label{wxwindowsetscrollrange}
1637
1638 \func{virtual void}{SetScrollRange}{\param{int }{orientation}, \param{int }{range}, \param{const bool }{refresh = TRUE}}
1639
1640 Sets the range of one of the built-in scrollbars.
1641
1642 \wxheading{Parameters}
1643
1644 \docparam{orientation}{Determines the scrollbar whose range is to be set. May be wxHORIZONTAL or wxVERTICAL.}
1645
1646 \docparam{range}{Scroll range.}
1647
1648 \docparam{refresh}{TRUE to redraw the scrollbar, FALSE otherwise.}
1649
1650 \wxheading{Remarks}
1651
1652 The range of a scrollbar is the number of steps that the thumb may travel, rather than the total
1653 object length of the scrollbar. If you are implementing a scrolling window, for example, you
1654 would adjust the scroll range when the window is resized, by subtracting the window view size from the
1655 total virtual window size. When the two sizes are the same (all the window is visible), the range goes to zero
1656 and usually the scrollbar will be automatically hidden.
1657
1658 \wxheading{See also}
1659
1660 \helpref{wxWindow::SetScrollPos}{wxwindowsetscrollpos},\rtfsp
1661 \helpref{wxWindow::SetScrollPage}{wxwindowsetscrollpage},\rtfsp
1662 \helpref{wxWindow::GetScrollPos}{wxwindowsetscrollpos},\rtfsp
1663 \helpref{wxWindow::GetScrollRange}{wxwindowsetscrollrange},\rtfsp
1664 \helpref{wxWindow::GetScrollPage}{wxwindowsetscrollrange},\rtfsp
1665 \helpref{wxScrollBar}{wxscrollbar}, \helpref{wxScrolledWindow}{wxscrolledwindow}
1666 \end{comment}
1667
1668 \membersection{wxWindow::SetSize}\label{wxwindowsetsize}
1669
1670 \func{virtual void}{SetSize}{\param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height},
1671 \param{int}{ sizeFlags = wxSIZE\_AUTO}}
1672
1673 Sets the size and position of the window in pixels.
1674
1675 \func{virtual void}{SetSize}{\param{int}{ width}, \param{int}{ height}}
1676
1677 Sets the size of the window in pixels.
1678
1679 \wxheading{Parameters}
1680
1681 \docparam{x}{Required x position in pixels, or -1 to indicate that the existing
1682 value should be used.}
1683
1684 \docparam{y}{Required y position in pixels, or -1 to indicate that the existing
1685 value should be used.}
1686
1687 \docparam{width}{Required width in pixels, or -1 to indicate that the existing
1688 value should be used.}
1689
1690 \docparam{height}{Required height position in pixels, or -1 to indicate that the existing
1691 value should be used.}
1692
1693 \docparam{sizeFlags}{Indicates the interpretation of other parameters. It is a bit list of the following:
1694
1695 {\bf wxSIZE\_AUTO\_WIDTH}: a -1 width value is taken to indicate
1696 a wxWindows-supplied default width.\\
1697 {\bf wxSIZE\_AUTO\_HEIGHT}: a -1 height value is taken to indicate
1698 a wxWindows-supplied default width.\\
1699 {\bf wxSIZE\_AUTO}: -1 size values are taken to indicate
1700 a wxWindows-supplied default size.\\
1701 {\bf wxSIZE\_USE\_EXISTING}: existing dimensions should be used
1702 if -1 values are supplied.\\
1703 {\bf wxSIZE\_ALLOW\_MINUS\_ONE}: allow dimensions of -1 and less to be interpreted
1704 as real dimensions, not default values.
1705 }
1706
1707 \wxheading{Remarks}
1708
1709 The second form is a convenience for calling the first form with default
1710 x and y parameters, and must be used with non-default width and height values.
1711
1712 The first form sets the position and optionally size, of the window.
1713 Parameters may be -1 to indicate either that a default should be supplied
1714 by wxWindows, or that the current value of the dimension should be used.
1715
1716 \wxheading{See also}
1717
1718 \helpref{wxWindow::Move}{wxwindowmove}
1719
1720 \membersection{wxWindow::SetSizeHints}\label{wxwindowsetsizehints}
1721
1722 \func{virtual void}{SetSizeHints}{\param{int}{ minW=-1}, \param{int}{ minH=-1}, \param{int}{ maxW=-1}, \param{int}{ maxH=-1},
1723 \param{int}{ incW=-1}, \param{int}{ incH=-1}}
1724
1725 Allows specification of minimum and maximum window sizes, and window size increments.
1726 If a pair of values is not set (or set to -1), the default values will be used.
1727
1728 \wxheading{Parameters}
1729
1730 \docparam{minW}{Specifies the minimum width allowable.}
1731
1732 \docparam{minH}{Specifies the minimum height allowable.}
1733
1734 \docparam{maxW}{Specifies the maximum width allowable.}
1735
1736 \docparam{maxH}{Specifies the maximum height allowable.}
1737
1738 \docparam{incW}{Specifies the increment for sizing the width (Motif/Xt only).}
1739
1740 \docparam{incH}{Specifies the increment for sizing the height (Motif/Xt only).}
1741
1742 \wxheading{Remarks}
1743
1744 If this function is called, the user will not be able to size the window outside the
1745 given bounds.
1746
1747 The resizing increments are only significant under Motif or Xt.
1748
1749 \membersection{wxWindow::SetClientSize}
1750
1751 \func{virtual void}{SetClientSize}{\param{int}{ width}, \param{int}{ height}}
1752
1753 This sets the size of the window client area in pixels. Using this function to size a window
1754 tends to be more device-independent than \helpref{wxWindow::SetSize}{wxwindowsetsize}, since the application need not
1755 worry about what dimensions the border or title bar have when trying to fit the window
1756 around panel items, for example.
1757
1758 \wxheading{Parameters}
1759
1760 \docparam{width}{The required client area width.}
1761
1762 \docparam{height}{The required client area height.}
1763
1764 \membersection{wxWindow::SetPalette}
1765
1766 \func{virtual void}{SetPalette}{\param{wxPalette* }{palette}}
1767
1768 Obsolete - use \helpref{wxDC::SetPalette}{wxdcsetpalette} instead.
1769
1770 \membersection{wxWindow::SetCursor}\label{wxwindowsetcursor}
1771
1772 \func{virtual void}{SetCursor}{\param{const wxCursor\&}{cursor}}
1773
1774 Sets the window's cursor.
1775
1776 \wxheading{Parameters}
1777
1778 \docparam{cursor}{Specifies the cursor that the window should normally display.}
1779
1780 \wxheading{Remarks}
1781
1782 Under Windows, you sometimes need to call ::wxSetCursor in addition to this
1783 function if you want the cursor to change immediately, because under Windows,
1784 wxWindows only sets the global cursor when it detects mouse movement.
1785
1786 \wxheading{See also}
1787
1788 \helpref{::wxSetCursor}{wxsetcursor}, \helpref{wxCursor}{wxcursor}
1789
1790 \membersection{wxWindow::SetEventHandler}\label{wxwindowseteventhandler}
1791
1792 \func{void}{SetEventHandler}{\param{wxEvtHandler* }{handler}}
1793
1794 Sets the event handler for this window.
1795
1796 \wxheading{Parameters}
1797
1798 \docparam{handler}{Specifies the handler to be set.}
1799
1800 \wxheading{Remarks}
1801
1802 An event handler is an object that is capable of processing the events
1803 sent to a window. By default, the window is its own event handler, but
1804 an application may wish to substitute another, for example to allow
1805 central implementation of event-handling for a variety of different
1806 window classes.
1807
1808 It is usually better to use \helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler} since
1809 this sets up a chain of event handlers, where an event not handled by one event handler is
1810 handed to the next one in the chain.
1811
1812 \wxheading{See also}
1813
1814 \helpref{wxWindow::GetEventHandler}{wxwindowgeteventhandler},\rtfsp
1815 \helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
1816 \helpref{wxWindow::PopEventHandler}{wxwindowpusheventhandler},\rtfsp
1817 \helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp
1818 \helpref{wxEvtHandler}{wxevthandler}
1819
1820 \membersection{wxWindow::SetTitle}\label{wxwindowsettitle}
1821
1822 \func{virtual void}{SetTitle}{\param{const wxString\& }{title}}
1823
1824 Sets the window's title. Applicable only to frames and dialogs.
1825
1826 \wxheading{Parameters}
1827
1828 \docparam{title}{The window's title.}
1829
1830 \wxheading{See also}
1831
1832 \helpref{wxWindow::GetTitle}{wxwindowgettitle}
1833
1834 \membersection{wxWindow::Show}
1835
1836 \func{virtual bool}{Show}{\param{const bool}{ show}}
1837
1838 Shows or hides the window.
1839
1840 \wxheading{Parameters}
1841
1842 \docparam{show}{If TRUE, displays the window and brings it to the front. Otherwise,
1843 hides the window.}
1844
1845 \wxheading{See also}
1846
1847 \helpref{wxWindow::IsShown}{wxwindowisshown}
1848
1849 \membersection{wxWindow::TransferDataFromWindow}\label{wxwindowtransferdatafromwindow}
1850
1851 \func{virtual bool}{TransferDataFromWindow}{\void}
1852
1853 Transfers values from child controls to data areas specified by their validators. Returns
1854 FALSE if a transfer failed.
1855
1856 \wxheading{See also}
1857
1858 \helpref{wxWindow::TransferDataToWindow}{wxwindowtransferdatatowindow},\rtfsp
1859 \helpref{wxValidator}{wxvalidator}, \helpref{wxWindow::Validate}{wxwindowvalidate}
1860
1861 \membersection{wxWindow::TransferDataToWindow}\label{wxwindowtransferdatatowindow}
1862
1863 \func{virtual bool}{TransferDataToWindow}{\void}
1864
1865 Transfers values to child controls from data areas specified by their validators.
1866
1867 \wxheading{Return value}
1868
1869 Returns FALSE if a transfer failed.
1870
1871 \wxheading{See also}
1872
1873 \helpref{wxWindow::TransferDataFromWindow}{wxwindowtransferdatafromwindow},\rtfsp
1874 \helpref{wxValidator}{wxvalidator}, \helpref{wxWindow::Validate}{wxwindowvalidate}
1875
1876 \membersection{wxWindow::Validate}\label{wxwindowvalidate}
1877
1878 \func{virtual bool}{Validate}{\void}
1879
1880 Validates the current values of the child controls using their validators.
1881
1882 \wxheading{Return value}
1883
1884 Returns FALSE if any of the validations failed.
1885
1886 \wxheading{See also}
1887
1888 \helpref{wxWindow::TransferDataFromWindow}{wxwindowtransferdatafromwindow},\rtfsp
1889 \helpref{wxWindow::TransferDataFromWindow}{wxwindowtransferdatafromwindow},\rtfsp
1890 \helpref{wxValidator}{wxvalidator}
1891
1892 \membersection{wxWindow::WarpPointer}\label{wxwindowwarppointer}
1893
1894 \func{void}{WarpPointer}{\param{int}{ x}, \param{int}{ y}}
1895
1896 Moves the pointer to the given position on the window.
1897
1898 \wxheading{Parameters}
1899
1900 \docparam{x}{The new x position for the cursor.}
1901
1902 \docparam{y}{The new y position for the cursor.}
1903