]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/window.tex
Fixed description with number of ways to use timer class, updated note about main...
[wxWidgets.git] / docs / latex / wx / window.tex
index 322ca2ae90796cdea4f6c9279d9b92d578dfae69..e61faddd2aaa7a7b7f713a7180c8723cf1199856 100644 (file)
@@ -615,32 +615,32 @@ The search is recursive in both cases.
 \helpref{FindWindow}{wxwindowfindwindow}
 
 
-\membersection{wxWindow::FindWindowByName}\label{wxwindowfindwindowbyname}
+\membersection{wxWindow::FindWindowByLabel}\label{wxwindowfindwindowbylabel}
 
-\func{static wxWindow*}{FindWindowByName}{\param{const wxString\&}{ name}, \param{wxWindow*}{ parent = NULL}}
+\func{static wxWindow*}{FindWindowByLabel}{\param{const wxString\&}{ label}, \param{wxWindow*}{ parent = NULL}}
 
-Find a window by its name (as given in a window constructor or {\bf Create} function call).
-If {\it parent} is NULL, the search will start from all top-level
+Find a window by its label. Depending on the type of window, the label may be a window title
+or panel item label. If {\it parent} is NULL, the search will start from all top-level
 frames and dialog boxes; if non-NULL, the search will be limited to the given window hierarchy.
 The search is recursive in both cases.
 
-If no window with such name is found,
-\helpref{FindWindowByLabel}{wxwindowfindwindowbylabel} is called.
-
 \wxheading{See also}
 
 \helpref{FindWindow}{wxwindowfindwindow}
 
 
-\membersection{wxWindow::FindWindowByLabel}\label{wxwindowfindwindowbylabel}
+\membersection{wxWindow::FindWindowByName}\label{wxwindowfindwindowbyname}
 
-\func{static wxWindow*}{FindWindowByLabel}{\param{const wxString\&}{ label}, \param{wxWindow*}{ parent = NULL}}
+\func{static wxWindow*}{FindWindowByName}{\param{const wxString\&}{ name}, \param{wxWindow*}{ parent = NULL}}
 
-Find a window by its label. Depending on the type of window, the label may be a window title
-or panel item label. If {\it parent} is NULL, the search will start from all top-level
+Find a window by its name (as given in a window constructor or {\bf Create} function call).
+If {\it parent} is NULL, the search will start from all top-level
 frames and dialog boxes; if non-NULL, the search will be limited to the given window hierarchy.
 The search is recursive in both cases.
 
+If no window with such name is found,
+\helpref{FindWindowByLabel}{wxwindowfindwindowbylabel} is called.
+
 \wxheading{See also}
 
 \helpref{FindWindow}{wxwindowfindwindow}
@@ -772,13 +772,6 @@ same as the size the window would have had after calling
 \helpref{Fit}{wxwindowfit}.
 
 
-\membersection{wxWindow::GetCaret}\label{wxwindowgetcaret}
-
-\constfunc{wxCaret *}{GetCaret}{\void}
-
-Returns the \helpref{caret}{wxcaret} associated with the window.
-
-
 \membersection{wxWindow::GetCapture}\label{wxwindowgetcapture}
 
 \func{static wxWindow *}{GetCapture}{\void}
@@ -793,6 +786,13 @@ Returns the currently captured window.
 \helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}
 
 
+\membersection{wxWindow::GetCaret}\label{wxwindowgetcaret}
+
+\constfunc{wxCaret *}{GetCaret}{\void}
+
+Returns the \helpref{caret}{wxcaret} associated with the window.
+
+
 \membersection{wxWindow::GetCharHeight}\label{wxwindowgetcharheight}
 
 \constfunc{virtual int}{GetCharHeight}{\void}
@@ -2448,14 +2448,14 @@ Physically scrolls the pixels in the window and move child windows accordingly.
 
 \docparam{dy}{Amount to scroll vertically.}
 
-\docparam{rect}{Rectangle to invalidate. If this is NULL, the whole window is invalidated. If you
-pass a rectangle corresponding to the area of the window exposed by the scroll, your painting handler
-can optimize painting by checking for the invalidated region. This parameter is ignored under GTK.}
+\docparam{rect}{Rectangle to scroll, if it is \NULL, the whole window is
+scrolled (this is always the case under wxGTK which doesn't support this
+parameter)}
 
 \wxheading{Remarks}
 
-Use this function to optimise your scrolling implementations, to minimise the area that must be
-redrawn. Note that it is rarely required to call this function from a user program.
+Note that you can often use \helpref{wxScrolledWindow}{wxscrolledwindow} 
+instead of using this function directly.
 
 
 \membersection{wxWindow::SetAcceleratorTable}\label{wxwindowsetacceleratortable}
@@ -2609,36 +2609,6 @@ implements the following methods:\par
 }
 
 
-\membersection{wxWindow::SetContainingSizer}\label{wxwindowsetcontainingsizer}
-
-\func{void}{SetContainingSizer}{\param{wxSizer* }{sizer}}
-
-This normally does not need to be called by user code.  It is called
-when a window is added to a sizer, and is used so the window can
-remove itself from the sizer when it is destroyed.
-
-
-\membersection{wxWindow::SetCursor}\label{wxwindowsetcursor}
-
-\func{virtual void}{SetCursor}{\param{const wxCursor\&}{cursor}}
-
-% VZ: the docs are correct, if the code doesn't behave like this, it must be
-%     changed
-Sets the window's cursor. Notice that the window cursor also sets it for the
-children of the window implicitly.
-
-The {\it cursor} may be {\tt wxNullCursor} in which case the window cursor will
-be reset back to default.
-
-\wxheading{Parameters}
-
-\docparam{cursor}{Specifies the cursor that the window should normally display.}
-
-\wxheading{See also}
-
-\helpref{::wxSetCursor}{wxsetcursor}, \helpref{wxCursor}{wxcursor}
-
-
 \membersection{wxWindow::SetConstraints}\label{wxwindowsetconstraints}
 
 \func{void}{SetConstraints}{\param{wxLayoutConstraints* }{constraints}}
@@ -2660,66 +2630,34 @@ the constraints automatically in OnSize; otherwise, you must override OnSize and
 explicitly. When setting both a wxLayoutConstraints and a \helpref{wxSizer}{wxsizer}, only the
 sizer will have effect.
 
-\membersection{wxWindow::SetInitialBestSize}\label{wxwindowsetinitialbestsize}
-
-\func{virtual void}{SetInitialBestSize}{\param{const wxSize\& }{size}}
-
-Sets the initial window size if none is given (i.e. at least one of the
-components of the size passed to ctor/Create() is wxDefaultCoord).
-
-\membersection{wxWindow::SetMaxSize}\label{wxwindowsetmaxsize}
-
-\func{void}{SetMaxSize}{\param{const wxSize\& }{size}}
-
-Sets the maximum size of the window, to indicate to the sizer layout mechanism
-that this is the maximum possible size.
-
-\membersection{wxWindow::SetMinSize}\label{wxwindowsetminsize}
-
-\func{void}{SetMinSize}{\param{const wxSize\& }{size}}
-
-Sets the minimum size of the window, to indicate to the sizer layout mechanism
-that this is the minimum required size. You may need to call this
-if you change the window size after construction and before adding
-to its parent sizer.
-
-\membersection{wxWindow::SetOwnBackgroundColour}\label{wxwindowsetownbackgroundcolour}
-
-\func{void}{SetOwnBackgroundColour}{\param{const wxColour\& }{colour}}
-
-Sets the background colour of the window but prevents it from being inherited
-by the children of this window.
-
-\wxheading{See also}
-
-\helpref{SetBackgroundColour}{wxwindowsetbackgroundcolour},\rtfsp
-\helpref{InheritAttributes}{wxwindowinheritattributes}
-
+\membersection{wxWindow::SetContainingSizer}\label{wxwindowsetcontainingsizer}
 
-\membersection{wxWindow::SetOwnFont}\label{wxwindowsetownfont}
+\func{void}{SetContainingSizer}{\param{wxSizer* }{sizer}}
 
-\func{void}{SetOwnFont}{\param{const wxFont\& }{font}}
+This normally does not need to be called by user code.  It is called
+when a window is added to a sizer, and is used so the window can
+remove itself from the sizer when it is destroyed.
 
-Sets the font of the window but prevents it from being inherited by the
-children of this window.
 
-\wxheading{See also}
+\membersection{wxWindow::SetCursor}\label{wxwindowsetcursor}
 
-\helpref{SetFont}{wxwindowsetfont},\rtfsp
-\helpref{InheritAttributes}{wxwindowinheritattributes}
+\func{virtual void}{SetCursor}{\param{const wxCursor\&}{cursor}}
 
+% VZ: the docs are correct, if the code doesn't behave like this, it must be
+%     changed
+Sets the window's cursor. Notice that the window cursor also sets it for the
+children of the window implicitly.
 
-\membersection{wxWindow::SetOwnForegroundColour}\label{wxwindowsetownforegroundcolour}
+The {\it cursor} may be {\tt wxNullCursor} in which case the window cursor will
+be reset back to default.
 
-\func{void}{SetOwnForegroundColour}{\param{const wxColour\& }{colour}}
+\wxheading{Parameters}
 
-Sets the foreground colour of the window but prevents it from being inherited
-by the children of this window.
+\docparam{cursor}{Specifies the cursor that the window should normally display.}
 
 \wxheading{See also}
 
-\helpref{SetForegroundColour}{wxwindowsetforegroundcolour},\rtfsp
-\helpref{InheritAttributes}{wxwindowinheritattributes}
+\helpref{::wxSetCursor}{wxsetcursor}, \helpref{wxCursor}{wxcursor}
 
 
 \membersection{wxWindow::SetDropTarget}\label{wxwindowsetdroptarget}
@@ -2737,6 +2675,13 @@ If the window already has a drop target, it is deleted.
 
 
 
+\membersection{wxWindow::SetInitialBestSize}\label{wxwindowsetinitialbestsize}
+
+\func{virtual void}{SetInitialBestSize}{\param{const wxSize\& }{size}}
+
+Sets the initial window size if none is given (i.e. at least one of the
+components of the size passed to ctor/Create() is wxDefaultCoord).
+
 \membersection{wxWindow::SetEventHandler}\label{wxwindowseteventhandler}
 
 \func{void}{SetEventHandler}{\param{wxEvtHandler* }{handler}}
@@ -2931,6 +2876,22 @@ Sets the window's label.
 \helpref{wxWindow::GetLabel}{wxwindowgetlabel}
 
 
+\membersection{wxWindow::SetMaxSize}\label{wxwindowsetmaxsize}
+
+\func{void}{SetMaxSize}{\param{const wxSize\& }{size}}
+
+Sets the maximum size of the window, to indicate to the sizer layout mechanism
+that this is the maximum possible size.
+
+\membersection{wxWindow::SetMinSize}\label{wxwindowsetminsize}
+
+\func{void}{SetMinSize}{\param{const wxSize\& }{size}}
+
+Sets the minimum size of the window, to indicate to the sizer layout mechanism
+that this is the minimum required size. You may need to call this
+if you change the window size after construction and before adding
+to its parent sizer.
+
 \membersection{wxWindow::SetName}\label{wxwindowsetname}
 
 \func{virtual void}{SetName}{\param{const wxString\& }{name}}
@@ -2946,6 +2907,45 @@ Sets the window's name.
 \helpref{wxWindow::GetName}{wxwindowgetname}
 
 
+\membersection{wxWindow::SetOwnBackgroundColour}\label{wxwindowsetownbackgroundcolour}
+
+\func{void}{SetOwnBackgroundColour}{\param{const wxColour\& }{colour}}
+
+Sets the background colour of the window but prevents it from being inherited
+by the children of this window.
+
+\wxheading{See also}
+
+\helpref{SetBackgroundColour}{wxwindowsetbackgroundcolour},\rtfsp
+\helpref{InheritAttributes}{wxwindowinheritattributes}
+
+
+\membersection{wxWindow::SetOwnFont}\label{wxwindowsetownfont}
+
+\func{void}{SetOwnFont}{\param{const wxFont\& }{font}}
+
+Sets the font of the window but prevents it from being inherited by the
+children of this window.
+
+\wxheading{See also}
+
+\helpref{SetFont}{wxwindowsetfont},\rtfsp
+\helpref{InheritAttributes}{wxwindowinheritattributes}
+
+
+\membersection{wxWindow::SetOwnForegroundColour}\label{wxwindowsetownforegroundcolour}
+
+\func{void}{SetOwnForegroundColour}{\param{const wxColour\& }{colour}}
+
+Sets the foreground colour of the window but prevents it from being inherited
+by the children of this window.
+
+\wxheading{See also}
+
+\helpref{SetForegroundColour}{wxwindowsetforegroundcolour},\rtfsp
+\helpref{InheritAttributes}{wxwindowinheritattributes}
+
+
 \membersection{wxWindow::SetPalette}\label{wxwindowsetpalette}
 
 \func{virtual void}{SetPalette}{\param{wxPalette* }{palette}}
@@ -3260,21 +3260,6 @@ The same as \helpref{SetSizer}{wxwindowsetsizer}, except it also sets the size h
 for the window based on the sizer's minimum size.
 
 
-\membersection{wxWindow::SetTitle}\label{wxwindowsettitle}
-
-\func{virtual void}{SetTitle}{\param{const wxString\& }{title}}
-
-Sets the window's title. Applicable only to frames and dialogs.
-
-\wxheading{Parameters}
-
-\docparam{title}{The window's title.}
-
-\wxheading{See also}
-
-\helpref{wxWindow::GetTitle}{wxwindowgettitle}
-
-
 \membersection{wxWindow::SetThemeEnabled}\label{wxwindowsetthemeenabled}
 
 \func{virtual void}{SetThemeEnabled}{\param{bool }{enable}}
@@ -3290,6 +3275,21 @@ Dialogs, notebook pages and the status bar have this flag set to true
 by default so that the default look and feel is simulated best.
 
 
+\membersection{wxWindow::SetTitle}\label{wxwindowsettitle}
+
+\func{virtual void}{SetTitle}{\param{const wxString\& }{title}}
+
+Sets the window's title. Applicable only to frames and dialogs.
+
+\wxheading{Parameters}
+
+\docparam{title}{The window's title.}
+
+\wxheading{See also}
+
+\helpref{wxWindow::GetTitle}{wxwindowgettitle}
+
+
 \membersection{wxWindow::SetToolTip}\label{wxwindowsettooltip}
 
 \func{void}{SetToolTip}{\param{const wxString\& }{tip}}