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.
146 \membersection{wxWindow::ClientToScreen
}
148 \constfunc{virtual void
}{ClientToScreen
}{\param{int*
}{x
},
\param{int*
}{y
}}
150 \constfunc{virtual wxPoint
}{ClientToScreen
}{\param{const wxPoint\&
}{ pt
}}
152 Converts to screen coordinates from coordinates relative to this window.
154 \docparam{x
}{A pointer to a integer value for the x coordinate. Pass the client coordinate in, and
155 a screen coordinate will be passed out.
}
157 \docparam{y
}{A pointer to a integer value for the y coordinate. Pass the client coordinate in, and
158 a screen coordinate will be passed out.
}
160 \docparam{pt
}{The client position for the second form of the function.
}
162 \membersection{wxWindow::Close
}\label{wxwindowclose
}
164 \func{virtual bool
}{Close
}{\param{const bool
}{ force = FALSE
}}
166 The purpose of this call is to provide a safer way of destroying a window than using
167 the
{\it delete
} operator.
169 \wxheading{Parameters
}
171 \docparam{force
}{FALSE if the window's close handler should be able to veto the destruction
172 of this window, TRUE if it cannot.
}
176 Close calls the
\helpref{close handler
}{wxcloseevent
} for the window, providing an opportunity for the window to
177 choose whether to destroy the window.
179 The close handler should check whether the window is being deleted forcibly,
180 using
\helpref{wxCloseEvent::GetForce
}{wxcloseeventgetforce
}, in which case it should
181 destroy the window using
\helpref{wxWindow::Destroy
}{wxwindowdestroy
}.
183 Applies to managed windows (wxFrame and wxDialog classes) only.
187 \helpref{Window deletion overview
}{windowdeletionoverview
},
\rtfsp
188 \helpref{wxWindow::OnCloseWindow
}{wxwindowonclosewindow
},
\rtfsp
189 \helpref{wxWindow::Destroy
}{wxwindowdestroy
},
\rtfsp
190 \helpref{wxCloseEvent
}{wxcloseevent
}
192 \membersection{wxWindow::ConvertDialogToPixels
}\label{wxwindowconvertdialogtopixels
}
194 \func{wxPoint
}{ConvertDialogToPixels
}{\param{const wxPoint\&
}{ pt
}}
196 \func{wxSize
}{ConvertDialogToPixels
}{\param{const wxSize\&
}{ sz
}}
198 Converts a point or size from dialog units to pixels.
200 For the x dimension, the dialog units are multiplied by the average character width
201 and then divided by
4.
203 For the y dimension, the dialog units are multiplied by the average character height
204 and then divided by
8.
208 Dialog units are used for maintaining a dialog's proportions even if the font changes.
209 Dialogs created using Dialog Editor optionally use dialog units.
211 You can also use these functions programmatically. A convenience macro is defined:
215 #define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
221 \helpref{wxWindow::ConvertPixelsToDialog
}{wxwindowconvertpixelstodialog
}
223 \membersection{wxWindow::ConvertPixelsToDialog
}\label{wxwindowconvertpixelstodialog
}
225 \func{wxPoint
}{ConvertPixelsToDialog
}{\param{const wxPoint\&
}{ pt
}}
227 \func{wxSize
}{ConvertPixelsToDialog
}{\param{const wxSize\&
}{ sz
}}
229 Converts a point or size from pixels to dialog units.
231 For the x dimension, the pixels are multiplied by
4 and then divided by the average
234 For the y dimension, the pixels are multipled by
8 and then divided by the average
239 Dialog units are used for maintaining a dialog's proportions even if the font changes.
240 Dialogs created using Dialog Editor optionally use dialog units.
244 \helpref{wxWindow::ConvertDialogToPixels
}{wxwindowconvertdialogtopixels
}
246 \membersection{wxWindow::Destroy
}\label{wxwindowdestroy
}
248 \func{virtual bool
}{Destroy
}{\void}
250 Destroys the window safely. Use this function instead of the delete operator, since
251 different window classes can be destroyed differently. Frames and dialogs
252 are not destroyed immediately when this function is called - they are added
253 to a list of windows to be deleted on idle time, when all the window's events
254 have been processed. This prevents problems with events being sent to non-existant
257 \wxheading{Return value
}
259 TRUE if the window has either been successfully deleted, or it has been added
260 to the list of windows pending real deletion.
262 \membersection{wxWindow::DestroyChildren
}
264 \func{virtual void
}{DestroyChildren
}{\void}
266 Destroys all children of a window. Called automatically by the destructor.
268 \membersection{wxWindow::DragAcceptFiles
}\label{wxwindowdragacceptfiles
}
270 \func{virtual void
}{DragAcceptFiles
}{\param{const bool
}{ accept
}}
272 Enables or disables elibility for drop file events (OnDropFiles).
274 \wxheading{Parameters
}
276 \docparam{accept
}{If TRUE, the window is eligible for drop file events. If FALSE, the window
277 will not accept drop file events.
}
285 \helpref{wxWindow::OnDropFiles
}{wxwindowondropfiles
}
287 \membersection{wxWindow::Enable
}\label{wxwindowenable
}
289 \func{virtual void
}{Enable
}{\param{const bool
}{ enable
}}
291 Enable or disable the window for user input.
293 \wxheading{Parameters
}
295 \docparam{enable
}{If TRUE, enables the window for input. If FALSE, disables the window.
}
299 \helpref{wxWindow::IsEnabled
}{wxwindowisenabled
}
301 \membersection{wxWindow::FakePopupMenu
}\label{wxwindowfakepopupmenu
}
303 \func{virtual bool
}{FakePopupMenu
}{\param{wxMenu*
}{menu
},
\param{int
}{x
},
\param{int
}{y
}}
305 A replacement for wxWindow::PopupMenu for cases where the PopupMenu implementation
306 does not work correctly, in particular on Motif platforms.
308 \wxheading{Parameters
}
310 \docparam{menu
}{Menu to pop up.
}
312 \docparam{x
}{Required x position for the menu to appear.
}
314 \docparam{y
}{Required y position for the menu to appear.
}
318 This is a cut-down version of PopupMenu using a dialog and listbox; pull-right menus
323 \helpref{wxMenu
}{wxmenu
},
\helpref{wxWindow::PopupMenu
}{wxwindowpopupmenu
}
325 \membersection{wxWindow::FindFocus
}\label{wxwindowfindfocus
}
327 \func{static wxWindow*
}{FindFocus
}{\void}
329 Finds the window or control which currently has the keyboard focus.
333 Note that this is a static function, so it can be called without needing a wxWindow pointer.
337 \helpref{wxWindow::SetFocus
}{wxwindowsetfocus
}
339 \membersection{wxWindow::FindWindow
}\label{wxwindowfindwindow
}
341 \func{wxWindow*
}{FindWindow
}{\param{long
}{ id
}}
343 Find a child of this window, by identifier.
345 \func{wxWindow*
}{FindWindow
}{\param{const wxString\&
}{ name
}}
347 Find a child of this window, by name.
349 \membersection{wxWindow::Fit
}\label{wxwindowfit
}
351 \func{virtual void
}{Fit
}{\void}
353 Sizes the window so that it fits around its subwindows.
355 \membersection{wxWindow::GetBackgroundColour
}\label{wxwindowgetbackgroundcolour
}
357 \constfunc{virtual wxColour
}{GetBackgroundColour
}{\void}
359 Returns the background colour of the window.
363 \helpref{wxWindow::SetBackgroundColour
}{wxwindowsetbackgroundcolour
},
\rtfsp
364 \helpref{wxWindow::SetForegroundColour
}{wxwindowsetforegroundcolour
},
\rtfsp
365 \helpref{wxWindow::GetForegroundColour
}{wxwindowgetforegroundcolour
},
\rtfsp
366 \helpref{wxWindow::OnEraseBackground
}{wxwindowonerasebackground
}
368 \membersection{wxWindow::GetCharHeight
}
370 \constfunc{virtual int
}{GetCharHeight
}{\void}
372 Returns the character height for this window.
374 \membersection{wxWindow::GetCharWidth
}
376 \constfunc{virtual int
}{GetCharWidth
}{\void}
378 Returns the average character width for this window.
380 \membersection{wxWindow::GetChildren
}
382 \func{wxList\&
}{GetChildren
}{\void}
384 Returns a reference to the list of the window's children.
386 \membersection{wxWindow::GetClientSize
}\label{wxwindowgetclientsize
}
388 \constfunc{virtual void
}{GetClientSize
}{\param{int*
}{width
},
\param{int*
}{height
}}
390 \constfunc{virtual wxSize
}{GetClientSize
}{\void}
392 This gets the size of the window `client area' in pixels. The client area is the
393 area which may be drawn on by the programmer, excluding title bar, border etc.
395 \wxheading{Parameters
}
397 \docparam{width
}{Receives the client width in pixels.
}
399 \docparam{height
}{Receives the client height in pixels.
}
401 \membersection{wxWindow::GetConstraints
}\label{wxwindowgetconstraints
}
403 \constfunc{wxLayoutConstraints*
}{GetConstraints
}{\void}
405 Returns a pointer to the window's layout constraints, or NULL if there are none.
407 \membersection{wxWindow::GetDefaultItem
}\label{wxwindowgetdefaultitem
}
409 \constfunc{wxButton*
}{GetDefaultItem
}{\void}
411 Returns a pointer to the button which is the default for this window, or NULL.
413 \membersection{wxWindow::GetDropTarget
}\label{wxwindowgetdroptarget
}
415 \constfunc{wxDropTarget*
}{GetDropTarget
}{\void}
417 Returns the associated drop target, which may be NULL.
421 \helpref{wxWindow::SetDropTarget
}{wxwindowsetdroptarget
},
422 \helpref{Drag and drop overview
}{wxdndoverview
}
424 \membersection{wxWindow::GetEventHandler
}\label{wxwindowgeteventhandler
}
426 \constfunc{wxEvtHandler*
}{GetEventHandler
}{\void}
428 Returns the event handler for this window. By default, the window is its
433 \helpref{wxWindow::SetEventHandler
}{wxwindowseteventhandler
},
\rtfsp
434 \helpref{wxWindow::PushEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
435 \helpref{wxWindow::PopEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
436 \helpref{wxEvtHandler::ProcessEvent
}{wxevthandlerprocessevent
},
\rtfsp
437 \helpref{wxEvtHandler
}{wxevthandler
}\rtfsp
439 \membersection{wxWindow::GetFont
}\label{wxwindowgetfont
}
441 \constfunc{wxFont\&
}{GetFont
}{\void}
443 Returns a reference to the font for this window.
447 \helpref{wxWindow::SetFont
}{wxwindowsetfont
}
449 \membersection{wxWindow::GetForegroundColour
}\label{wxwindowgetforegroundcolour
}
451 \func{virtual wxColour
}{GetForegroundColour
}{\void}
453 Returns the foreground colour of the window.
457 The interpretation of foreground colour is open to interpretation according
458 to the window class; it may be the text colour or other colour, or it may not
463 \helpref{wxWindow::SetForegroundColour
}{wxwindowsetforegroundcolour
},
\rtfsp
464 \helpref{wxWindow::SetBackgroundColour
}{wxwindowsetbackgroundcolour
},
\rtfsp
465 \helpref{wxWindow::GetBackgroundColour
}{wxwindowgetbackgroundcolour
}
467 \membersection{wxWindow::GetGrandParent
}
469 \constfunc{wxWindow*
}{GetGrandParent
}{\void}
471 Returns the grandparent of a window, or NULL if there isn't one.
473 \membersection{wxWindow::GetHandle
}
475 \constfunc{void*
}{GetHandle
}{\void}
477 Returns the platform-specific handle of the physical window. Cast it to an appropriate
478 handle, such as
{\bf HWND
} for Windows or
{\bf Widget
} for Motif.
480 \membersection{wxWindow::GetId
}\label{wxwindowgetid
}
482 \constfunc{int
}{GetId
}{\void}
484 Returns the identifier of the window.
488 Each window has an integer identifier. If the application has not provided one,
489 an identifier will be generated.
491 TODO: perhaps there should be a default identifier for each class, rather
492 choosing one, which could clash with other ones.
496 \helpref{wxWindow::SetId
}{wxwindowsetid
}
498 \membersection{wxWindow::GetPosition
}
500 \constfunc{virtual void
}{GetPosition
}{\param{int*
}{x
},
\param{int*
}{y
}}
502 This gets the position of the window in pixels, relative to the parent window or
503 if no parent, relative to the whole display.
505 \wxheading{Parameters
}
507 \docparam{x
}{Receives the x position of the window.
}
509 \docparam{y
}{Receives the y position of the window.
}
511 \membersection{wxWindow::GetLabel
}
513 \constfunc{virtual wxString\&
}{GetLabel
}{\void}
515 Generic way of getting a label from any window, for
516 identification purposes.
520 The interpretation of this function differs from class to class.
521 For frames and dialogs, the value returned is the title. For buttons or static text controls, it is
522 the button text. This function can be useful for meta-programs (such as testing
523 tools or special-needs access programs) which need to identify windows
526 \membersection{wxWindow::GetName
}\label{wxwindowgetname
}
528 \constfunc{virtual wxString\&
}{GetName
}{\void}
530 Returns the window's name.
534 This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate
535 name in the window constructor or via
\helpref{wxWindow::SetName
}{wxwindowsetname
}.
539 \helpref{wxWindow::SetName
}{wxwindowsetname
}
541 \membersection{wxWindow::GetParent
}
543 \constfunc{virtual wxWindow*
}{GetParent
}{\void}
545 Returns the parent of the window, or NULL if there is no parent.
547 \membersection{wxWindow::GetRect
}\label{wxwindowgetrect
}
549 \constfunc{virtual wxRect
}{GetRect
}{\void}
551 Returns the size and position of the window as a
\helpref{wxRect
}{wxrect
} object.
553 \membersection{wxWindow::GetReturnCode
}\label{wxwindowgetreturncode
}
555 \func{int
}{GetReturnCode
}{\void}
557 Gets the return code for this window.
561 A return code is normally associated with a modal dialog, where
\helpref{wxDialog::ShowModal
}{wxdialogshowmodal
} returns
562 a code to the application.
566 \helpref{wxWindow::SetReturnCode
}{wxwindowsetreturncode
},
\helpref{wxDialog::ShowModal
}{wxdialogshowmodal
},
\rtfsp
567 \helpref{wxDialog::EndModal
}{wxdialogendmodal
}
569 \membersection{wxWindow::GetScrollThumb
}\label{wxwindowgetscrollthumb
}
571 \func{virtual int
}{GetScrollThumb
}{\param{int
}{orientation
}}
573 Returns the built-in scrollbar thumb size.
577 \helpref{wxWindow::SetScrollbar
}{wxwindowsetscrollbar
}
579 \membersection{wxWindow::GetScrollPos
}\label{wxwindowgetscrollpos
}
581 \func{virtual int
}{GetScrollPos
}{\param{int
}{orientation
}}
583 Returns the built-in scrollbar position.
587 See
\helpref{wxWindow::SetScrollbar
}{wxwindowsetscrollbar
}
589 \membersection{wxWindow::GetScrollRange
}\label{wxwindowgetscrollrange
}
591 \func{virtual int
}{GetScrollRange
}{\param{int
}{orientation
}}
593 Returns the built-in scrollbar range.
597 \helpref{wxWindow::SetScrollbar
}{wxwindowsetscrollbar
}
599 \membersection{wxWindow::GetSize
}\label{wxwindowgetsize
}
601 \constfunc{virtual void
}{GetSize
}{\param{int*
}{width
},
\param{int*
}{height
}}
603 \constfunc{virtual wxSize
}{GetSize
}{\void}
605 This gets the size of the entire window in pixels.
607 \wxheading{Parameters
}
609 \docparam{width
}{Receives the window width.
}
611 \docparam{height
}{Receives the window height.
}
613 \membersection{wxWindow::GetTextExtent
}
615 \constfunc{virtual void
}{GetTextExtent
}{\param{const wxString\&
}{string
},
\param{int*
}{x
},
\param{int*
}{y
},
616 \param{int*
}{descent = NULL
},
\param{int*
}{externalLeading = NULL
},
617 \param{const wxFont*
}{font = NULL
},
\param{const bool
}{ use16 = FALSE
}}
619 Gets the dimensions of the string as it would be drawn on the
620 window with the currently selected font.
622 \wxheading{Parameters
}
624 \docparam{string
}{String whose extent is to be measured.
}
626 \docparam{x
}{Return value for width.
}
628 \docparam{y
}{Return value for height.
}
630 \docparam{descent
}{Return value for descent (optional).
}
632 \docparam{externalLeading
}{Return value for external leading (optional).
}
634 \docparam{font
}{Font to use instead of the current window font (optional).
}
636 \docparam{use16
}{If TRUE,
{\it string
} contains
16-bit characters. The default is FALSE.
}
638 \membersection{wxWindow::GetTitle
}\label{wxwindowgettitle
}
640 \func{virtual wxString
}{GetTitle
}{\void}
642 Gets the window's title. Applicable only to frames and dialogs.
646 \helpref{wxWindow::SetTitle
}{wxwindowsettitle
}
648 \membersection{wxWindow::GetUpdateRegion
}\label{wxwindowgetupdateregion
}
650 \constfunc{virtual wxRegion
}{GetUpdateRegion
}{\void}
652 Returns the region specifying which parts of the window have been damaged. Should
653 only be called within an
\helpref{OnPaint
}{wxwindowonpaint
} event handler.
657 \helpref{wxRegion
}{wxregion
},
\helpref{wxRegionIterator
}{wxregioniterator
},
\helpref{wxWindow::OnPaint
}{wxwindowonpaint
}
659 \membersection{wxWindow::GetWindowStyleFlag
}
661 \constfunc{long
}{GetWindowStyleFlag
}{\void}
663 Gets the window style that was passed to the consructor or
{\bf Create
} member.
665 \membersection{wxWindow::InitDialog
}\label{wxwindowinitdialog
}
667 \func{void
}{InitDialog
}{\void}
669 Sends an
\helpref{wxWindow::OnInitDialog
}{wxwindowoninitdialog
} event, which
670 in turn transfers data to the dialog via validators.
674 \helpref{wxWindow::OnInitDialog
}{wxwindowoninitdialog
}
676 \membersection{wxWindow::IsEnabled
}\label{wxwindowisenabled
}
678 \constfunc{virtual bool
}{IsEnabled
}{\void}
680 Returns TRUE if the window is enabled for input, FALSE otherwise.
684 \helpref{wxWindow::Enable
}{wxwindowenable
}
686 \membersection{wxWindow::IsRetained
}\label{wxwindowisretained
}
688 \constfunc{virtual bool
}{IsRetained
}{\void}
690 Returns TRUE if the window is retained, FALSE otherwise.
694 Retained windows are only available on X platforms.
696 \membersection{wxWindow::IsShown
}\label{wxwindowisshown
}
698 \constfunc{virtual bool
}{IsShown
}{\void}
700 Returns TRUE if the window is shown, FALSE if it has been hidden.
702 \membersection{wxWindow::Layout
}\label{wxwindowlayout
}
704 \func{void
}{Layout
}{\void}
706 Invokes the constraint-based layout algorithm for this window. It is called
707 automatically by the default
{\bf wxWindow::OnSize
} member.
709 \membersection{wxWindow::LoadFromResource
}\label{wxwindowloadfromresource
}
711 \func{virtual bool
}{LoadFromResource
}{\param{wxWindow*
}{parent
},
\rtfsp
712 \param{const wxString\&
}{resourceName
},
\param{const wxResourceTable*
}{resourceTable = NULL
}}
714 Loads a panel or dialog from a resource file.
716 \wxheading{Parameters
}
718 \docparam{parent
}{Parent window.
}
720 \docparam{resourceName
}{The name of the resource to load.
}
722 \docparam{resourceTable
}{The resource table to load it from. If this is NULL, the
723 default resource table will be used.
}
725 \wxheading{Return value
}
727 TRUE if the operation succeeded, otherwise FALSE.
737 \membersection{wxWindow::Lower
}\label{wxwindowlower
}
739 \func{void
}{Lower
}{\void}
741 Lowers the window to the bottom of the window hierarchy if it is a managed window (dialog
744 \membersection{wxWindow::MakeModal
}\label{wxwindowmakemodal
}
746 \func{virtual void
}{MakeModal
}{\param{const bool
}{flag
}}
748 Disables all other windows in the application so that
749 the user can only interact with this window.
751 \wxheading{Parameters
}
753 \docparam{flag
}{If TRUE, this call disables all other windows in the application so that
754 the user can only interact with this window. If FALSE, the effect is reversed.
}
756 \membersection{wxWindow::Move
}\label{wxwindowmove
}
758 \func{void
}{Move
}{\param{int
}{ x
},
\param{int
}{ y
}}
760 \func{void
}{Move
}{\param{const wxPoint\&
}{ pt
}}
762 Moves the window to the given position.
764 \wxheading{Parameters
}
766 \docparam{x
}{Required x position.
}
768 \docparam{y
}{Required y position.
}
770 \docparam{pt
}{\helpref{wxPoint
}{wxpoint
} object representing the position.
}
774 Implementations of SetSize can also implicitly implement the
775 wxWindow::Move function, which is defined in the base wxWindow class
779 SetSize(x, y, -
1, -
1, wxSIZE_USE_EXISTING);
784 \helpref{wxWindow::SetSize
}{wxwindowsetsize
}
786 \membersection{wxWindow::OnActivate
}\label{wxwindowonactivate
}
788 \func{void
}{OnActivate
}{\param{wxActivateEvent\&
}{ event
}}
790 Called when a window is activated or deactivated.
792 \wxheading{Parameters
}
794 \docparam{event
}{Object containing activation information.
}
798 If the window is being activated,
\helpref{wxActivateEvent::GetActive
}{wxactivateeventgetactive
} returns TRUE,
799 otherwise it returns FALSE (it is being deactivated).
803 \helpref{wxActivateEvent
}{wxactivateevent
},
\rtfsp
804 \helpref{Event handling overview
}{eventhandlingoverview
}
806 \membersection{wxWindow::OnChar
}\label{wxwindowonchar
}
808 \func{void
}{OnChar
}{\param{wxKeyEvent\&
}{ event
}}
810 Called when the user has pressed a key, which has been translated into an ASCII value.
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. To intercept this event,
820 use the EVT
\_CHAR macro in an event table definition. Your
{\bf OnChar
} handler may call this
821 default function to achieve default keypress functionality.
823 Note that the ASCII values do not have explicit key codes: they are passed as ASCII
826 Note that not all keypresses can be intercepted this way. If you wish to intercept special
827 keys, such as shift, control, and function keys, then you will need to use
\helpref{wxWindow::OnKeyDown
}{wxwindowonkeydown
} or
828 \helpref{wxWindow::OnKeyUp
}{wxwindowonkeyup
}.
830 Most, but not all, windows allow keypresses to be intercepted.
834 \helpref{wxWindow::OnKeyDown
}{wxwindowonkeydown
},
\helpref{wxWindow::OnKeyUp
}{wxwindowonkeyup
},
\rtfsp
835 \helpref{wxKeyEvent
}{wxkeyevent
},
\helpref{wxWindow::OnCharHook
}{wxwindowoncharhook
},
\rtfsp
836 \helpref{Event handling overview
}{eventhandlingoverview
}
838 \membersection{wxWindow::OnCharHook
}\label{wxwindowoncharhook
}
840 \func{void
}{OnCharHook
}{\param{wxKeyEvent\&
}{ event
}}
842 This member is called to allow the window to intercept keyboard events
843 before they are processed by child windows.
845 \wxheading{Parameters
}
847 \docparam{event
}{Object containing keypress information. See
\helpref{wxKeyEvent
}{wxkeyevent
} for
848 details about this class.
}
852 This member function is called in response to a keypress, if the window is active. To intercept this event,
853 use the EVT
\_CHAR\_HOOK macro in an event table definition. If you do not process a particular
854 keypress, call
\helpref{wxEvent::Skip
}{wxeventskip
} to allow default processing.
856 An example of using this function is in the implementation of escape-character processing for wxDialog,
857 where pressing ESC dismisses the dialog by
{\bf OnCharHook
} 'forging' a cancel button press event.
859 Note that the ASCII values do not have explicit key codes: they are passed as ASCII
862 This function is only relevant to top-level windows (frames and dialogs), and under
867 \helpref{wxKeyEvent
}{wxkeyevent
},
\helpref{wxWindow::OnCharHook
}{wxwindowoncharhook
},
\rtfsp
868 \helpref{wxApp::OnCharHook
}{wxapponcharhook
},
\rtfsp
869 \helpref{Event handling overview
}{eventhandlingoverview
}
871 \membersection{wxWindow::OnCommand
}\label{wxwindowoncommand
}
873 \func{virtual void
}{OnCommand
}{\param{wxEvtHandler\&
}{object
},
\param{wxCommandEvent\&
}{event
}}
875 This virtual member function is called if the control does not handle the command event.
877 \wxheading{Parameters
}
879 \docparam{object
}{Object receiving the command event.
}
881 \docparam{event
}{Command event
}
885 This virtual function is provided mainly for backward compatibility. You can also intercept commands
886 from child controls by using an event table, with identifiers or identifier ranges to identify
887 the control(s) in question.
891 \helpref{wxCommandEvent
}{wxcommandevent
},
\rtfsp
892 \helpref{Event handling overview
}{eventhandlingoverview
}
894 \membersection{wxWindow::OnClose
}\label{wxwindowonclose
}
896 \func{virtual bool
}{OnClose
}{\void}
898 Called when the user has tried to close a a frame
899 or dialog box using the window manager (X) or system menu (Windows).
901 {\bf Note:
} This is an obsolete function retained for backward compatibility.
902 It is superceded by the
\helpref{wxWindow::OnCloseWindow
}{wxwindowonclosewindow
} event
905 \wxheading{Return value
}
907 If TRUE is returned by OnClose, the window will be deleted by the system, otherwise the
908 attempt will be ignored. Do not delete the window from within this handler, although
909 you may delete other windows.
913 Derive your own class to handle this message. The default handler returns TRUE.
917 \helpref{Window deletion overview
}{windowdeletionoverview
},
\rtfsp
918 \helpref{wxWindow::Close
}{wxwindowclose
},
\rtfsp
919 \helpref{wxWindow::OnCloseWindow
}{wxwindowonclosewindow
},
\rtfsp
920 \helpref{wxCloseEvent
}{wxcloseevent
}
922 \membersection{wxWindow::OnCloseWindow
}\label{wxwindowonclosewindow
}
924 \func{void
}{OnCloseWindow
}{\param{wxCloseEvent\&
}{event
}}
926 This is an event handler function called when the user has tried to close a a frame
927 or dialog box using the window manager (X) or system menu (Windows). It is
928 called via the
\helpref{wxWindow::Close
}{wxwindowclose
} function, so
929 that the application can also invoke the handler programmatically.
931 Use the EVT
\_CLOSE event table macro to handle close events.
933 You should check whether the application is forcing the deletion of the window
934 using
\helpref{wxCloseEvent::GetForce
}{wxcloseeventgetforce
}. If this is TRUE,
935 destroy the window using
\helpref{wxWindow::Destroy
}{wxwindowdestroy
}.
936 If not, it is up to you whether you respond by destroying the window.
938 (Note: GetForce is now superceded by CanVeto. So to test whether forced destruction of
939 the window is required, test for the negative of CanVeto. If CanVeto returns FALSE,
940 it is not possible to skip window deletion.)
942 If you don't destroy the window, you should call
\helpref{wxCloseEvent::Veto
}{wxcloseeventveto
} to
943 let the calling code know that you did not destroy the window. This allows the
\helpref{wxWindow::Close
}{wxwindowclose
} function
944 to return TRUE or FALSE depending on whether the close instruction was honoured or not.
948 The
\helpref{wxWindow::OnClose
}{wxwindowonclose
} virtual function remains
949 for backward compatibility with earlier versions of wxWindows. The
950 default
{\bf OnCloseWindow
} handler for wxFrame and wxDialog will call
{\bf OnClose
},
951 destroying the window if it returns TRUE or if the close is being forced.
955 \helpref{Window deletion overview
}{windowdeletionoverview
},
\rtfsp
956 \helpref{wxWindow::Close
}{wxwindowclose
},
\rtfsp
957 \helpref{wxWindow::OnClose
}{wxwindowonclose
},
\rtfsp
958 \helpref{wxWindow::Destroy
}{wxwindowdestroy
},
\rtfsp
959 \helpref{wxCloseEvent
}{wxcloseevent
},
\rtfsp
960 \helpref{wxApp::OnQueryEndSession
}{wxapponqueryendsession
},
\rtfsp
961 \helpref{wxApp::OnEndSession
}{wxapponendsession
}
963 \membersection{wxWindow::OnDropFiles
}\label{wxwindowondropfiles
}
965 \func{void
}{OnDropFiles
}{\param{wxDropFilesEvent\&
}{ event
}}
967 Called when files have been dragged from the file manager to the window.
969 \wxheading{Parameters
}
971 \docparam{event
}{Drop files event. For more information, see
\helpref{wxDropFilesEvent
}{wxdropfilesevent
}.
}
975 The window must have previously been enabled for dropping by calling
976 \rtfsp\helpref{wxWindow::DragAcceptFiles
}{wxwindowdragacceptfiles
}.
978 This event is only generated under Windows.
980 To intercept this event, use the EVT
\_DROP\_FILES macro in an event table definition.
984 \helpref{wxDropFilesEvent
}{wxdropfilesevent
},
\helpref{wxWindow::DragAcceptFiles
}{wxwindowdragacceptfiles
},
\rtfsp
985 \helpref{Event handling overview
}{eventhandlingoverview
}
987 \membersection{wxWindow::OnEraseBackground
}\label{wxwindowonerasebackground
}
989 \func{void
}{OnEraseBackground
}{\param{wxEraseEvent\&
}{ event
}}
991 Called when the background of the window needs to be erased.
993 \wxheading{Parameters
}
995 \docparam{event
}{Erase background event. For more information, see
\helpref{wxEraseEvent
}{wxeraseevent
}.
}
999 This event is only generated under Windows.
1001 To intercept this event, use the EVT
\_ERASE\_BACKGROUND macro in an event table definition.
1003 \wxheading{See also
}
1005 \helpref{wxEraseEvent
}{wxeraseevent
},
\helpref{Event handling overview
}{eventhandlingoverview
}
1007 \membersection{wxWindow::OnKeyDown
}\label{wxwindowonkeydown
}
1009 \func{void
}{OnKeyDown
}{\param{wxKeyEvent\&
}{ event
}}
1011 Called when the user has pressed a key, before it is translated into an ASCII value using other
1012 modifier keys that might be pressed at the same time.
1014 \wxheading{Parameters
}
1016 \docparam{event
}{Object containing keypress information. See
\helpref{wxKeyEvent
}{wxkeyevent
} for
1017 details about this class.
}
1021 This member function is called in response to a key down event. To intercept this event,
1022 use the EVT
\_KEY\_DOWN macro in an event table definition. Your
{\bf OnKeyDown
} handler may call this
1023 default function to achieve default keypress functionality.
1025 Note that not all keypresses can be intercepted this way. If you wish to intercept special
1026 keys, such as shift, control, and function keys, then you will need to use
\helpref{wxWindow::OnKeyDown
}{wxwindowonkeydown
} or
1027 \helpref{wxWindow::OnKeyUp
}{wxwindowonkeyup
}.
1029 Most, but not all, windows allow keypresses to be intercepted.
1031 \wxheading{See also
}
1033 \helpref{wxWindow::OnChar
}{wxwindowonchar
},
\helpref{wxWindow::OnKeyUp
}{wxwindowonkeyup
},
\rtfsp
1034 \helpref{wxKeyEvent
}{wxkeyevent
},
\helpref{wxWindow::OnCharHook
}{wxwindowoncharhook
},
\rtfsp
1035 \helpref{Event handling overview
}{eventhandlingoverview
}
1037 \membersection{wxWindow::OnKeyUp
}\label{wxwindowonkeyup
}
1039 \func{void
}{OnKeyUp
}{\param{wxKeyEvent\&
}{ event
}}
1041 Called when the user has released a key.
1043 \wxheading{Parameters
}
1045 \docparam{event
}{Object containing keypress information. See
\helpref{wxKeyEvent
}{wxkeyevent
} for
1046 details about this class.
}
1050 This member function is called in response to a key up event. To intercept this event,
1051 use the EVT
\_KEY\_UP macro in an event table definition. Your
{\bf OnKeyUp
} handler may call this
1052 default function to achieve default keypress functionality.
1054 Note that not all keypresses can be intercepted this way. If you wish to intercept special
1055 keys, such as shift, control, and function keys, then you will need to use
\helpref{wxWindow::OnKeyDown
}{wxwindowonkeydown
} or
1056 \helpref{wxWindow::OnKeyUp
}{wxwindowonkeyup
}.
1058 Most, but not all, windows allow key up events to be intercepted.
1060 \wxheading{See also
}
1062 \helpref{wxWindow::OnChar
}{wxwindowonchar
},
\helpref{wxWindow::OnKeyDown
}{wxwindowonkeydown
},
\rtfsp
1063 \helpref{wxKeyEvent
}{wxkeyevent
},
\helpref{wxWindow::OnCharHook
}{wxwindowoncharhook
},
\rtfsp
1064 \helpref{Event handling overview
}{eventhandlingoverview
}
1066 \membersection{wxWindow::OnKillFocus
}\label{wxwindowonkillfocus
}
1068 \func{void
}{OnKillFocus
}{\param{wxFocusEvent\&
}{event
}}
1070 Called when a window's focus is being killed.
1072 \wxheading{Parameters
}
1074 \docparam{event
}{The focus event. For more information, see
\helpref{wxFocusEvent
}{wxfocusevent
}.
}
1078 To intercept this event, use the macro EVT
\_KILL\_FOCUS in an event table definition.
1080 Most, but not all, windows respond to this event.
1082 \wxheading{See also
}
1084 \helpref{wxFocusEvent
}{wxfocusevent
},
\helpref{wxWindow::OnSetFocus
}{wxwindowonsetfocus
},
\rtfsp
1085 \helpref{Event handling overview
}{eventhandlingoverview
}
1087 \membersection{wxWindow::OnIdle
}\label{wxwindowonidle
}
1089 \func{void
}{OnIdle
}{\param{wxIdleEvent\&
}{event
}}
1091 Provide this member function for any processing which needs to be done
1092 when the application is idle.
1094 \wxheading{See also
}
1096 \helpref{wxApp::OnIdle
}{wxapponidle
},
\helpref{wxIdleEvent
}{wxidleevent
}
1098 \membersection{wxWindow::OnInitDialog
}\label{wxwindowoninitdialog
}
1100 \func{void
}{OnInitDialog
}{\param{wxInitDialogEvent\&
}{ event
}}
1102 Default handler for the wxEVT
\_INIT\_DIALOG event. Calls
\helpref{wxWindow::TransferDataToWindow
}{wxwindowtransferdatatowindow
}.
1104 \wxheading{Parameters
}
1106 \docparam{event
}{Dialog initialisation event.
}
1110 Gives the window the default behaviour of transferring data to child controls via
1111 the validator that each control has.
1113 \wxheading{See also
}
1115 \helpref{wxValidator
}{wxvalidator
},
\helpref{wxWindow::TransferDataToWindow
}{wxwindowtransferdatatowindow
}
1117 \membersection{wxWindow::OnMenuCommand
}\label{wxwindowonmenucommand
}
1119 \func{void
}{OnMenuCommand
}{\param{wxCommandEvent\&
}{event
}}
1121 Called when a menu command is received from a menu bar.
1123 \wxheading{Parameters
}
1125 \docparam{event
}{The menu command event. For more information, see
\helpref{wxCommandEvent
}{wxcommandevent
}.
}
1129 A function with this name doesn't actually exist; you can choose any member function to receive
1130 menu command events, using the EVT
\_COMMAND macro for individual commands or EVT
\_COMMAND\_RANGE for
1131 a range of commands.
1133 \wxheading{See also
}
1135 \helpref{wxCommandEvent
}{wxcommandevent
},
\rtfsp
1136 \helpref{wxWindow::OnMenuHighlight
}{wxwindowonmenuhighlight
},
\rtfsp
1137 \helpref{Event handling overview
}{eventhandlingoverview
}
1139 \membersection{wxWindow::OnMenuHighlight
}\label{wxwindowonmenuhighlight
}
1141 \func{void
}{OnMenuHighlight
}{\param{wxMenuEvent\&
}{event
}}
1143 Called when a menu select is received from a menu bar: that is, the
1144 mouse cursor is over a menu item, but the left mouse button has not been
1147 \wxheading{Parameters
}
1149 \docparam{event
}{The menu highlight event. For more information, see
\helpref{wxMenuEvent
}{wxmenuevent
}.
}
1153 You can choose any member function to receive
1154 menu select events, using the EVT
\_MENU\_HIGHLIGHT macro for individual menu items or EVT
\_MENU\_HIGHLIGHT\_ALL macro
1157 The default implementation for
\helpref{wxFrame::OnMenuHighlight
}{wxframeonmenuhighlight
} displays help
1158 text in the first field of the status bar.
1160 This function was known as
{\bf OnMenuSelect
} in earlier versions of wxWindows, but this was confusing
1161 since a selection is normally a left-click action.
1163 \wxheading{See also
}
1165 \helpref{wxMenuEvent
}{wxmenuevent
},
\rtfsp
1166 \helpref{wxWindow::OnMenuCommand
}{wxwindowonmenucommand
},
\rtfsp
1167 \helpref{Event handling overview
}{eventhandlingoverview
}
1170 \membersection{wxWindow::OnMouseEvent
}\label{wxwindowonmouseevent
}
1172 \func{void
}{OnMouseEvent
}{\param{wxMouseEvent\&
}{ event
}}
1174 Called when the user has initiated an event with the
1177 \wxheading{Parameters
}
1179 \docparam{event
}{The mouse event. See
\helpref{wxMouseEvent
}{wxmouseevent
} for
1184 Most, but not all, windows respond to this event.
1186 To intercept this event, use the EVT
\_MOUSE\_EVENTS macro in an event table definition, or individual
1187 mouse event macros such as EVT
\_LEFT\_DOWN.
1189 \wxheading{See also
}
1191 \helpref{wxMouseEvent
}{wxmouseevent
},
\rtfsp
1192 \helpref{Event handling overview
}{eventhandlingoverview
}
1194 \membersection{wxWindow::OnMove
}\label{wxwindowonmove
}
1196 \func{void
}{OnMove
}{\param{wxMoveEvent\&
}{event
}}
1198 Called when a window is moved.
1200 \wxheading{Parameters
}
1202 \docparam{event
}{The move event. For more information, see
\helpref{wxMoveEvent
}{wxmoveevent
}.
}
1206 Use the EVT
\_MOVE macro to intercept move events.
1210 Not currently implemented.
1212 \wxheading{See also
}
1214 \helpref{wxMoveEvent
}{wxmoveevent
},
\rtfsp
1215 \helpref{wxFrame::OnSize
}{wxframeonsize
},
\rtfsp
1216 \helpref{Event handling overview
}{eventhandlingoverview
}
1218 \membersection{wxWindow::OnPaint
}\label{wxwindowonpaint
}
1220 \func{void
}{OnPaint
}{\param{wxPaintEvent\&
}{event
}}
1222 Sent to the event handler when the window must be refreshed.
1224 \wxheading{Parameters
}
1226 \docparam{event
}{Paint event. For more information, see
\helpref{wxPaintEvent
}{wxpaintevent
}.
}
1230 Use the EVT
\_PAINT macro in an event table definition to intercept paint events.
1232 In a paint event handler, the application should always create a
\helpref{wxPaintDC
}{wxpaintdc
} object.
1238 void MyWindow::OnPaint(wxPaintEvent& event)
1247 You can optimize painting by retrieving the rectangles
1248 that have been damaged and only repainting these. The rectangles are in
1249 terms of the client area, and are unscrolled, so you will need to do
1250 some calculations using the current view position to obtain logical,
1253 Here is an example of using the
\helpref{wxRegionIterator
}{wxregioniterator
} class:
1257 // Called when window needs to be repainted.
1258 void MyWindow::OnPaint(wxPaintEvent& event)
1262 // Find Out where the window is scrolled to
1263 int vbX,vbY; // Top left corner of client
1264 ViewStart(&vbX,&vbY);
1266 int vX,vY,vW,vH; // Dimensions of client area in pixels
1267 wxRegionIterator upd(GetUpdateRegion()); // get the update rect list
1276 // Alternatively we can do this:
1278 // upd.GetRect(&rect);
1280 // Repaint this rectangle
1289 \wxheading{See also
}
1291 \helpref{wxPaintEvent
}{wxpaintevent
},
\rtfsp
1292 \helpref{wxPaintDC
}{wxpaintdc
},
\rtfsp
1293 \helpref{Event handling overview
}{eventhandlingoverview
}
1295 \membersection{wxWindow::OnScroll
}\label{wxwindowonscroll
}
1297 \func{void
}{OnScroll
}{\param{wxScrollEvent\&
}{event
}}
1299 Called when a scroll event is received from one of the window's built-in scrollbars.
1301 \wxheading{Parameters
}
1303 \docparam{event
}{Command event. Retrieve the new scroll position by
1304 calling
\helpref{wxScrollEvent::GetPosition
}{wxscrolleventgetposition
}, and the
1305 scrollbar orientation by calling
\helpref{wxScrollEvent::GetOrientation
}{wxscrolleventgetorientation
}.
}
1309 Note that it is not possible to distinguish between horizontal and vertical scrollbars
1310 until the function is executing (you can't have one function for vertical, another
1311 for horizontal events).
1313 \wxheading{See also
}
1315 \helpref{wxScrollEvent
}{wxscrollevent
},
\rtfsp
1316 \helpref{Event handling overview
}{eventhandlingoverview
}
1318 \membersection{wxWindow::OnSetFocus
}\label{wxwindowonsetfocus
}
1320 \func{void
}{OnSetFocus
}{\param{wxFocusEvent\&
}{event
}}
1322 Called when a window's focus is being set.
1324 \wxheading{Parameters
}
1326 \docparam{event
}{The focus event. For more information, see
\helpref{wxFocusEvent
}{wxfocusevent
}.
}
1330 To intercept this event, use the macro EVT
\_SET\_FOCUS in an event table definition.
1332 Most, but not all, windows respond to this event.
1334 \wxheading{See also
}
1336 \helpref{wxFocusEvent
}{wxfocusevent
},
\helpref{wxWindow::OnKillFocus
}{wxwindowonkillfocus
},
\rtfsp
1337 \helpref{Event handling overview
}{eventhandlingoverview
}
1339 \membersection{wxWindow::OnSize
}\label{wxwindowonsize
}
1341 \func{void
}{OnSize
}{\param{wxSizeEvent\&
}{event
}}
1343 Called when the window has been resized.
1345 \wxheading{Parameters
}
1347 \docparam{event
}{Size event. For more information, see
\helpref{wxSizeEvent
}{wxsizeevent
}.
}
1351 You may wish to use this for frames to resize their child windows as appropriate.
1353 Note that the size passed is of
1354 the whole window: call
\helpref{wxWindow::GetClientSize
}{wxwindowgetclientsize
} for the area which may be
1355 used by the application.
1357 \wxheading{See also
}
1359 \helpref{wxSizeEvent
}{wxsizeevent
},
\rtfsp
1360 \helpref{Event handling overview
}{eventhandlingoverview
}
1362 \membersection{wxWindow::OnSysColourChanged
}\label{wxwindowonsyscolourchanged
}
1364 \func{void
}{OnSysColourChanged
}{\param{wxOnSysColourChangedEvent\&
}{event
}}
1366 Called when the user has changed the system colours.
1368 \wxheading{Parameters
}
1370 \docparam{event
}{System colour change event. For more information, see
\helpref{wxSysColourChangedEvent
}{wxsyscolourchangedevent
}.
}
1372 \wxheading{See also
}
1374 \helpref{wxSysColourChangedEvent
}{wxsyscolourchangedevent
},
\rtfsp
1375 \helpref{Event handling overview
}{eventhandlingoverview
}
1377 \membersection{wxWindow::PopEventHandler
}\label{wxwindowpopeventhandler
}
1379 \constfunc{wxEvtHandler*
}{PopEventHandler
}{\param{bool
}{deleteHandler = FALSE
}}
1381 Removes and returns the top-most event handler on the event handler stack.
1383 \wxheading{Parameters
}
1385 \docparam{deleteHandler
}{If this is TRUE, the handler will be deleted after it is removed. The
1386 default value is FALSE.
}
1388 \wxheading{See also
}
1390 \helpref{wxWindow::SetEventHandler
}{wxwindowseteventhandler
},
\rtfsp
1391 \helpref{wxWindow::GetEventHandler
}{wxwindowgeteventhandler
},
\rtfsp
1392 \helpref{wxWindow::PushEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
1393 \helpref{wxEvtHandler::ProcessEvent
}{wxevthandlerprocessevent
},
\rtfsp
1394 \helpref{wxEvtHandler
}{wxevthandler
}\rtfsp
1396 \membersection{wxWindow::PopupMenu
}\label{wxwindowpopupmenu
}
1398 \func{virtual bool
}{PopupMenu
}{\param{wxMenu*
}{menu
},
\param{int
}{x
},
\param{int
}{y
}}
1400 Pops up the given menu at the specified coordinates, relative to this
1401 window, and returns control when the user has dismissed the menu. If a
1402 menu item is selected, the callback defined for the menu is called with
1403 wxMenu and wxCommandEvent reference arguments. The callback should access
1404 the commandInt member of the event to check the selected menu identifier.
1406 \wxheading{Parameters
}
1408 \docparam{menu
}{Menu to pop up.
}
1410 \docparam{x
}{Required x position for the menu to appear.
}
1412 \docparam{y
}{Required y position for the menu to appear.
}
1414 \wxheading{See also
}
1416 \helpref{wxMenu
}{wxmenu
},
\helpref{wxWindow::FakePopupMenu
}{wxwindowfakepopupmenu
}
1418 \membersection{wxWindow::PushEventHandler
}\label{wxwindowpusheventhandler
}
1420 \func{void
}{PushEventHandler
}{\param{wxEvtHandler*
}{handler
}}
1422 Pushes this event handler onto the event stack for the window.
1424 \wxheading{Parameters
}
1426 \docparam{handler
}{Specifies the handler to be pushed.
}
1430 An event handler is an object that is capable of processing the events
1431 sent to a window. By default, the window is its own event handler, but
1432 an application may wish to substitute another, for example to allow
1433 central implementation of event-handling for a variety of different
1436 \helpref{wxWindow::PushEventHandler
}{wxwindowpusheventhandler
} allows
1437 an application to set up a chain of event handlers, where an event not handled by one event handler is
1438 handed to the next one in the chain. Use
\helpref{wxWindow::PopEventHandler
}{wxwindowpopeventhandler
} to
1439 remove the event handler.
1441 \wxheading{See also
}
1443 \helpref{wxWindow::SetEventHandler
}{wxwindowseteventhandler
},
\rtfsp
1444 \helpref{wxWindow::GetEventHandler
}{wxwindowgeteventhandler
},
\rtfsp
1445 \helpref{wxWindow::PopEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
1446 \helpref{wxEvtHandler::ProcessEvent
}{wxevthandlerprocessevent
},
\rtfsp
1447 \helpref{wxEvtHandler
}{wxevthandler
}
1449 \membersection{wxWindow::Raise
}\label{wxwindowraise
}
1451 \func{void
}{Raise
}{\void}
1453 Raises the window to the top of the window hierarchy if it is a managed window (dialog
1456 \membersection{wxWindow::Refresh
}\label{wxwindowrefresh
}
1458 \func{virtual void
}{Refresh
}{\param{const bool
}{ eraseBackground = TRUE
},
\param{const wxRect*
}{rect
1461 Causes a message or event to be generated to repaint the
1464 \wxheading{Parameters
}
1466 \docparam{eraseBackground
}{If TRUE, the background will be
1469 \docparam{rect
}{If non-NULL, only the given rectangle will
1470 be treated as damaged.
}
1472 \membersection{wxWindow::ReleaseMouse
}\label{wxwindowreleasemouse
}
1474 \func{virtual void
}{ReleaseMouse
}{\void}
1476 Releases mouse input captured with
\helpref{wxWindow::CaptureMouse
}{wxwindowcapturemouse
}.
1478 \wxheading{See also
}
1480 \helpref{wxWindow::CaptureMouse
}{wxwindowcapturemouse
}
1482 \membersection{wxWindow::RemoveChild
}\label{wxwindowremovechild
}
1484 \func{virtual void
}{RemoveChild
}{\param{wxWindow*
}{child
}}
1486 Removes a child window. This is called automatically by window deletion
1487 functions so should not be required by the application programmer.
1489 \wxheading{Parameters
}
1491 \docparam{child
}{Child window to remove.
}
1493 \membersection{wxWindow::ScreenToClient
}\label{wxwindowscreentoclient
}
1495 \constfunc{virtual void
}{ScreenToClient
}{\param{int*
}{x
},
\param{int*
}{y
}}
1497 \constfunc{virtual wxPoint
}{ScreenToClient
}{\param{const wxPoint\&
}{pt
}}
1499 Converts from screen to client window coordinates.
1501 \wxheading{Parameters
}
1503 \docparam{x
}{Stores the screen x coordinate and receives the client x coordinate.
}
1505 \docparam{y
}{Stores the screen x coordinate and receives the client x coordinate.
}
1507 \docparam{pt
}{The screen position for the second form of the function.
}
1509 \membersection{wxWindow::ScrollWindow
}\label{wxwindowscrollwindow
}
1511 \func{virtual void
}{ScrollWindow
}{\param{int
}{dx
},
\param{int
}{dy
},
\param{const wxRect*
}{ rect = NULL
}}
1513 Physically scrolls the pixels in the window.
1515 \wxheading{Parameters
}
1517 \docparam{dx
}{Amount to scroll horizontally.
}
1519 \docparam{dy
}{Amount to scroll vertically.
}
1521 \docparam{rect
}{Rectangle to invalidate. If this is NULL, the whole window is invalidated. If you
1522 pass a rectangle corresponding to the area of the window exposed by the scroll, your painting handler
1523 can optimise painting by checking for the invalidated region.
}
1527 Available only under Windows.
1529 Use this function to optimise your scrolling implementations, to minimise the area that must be
1532 \membersection{wxWindow::SetAcceleratorTable
}\label{wxwindowsetacceleratortable
}
1534 \func{virtual void
}{SetAcceleratorTable
}{\param{const wxAcceleratorTable\&
}{ accel
}}
1536 Sets the accelerator table for this window. See
\helpref{wxAcceleratorTable
}{wxacceleratortable
}.
1538 \membersection{wxWindow::SetAutoLayout
}\label{wxwindowsetautolayout
}
1540 \func{void
}{SetAutoLayout
}{\param{const bool
}{ autoLayout
}}
1542 Determines whether the
\helpref{wxWindow::Layout
}{wxwindowlayout
} function will
1543 be called automatically when the window is resized.
1545 \wxheading{Parameters
}
1547 \docparam{autoLayout
}{Set this to TRUE if you wish the Layout function to be called
1548 from within wxWindow::OnSize functions.
}
1550 \wxheading{See also
}
1552 \helpref{wxWindow::SetConstraints
}{wxwindowsetconstraints
}
1554 \membersection{wxWindow::SetBackgroundColour
}\label{wxwindowsetbackgroundcolour
}
1556 \func{virtual void
}{SetBackgroundColour
}{\param{const wxColour\&
}{colour
}}
1558 Sets the background colour of the window.
1560 \wxheading{Parameters
}
1562 \docparam{colour
}{The colour to be used as the background colour.
}
1566 The background colour is usually painted by the default
\rtfsp
1567 \helpref{wxWindow::OnEraseBackground
}{wxwindowonerasebackground
} event handler function.
1569 \wxheading{See also
}
1571 \helpref{wxWindow::GetBackgroundColour
}{wxwindowgetbackgroundcolour
},
\rtfsp
1572 \helpref{wxWindow::SetForegroundColour
}{wxwindowsetforegroundcolour
},
\rtfsp
1573 \helpref{wxWindow::GetForegroundColour
}{wxwindowgetforegroundcolour
},
\rtfsp
1574 \helpref{wxWindow::OnEraseBackground
}{wxwindowonerasebackground
}
1576 \membersection{wxWindow::SetConstraints
}\label{wxwindowsetconstraints
}
1578 \func{void
}{SetConstraints
}{\param{wxLayoutConstraints*
}{constraints
}}
1580 Sets the window to have the given layout constraints. The window
1581 will then own the object, and will take care of its deletion.
1582 If an existing layout constraints object is already owned by the
1583 window, it will be deleted.
1585 \wxheading{Parameters
}
1587 \docparam{constraints
}{The constraints to set. Pass NULL to disassociate and delete the window's
1592 You must call
\helpref{wxWindow::SetAutoLayout
}{wxwindowsetautolayout
} to tell a window to use
1593 the constraints automatically in OnSize; otherwise, you must
1594 override OnSize and call Layout explicitly.
1596 \membersection{wxWindow::SetDropTarget
}\label{wxwindowsetdroptarget
}
1598 \func{void
}{SetDropTarget
}{\param{wxDropTarget*
}{ target
}}
1600 Associates a drop target with this window.
1602 If the window already has a drop target, it is deleted.
1604 \wxheading{See also
}
1606 \helpref{wxWindow::GetDropTarget
}{wxwindowgetdroptarget
},
1607 \helpref{Drag and drop overview
}{wxdndoverview
}
1609 \membersection{wxWindow::SetFocus
}\label{wxwindowsetfocus
}
1611 \func{virtual void
}{SetFocus
}{\void}
1613 This sets the window to receive keyboard input.
1615 \membersection{wxWindow::SetFont
}\label{wxwindowsetfont
}
1617 \func{void
}{SetFont
}{\param{const wxFont\&
}{font
}}
1619 Sets the font for this window.
1621 \wxheading{Parameters
}
1623 \docparam{font
}{Font to associate with this window.
}
1625 \wxheading{See also
}
1627 \helpref{wxWindow::GetFont
}{wxwindowgetfont
}
1629 \membersection{wxWindow::SetForegroundColour
}\label{wxwindowsetforegroundcolour
}
1631 \func{virtual void
}{SetForegroundColour
}{\param{const wxColour\&
}{colour
}}
1633 Sets the foreground colour of the window.
1635 \wxheading{Parameters
}
1637 \docparam{colour
}{The colour to be used as the foreground colour.
}
1641 The interpretation of foreground colour is open to interpretation according
1642 to the window class; it may be the text colour or other colour, or it may not
1645 \wxheading{See also
}
1647 \helpref{wxWindow::GetForegroundColour
}{wxwindowgetforegroundcolour
},
\rtfsp
1648 \helpref{wxWindow::SetBackgroundColour
}{wxwindowsetbackgroundcolour
},
\rtfsp
1649 \helpref{wxWindow::GetBackgroundColour
}{wxwindowgetbackgroundcolour
}
1651 \membersection{wxWindow::SetId
}\label{wxwindowsetid
}
1653 \func{void
}{SetId
}{\param{int
}{ id
}}
1655 Sets the identifier of the window.
1659 Each window has an integer identifier. If the application has not provided one,
1660 an identifier will be generated. Normally, the identifier should be provided
1661 on creation and should not be modified subsequently.
1663 TODO: perhaps there should be a default identifier for each class, rather
1664 choosing one, which could clash with other ones.
1666 \wxheading{See also
}
1668 \helpref{wxWindow::GetId
}{wxwindowgetid
}
1671 \membersection{wxWindow::SetName
}\label{wxwindowsetname
}
1673 \func{virtual void
}{SetName
}{\param{const wxString\&
}{name
}}
1675 Sets the window's name.
1677 \wxheading{Parameters
}
1679 \docparam{name
}{A name to set for the window.
}
1681 \wxheading{See also
}
1683 \helpref{wxWindow::GetName
}{wxwindowgetname
}
1685 \membersection{wxWindow::SetReturnCode
}\label{wxwindowsetreturncode
}
1687 \func{void
}{SetReturnCode
}{\param{int
}{retCode
}}
1689 Sets the return code for this window.
1691 \wxheading{Parameters
}
1693 \docparam{retCode
}{The integer return code, usually a control identifier.
}
1697 A return code is normally associated with a modal dialog, where
\helpref{wxDialog::ShowModal
}{wxdialogshowmodal
} returns
1698 a code to the application. The function
\helpref{wxDialog::EndModal
}{wxdialogendmodal
} calls
{\bf SetReturnCode
}.
1700 \wxheading{See also
}
1702 \helpref{wxWindow::GetReturnCode
}{wxwindowgetreturncode
},
\helpref{wxDialog::ShowModal
}{wxdialogshowmodal
},
\rtfsp
1703 \helpref{wxDialog::EndModal
}{wxdialogendmodal
}
1705 \membersection{wxWindow::SetScrollbar
}\label{wxwindowsetscrollbar
}
1707 \func{virtual void
}{SetScrollbar
}{\param{int
}{orientation
},
\param{int
}{position
},
\rtfsp
1708 \param{int
}{thumbSize
},
\param{int
}{range
},
\rtfsp
1709 \param{const bool
}{refresh = TRUE
}}
1711 Sets the scrollbar properties of a built-in scrollbar.
1713 \wxheading{Parameters
}
1715 \docparam{orientation
}{Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL or wxVERTICAL.
}
1717 \docparam{position
}{The position of the scrollbar in scroll units.
}
1719 \docparam{thumbSize
}{The size of the thumb, or visible portion of the scrollbar, in scroll units.
}
1721 \docparam{range
}{The maximum position of the scrollbar.
}
1723 \docparam{refresh
}{TRUE to redraw the scrollbar, FALSE otherwise.
}
1727 Let's say you wish to display
50 lines of text, using the same font.
1728 The window is sized so that you can only see
16 lines at a time.
1734 SetScrollbar(wxVERTICAL,
0,
16,
50);
1738 Note that with the window at this size, the thumb position can never go
1739 above
50 minus
16, or
34.
1741 You can determine how many lines are currently visible by dividing the current view
1742 size by the character height in pixels.
1744 When defining your own scrollbar behaviour, you will always need to recalculate
1745 the scrollbar settings when the window size changes. You could therefore put your
1746 scrollbar calculations and SetScrollbar
1747 call into a function named AdjustScrollbars, which can be called initially and also
1748 from your
\helpref{wxWindow::OnSize
}{wxwindowonsize
} event handler function.
1750 \wxheading{See also
}
1752 \helpref{Scrolling overview
}{scrollingoverview
},
\rtfsp
1753 \helpref{wxScrollBar
}{wxscrollbar
},
\helpref{wxScrolledWindow
}{wxscrolledwindow
}
1756 \membersection{wxWindow::SetScrollPage
}\label{wxwindowsetscrollpage
}
1758 \func{virtual void
}{SetScrollPage
}{\param{int
}{orientation
},
\param{int
}{pageSize
},
\param{const bool
}{refresh = TRUE
}}
1760 Sets the page size of one of the built-in scrollbars.
1762 \wxheading{Parameters
}
1764 \docparam{orientation
}{Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL or wxVERTICAL.
}
1766 \docparam{pageSize
}{Page size in scroll units.
}
1768 \docparam{refresh
}{TRUE to redraw the scrollbar, FALSE otherwise.
}
1772 The page size of a scrollbar is the number of scroll units that the scroll thumb travels when you
1773 click on the area above/left of or below/right of the thumb. Normally you will want a whole visible
1774 page to be scrolled, i.e. the size of the current view (perhaps the window client size). This
1775 value has to be adjusted when the window is resized, since the page size will have changed.
1777 In addition to specifying how far the scroll thumb travels when paging, in Motif and some versions of Windows
1778 the thumb changes size to reflect the page size relative to the length of the
document. When the
1779 document size is only slightly bigger than the current view (window) size, almost all of the scrollbar
1780 will be taken up by the thumb. When the two values become the same, the scrollbar will (on some systems)
1783 Currently, this function should be called before SetPageRange, because of a quirk in the Windows
1784 handling of pages and ranges.
1786 \wxheading{See also
}
1788 \helpref{wxWindow::SetScrollPos
}{wxwindowsetscrollpos
},
\rtfsp
1789 \helpref{wxWindow::GetScrollPos
}{wxwindowsetscrollpos
},
\rtfsp
1790 \helpref{wxWindow::GetScrollPage
}{wxwindowsetscrollpage
},
\rtfsp
1791 \helpref{wxScrollBar
}{wxscrollbar
},
\helpref{wxScrolledWindow
}{wxscrolledwindow
}
1794 \membersection{wxWindow::SetScrollPos
}\label{wxwindowsetscrollpos
}
1796 \func{virtual void
}{SetScrollPos
}{\param{int
}{orientation
},
\param{int
}{pos
},
\param{const bool
}{refresh = TRUE
}}
1798 Sets the position of one of the built-in scrollbars.
1800 \wxheading{Parameters
}
1802 \docparam{orientation
}{Determines the scrollbar whose position is to be set. May be wxHORIZONTAL or wxVERTICAL.
}
1804 \docparam{pos
}{Position in scroll units.
}
1806 \docparam{refresh
}{TRUE to redraw the scrollbar, FALSE otherwise.
}
1810 This function does not directly affect the contents of the window: it is up to the
1811 application to take note of scrollbar attributes and redraw contents accordingly.
1813 \wxheading{See also
}
1815 \helpref{wxWindow::SetScrollbar
}{wxwindowsetscrollbar
},
\rtfsp
1816 \helpref{wxWindow::GetScrollPos
}{wxwindowsetscrollpos
},
\rtfsp
1817 \helpref{wxWindow::GetScrollThumb
}{wxwindowgetscrollthumb
},
\rtfsp
1818 \helpref{wxScrollBar
}{wxscrollbar
},
\helpref{wxScrolledWindow
}{wxscrolledwindow
}
1821 \membersection{wxWindow::SetScrollRange
}\label{wxwindowsetscrollrange
}
1823 \func{virtual void
}{SetScrollRange
}{\param{int
}{orientation
},
\param{int
}{range
},
\param{const bool
}{refresh = TRUE
}}
1825 Sets the range of one of the built-in scrollbars.
1827 \wxheading{Parameters
}
1829 \docparam{orientation
}{Determines the scrollbar whose range is to be set. May be wxHORIZONTAL or wxVERTICAL.
}
1831 \docparam{range
}{Scroll range.
}
1833 \docparam{refresh
}{TRUE to redraw the scrollbar, FALSE otherwise.
}
1837 The range of a scrollbar is the number of steps that the thumb may travel, rather than the total
1838 object length of the scrollbar. If you are implementing a scrolling window, for example, you
1839 would adjust the scroll range when the window is resized, by subtracting the window view size from the
1840 total virtual window size. When the two sizes are the same (all the window is visible), the range goes to zero
1841 and usually the scrollbar will be automatically hidden.
1843 \wxheading{See also
}
1845 \helpref{wxWindow::SetScrollPos
}{wxwindowsetscrollpos
},
\rtfsp
1846 \helpref{wxWindow::SetScrollPage
}{wxwindowsetscrollpage
},
\rtfsp
1847 \helpref{wxWindow::GetScrollPos
}{wxwindowsetscrollpos
},
\rtfsp
1848 \helpref{wxWindow::GetScrollPage
}{wxwindowsetscrollpage
},
\rtfsp
1849 \helpref{wxScrollBar
}{wxscrollbar
},
\helpref{wxScrolledWindow
}{wxscrolledwindow
}
1852 \membersection{wxWindow::SetSize
}\label{wxwindowsetsize
}
1854 \func{virtual void
}{SetSize
}{\param{int
}{ x
},
\param{int
}{ y
},
\param{int
}{ width
},
\param{int
}{ height
},
1855 \param{int
}{ sizeFlags = wxSIZE
\_AUTO}}
1857 \func{virtual void
}{SetSize
}{\param{const wxRect\&
}{ rect
}}
1859 Sets the size and position of the window in pixels.
1861 \func{virtual void
}{SetSize
}{\param{int
}{ width
},
\param{int
}{ height
}}
1863 \func{virtual void
}{SetSize
}{\param{const wxSize\&
}{ size
}}
1865 Sets the size of the window in pixels.
1867 \wxheading{Parameters
}
1869 \docparam{x
}{Required x position in pixels, or -
1 to indicate that the existing
1870 value should be used.
}
1872 \docparam{y
}{Required y position in pixels, or -
1 to indicate that the existing
1873 value should be used.
}
1875 \docparam{width
}{Required width in pixels, or -
1 to indicate that the existing
1876 value should be used.
}
1878 \docparam{height
}{Required height position in pixels, or -
1 to indicate that the existing
1879 value should be used.
}
1881 \docparam{size
}{\helpref{wxSize
}{wxsize
} object for setting the size.
}
1883 \docparam{rect
}{\helpref{wxRect
}{wxrect
} object for setting the position and size.
}
1885 \docparam{sizeFlags
}{Indicates the interpretation of other parameters. It is a bit list of the following:
1887 {\bf wxSIZE
\_AUTO\_WIDTH}: a -
1 width value is taken to indicate
1888 a wxWindows-supplied default width.\\
1889 {\bf wxSIZE
\_AUTO\_HEIGHT}: a -
1 height value is taken to indicate
1890 a wxWindows-supplied default width.\\
1891 {\bf wxSIZE
\_AUTO}: -
1 size values are taken to indicate
1892 a wxWindows-supplied default size.\\
1893 {\bf wxSIZE
\_USE\_EXISTING}: existing dimensions should be used
1894 if -
1 values are supplied.\\
1895 {\bf wxSIZE
\_ALLOW\_MINUS\_ONE}: allow dimensions of -
1 and less to be interpreted
1896 as real dimensions, not default values.
1901 The second form is a convenience for calling the first form with default
1902 x and y parameters, and must be used with non-default width and height values.
1904 The first form sets the position and optionally size, of the window.
1905 Parameters may be -
1 to indicate either that a default should be supplied
1906 by wxWindows, or that the current value of the dimension should be used.
1908 \wxheading{See also
}
1910 \helpref{wxWindow::Move
}{wxwindowmove
}
1912 \membersection{wxWindow::SetSizeHints
}\label{wxwindowsetsizehints
}
1914 \func{virtual void
}{SetSizeHints
}{\param{int
}{ minW=-
1},
\param{int
}{ minH=-
1},
\param{int
}{ maxW=-
1},
\param{int
}{ maxH=-
1},
1915 \param{int
}{ incW=-
1},
\param{int
}{ incH=-
1}}
1917 Allows specification of minimum and maximum window sizes, and window size increments.
1918 If a pair of values is not set (or set to -
1), the default values will be used.
1920 \wxheading{Parameters
}
1922 \docparam{minW
}{Specifies the minimum width allowable.
}
1924 \docparam{minH
}{Specifies the minimum height allowable.
}
1926 \docparam{maxW
}{Specifies the maximum width allowable.
}
1928 \docparam{maxH
}{Specifies the maximum height allowable.
}
1930 \docparam{incW
}{Specifies the increment for sizing the width (Motif/Xt only).
}
1932 \docparam{incH
}{Specifies the increment for sizing the height (Motif/Xt only).
}
1936 If this function is called, the user will not be able to size the window outside the
1939 The resizing increments are only significant under Motif or Xt.
1941 \membersection{wxWindow::SetClientSize
}
1943 \func{virtual void
}{SetClientSize
}{\param{int
}{ width
},
\param{int
}{ height
}}
1945 \func{virtual void
}{SetClientSize
}{\param{const wxSize\&
}{ size
}}
1947 This sets the size of the window client area in pixels. Using this function to size a window
1948 tends to be more device-independent than
\helpref{wxWindow::SetSize
}{wxwindowsetsize
}, since the application need not
1949 worry about what dimensions the border or title bar have when trying to fit the window
1950 around panel items, for example.
1952 \wxheading{Parameters
}
1954 \docparam{width
}{The required client area width.
}
1956 \docparam{height
}{The required client area height.
}
1958 \docparam{size
}{The required client size.
}
1960 \membersection{wxWindow::SetPalette
}
1962 \func{virtual void
}{SetPalette
}{\param{wxPalette*
}{palette
}}
1964 Obsolete - use
\helpref{wxDC::SetPalette
}{wxdcsetpalette
} instead.
1966 \membersection{wxWindow::SetCursor
}\label{wxwindowsetcursor
}
1968 \func{virtual void
}{SetCursor
}{\param{const wxCursor\&
}{cursor
}}
1970 Sets the window's cursor.
1972 \wxheading{Parameters
}
1974 \docparam{cursor
}{Specifies the cursor that the window should normally display.
}
1978 Under Windows, you sometimes need to call ::wxSetCursor in addition to this
1979 function if you want the cursor to change immediately, because under Windows,
1980 wxWindows only sets the global cursor when it detects mouse movement.
1982 \wxheading{See also
}
1984 \helpref{::wxSetCursor
}{wxsetcursor
},
\helpref{wxCursor
}{wxcursor
}
1986 \membersection{wxWindow::SetEventHandler
}\label{wxwindowseteventhandler
}
1988 \func{void
}{SetEventHandler
}{\param{wxEvtHandler*
}{handler
}}
1990 Sets the event handler for this window.
1992 \wxheading{Parameters
}
1994 \docparam{handler
}{Specifies the handler to be set.
}
1998 An event handler is an object that is capable of processing the events
1999 sent to a window. By default, the window is its own event handler, but
2000 an application may wish to substitute another, for example to allow
2001 central implementation of event-handling for a variety of different
2004 It is usually better to use
\helpref{wxWindow::PushEventHandler
}{wxwindowpusheventhandler
} since
2005 this sets up a chain of event handlers, where an event not handled by one event handler is
2006 handed to the next one in the chain.
2008 \wxheading{See also
}
2010 \helpref{wxWindow::GetEventHandler
}{wxwindowgeteventhandler
},
\rtfsp
2011 \helpref{wxWindow::PushEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
2012 \helpref{wxWindow::PopEventHandler
}{wxwindowpusheventhandler
},
\rtfsp
2013 \helpref{wxEvtHandler::ProcessEvent
}{wxevthandlerprocessevent
},
\rtfsp
2014 \helpref{wxEvtHandler
}{wxevthandler
}
2016 \membersection{wxWindow::SetTitle
}\label{wxwindowsettitle
}
2018 \func{virtual void
}{SetTitle
}{\param{const wxString\&
}{title
}}
2020 Sets the window's title. Applicable only to frames and dialogs.
2022 \wxheading{Parameters
}
2024 \docparam{title
}{The window's title.
}
2026 \wxheading{See also
}
2028 \helpref{wxWindow::GetTitle
}{wxwindowgettitle
}
2030 \membersection{wxWindow::Show
}
2032 \func{virtual bool
}{Show
}{\param{const bool
}{ show
}}
2034 Shows or hides the window.
2036 \wxheading{Parameters
}
2038 \docparam{show
}{If TRUE, displays the window and brings it to the front. Otherwise,
2041 \wxheading{See also
}
2043 \helpref{wxWindow::IsShown
}{wxwindowisshown
}
2045 \membersection{wxWindow::TransferDataFromWindow
}\label{wxwindowtransferdatafromwindow
}
2047 \func{virtual bool
}{TransferDataFromWindow
}{\void}
2049 Transfers values from child controls to data areas specified by their validators. Returns
2050 FALSE if a transfer failed.
2052 \wxheading{See also
}
2054 \helpref{wxWindow::TransferDataToWindow
}{wxwindowtransferdatatowindow
},
\rtfsp
2055 \helpref{wxValidator
}{wxvalidator
},
\helpref{wxWindow::Validate
}{wxwindowvalidate
}
2057 \membersection{wxWindow::TransferDataToWindow
}\label{wxwindowtransferdatatowindow
}
2059 \func{virtual bool
}{TransferDataToWindow
}{\void}
2061 Transfers values to child controls from data areas specified by their validators.
2063 \wxheading{Return value
}
2065 Returns FALSE if a transfer failed.
2067 \wxheading{See also
}
2069 \helpref{wxWindow::TransferDataFromWindow
}{wxwindowtransferdatafromwindow
},
\rtfsp
2070 \helpref{wxValidator
}{wxvalidator
},
\helpref{wxWindow::Validate
}{wxwindowvalidate
}
2072 \membersection{wxWindow::Validate
}\label{wxwindowvalidate
}
2074 \func{virtual bool
}{Validate
}{\void}
2076 Validates the current values of the child controls using their validators.
2078 \wxheading{Return value
}
2080 Returns FALSE if any of the validations failed.
2082 \wxheading{See also
}
2084 \helpref{wxWindow::TransferDataFromWindow
}{wxwindowtransferdatafromwindow
},
\rtfsp
2085 \helpref{wxWindow::TransferDataFromWindow
}{wxwindowtransferdatafromwindow
},
\rtfsp
2086 \helpref{wxValidator
}{wxvalidator
}
2088 \membersection{wxWindow::WarpPointer
}\label{wxwindowwarppointer
}
2090 \func{void
}{WarpPointer
}{\param{int
}{ x
},
\param{int
}{ y
}}
2092 Moves the pointer to the given position on the window.
2094 \wxheading{Parameters
}
2096 \docparam{x
}{The new x position for the cursor.
}
2098 \docparam{y
}{The new y position for the cursor.
}