1 \section{\class{wxWindow
}}\label{wxwindow
}
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.
7 \wxheading{Derived from
}
9 \helpref{wxEvtHandler
}{wxevthandler
}\\
10 \helpref{wxObject
}{wxobject
}
12 \wxheading{Window styles
}
14 The following styles can apply to all windows, although they will not always make sense for a particular
18 \begin{twocollist
}\itemsep=
0pt
19 \twocolitem{\windowstyle{wxSIMPLE
\_BORDER}}{Displays a thin border around the window. wxBORDER is the old name
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 raised 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.
}
36 See also
\helpref{window styles overview
}{windowstyles
}.
40 \helpref{Event handling overview
}{eventhandlingoverview
}
42 \latexignore{\rtfignore{\wxheading{Members
}}}
44 \membersection{wxWindow::wxWindow
}
46 \func{}{wxWindow
}{\void}
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
}}
56 Constructs a window, which can be a child of a frame, dialog or any other non-control window.
58 \wxheading{Parameters
}
60 \docparam{parent
}{Pointer to a parent window.
}
62 \docparam{id
}{Window identifier. If -
1, will automatically create an identifier.
}
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
68 \docparam{size
}{Window size. wxDefaultSize is (-
1, -
1) which indicates that wxWindows
69 should generate a default size for the window.
}
71 \docparam{style
}{Window style. For generic window styles, please see
\helpref{wxWindow
}{wxwindow
}.
}
73 \docparam{name
}{Window name.
}
75 \membersection{wxWindow::
\destruct{wxWindow
}}
77 \func{}{\destruct{wxWindow
}}{\void}
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.
86 \helpref{Window deletion overview
}{windowdeletionoverview
},
\rtfsp
87 \helpref{wxWindow::OnCloseWindow
}{wxwindowonclosewindow
},
\rtfsp
88 \helpref{wxWindow::Destroy
}{wxwindowdestroy
},
\rtfsp
89 \helpref{wxCloseEvent
}{wxcloseevent
}
91 \membersection{wxWindow::AddChild
}
93 \func{virtual void
}{AddChild
}{\param{wxWindow*
}{child
}}
95 Adds a child window. This is called automatically by window creation
96 functions so should not be required by the application programmer.
98 \wxheading{Parameters
}
100 \docparam{child
}{Child window to add.
}
102 \membersection{wxWindow::CaptureMouse
}\label{wxwindowcapturemouse
}
104 \func{virtual void
}{CaptureMouse
}{\void}
106 Directs all mouse input to this window. Call
\helpref{wxWindow::ReleaseMouse
}{wxwindowreleasemouse
} to
111 \helpref{wxWindow::ReleaseMouse
}{wxwindowreleasemouse
}
113 \membersection{wxWindow::Center
}\label{wxwindowcenter
}
115 \func{void
}{Center
}{\param{int
}{ direction
}}
117 A synonym for
\helpref{Centre
}{wxwindowcentre
}.
119 \membersection{wxWindow::Centre
}\label{wxwindowcentre
}
121 \func{virtual void
}{Centre
}{\param{int
}{ direction = wxHORIZONTAL
}}
125 \wxheading{Parameters
}
127 \docparam{direction
}{Specifies the direction for the centering. May be
{\tt wxHORIZONTAL
},
{\tt wxVERTICAL
}\rtfsp
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.
138 \helpref{wxWindow::Center
}{wxwindowcenter
}
140 \membersection{wxWindow::Clear
}\label{wxwindowclear
}
142 \func{void
}{Clear
}{\void}
144 Clears the window by filling it with the current background colour. Does not
145 cause an erase background event to be generated.
147 \membersection{wxWindow::ClientToScreen
}
149 \constfunc{virtual void
}{ClientToScreen
}{\param{int*
}{x
},
\param{int*
}{y
}}
151 \constfunc{virtual wxPoint
}{ClientToScreen
}{\param{const wxPoint\&
}{ pt
}}
153 Converts to screen coordinates from coordinates relative to this window.
155 \docparam{x
}{A pointer to a integer value for the x coordinate. Pass the client coordinate in, and
156 a screen coordinate will be passed out.
}
158 \docparam{y
}{A pointer to a integer value for the y coordinate. Pass the client coordinate in, and
159 a screen coordinate will be passed out.
}
161 \docparam{pt
}{The client position for the second form of the function.
}
163 \membersection{wxWindow::Close
}\label{wxwindowclose
}
165 \func{virtual bool
}{Close
}{\param{const bool
}{ force = FALSE
}}
167 The purpose of this call is to provide a safer way of destroying a window than using
168 the
{\it delete
} operator.
170 \wxheading{Parameters
}
172 \docparam{force
}{FALSE if the window's close handler should be able to veto the destruction
173 of this window, TRUE if it cannot.
}
177 Close calls the
\helpref{close handler
}{wxcloseevent
} for the window, providing an opportunity for the window to
178 choose whether to destroy the window.
180 The close handler should check whether the window is being deleted forcibly,
181 using
\helpref{wxCloseEvent::GetForce
}{wxcloseeventgetforce
}, in which case it should
182 destroy the window using
\helpref{wxWindow::Destroy
}{wxwindowdestroy
}.
184 Applies to managed windows (wxFrame and wxDialog classes) only.
188 \helpref{Window deletion overview
}{windowdeletionoverview
},
\rtfsp
189 \helpref{wxWindow::OnCloseWindow
}{wxwindowonclosewindow
},
\rtfsp
190 \helpref{wxWindow::Destroy
}{wxwindowdestroy
},
\rtfsp
191 \helpref{wxCloseEvent
}{wxcloseevent
}
193 \membersection{wxWindow::ConvertDialogToPixels
}\label{wxwindowconvertdialogtopixels
}
195 \func{wxPoint
}{ConvertDialogToPixels
}{\param{const wxPoint\&
}{ pt
}}
197 \func{wxSize
}{ConvertDialogToPixels
}{\param{const wxSize\&
}{ sz
}}
199 Converts a point or size from dialog units to pixels.
201 For the x dimension, the dialog units are multiplied by the average character width
202 and then divided by
4.
204 For the y dimension, the dialog units are multiplied by the average character height
205 and then divided by
8.
209 Dialog units are used for maintaining a dialog's proportions even if the font changes.
210 Dialogs created using Dialog Editor optionally use dialog units.
212 You can also use these functions programmatically. A convenience macro is defined:
216 #define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
222 \helpref{wxWindow::ConvertPixelsToDialog
}{wxwindowconvertpixelstodialog
}
224 \membersection{wxWindow::ConvertPixelsToDialog
}\label{wxwindowconvertpixelstodialog
}
226 \func{wxPoint
}{ConvertPixelsToDialog
}{\param{const wxPoint\&
}{ pt
}}
228 \func{wxSize
}{ConvertPixelsToDialog
}{\param{const wxSize\&
}{ sz
}}
230 Converts a point or size from pixels to dialog units.
232 For the x dimension, the pixels are multiplied by
4 and then divided by the average
235 For the y dimension, the pixels are multipled by
8 and then divided by the average
240 Dialog units are used for maintaining a dialog's proportions even if the font changes.
241 Dialogs created using Dialog Editor optionally use dialog units.
245 \helpref{wxWindow::ConvertDialogToPixels
}{wxwindowconvertdialogtopixels
}
247 \membersection{wxWindow::Destroy
}\label{wxwindowdestroy
}
249 \func{virtual bool
}{Destroy
}{\void}
251 Destroys the window safely. Use this function instead of the delete operator, since
252 different window classes can be destroyed differently. Frames and dialogs
253 are not destroyed immediately when this function is called - they are added
254 to a list of windows to be deleted on idle time, when all the window's events
255 have been processed. This prevents problems with events being sent to non-existant
258 \wxheading{Return value
}
260 TRUE if the window has either been successfully deleted, or it has been added
261 to the list of windows pending real deletion.
263 \membersection{wxWindow::DestroyChildren
}
265 \func{virtual void
}{DestroyChildren
}{\void}
267 Destroys all children of a window. Called automatically by the destructor.
269 \membersection{wxWindow::DragAcceptFiles
}\label{wxwindowdragacceptfiles
}
271 \func{virtual void
}{DragAcceptFiles
}{\param{const bool
}{ accept
}}
273 Enables or disables elibility for drop file events (OnDropFiles).
275 \wxheading{Parameters
}
277 \docparam{accept
}{If TRUE, the window is eligible for drop file events. If FALSE, the window
278 will not accept drop file events.
}
286 \helpref{wxWindow::OnDropFiles
}{wxwindowondropfiles
}
288 \membersection{wxWindow::Enable
}\label{wxwindowenable
}
290 \func{virtual void
}{Enable
}{\param{const bool
}{ enable
}}
292 Enable or disable the window for user input.
294 \wxheading{Parameters
}
296 \docparam{enable
}{If TRUE, enables the window for input. If FALSE, disables the window.
}
300 \helpref{wxWindow::IsEnabled
}{wxwindowisenabled
}
302 \membersection{wxWindow::FindFocus
}\label{wxwindowfindfocus
}
304 \func{static wxWindow*
}{FindFocus
}{\void}
306 Finds the window or control which currently has the keyboard focus.
310 Note that this is a static function, so it can be called without needing a wxWindow pointer.
314 \helpref{wxWindow::SetFocus
}{wxwindowsetfocus
}
316 \membersection{wxWindow::FindWindow
}\label{wxwindowfindwindow
}
318 \func{wxWindow*
}{FindWindow
}{\param{long
}{ id
}}
320 Find a child of this window, by identifier.
322 \func{wxWindow*
}{FindWindow
}{\param{const wxString\&
}{ name
}}
324 Find a child of this window, by name.
326 \membersection{wxWindow::Fit
}\label{wxwindowfit
}
328 \func{virtual void
}{Fit
}{\void}
330 Sizes the window so that it fits around its subwindows.
332 \membersection{wxWindow::GetBackgroundColour
}\label{wxwindowgetbackgroundcolour
}
334 \constfunc{virtual wxColour
}{GetBackgroundColour
}{\void}
336 Returns the background colour of the window.
340 \helpref{wxWindow::SetBackgroundColour
}{wxwindowsetbackgroundcolour
},
\rtfsp
341 \helpref{wxWindow::SetForegroundColour
}{wxwindowsetforegroundcolour
},
\rtfsp
342 \helpref{wxWindow::GetForegroundColour
}{wxwindowgetforegroundcolour
},
\rtfsp
343 \helpref{wxWindow::OnEraseBackground
}{wxwindowonerasebackground
}
345 \membersection{wxWindow::GetCharHeight
}
347 \constfunc{virtual int
}{GetCharHeight
}{\void}
349 Returns the character height for this window.
351 \membersection{wxWindow::GetCharWidth
}
353 \constfunc{virtual int
}{GetCharWidth
}{\void}
355 Returns the average character width for this window.
357 \membersection{wxWindow::GetChildren
}
359 \func{wxList\&
}{GetChildren
}{\void}
361 Returns a reference to the list of the window's children.
363 \membersection{wxWindow::GetClientSize
}\label{wxwindowgetclientsize
}
365 \constfunc{virtual void
}{GetClientSize
}{\param{int*
}{width
},
\param{int*
}{height
}}
367 \constfunc{virtual wxSize
}{GetClientSize
}{\void}
369 This gets the size of the window `client area' in pixels. The client area is the
370 area which may be drawn on by the programmer, excluding title bar, border etc.
372 \wxheading{Parameters
}
374 \docparam{width
}{Receives the client width in pixels.
}
376 \docparam{height
}{Receives the client height in pixels.
}
378 \membersection{wxWindow::GetConstraints
}\label{wxwindowgetconstraints
}
380 \constfunc{wxLayoutConstraints*
}{GetConstraints
}{\void}
382 Returns a pointer to the window's layout constraints, or NULL if there are none.
384 \membersection{wxWindow::GetDefaultItem
}\label{wxwindowgetdefaultitem
}
386 \constfunc{wxButton*
}{GetDefaultItem
}{\void}
388 Returns a pointer to the button which is the default for this window, or NULL.
390 \membersection{wxWindow::GetDropTarget
}\label{wxwindowgetdroptarget
}
392 \constfunc{wxDropTarget*
}{GetDropTarget
}{\void}
394 Returns the associated drop target, which may be NULL.
398 \helpref{wxWindow::SetDropTarget
}{wxwindowsetdroptarget
},
399 \helpref{Drag and drop overview
}{wxdndoverview
}
401 \membersection{wxWindow::GetEventHandler
}\label{wxwindowgeteventhandler
}
403 \constfunc{wxEvtHandler*
}{GetEventHandler
}{\void}
405 Returns the event handler for this window. By default, the window is its
410 \helpref{wxWindow::SetEventHandler
}{wxwindowseteventhandler
},
\rtfsp
411 \helpref{wxWindow::PushEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
412 \helpref{wxWindow::PopEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
413 \helpref{wxEvtHandler::ProcessEvent
}{wxevthandlerprocessevent
},
\rtfsp
414 \helpref{wxEvtHandler
}{wxevthandler
}\rtfsp
416 \membersection{wxWindow::GetFont
}\label{wxwindowgetfont
}
418 \constfunc{wxFont\&
}{GetFont
}{\void}
420 Returns a reference to the font for this window.
424 \helpref{wxWindow::SetFont
}{wxwindowsetfont
}
426 \membersection{wxWindow::GetForegroundColour
}\label{wxwindowgetforegroundcolour
}
428 \func{virtual wxColour
}{GetForegroundColour
}{\void}
430 Returns the foreground colour of the window.
434 The interpretation of foreground colour is open to interpretation according
435 to the window class; it may be the text colour or other colour, or it may not
440 \helpref{wxWindow::SetForegroundColour
}{wxwindowsetforegroundcolour
},
\rtfsp
441 \helpref{wxWindow::SetBackgroundColour
}{wxwindowsetbackgroundcolour
},
\rtfsp
442 \helpref{wxWindow::GetBackgroundColour
}{wxwindowgetbackgroundcolour
}
444 \membersection{wxWindow::GetGrandParent
}
446 \constfunc{wxWindow*
}{GetGrandParent
}{\void}
448 Returns the grandparent of a window, or NULL if there isn't one.
450 \membersection{wxWindow::GetHandle
}
452 \constfunc{void*
}{GetHandle
}{\void}
454 Returns the platform-specific handle of the physical window. Cast it to an appropriate
455 handle, such as
{\bf HWND
} for Windows or
{\bf Widget
} for Motif.
457 \membersection{wxWindow::GetId
}\label{wxwindowgetid
}
459 \constfunc{int
}{GetId
}{\void}
461 Returns the identifier of the window.
465 Each window has an integer identifier. If the application has not provided one,
466 an identifier will be generated.
470 \helpref{wxWindow::SetId
}{wxwindowsetid
}\rtfsp
471 \helpref{Window identifiers
}{windowids
}
473 \membersection{wxWindow::GetPosition
}
475 \constfunc{virtual void
}{GetPosition
}{\param{int*
}{x
},
\param{int*
}{y
}}
477 This gets the position of the window in pixels, relative to the parent window or
478 if no parent, relative to the whole display.
480 \wxheading{Parameters
}
482 \docparam{x
}{Receives the x position of the window.
}
484 \docparam{y
}{Receives the y position of the window.
}
486 \membersection{wxWindow::GetLabel
}
488 \constfunc{virtual wxString\&
}{GetLabel
}{\void}
490 Generic way of getting a label from any window, for
491 identification purposes.
495 The interpretation of this function differs from class to class.
496 For frames and dialogs, the value returned is the title. For buttons or static text controls, it is
497 the button text. This function can be useful for meta-programs (such as testing
498 tools or special-needs access programs) which need to identify windows
501 \membersection{wxWindow::GetName
}\label{wxwindowgetname
}
503 \constfunc{virtual wxString\&
}{GetName
}{\void}
505 Returns the window's name.
509 This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate
510 name in the window constructor or via
\helpref{wxWindow::SetName
}{wxwindowsetname
}.
514 \helpref{wxWindow::SetName
}{wxwindowsetname
}
516 \membersection{wxWindow::GetParent
}
518 \constfunc{virtual wxWindow*
}{GetParent
}{\void}
520 Returns the parent of the window, or NULL if there is no parent.
522 \membersection{wxWindow::GetRect
}\label{wxwindowgetrect
}
524 \constfunc{virtual wxRect
}{GetRect
}{\void}
526 Returns the size and position of the window as a
\helpref{wxRect
}{wxrect
} object.
528 \membersection{wxWindow::GetReturnCode
}\label{wxwindowgetreturncode
}
530 \func{int
}{GetReturnCode
}{\void}
532 Gets the return code for this window.
536 A return code is normally associated with a modal dialog, where
\helpref{wxDialog::ShowModal
}{wxdialogshowmodal
} returns
537 a code to the application.
541 \helpref{wxWindow::SetReturnCode
}{wxwindowsetreturncode
},
\helpref{wxDialog::ShowModal
}{wxdialogshowmodal
},
\rtfsp
542 \helpref{wxDialog::EndModal
}{wxdialogendmodal
}
544 \membersection{wxWindow::GetScrollThumb
}\label{wxwindowgetscrollthumb
}
546 \func{virtual int
}{GetScrollThumb
}{\param{int
}{orientation
}}
548 Returns the built-in scrollbar thumb size.
552 \helpref{wxWindow::SetScrollbar
}{wxwindowsetscrollbar
}
554 \membersection{wxWindow::GetScrollPos
}\label{wxwindowgetscrollpos
}
556 \func{virtual int
}{GetScrollPos
}{\param{int
}{orientation
}}
558 Returns the built-in scrollbar position.
562 See
\helpref{wxWindow::SetScrollbar
}{wxwindowsetscrollbar
}
564 \membersection{wxWindow::GetScrollRange
}\label{wxwindowgetscrollrange
}
566 \func{virtual int
}{GetScrollRange
}{\param{int
}{orientation
}}
568 Returns the built-in scrollbar range.
572 \helpref{wxWindow::SetScrollbar
}{wxwindowsetscrollbar
}
574 \membersection{wxWindow::GetSize
}\label{wxwindowgetsize
}
576 \constfunc{virtual void
}{GetSize
}{\param{int*
}{width
},
\param{int*
}{height
}}
578 \constfunc{virtual wxSize
}{GetSize
}{\void}
580 This gets the size of the entire window in pixels.
582 \wxheading{Parameters
}
584 \docparam{width
}{Receives the window width.
}
586 \docparam{height
}{Receives the window height.
}
588 \membersection{wxWindow::GetTextExtent
}
590 \constfunc{virtual void
}{GetTextExtent
}{\param{const wxString\&
}{string
},
\param{int*
}{x
},
\param{int*
}{y
},
591 \param{int*
}{descent = NULL
},
\param{int*
}{externalLeading = NULL
},
592 \param{const wxFont*
}{font = NULL
},
\param{const bool
}{ use16 = FALSE
}}
594 Gets the dimensions of the string as it would be drawn on the
595 window with the currently selected font.
597 \wxheading{Parameters
}
599 \docparam{string
}{String whose extent is to be measured.
}
601 \docparam{x
}{Return value for width.
}
603 \docparam{y
}{Return value for height.
}
605 \docparam{descent
}{Return value for descent (optional).
}
607 \docparam{externalLeading
}{Return value for external leading (optional).
}
609 \docparam{font
}{Font to use instead of the current window font (optional).
}
611 \docparam{use16
}{If TRUE,
{\it string
} contains
16-bit characters. The default is FALSE.
}
613 \membersection{wxWindow::GetTitle
}\label{wxwindowgettitle
}
615 \func{virtual wxString
}{GetTitle
}{\void}
617 Gets the window's title. Applicable only to frames and dialogs.
621 \helpref{wxWindow::SetTitle
}{wxwindowsettitle
}
623 \membersection{wxWindow::GetUpdateRegion
}\label{wxwindowgetupdateregion
}
625 \constfunc{virtual wxRegion
}{GetUpdateRegion
}{\void}
627 Returns the region specifying which parts of the window have been damaged. Should
628 only be called within an
\helpref{OnPaint
}{wxwindowonpaint
} event handler.
632 \helpref{wxRegion
}{wxregion
},
\helpref{wxRegionIterator
}{wxregioniterator
},
\helpref{wxWindow::OnPaint
}{wxwindowonpaint
}
634 \membersection{wxWindow::GetWindowStyleFlag
}
636 \constfunc{long
}{GetWindowStyleFlag
}{\void}
638 Gets the window style that was passed to the consructor or
{\bf Create
} member.
640 \membersection{wxWindow::InitDialog
}\label{wxwindowinitdialog
}
642 \func{void
}{InitDialog
}{\void}
644 Sends an
\helpref{wxWindow::OnInitDialog
}{wxwindowoninitdialog
} event, which
645 in turn transfers data to the dialog via validators.
649 \helpref{wxWindow::OnInitDialog
}{wxwindowoninitdialog
}
651 \membersection{wxWindow::IsEnabled
}\label{wxwindowisenabled
}
653 \constfunc{virtual bool
}{IsEnabled
}{\void}
655 Returns TRUE if the window is enabled for input, FALSE otherwise.
659 \helpref{wxWindow::Enable
}{wxwindowenable
}
661 \membersection{wxWindow::IsRetained
}\label{wxwindowisretained
}
663 \constfunc{virtual bool
}{IsRetained
}{\void}
665 Returns TRUE if the window is retained, FALSE otherwise.
669 Retained windows are only available on X platforms.
671 \membersection{wxWindow::IsShown
}\label{wxwindowisshown
}
673 \constfunc{virtual bool
}{IsShown
}{\void}
675 Returns TRUE if the window is shown, FALSE if it has been hidden.
677 \membersection{wxWindow::Layout
}\label{wxwindowlayout
}
679 \func{void
}{Layout
}{\void}
681 Invokes the constraint-based layout algorithm for this window. It is called
682 automatically by the default
{\bf wxWindow::OnSize
} member.
684 \membersection{wxWindow::LoadFromResource
}\label{wxwindowloadfromresource
}
686 \func{virtual bool
}{LoadFromResource
}{\param{wxWindow*
}{parent
},
\rtfsp
687 \param{const wxString\&
}{resourceName
},
\param{const wxResourceTable*
}{resourceTable = NULL
}}
689 Loads a panel or dialog from a resource file.
691 \wxheading{Parameters
}
693 \docparam{parent
}{Parent window.
}
695 \docparam{resourceName
}{The name of the resource to load.
}
697 \docparam{resourceTable
}{The resource table to load it from. If this is NULL, the
698 default resource table will be used.
}
700 \wxheading{Return value
}
702 TRUE if the operation succeeded, otherwise FALSE.
704 \membersection{wxWindow::Lower
}\label{wxwindowlower
}
706 \func{void
}{Lower
}{\void}
708 Lowers the window to the bottom of the window hierarchy if it is a managed window (dialog
711 \membersection{wxWindow::MakeModal
}\label{wxwindowmakemodal
}
713 \func{virtual void
}{MakeModal
}{\param{const bool
}{flag
}}
715 Disables all other windows in the application so that
716 the user can only interact with this window.
718 \wxheading{Parameters
}
720 \docparam{flag
}{If TRUE, this call disables all other windows in the application so that
721 the user can only interact with this window. If FALSE, the effect is reversed.
}
723 \membersection{wxWindow::Move
}\label{wxwindowmove
}
725 \func{void
}{Move
}{\param{int
}{ x
},
\param{int
}{ y
}}
727 \func{void
}{Move
}{\param{const wxPoint\&
}{ pt
}}
729 Moves the window to the given position.
731 \wxheading{Parameters
}
733 \docparam{x
}{Required x position.
}
735 \docparam{y
}{Required y position.
}
737 \docparam{pt
}{\helpref{wxPoint
}{wxpoint
} object representing the position.
}
741 Implementations of SetSize can also implicitly implement the
742 wxWindow::Move function, which is defined in the base wxWindow class
746 SetSize(x, y, -
1, -
1, wxSIZE_USE_EXISTING);
751 \helpref{wxWindow::SetSize
}{wxwindowsetsize
}
753 \membersection{wxWindow::OnActivate
}\label{wxwindowonactivate
}
755 \func{void
}{OnActivate
}{\param{wxActivateEvent\&
}{ event
}}
757 Called when a window is activated or deactivated.
759 \wxheading{Parameters
}
761 \docparam{event
}{Object containing activation information.
}
765 If the window is being activated,
\helpref{wxActivateEvent::GetActive
}{wxactivateeventgetactive
} returns TRUE,
766 otherwise it returns FALSE (it is being deactivated).
770 \helpref{wxActivateEvent
}{wxactivateevent
},
\rtfsp
771 \helpref{Event handling overview
}{eventhandlingoverview
}
773 \membersection{wxWindow::OnChar
}\label{wxwindowonchar
}
775 \func{void
}{OnChar
}{\param{wxKeyEvent\&
}{ event
}}
777 Called when the user has pressed a key that is not a modifier (SHIFT, CONTROL or ALT).
779 \wxheading{Parameters
}
781 \docparam{event
}{Object containing keypress information. See
\helpref{wxKeyEvent
}{wxkeyevent
} for
782 details about this class.
}
786 This member function is called in response to a keypress. To intercept this event,
787 use the EVT
\_CHAR macro in an event table definition. Your
{\bf OnChar
} handler may call this
788 default function to achieve default keypress functionality.
790 Note that the ASCII values do not have explicit key codes: they are passed as ASCII
793 Note that not all keypresses can be intercepted this way. If you wish to intercept modifier
794 keypresses, then you will need to use
\helpref{wxWindow::OnKeyDown
}{wxwindowonkeydown
} or
795 \helpref{wxWindow::OnKeyUp
}{wxwindowonkeyup
}.
797 Most, but not all, windows allow keypresses to be intercepted.
801 \helpref{wxWindow::OnKeyDown
}{wxwindowonkeydown
},
\helpref{wxWindow::OnKeyUp
}{wxwindowonkeyup
},
\rtfsp
802 \helpref{wxKeyEvent
}{wxkeyevent
},
\helpref{wxWindow::OnCharHook
}{wxwindowoncharhook
},
\rtfsp
803 \helpref{Event handling overview
}{eventhandlingoverview
}
805 \membersection{wxWindow::OnCharHook
}\label{wxwindowoncharhook
}
807 \func{void
}{OnCharHook
}{\param{wxKeyEvent\&
}{ event
}}
809 This member is called to allow the window to intercept keyboard events
810 before they are processed by child windows.
812 \wxheading{Parameters
}
814 \docparam{event
}{Object containing keypress information. See
\helpref{wxKeyEvent
}{wxkeyevent
} for
815 details about this class.
}
819 This member function is called in response to a keypress, if the window is active. To intercept this event,
820 use the EVT
\_CHAR\_HOOK macro in an event table definition. If you do not process a particular
821 keypress, call
\helpref{wxEvent::Skip
}{wxeventskip
} to allow default processing.
823 An example of using this function is in the implementation of escape-character processing for wxDialog,
824 where pressing ESC dismisses the dialog by
{\bf OnCharHook
} 'forging' a cancel button press event.
826 Note that the ASCII values do not have explicit key codes: they are passed as ASCII
829 This function is only relevant to top-level windows (frames and dialogs), and under
834 \helpref{wxKeyEvent
}{wxkeyevent
},
\helpref{wxWindow::OnCharHook
}{wxwindowoncharhook
},
\rtfsp
835 \helpref{wxApp::OnCharHook
}{wxapponcharhook
},
\rtfsp
836 \helpref{Event handling overview
}{eventhandlingoverview
}
838 \membersection{wxWindow::OnCommand
}\label{wxwindowoncommand
}
840 \func{virtual void
}{OnCommand
}{\param{wxEvtHandler\&
}{object
},
\param{wxCommandEvent\&
}{event
}}
842 This virtual member function is called if the control does not handle the command event.
844 \wxheading{Parameters
}
846 \docparam{object
}{Object receiving the command event.
}
848 \docparam{event
}{Command event
}
852 This virtual function is provided mainly for backward compatibility. You can also intercept commands
853 from child controls by using an event table, with identifiers or identifier ranges to identify
854 the control(s) in question.
858 \helpref{wxCommandEvent
}{wxcommandevent
},
\rtfsp
859 \helpref{Event handling overview
}{eventhandlingoverview
}
861 \membersection{wxWindow::OnClose
}\label{wxwindowonclose
}
863 \func{virtual bool
}{OnClose
}{\void}
865 Called when the user has tried to close a a frame
866 or dialog box using the window manager (X) or system menu (Windows).
868 {\bf Note:
} This is an obsolete function.
869 It is superceded by the
\helpref{wxWindow::OnCloseWindow
}{wxwindowonclosewindow
} event
872 \wxheading{Return value
}
874 If TRUE is returned by OnClose, the window will be deleted by the system, otherwise the
875 attempt will be ignored. Do not delete the window from within this handler, although
876 you may delete other windows.
880 \helpref{Window deletion overview
}{windowdeletionoverview
},
\rtfsp
881 \helpref{wxWindow::Close
}{wxwindowclose
},
\rtfsp
882 \helpref{wxWindow::OnCloseWindow
}{wxwindowonclosewindow
},
\rtfsp
883 \helpref{wxCloseEvent
}{wxcloseevent
}
885 \membersection{wxWindow::OnCloseWindow
}\label{wxwindowonclosewindow
}
887 \func{void
}{OnCloseWindow
}{\param{wxCloseEvent\&
}{event
}}
889 This is an event handler function called when the user has tried to close a a frame
890 or dialog box using the window manager (X) or system menu (Windows). It is
891 called via the
\helpref{wxWindow::Close
}{wxwindowclose
} function, so
892 that the application can also invoke the handler programmatically.
894 Use the EVT
\_CLOSE event table macro to handle close events.
896 You should check whether the application is forcing the deletion of the window
897 using
\helpref{wxCloseEvent::GetForce
}{wxcloseeventgetforce
}. If this is TRUE,
898 destroy the window using
\helpref{wxWindow::Destroy
}{wxwindowdestroy
}.
899 If not, it is up to you whether you respond by destroying the window.
901 (Note: GetForce is now superceded by CanVeto. So to test whether forced destruction of
902 the window is required, test for the negative of CanVeto. If CanVeto returns FALSE,
903 it is not possible to skip window deletion.)
905 If you don't destroy the window, you should call
\helpref{wxCloseEvent::Veto
}{wxcloseeventveto
} to
906 let the calling code know that you did not destroy the window. This allows the
\helpref{wxWindow::Close
}{wxwindowclose
} function
907 to return TRUE or FALSE depending on whether the close instruction was honoured or not.
911 The
\helpref{wxWindow::OnClose
}{wxwindowonclose
} virtual function remains
912 for backward compatibility with earlier versions of wxWindows. The
913 default
{\bf OnCloseWindow
} handler for wxFrame and wxDialog will call
{\bf OnClose
},
914 destroying the window if it returns TRUE or if the close is being forced.
918 \helpref{Window deletion overview
}{windowdeletionoverview
},
\rtfsp
919 \helpref{wxWindow::Close
}{wxwindowclose
},
\rtfsp
920 \helpref{wxWindow::OnClose
}{wxwindowonclose
},
\rtfsp
921 \helpref{wxWindow::Destroy
}{wxwindowdestroy
},
\rtfsp
922 \helpref{wxCloseEvent
}{wxcloseevent
},
\rtfsp
923 \helpref{wxApp::OnQueryEndSession
}{wxapponqueryendsession
},
\rtfsp
924 \helpref{wxApp::OnEndSession
}{wxapponendsession
}
926 \membersection{wxWindow::OnDropFiles
}\label{wxwindowondropfiles
}
928 \func{void
}{OnDropFiles
}{\param{wxDropFilesEvent\&
}{ event
}}
930 Called when files have been dragged from the file manager to the window.
932 \wxheading{Parameters
}
934 \docparam{event
}{Drop files event. For more information, see
\helpref{wxDropFilesEvent
}{wxdropfilesevent
}.
}
938 The window must have previously been enabled for dropping by calling
939 \rtfsp\helpref{wxWindow::DragAcceptFiles
}{wxwindowdragacceptfiles
}.
941 This event is only generated under Windows.
943 To intercept this event, use the EVT
\_DROP\_FILES macro in an event table definition.
947 \helpref{wxDropFilesEvent
}{wxdropfilesevent
},
\helpref{wxWindow::DragAcceptFiles
}{wxwindowdragacceptfiles
},
\rtfsp
948 \helpref{Event handling overview
}{eventhandlingoverview
}
950 \membersection{wxWindow::OnEraseBackground
}\label{wxwindowonerasebackground
}
952 \func{void
}{OnEraseBackground
}{\param{wxEraseEvent\&
}{ event
}}
954 Called when the background of the window needs to be erased.
956 \wxheading{Parameters
}
958 \docparam{event
}{Erase background event. For more information, see
\helpref{wxEraseEvent
}{wxeraseevent
}.
}
962 This event is only generated under Windows.
964 To intercept this event, use the EVT
\_ERASE\_BACKGROUND macro in an event table definition.
968 \helpref{wxEraseEvent
}{wxeraseevent
},
\helpref{Event handling overview
}{eventhandlingoverview
}
970 \membersection{wxWindow::OnKeyDown
}\label{wxwindowonkeydown
}
972 \func{void
}{OnKeyDown
}{\param{wxKeyEvent\&
}{ event
}}
974 Called when the user has pressed a key, before it is translated into an ASCII value using other
975 modifier keys that might be pressed at the same time.
977 \wxheading{Parameters
}
979 \docparam{event
}{Object containing keypress information. See
\helpref{wxKeyEvent
}{wxkeyevent
} for
980 details about this class.
}
984 This member function is called in response to a key down event. To intercept this event,
985 use the EVT
\_KEY\_DOWN macro in an event table definition. Your
{\bf OnKeyDown
} handler may call this
986 default function to achieve default keypress functionality.
988 Note that not all keypresses can be intercepted this way. If you wish to intercept special
989 keys, such as shift, control, and function keys, then you will need to use
\helpref{wxWindow::OnKeyDown
}{wxwindowonkeydown
} or
990 \helpref{wxWindow::OnKeyUp
}{wxwindowonkeyup
}.
992 Most, but not all, windows allow keypresses to be intercepted.
996 \helpref{wxWindow::OnChar
}{wxwindowonchar
},
\helpref{wxWindow::OnKeyUp
}{wxwindowonkeyup
},
\rtfsp
997 \helpref{wxKeyEvent
}{wxkeyevent
},
\helpref{wxWindow::OnCharHook
}{wxwindowoncharhook
},
\rtfsp
998 \helpref{Event handling overview
}{eventhandlingoverview
}
1000 \membersection{wxWindow::OnKeyUp
}\label{wxwindowonkeyup
}
1002 \func{void
}{OnKeyUp
}{\param{wxKeyEvent\&
}{ event
}}
1004 Called when the user has released a key.
1006 \wxheading{Parameters
}
1008 \docparam{event
}{Object containing keypress information. See
\helpref{wxKeyEvent
}{wxkeyevent
} for
1009 details about this class.
}
1013 This member function is called in response to a key up event. To intercept this event,
1014 use the EVT
\_KEY\_UP macro in an event table definition. Your
{\bf OnKeyUp
} handler may call this
1015 default function to achieve default keypress functionality.
1017 Note that not all keypresses can be intercepted this way. If you wish to intercept special
1018 keys, such as shift, control, and function keys, then you will need to use
\helpref{wxWindow::OnKeyDown
}{wxwindowonkeydown
} or
1019 \helpref{wxWindow::OnKeyUp
}{wxwindowonkeyup
}.
1021 Most, but not all, windows allow key up events to be intercepted.
1023 \wxheading{See also
}
1025 \helpref{wxWindow::OnChar
}{wxwindowonchar
},
\helpref{wxWindow::OnKeyDown
}{wxwindowonkeydown
},
\rtfsp
1026 \helpref{wxKeyEvent
}{wxkeyevent
},
\helpref{wxWindow::OnCharHook
}{wxwindowoncharhook
},
\rtfsp
1027 \helpref{Event handling overview
}{eventhandlingoverview
}
1029 \membersection{wxWindow::OnKillFocus
}\label{wxwindowonkillfocus
}
1031 \func{void
}{OnKillFocus
}{\param{wxFocusEvent\&
}{event
}}
1033 Called when a window's focus is being killed.
1035 \wxheading{Parameters
}
1037 \docparam{event
}{The focus event. For more information, see
\helpref{wxFocusEvent
}{wxfocusevent
}.
}
1041 To intercept this event, use the macro EVT
\_KILL\_FOCUS in an event table definition.
1043 Most, but not all, windows respond to this event.
1045 \wxheading{See also
}
1047 \helpref{wxFocusEvent
}{wxfocusevent
},
\helpref{wxWindow::OnSetFocus
}{wxwindowonsetfocus
},
\rtfsp
1048 \helpref{Event handling overview
}{eventhandlingoverview
}
1050 \membersection{wxWindow::OnIdle
}\label{wxwindowonidle
}
1052 \func{void
}{OnIdle
}{\param{wxIdleEvent\&
}{event
}}
1054 Provide this member function for any processing which needs to be done
1055 when the application is idle.
1057 \wxheading{See also
}
1059 \helpref{wxApp::OnIdle
}{wxapponidle
},
\helpref{wxIdleEvent
}{wxidleevent
}
1061 \membersection{wxWindow::OnInitDialog
}\label{wxwindowoninitdialog
}
1063 \func{void
}{OnInitDialog
}{\param{wxInitDialogEvent\&
}{ event
}}
1065 Default handler for the wxEVT
\_INIT\_DIALOG event. Calls
\helpref{wxWindow::TransferDataToWindow
}{wxwindowtransferdatatowindow
}.
1067 \wxheading{Parameters
}
1069 \docparam{event
}{Dialog initialisation event.
}
1073 Gives the window the default behaviour of transferring data to child controls via
1074 the validator that each control has.
1076 \wxheading{See also
}
1078 \helpref{wxValidator
}{wxvalidator
},
\helpref{wxWindow::TransferDataToWindow
}{wxwindowtransferdatatowindow
}
1080 \membersection{wxWindow::OnMenuCommand
}\label{wxwindowonmenucommand
}
1082 \func{void
}{OnMenuCommand
}{\param{wxCommandEvent\&
}{event
}}
1084 Called when a menu command is received from a menu bar.
1086 \wxheading{Parameters
}
1088 \docparam{event
}{The menu command event. For more information, see
\helpref{wxCommandEvent
}{wxcommandevent
}.
}
1092 A function with this name doesn't actually exist; you can choose any member function to receive
1093 menu command events, using the EVT
\_COMMAND macro for individual commands or EVT
\_COMMAND\_RANGE for
1094 a range of commands.
1096 \wxheading{See also
}
1098 \helpref{wxCommandEvent
}{wxcommandevent
},
\rtfsp
1099 \helpref{wxWindow::OnMenuHighlight
}{wxwindowonmenuhighlight
},
\rtfsp
1100 \helpref{Event handling overview
}{eventhandlingoverview
}
1102 \membersection{wxWindow::OnMenuHighlight
}\label{wxwindowonmenuhighlight
}
1104 \func{void
}{OnMenuHighlight
}{\param{wxMenuEvent\&
}{event
}}
1106 Called when a menu select is received from a menu bar: that is, the
1107 mouse cursor is over a menu item, but the left mouse button has not been
1110 \wxheading{Parameters
}
1112 \docparam{event
}{The menu highlight event. For more information, see
\helpref{wxMenuEvent
}{wxmenuevent
}.
}
1116 You can choose any member function to receive
1117 menu select events, using the EVT
\_MENU\_HIGHLIGHT macro for individual menu items or EVT
\_MENU\_HIGHLIGHT\_ALL macro
1120 The default implementation for
\helpref{wxFrame::OnMenuHighlight
}{wxframeonmenuhighlight
} displays help
1121 text in the first field of the status bar.
1123 This function was known as
{\bf OnMenuSelect
} in earlier versions of wxWindows, but this was confusing
1124 since a selection is normally a left-click action.
1126 \wxheading{See also
}
1128 \helpref{wxMenuEvent
}{wxmenuevent
},
\rtfsp
1129 \helpref{wxWindow::OnMenuCommand
}{wxwindowonmenucommand
},
\rtfsp
1130 \helpref{Event handling overview
}{eventhandlingoverview
}
1133 \membersection{wxWindow::OnMouseEvent
}\label{wxwindowonmouseevent
}
1135 \func{void
}{OnMouseEvent
}{\param{wxMouseEvent\&
}{ event
}}
1137 Called when the user has initiated an event with the
1140 \wxheading{Parameters
}
1142 \docparam{event
}{The mouse event. See
\helpref{wxMouseEvent
}{wxmouseevent
} for
1147 Most, but not all, windows respond to this event.
1149 To intercept this event, use the EVT
\_MOUSE\_EVENTS macro in an event table definition, or individual
1150 mouse event macros such as EVT
\_LEFT\_DOWN.
1152 \wxheading{See also
}
1154 \helpref{wxMouseEvent
}{wxmouseevent
},
\rtfsp
1155 \helpref{Event handling overview
}{eventhandlingoverview
}
1157 \membersection{wxWindow::OnMove
}\label{wxwindowonmove
}
1159 \func{void
}{OnMove
}{\param{wxMoveEvent\&
}{event
}}
1161 Called when a window is moved.
1163 \wxheading{Parameters
}
1165 \docparam{event
}{The move event. For more information, see
\helpref{wxMoveEvent
}{wxmoveevent
}.
}
1169 Use the EVT
\_MOVE macro to intercept move events.
1173 Not currently implemented.
1175 \wxheading{See also
}
1177 \helpref{wxMoveEvent
}{wxmoveevent
},
\rtfsp
1178 \helpref{wxFrame::OnSize
}{wxframeonsize
},
\rtfsp
1179 \helpref{Event handling overview
}{eventhandlingoverview
}
1181 \membersection{wxWindow::OnPaint
}\label{wxwindowonpaint
}
1183 \func{void
}{OnPaint
}{\param{wxPaintEvent\&
}{event
}}
1185 Sent to the event handler when the window must be refreshed.
1187 \wxheading{Parameters
}
1189 \docparam{event
}{Paint event. For more information, see
\helpref{wxPaintEvent
}{wxpaintevent
}.
}
1193 Use the EVT
\_PAINT macro in an event table definition to intercept paint events.
1195 In a paint event handler, the application should always create a
\helpref{wxPaintDC
}{wxpaintdc
} object.
1201 void MyWindow::OnPaint(wxPaintEvent& event)
1210 You can optimize painting by retrieving the rectangles
1211 that have been damaged and only repainting these. The rectangles are in
1212 terms of the client area, and are unscrolled, so you will need to do
1213 some calculations using the current view position to obtain logical,
1216 Here is an example of using the
\helpref{wxRegionIterator
}{wxregioniterator
} class:
1220 // Called when window needs to be repainted.
1221 void MyWindow::OnPaint(wxPaintEvent& event)
1225 // Find Out where the window is scrolled to
1226 int vbX,vbY; // Top left corner of client
1227 ViewStart(&vbX,&vbY);
1229 int vX,vY,vW,vH; // Dimensions of client area in pixels
1230 wxRegionIterator upd(GetUpdateRegion()); // get the update rect list
1239 // Alternatively we can do this:
1241 // upd.GetRect(&rect);
1243 // Repaint this rectangle
1252 \wxheading{See also
}
1254 \helpref{wxPaintEvent
}{wxpaintevent
},
\rtfsp
1255 \helpref{wxPaintDC
}{wxpaintdc
},
\rtfsp
1256 \helpref{Event handling overview
}{eventhandlingoverview
}
1258 \membersection{wxWindow::OnScroll
}\label{wxwindowonscroll
}
1260 \func{void
}{OnScroll
}{\param{wxScrollEvent\&
}{event
}}
1262 Called when a scroll event is received from one of the window's built-in scrollbars.
1264 \wxheading{Parameters
}
1266 \docparam{event
}{Command event. Retrieve the new scroll position by
1267 calling
\helpref{wxScrollEvent::GetPosition
}{wxscrolleventgetposition
}, and the
1268 scrollbar orientation by calling
\helpref{wxScrollEvent::GetOrientation
}{wxscrolleventgetorientation
}.
}
1272 Note that it is not possible to distinguish between horizontal and vertical scrollbars
1273 until the function is executing (you can't have one function for vertical, another
1274 for horizontal events).
1276 \wxheading{See also
}
1278 \helpref{wxScrollEvent
}{wxscrollevent
},
\rtfsp
1279 \helpref{Event handling overview
}{eventhandlingoverview
}
1281 \membersection{wxWindow::OnSetFocus
}\label{wxwindowonsetfocus
}
1283 \func{void
}{OnSetFocus
}{\param{wxFocusEvent\&
}{event
}}
1285 Called when a window's focus is being set.
1287 \wxheading{Parameters
}
1289 \docparam{event
}{The focus event. For more information, see
\helpref{wxFocusEvent
}{wxfocusevent
}.
}
1293 To intercept this event, use the macro EVT
\_SET\_FOCUS in an event table definition.
1295 Most, but not all, windows respond to this event.
1297 \wxheading{See also
}
1299 \helpref{wxFocusEvent
}{wxfocusevent
},
\helpref{wxWindow::OnKillFocus
}{wxwindowonkillfocus
},
\rtfsp
1300 \helpref{Event handling overview
}{eventhandlingoverview
}
1302 \membersection{wxWindow::OnSize
}\label{wxwindowonsize
}
1304 \func{void
}{OnSize
}{\param{wxSizeEvent\&
}{event
}}
1306 Called when the window has been resized.
1308 \wxheading{Parameters
}
1310 \docparam{event
}{Size event. For more information, see
\helpref{wxSizeEvent
}{wxsizeevent
}.
}
1314 You may wish to use this for frames to resize their child windows as appropriate.
1316 Note that the size passed is of
1317 the whole window: call
\helpref{wxWindow::GetClientSize
}{wxwindowgetclientsize
} for the area which may be
1318 used by the application.
1320 \wxheading{See also
}
1322 \helpref{wxSizeEvent
}{wxsizeevent
},
\rtfsp
1323 \helpref{Event handling overview
}{eventhandlingoverview
}
1325 \membersection{wxWindow::OnSysColourChanged
}\label{wxwindowonsyscolourchanged
}
1327 \func{void
}{OnSysColourChanged
}{\param{wxOnSysColourChangedEvent\&
}{event
}}
1329 Called when the user has changed the system colours.
1331 \wxheading{Parameters
}
1333 \docparam{event
}{System colour change event. For more information, see
\helpref{wxSysColourChangedEvent
}{wxsyscolourchangedevent
}.
}
1335 \wxheading{See also
}
1337 \helpref{wxSysColourChangedEvent
}{wxsyscolourchangedevent
},
\rtfsp
1338 \helpref{Event handling overview
}{eventhandlingoverview
}
1340 \membersection{wxWindow::PopEventHandler
}\label{wxwindowpopeventhandler
}
1342 \constfunc{wxEvtHandler*
}{PopEventHandler
}{\param{bool
}{deleteHandler = FALSE
}}
1344 Removes and returns the top-most event handler on the event handler stack.
1346 \wxheading{Parameters
}
1348 \docparam{deleteHandler
}{If this is TRUE, the handler will be deleted after it is removed. The
1349 default value is FALSE.
}
1351 \wxheading{See also
}
1353 \helpref{wxWindow::SetEventHandler
}{wxwindowseteventhandler
},
\rtfsp
1354 \helpref{wxWindow::GetEventHandler
}{wxwindowgeteventhandler
},
\rtfsp
1355 \helpref{wxWindow::PushEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
1356 \helpref{wxEvtHandler::ProcessEvent
}{wxevthandlerprocessevent
},
\rtfsp
1357 \helpref{wxEvtHandler
}{wxevthandler
}\rtfsp
1359 \membersection{wxWindow::PopupMenu
}\label{wxwindowpopupmenu
}
1361 \func{virtual bool
}{PopupMenu
}{\param{wxMenu*
}{menu
},
\param{int
}{x
},
\param{int
}{y
}}
1363 Pops up the given menu at the specified coordinates, relative to this
1364 window, and returns control when the user has dismissed the menu. If a
1365 menu item is selected, the callback defined for the menu is called with
1366 wxMenu and wxCommandEvent reference arguments. The callback should access
1367 the commandInt member of the event to check the selected menu identifier.
1369 \wxheading{Parameters
}
1371 \docparam{menu
}{Menu to pop up.
}
1373 \docparam{x
}{Required x position for the menu to appear.
}
1375 \docparam{y
}{Required y position for the menu to appear.
}
1377 \wxheading{See also
}
1379 \helpref{wxMenu
}{wxmenu
}
1383 Just before the menu is popped up,
\helpref{wxMenu::UpdateUI
}{wxmenuupdateui
} is called
1384 to ensure that the menu items are in the correct state.
1386 \membersection{wxWindow::PushEventHandler
}\label{wxwindowpusheventhandler
}
1388 \func{void
}{PushEventHandler
}{\param{wxEvtHandler*
}{handler
}}
1390 Pushes this event handler onto the event stack for the window.
1392 \wxheading{Parameters
}
1394 \docparam{handler
}{Specifies the handler to be pushed.
}
1398 An event handler is an object that is capable of processing the events
1399 sent to a window. By default, the window is its own event handler, but
1400 an application may wish to substitute another, for example to allow
1401 central implementation of event-handling for a variety of different
1404 \helpref{wxWindow::PushEventHandler
}{wxwindowpusheventhandler
} allows
1405 an application to set up a chain of event handlers, where an event not handled by one event handler is
1406 handed to the next one in the chain. Use
\helpref{wxWindow::PopEventHandler
}{wxwindowpopeventhandler
} to
1407 remove the event handler.
1409 \wxheading{See also
}
1411 \helpref{wxWindow::SetEventHandler
}{wxwindowseteventhandler
},
\rtfsp
1412 \helpref{wxWindow::GetEventHandler
}{wxwindowgeteventhandler
},
\rtfsp
1413 \helpref{wxWindow::PopEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
1414 \helpref{wxEvtHandler::ProcessEvent
}{wxevthandlerprocessevent
},
\rtfsp
1415 \helpref{wxEvtHandler
}{wxevthandler
}
1417 \membersection{wxWindow::Raise
}\label{wxwindowraise
}
1419 \func{void
}{Raise
}{\void}
1421 Raises the window to the top of the window hierarchy if it is a managed window (dialog
1424 \membersection{wxWindow::Refresh
}\label{wxwindowrefresh
}
1426 \func{virtual void
}{Refresh
}{\param{const bool
}{ eraseBackground = TRUE
},
\param{const wxRect*
}{rect
1429 Causes a message or event to be generated to repaint the
1432 \wxheading{Parameters
}
1434 \docparam{eraseBackground
}{If TRUE, the background will be
1437 \docparam{rect
}{If non-NULL, only the given rectangle will
1438 be treated as damaged.
}
1440 \membersection{wxWindow::ReleaseMouse
}\label{wxwindowreleasemouse
}
1442 \func{virtual void
}{ReleaseMouse
}{\void}
1444 Releases mouse input captured with
\helpref{wxWindow::CaptureMouse
}{wxwindowcapturemouse
}.
1446 \wxheading{See also
}
1448 \helpref{wxWindow::CaptureMouse
}{wxwindowcapturemouse
}
1450 \membersection{wxWindow::RemoveChild
}\label{wxwindowremovechild
}
1452 \func{virtual void
}{RemoveChild
}{\param{wxWindow*
}{child
}}
1454 Removes a child window. This is called automatically by window deletion
1455 functions so should not be required by the application programmer.
1457 \wxheading{Parameters
}
1459 \docparam{child
}{Child window to remove.
}
1461 \membersection{wxWindow::ScreenToClient
}\label{wxwindowscreentoclient
}
1463 \constfunc{virtual void
}{ScreenToClient
}{\param{int*
}{x
},
\param{int*
}{y
}}
1465 \constfunc{virtual wxPoint
}{ScreenToClient
}{\param{const wxPoint\&
}{pt
}}
1467 Converts from screen to client window coordinates.
1469 \wxheading{Parameters
}
1471 \docparam{x
}{Stores the screen x coordinate and receives the client x coordinate.
}
1473 \docparam{y
}{Stores the screen x coordinate and receives the client x coordinate.
}
1475 \docparam{pt
}{The screen position for the second form of the function.
}
1477 \membersection{wxWindow::ScrollWindow
}\label{wxwindowscrollwindow
}
1479 \func{virtual void
}{ScrollWindow
}{\param{int
}{dx
},
\param{int
}{dy
},
\param{const wxRect*
}{ rect = NULL
}}
1481 Physically scrolls the pixels in the window.
1483 \wxheading{Parameters
}
1485 \docparam{dx
}{Amount to scroll horizontally.
}
1487 \docparam{dy
}{Amount to scroll vertically.
}
1489 \docparam{rect
}{Rectangle to invalidate. If this is NULL, the whole window is invalidated. If you
1490 pass a rectangle corresponding to the area of the window exposed by the scroll, your painting handler
1491 can optimise painting by checking for the invalidated region.
}
1495 Available only under Windows.
1497 Use this function to optimise your scrolling implementations, to minimise the area that must be
1500 \membersection{wxWindow::SetAcceleratorTable
}\label{wxwindowsetacceleratortable
}
1502 \func{virtual void
}{SetAcceleratorTable
}{\param{const wxAcceleratorTable\&
}{ accel
}}
1504 Sets the accelerator table for this window. See
\helpref{wxAcceleratorTable
}{wxacceleratortable
}.
1506 \membersection{wxWindow::SetAutoLayout
}\label{wxwindowsetautolayout
}
1508 \func{void
}{SetAutoLayout
}{\param{const bool
}{ autoLayout
}}
1510 Determines whether the
\helpref{wxWindow::Layout
}{wxwindowlayout
} function will
1511 be called automatically when the window is resized.
1513 \wxheading{Parameters
}
1515 \docparam{autoLayout
}{Set this to TRUE if you wish the Layout function to be called
1516 from within wxWindow::OnSize functions.
}
1518 \wxheading{See also
}
1520 \helpref{wxWindow::SetConstraints
}{wxwindowsetconstraints
}
1522 \membersection{wxWindow::SetBackgroundColour
}\label{wxwindowsetbackgroundcolour
}
1524 \func{virtual void
}{SetBackgroundColour
}{\param{const wxColour\&
}{colour
}}
1526 Sets the background colour of the window.
1528 \wxheading{Parameters
}
1530 \docparam{colour
}{The colour to be used as the background colour.
}
1534 The background colour is usually painted by the default
\rtfsp
1535 \helpref{wxWindow::OnEraseBackground
}{wxwindowonerasebackground
} event handler function.
1537 Note that setting the background colour does not cause an immediate refresh, so you
1538 may wish to call
\helpref{wxWindow::Clear
}{wxwindowclear
} or
\helpref{wxWindow::Refresh
}{wxwindowrefresh
} after
1539 calling this function.
1541 \wxheading{See also
}
1543 \helpref{wxWindow::GetBackgroundColour
}{wxwindowgetbackgroundcolour
},
\rtfsp
1544 \helpref{wxWindow::SetForegroundColour
}{wxwindowsetforegroundcolour
},
\rtfsp
1545 \helpref{wxWindow::GetForegroundColour
}{wxwindowgetforegroundcolour
},
\rtfsp
1546 \helpref{wxWindow::Clear
}{wxwindowclear
},
\rtfsp
1547 \helpref{wxWindow::Refresh
}{wxwindowrefresh
},
\rtfsp
1548 \helpref{wxWindow::OnEraseBackground
}{wxwindowonerasebackground
}
1550 \membersection{wxWindow::SetConstraints
}\label{wxwindowsetconstraints
}
1552 \func{void
}{SetConstraints
}{\param{wxLayoutConstraints*
}{constraints
}}
1554 Sets the window to have the given layout constraints. The window
1555 will then own the object, and will take care of its deletion.
1556 If an existing layout constraints object is already owned by the
1557 window, it will be deleted.
1559 \wxheading{Parameters
}
1561 \docparam{constraints
}{The constraints to set. Pass NULL to disassociate and delete the window's
1566 You must call
\helpref{wxWindow::SetAutoLayout
}{wxwindowsetautolayout
} to tell a window to use
1567 the constraints automatically in OnSize; otherwise, you must
1568 override OnSize and call Layout explicitly.
1570 \membersection{wxWindow::SetDropTarget
}\label{wxwindowsetdroptarget
}
1572 \func{void
}{SetDropTarget
}{\param{wxDropTarget*
}{ target
}}
1574 Associates a drop target with this window.
1576 If the window already has a drop target, it is deleted.
1578 \wxheading{See also
}
1580 \helpref{wxWindow::GetDropTarget
}{wxwindowgetdroptarget
},
1581 \helpref{Drag and drop overview
}{wxdndoverview
}
1583 \membersection{wxWindow::SetFocus
}\label{wxwindowsetfocus
}
1585 \func{virtual void
}{SetFocus
}{\void}
1587 This sets the window to receive keyboard input.
1589 \membersection{wxWindow::SetFont
}\label{wxwindowsetfont
}
1591 \func{void
}{SetFont
}{\param{const wxFont\&
}{font
}}
1593 Sets the font for this window.
1595 \wxheading{Parameters
}
1597 \docparam{font
}{Font to associate with this window.
}
1599 \wxheading{See also
}
1601 \helpref{wxWindow::GetFont
}{wxwindowgetfont
}
1603 \membersection{wxWindow::SetForegroundColour
}\label{wxwindowsetforegroundcolour
}
1605 \func{virtual void
}{SetForegroundColour
}{\param{const wxColour\&
}{colour
}}
1607 Sets the foreground colour of the window.
1609 \wxheading{Parameters
}
1611 \docparam{colour
}{The colour to be used as the foreground colour.
}
1615 The interpretation of foreground colour is open to interpretation according
1616 to the window class; it may be the text colour or other colour, or it may not
1619 \wxheading{See also
}
1621 \helpref{wxWindow::GetForegroundColour
}{wxwindowgetforegroundcolour
},
\rtfsp
1622 \helpref{wxWindow::SetBackgroundColour
}{wxwindowsetbackgroundcolour
},
\rtfsp
1623 \helpref{wxWindow::GetBackgroundColour
}{wxwindowgetbackgroundcolour
}
1625 \membersection{wxWindow::SetId
}\label{wxwindowsetid
}
1627 \func{void
}{SetId
}{\param{int
}{ id
}}
1629 Sets the identifier of the window.
1633 Each window has an integer identifier. If the application has not provided one,
1634 an identifier will be generated. Normally, the identifier should be provided
1635 on creation and should not be modified subsequently.
1637 \wxheading{See also
}
1639 \helpref{wxWindow::GetId
}{wxwindowgetid
},
\rtfsp
1640 \helpref{Window identifiers
}{windowids
}
1642 \membersection{wxWindow::SetName
}\label{wxwindowsetname
}
1644 \func{virtual void
}{SetName
}{\param{const wxString\&
}{name
}}
1646 Sets the window's name.
1648 \wxheading{Parameters
}
1650 \docparam{name
}{A name to set for the window.
}
1652 \wxheading{See also
}
1654 \helpref{wxWindow::GetName
}{wxwindowgetname
}
1656 \membersection{wxWindow::SetReturnCode
}\label{wxwindowsetreturncode
}
1658 \func{void
}{SetReturnCode
}{\param{int
}{retCode
}}
1660 Sets the return code for this window.
1662 \wxheading{Parameters
}
1664 \docparam{retCode
}{The integer return code, usually a control identifier.
}
1668 A return code is normally associated with a modal dialog, where
\helpref{wxDialog::ShowModal
}{wxdialogshowmodal
} returns
1669 a code to the application. The function
\helpref{wxDialog::EndModal
}{wxdialogendmodal
} calls
{\bf SetReturnCode
}.
1671 \wxheading{See also
}
1673 \helpref{wxWindow::GetReturnCode
}{wxwindowgetreturncode
},
\helpref{wxDialog::ShowModal
}{wxdialogshowmodal
},
\rtfsp
1674 \helpref{wxDialog::EndModal
}{wxdialogendmodal
}
1676 \membersection{wxWindow::SetScrollbar
}\label{wxwindowsetscrollbar
}
1678 \func{virtual void
}{SetScrollbar
}{\param{int
}{orientation
},
\param{int
}{position
},
\rtfsp
1679 \param{int
}{thumbSize
},
\param{int
}{range
},
\rtfsp
1680 \param{const bool
}{refresh = TRUE
}}
1682 Sets the scrollbar properties of a built-in scrollbar.
1684 \wxheading{Parameters
}
1686 \docparam{orientation
}{Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL or wxVERTICAL.
}
1688 \docparam{position
}{The position of the scrollbar in scroll units.
}
1690 \docparam{thumbSize
}{The size of the thumb, or visible portion of the scrollbar, in scroll units.
}
1692 \docparam{range
}{The maximum position of the scrollbar.
}
1694 \docparam{refresh
}{TRUE to redraw the scrollbar, FALSE otherwise.
}
1698 Let's say you wish to display
50 lines of text, using the same font.
1699 The window is sized so that you can only see
16 lines at a time.
1705 SetScrollbar(wxVERTICAL,
0,
16,
50);
1709 Note that with the window at this size, the thumb position can never go
1710 above
50 minus
16, or
34.
1712 You can determine how many lines are currently visible by dividing the current view
1713 size by the character height in pixels.
1715 When defining your own scrollbar behaviour, you will always need to recalculate
1716 the scrollbar settings when the window size changes. You could therefore put your
1717 scrollbar calculations and SetScrollbar
1718 call into a function named AdjustScrollbars, which can be called initially and also
1719 from your
\helpref{wxWindow::OnSize
}{wxwindowonsize
} event handler function.
1721 \wxheading{See also
}
1723 \helpref{Scrolling overview
}{scrollingoverview
},
\rtfsp
1724 \helpref{wxScrollBar
}{wxscrollbar
},
\helpref{wxScrolledWindow
}{wxscrolledwindow
}
1727 \membersection{wxWindow::SetScrollPage
}\label{wxwindowsetscrollpage
}
1729 \func{virtual void
}{SetScrollPage
}{\param{int
}{orientation
},
\param{int
}{pageSize
},
\param{const bool
}{refresh = TRUE
}}
1731 Sets the page size of one of the built-in scrollbars.
1733 \wxheading{Parameters
}
1735 \docparam{orientation
}{Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL or wxVERTICAL.
}
1737 \docparam{pageSize
}{Page size in scroll units.
}
1739 \docparam{refresh
}{TRUE to redraw the scrollbar, FALSE otherwise.
}
1743 The page size of a scrollbar is the number of scroll units that the scroll thumb travels when you
1744 click on the area above/left of or below/right of the thumb. Normally you will want a whole visible
1745 page to be scrolled, i.e. the size of the current view (perhaps the window client size). This
1746 value has to be adjusted when the window is resized, since the page size will have changed.
1748 In addition to specifying how far the scroll thumb travels when paging, in Motif and some versions of Windows
1749 the thumb changes size to reflect the page size relative to the length of the
document. When the
1750 document size is only slightly bigger than the current view (window) size, almost all of the scrollbar
1751 will be taken up by the thumb. When the two values become the same, the scrollbar will (on some systems)
1754 Currently, this function should be called before SetPageRange, because of a quirk in the Windows
1755 handling of pages and ranges.
1757 \wxheading{See also
}
1759 \helpref{wxWindow::SetScrollPos
}{wxwindowsetscrollpos
},
\rtfsp
1760 \helpref{wxWindow::GetScrollPos
}{wxwindowsetscrollpos
},
\rtfsp
1761 \helpref{wxWindow::GetScrollPage
}{wxwindowsetscrollpage
},
\rtfsp
1762 \helpref{wxScrollBar
}{wxscrollbar
},
\helpref{wxScrolledWindow
}{wxscrolledwindow
}
1765 \membersection{wxWindow::SetScrollPos
}\label{wxwindowsetscrollpos
}
1767 \func{virtual void
}{SetScrollPos
}{\param{int
}{orientation
},
\param{int
}{pos
},
\param{const bool
}{refresh = TRUE
}}
1769 Sets the position of one of the built-in scrollbars.
1771 \wxheading{Parameters
}
1773 \docparam{orientation
}{Determines the scrollbar whose position is to be set. May be wxHORIZONTAL or wxVERTICAL.
}
1775 \docparam{pos
}{Position in scroll units.
}
1777 \docparam{refresh
}{TRUE to redraw the scrollbar, FALSE otherwise.
}
1781 This function does not directly affect the contents of the window: it is up to the
1782 application to take note of scrollbar attributes and redraw contents accordingly.
1784 \wxheading{See also
}
1786 \helpref{wxWindow::SetScrollbar
}{wxwindowsetscrollbar
},
\rtfsp
1787 \helpref{wxWindow::GetScrollPos
}{wxwindowsetscrollpos
},
\rtfsp
1788 \helpref{wxWindow::GetScrollThumb
}{wxwindowgetscrollthumb
},
\rtfsp
1789 \helpref{wxScrollBar
}{wxscrollbar
},
\helpref{wxScrolledWindow
}{wxscrolledwindow
}
1792 \membersection{wxWindow::SetScrollRange
}\label{wxwindowsetscrollrange
}
1794 \func{virtual void
}{SetScrollRange
}{\param{int
}{orientation
},
\param{int
}{range
},
\param{const bool
}{refresh = TRUE
}}
1796 Sets the range of one of the built-in scrollbars.
1798 \wxheading{Parameters
}
1800 \docparam{orientation
}{Determines the scrollbar whose range is to be set. May be wxHORIZONTAL or wxVERTICAL.
}
1802 \docparam{range
}{Scroll range.
}
1804 \docparam{refresh
}{TRUE to redraw the scrollbar, FALSE otherwise.
}
1808 The range of a scrollbar is the number of steps that the thumb may travel, rather than the total
1809 object length of the scrollbar. If you are implementing a scrolling window, for example, you
1810 would adjust the scroll range when the window is resized, by subtracting the window view size from the
1811 total virtual window size. When the two sizes are the same (all the window is visible), the range goes to zero
1812 and usually the scrollbar will be automatically hidden.
1814 \wxheading{See also
}
1816 \helpref{wxWindow::SetScrollPos
}{wxwindowsetscrollpos
},
\rtfsp
1817 \helpref{wxWindow::SetScrollPage
}{wxwindowsetscrollpage
},
\rtfsp
1818 \helpref{wxWindow::GetScrollPos
}{wxwindowsetscrollpos
},
\rtfsp
1819 \helpref{wxWindow::GetScrollPage
}{wxwindowsetscrollpage
},
\rtfsp
1820 \helpref{wxScrollBar
}{wxscrollbar
},
\helpref{wxScrolledWindow
}{wxscrolledwindow
}
1823 \membersection{wxWindow::SetSize
}\label{wxwindowsetsize
}
1825 \func{virtual void
}{SetSize
}{\param{int
}{ x
},
\param{int
}{ y
},
\param{int
}{ width
},
\param{int
}{ height
},
1826 \param{int
}{ sizeFlags = wxSIZE
\_AUTO}}
1828 \func{virtual void
}{SetSize
}{\param{const wxRect\&
}{ rect
}}
1830 Sets the size and position of the window in pixels.
1832 \func{virtual void
}{SetSize
}{\param{int
}{ width
},
\param{int
}{ height
}}
1834 \func{virtual void
}{SetSize
}{\param{const wxSize\&
}{ size
}}
1836 Sets the size of the window in pixels.
1838 \wxheading{Parameters
}
1840 \docparam{x
}{Required x position in pixels, or -
1 to indicate that the existing
1841 value should be used.
}
1843 \docparam{y
}{Required y position in pixels, or -
1 to indicate that the existing
1844 value should be used.
}
1846 \docparam{width
}{Required width in pixels, or -
1 to indicate that the existing
1847 value should be used.
}
1849 \docparam{height
}{Required height position in pixels, or -
1 to indicate that the existing
1850 value should be used.
}
1852 \docparam{size
}{\helpref{wxSize
}{wxsize
} object for setting the size.
}
1854 \docparam{rect
}{\helpref{wxRect
}{wxrect
} object for setting the position and size.
}
1856 \docparam{sizeFlags
}{Indicates the interpretation of other parameters. It is a bit list of the following:
1858 {\bf wxSIZE
\_AUTO\_WIDTH}: a -
1 width value is taken to indicate
1859 a wxWindows-supplied default width.\\
1860 {\bf wxSIZE
\_AUTO\_HEIGHT}: a -
1 height value is taken to indicate
1861 a wxWindows-supplied default width.\\
1862 {\bf wxSIZE
\_AUTO}: -
1 size values are taken to indicate
1863 a wxWindows-supplied default size.\\
1864 {\bf wxSIZE
\_USE\_EXISTING}: existing dimensions should be used
1865 if -
1 values are supplied.\\
1866 {\bf wxSIZE
\_ALLOW\_MINUS\_ONE}: allow dimensions of -
1 and less to be interpreted
1867 as real dimensions, not default values.
1872 The second form is a convenience for calling the first form with default
1873 x and y parameters, and must be used with non-default width and height values.
1875 The first form sets the position and optionally size, of the window.
1876 Parameters may be -
1 to indicate either that a default should be supplied
1877 by wxWindows, or that the current value of the dimension should be used.
1879 \wxheading{See also
}
1881 \helpref{wxWindow::Move
}{wxwindowmove
}
1883 \membersection{wxWindow::SetSizeHints
}\label{wxwindowsetsizehints
}
1885 \func{virtual void
}{SetSizeHints
}{\param{int
}{ minW=-
1},
\param{int
}{ minH=-
1},
\param{int
}{ maxW=-
1},
\param{int
}{ maxH=-
1},
1886 \param{int
}{ incW=-
1},
\param{int
}{ incH=-
1}}
1888 Allows specification of minimum and maximum window sizes, and window size increments.
1889 If a pair of values is not set (or set to -
1), the default values will be used.
1891 \wxheading{Parameters
}
1893 \docparam{minW
}{Specifies the minimum width allowable.
}
1895 \docparam{minH
}{Specifies the minimum height allowable.
}
1897 \docparam{maxW
}{Specifies the maximum width allowable.
}
1899 \docparam{maxH
}{Specifies the maximum height allowable.
}
1901 \docparam{incW
}{Specifies the increment for sizing the width (Motif/Xt only).
}
1903 \docparam{incH
}{Specifies the increment for sizing the height (Motif/Xt only).
}
1907 If this function is called, the user will not be able to size the window outside the
1910 The resizing increments are only significant under Motif or Xt.
1912 \membersection{wxWindow::SetClientSize
}
1914 \func{virtual void
}{SetClientSize
}{\param{int
}{ width
},
\param{int
}{ height
}}
1916 \func{virtual void
}{SetClientSize
}{\param{const wxSize\&
}{ size
}}
1918 This sets the size of the window client area in pixels. Using this function to size a window
1919 tends to be more device-independent than
\helpref{wxWindow::SetSize
}{wxwindowsetsize
}, since the application need not
1920 worry about what dimensions the border or title bar have when trying to fit the window
1921 around panel items, for example.
1923 \wxheading{Parameters
}
1925 \docparam{width
}{The required client area width.
}
1927 \docparam{height
}{The required client area height.
}
1929 \docparam{size
}{The required client size.
}
1931 \membersection{wxWindow::SetPalette
}
1933 \func{virtual void
}{SetPalette
}{\param{wxPalette*
}{palette
}}
1935 Obsolete - use
\helpref{wxDC::SetPalette
}{wxdcsetpalette
} instead.
1937 \membersection{wxWindow::SetCursor
}\label{wxwindowsetcursor
}
1939 \func{virtual void
}{SetCursor
}{\param{const wxCursor\&
}{cursor
}}
1941 Sets the window's cursor.
1943 \wxheading{Parameters
}
1945 \docparam{cursor
}{Specifies the cursor that the window should normally display.
}
1949 Under Windows, you sometimes need to call ::wxSetCursor in addition to this
1950 function if you want the cursor to change immediately, because under Windows,
1951 wxWindows only sets the global cursor when it detects mouse movement.
1953 \wxheading{See also
}
1955 \helpref{::wxSetCursor
}{wxsetcursor
},
\helpref{wxCursor
}{wxcursor
}
1957 \membersection{wxWindow::SetEventHandler
}\label{wxwindowseteventhandler
}
1959 \func{void
}{SetEventHandler
}{\param{wxEvtHandler*
}{handler
}}
1961 Sets the event handler for this window.
1963 \wxheading{Parameters
}
1965 \docparam{handler
}{Specifies the handler to be set.
}
1969 An event handler is an object that is capable of processing the events
1970 sent to a window. By default, the window is its own event handler, but
1971 an application may wish to substitute another, for example to allow
1972 central implementation of event-handling for a variety of different
1975 It is usually better to use
\helpref{wxWindow::PushEventHandler
}{wxwindowpusheventhandler
} since
1976 this sets up a chain of event handlers, where an event not handled by one event handler is
1977 handed to the next one in the chain.
1979 \wxheading{See also
}
1981 \helpref{wxWindow::GetEventHandler
}{wxwindowgeteventhandler
},
\rtfsp
1982 \helpref{wxWindow::PushEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
1983 \helpref{wxWindow::PopEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
1984 \helpref{wxEvtHandler::ProcessEvent
}{wxevthandlerprocessevent
},
\rtfsp
1985 \helpref{wxEvtHandler
}{wxevthandler
}
1987 \membersection{wxWindow::SetTitle
}\label{wxwindowsettitle
}
1989 \func{virtual void
}{SetTitle
}{\param{const wxString\&
}{title
}}
1991 Sets the window's title. Applicable only to frames and dialogs.
1993 \wxheading{Parameters
}
1995 \docparam{title
}{The window's title.
}
1997 \wxheading{See also
}
1999 \helpref{wxWindow::GetTitle
}{wxwindowgettitle
}
2001 \membersection{wxWindow::Show
}
2003 \func{virtual bool
}{Show
}{\param{const bool
}{ show
}}
2005 Shows or hides the window.
2007 \wxheading{Parameters
}
2009 \docparam{show
}{If TRUE, displays the window and brings it to the front. Otherwise,
2012 \wxheading{See also
}
2014 \helpref{wxWindow::IsShown
}{wxwindowisshown
}
2016 \membersection{wxWindow::TransferDataFromWindow
}\label{wxwindowtransferdatafromwindow
}
2018 \func{virtual bool
}{TransferDataFromWindow
}{\void}
2020 Transfers values from child controls to data areas specified by their validators. Returns
2021 FALSE if a transfer failed.
2023 \wxheading{See also
}
2025 \helpref{wxWindow::TransferDataToWindow
}{wxwindowtransferdatatowindow
},
\rtfsp
2026 \helpref{wxValidator
}{wxvalidator
},
\helpref{wxWindow::Validate
}{wxwindowvalidate
}
2028 \membersection{wxWindow::TransferDataToWindow
}\label{wxwindowtransferdatatowindow
}
2030 \func{virtual bool
}{TransferDataToWindow
}{\void}
2032 Transfers values to child controls from data areas specified by their validators.
2034 \wxheading{Return value
}
2036 Returns FALSE if a transfer failed.
2038 \wxheading{See also
}
2040 \helpref{wxWindow::TransferDataFromWindow
}{wxwindowtransferdatafromwindow
},
\rtfsp
2041 \helpref{wxValidator
}{wxvalidator
},
\helpref{wxWindow::Validate
}{wxwindowvalidate
}
2043 \membersection{wxWindow::Validate
}\label{wxwindowvalidate
}
2045 \func{virtual bool
}{Validate
}{\void}
2047 Validates the current values of the child controls using their validators.
2049 \wxheading{Return value
}
2051 Returns FALSE if any of the validations failed.
2053 \wxheading{See also
}
2055 \helpref{wxWindow::TransferDataFromWindow
}{wxwindowtransferdatafromwindow
},
\rtfsp
2056 \helpref{wxWindow::TransferDataFromWindow
}{wxwindowtransferdatafromwindow
},
\rtfsp
2057 \helpref{wxValidator
}{wxvalidator
}
2059 \membersection{wxWindow::WarpPointer
}\label{wxwindowwarppointer
}
2061 \func{void
}{WarpPointer
}{\param{int
}{ x
},
\param{int
}{ y
}}
2063 Moves the pointer to the given position on the window.
2065 \wxheading{Parameters
}
2067 \docparam{x
}{The new x position for the cursor.
}
2069 \docparam{y
}{The new y position for the cursor.
}