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