X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2edb0bdef6238c8c246b6978bc14828b7033d931..801a492c49f0e4641046b4fbb3f2d18111b1b387:/docs/latex/wx/window.tex diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex index 767281bb2b..c784cfbb04 100644 --- a/docs/latex/wx/window.tex +++ b/docs/latex/wx/window.tex @@ -3,13 +3,13 @@ wxWindow is the base class for all windows. Any children of the window will be deleted automatically by the destructor before the window itself is deleted. -Please note that we documented a number of handler functions (OnChar(), OnMouse() etc.) in this -help text. These must not be called by a user program and are documented only for illustration. -On several platforms, only a few of these handlers are actually written (they are not always -needed) and if you are uncertain on how to add a certain behaviour to a window class, intercept -the respective event as usual and call \helpref{wxEvent::Skip}{wxeventskip} so that the native -platform can implement its native behaviour or just ignore the event if nothing needs to be -done. +%Please note that we documented a number of handler functions (OnChar(), OnMouse() etc.) in this +%help text. These must not be called by a user program and are documented only for illustration. +%On several platforms, only a few of these handlers are actually written (they are not always +%needed) and if you are uncertain on how to add a certain behaviour to a window class, intercept +%the respective event as usual and call \helpref{wxEvent::Skip}{wxeventskip} so that the native +%platform can implement its native behaviour or just ignore the event if nothing needs to be +%done. \wxheading{Derived from} @@ -421,7 +421,9 @@ Windows only. \func{virtual bool}{Enable}{\param{bool}{ enable = {\tt TRUE}}} -Enable or disable the window for user input. +Enable or disable the window for user input. Note that when a parent window is +disabled, all of its children are disabled as well and they are reenabled again +when the parent is. \wxheading{Parameters} @@ -519,6 +521,16 @@ The search is recursive in both cases. Sizes the window so that it fits around its subwindows. This function won't do anything if there are no subwindows. +\membersection{wxWindow::FitInside}\label{wxwindowfitinside} + +\func{virtual void}{FitInside}{\void} + +Similar to \helpref{Fit}{wxwindowfit}, but sizes the interior (virtual) size +of a window. Mainly useful with scrolled windows to reset scrollbars after +sizing changes that do not trigger a size event, and/or scrolled windows without +an interior sizer. This function similarly won't do anything if there are no +subwindows. + \membersection{wxWindow::Freeze}\label{wxwindowfreeze} \func{virtual void}{Freeze}{\void} @@ -533,6 +545,16 @@ wxTextCtrl under wxGTK) but is not implemented on all platforms nor for all controls so it is mostly just a hint to wxWindows and not a mandatory directive. +\membersection{wxWindow::GetAdjustedBestSize}\label{wxwindowgetadjustedbestsize} + +\constfunc{wxSize}{GetAdjustedBestSize}{\void} + +This method is similar to \helpref{GetBestSize}{wxwindowgetbestsize}, except +in one thing. GetBestSize should return the minimum untruncated size of the +window, while this method will return the largest of BestSize and any user +specified minimum size. ie. it is the minimum size the window should currently +be drawn at, not the minimal size it can possibly tolerate. + \membersection{wxWindow::GetBackgroundColour}\label{wxwindowgetbackgroundcolour} \constfunc{virtual wxColour}{GetBackgroundColour}{\void} @@ -713,6 +735,8 @@ handle, such as {\bf HWND} for Windows, {\bf Widget} for Motif or {\bf GtkWidget \pythonnote{This method will return an integer in wxPython.} +\perlnote{This method will return an integer in wxPerl.} + \membersection{wxWindow::GetHelpText}\label{wxwindowgethelptext} \constfunc{virtual wxString}{GetHelpText}{\void} @@ -784,8 +808,9 @@ Returns the parent of the window, or NULL if there is no parent. \constfunc{wxPoint}{GetPosition}{\void} -This gets the position of the window in pixels, relative to the parent window or -if no parent, relative to the whole display. +This gets the position of the window in pixels, relative to the parent window +for the child windows or relative to the display origin for the top level +windows. \wxheading{Parameters} @@ -1754,6 +1779,19 @@ erased.} \docparam{rect}{If non-NULL, only the given rectangle will be treated as damaged.} +\wxheading{See also} + +\helpref{wxWindow::RefreshRect}{wxwindowrefreshrect} + +\membersection{wxWindow::RefreshRect}\label{wxwindowrefreshrect} + +\func{virtual void}{Refresh}{\param{const wxRect\& }{rect}} + +Redraws the contents of the given rectangle: the area inside it will be +repainted. + +This is the same as \helpref{Refresh}{wxwindowrefresh} but has a nicer syntax. + \membersection{wxWindow::ReleaseMouse}\label{wxwindowreleasemouse} \func{virtual void}{ReleaseMouse}{\void} @@ -1913,10 +1951,11 @@ Sets the accelerator table for this window. See \helpref{wxAcceleratorTable}{wxa \func{void}{SetAutoLayout}{\param{bool}{ autoLayout}} Determines whether the \helpref{wxWindow::Layout}{wxwindowlayout} function will -be called automatically when the window is resized. Use in connection with -\helpref{wxWindow::SetSizer}{wxwindowsetsizer} and -\helpref{wxWindow::SetConstraints}{wxwindowsetconstraints} for laying out -subwindows. +be called automatically when the window is resized. It is called implicitly by +\helpref{wxWindow::SetSizer}{wxwindowsetsizer} but if you use +\helpref{wxWindow::SetConstraints}{wxwindowsetconstraints} you should call it +manually or otherwise the window layout won't be correctly updated when its +size changes. \wxheading{Parameters} @@ -2480,6 +2519,10 @@ will then own the object, and will take care of its deletion. If an existing layout constraints object is already owned by the window, it will be deleted if the deleteOld parameter is TRUE. +Note that this function will also call +\helpref{SetAutoLayout}{wxwindowsetautolayout} implicitly with {\tt TRUE} +parameter if the {\it sizer}\/ is non-NULL and {\tt FALSE} otherwise. + \wxheading{Parameters} \docparam{sizer}{The sizer to set. Pass NULL to disassociate and conditionally delete @@ -2672,6 +2715,17 @@ Returns {\tt FALSE} if a transfer failed. \helpref{wxWindow::TransferDataFromWindow}{wxwindowtransferdatafromwindow},\rtfsp \helpref{wxValidator}{wxvalidator}, \helpref{wxWindow::Validate}{wxwindowvalidate} +\membersection{wxWindow::Update}\label{wxwindowupdate} + +\func{virtual void}{Update}{\void} + +Calling this method immediately repaints the invalidated area of the window +while this would usually only happen when the flow of control returns to the +event loop. Notice that this function doesn't refresh the window and does +nothing if the window hadn't been already repainted. Use +\helpref{Refresh}{wxwindowrefresh} first if you want to immediately redraw the +window unconditionally. + \membersection{wxWindow::Validate}\label{wxwindowvalidate} \func{virtual bool}{Validate}{\void}