]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/window.tex
don't wake up on Windows messages when waiting for thread termination in a console...
[wxWidgets.git] / docs / latex / wx / window.tex
index 438768873c8a08dda5d91822ba8611b609513b93..a416fa51511177db69c0d77b390d38f80f450716 100644 (file)
@@ -115,7 +115,8 @@ even if the mode set by \helpref{wxUpdateUIEvent::SetMode}{wxupdateuieventsetmod
 
 \wxheading{See also}
 
-\helpref{Event handling overview}{eventhandlingoverview}
+\helpref{Event handling overview}{eventhandlingoverview}\\
+\helpref{Window sizing overview}{windowsizingoverview}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
@@ -721,11 +722,8 @@ See also \helpref{wxAccessible}{wxaccessible}.
 
 \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.
+This method is deprecated, use \helpref{GetEffectiveMinSize}{wxwindowgeteffectiveminsize}
+instead.
 
 
 \membersection{wxWindow::GetBackgroundColour}\label{wxwindowgetbackgroundcolour}
@@ -758,16 +756,18 @@ background, such as a tiled bitmap. Currently the style has no effect on other p
 \helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour},\rtfsp
 \helpref{wxWindow::SetBackgroundStyle}{wxwindowsetbackgroundstyle}
 
-\membersection{wxWindow::GetBestFittingSize}\label{wxwindowgetbestfittingsize}
+\membersection{wxWindow::GetEffectiveMinSize}\label{wxwindowgeteffectiveminsize}
 
-\constfunc{wxSize}{GetBestFittingSize}{\void}
+\constfunc{wxSize}{GetEffectiveMinSize}{\void}
 
-Merges the window's best size into the min size and returns the result.
+Merges the window's best size into the min size and returns the
+result.  This is the value used by sizers to determine the appropriate
+ammount of sapce to allocate for the widget.
 
 \wxheading{See also}
 
 \helpref{wxWindow::GetBestSize}{wxwindowgetbestsize},\rtfsp
-\helpref{wxWindow::SetBestFittingSize}{wxwindowsetbestfittingsize}
+\helpref{wxWindow::SetInitialSize}{wxwindowsetinitialsize}
 
 
 \membersection{wxWindow::GetBestSize}\label{wxwindowgetbestsize}
@@ -1373,6 +1373,14 @@ that size.
 \helpref{GetClientSize}{wxwindowgetclientsize}
 
 
+\membersection{wxWindow::GetWindowBorderSize}\label{wxwindowgetwindowbordersize}
+
+\constfunc{wxSize}{GetWindowBorderSize}{\void}
+
+Returns the size of the left/right and top/bottom borders of this window in x
+and y components of the result respectively.
+
+
 \membersection{wxWindow::GetWindowStyleFlag}\label{wxwindowgetwindowstyleflag}
 
 \constfunc{long}{GetWindowStyleFlag}{\void}
@@ -1727,6 +1735,23 @@ navigation behaviour for the tab key, since the standard default behaviour for
 a multiline text control with the wxTE\_PROCESS\_TAB style is to insert a tab
 and not navigate to the next control.
 
+
+\membersection{wxWindow::NextControlId}\label{wxwindownextcontrolid}
+
+\func{static int}{NextControlId}{\param{int }{winid}}
+
+If two controls are created consecutively using \texttt{wxID\_ANY} id, this
+function allows to retrieve the effective id of the latter control from the id
+of the former. This is useful for example to find the control following its 
+\helpref{wxStaticText}{wxstatictext} label if only the id of or pointer to the
+label is available to the caller but it is known that the two controls were
+created together.
+
+\wxheading{See also}
+
+\helpref{PrevControlId}{wxwindowprevcontrolid}
+
+
 %% VZ: wxWindow::OnXXX() functions should not be documented but I'm leaving
 %%     the old docs here in case we want to move any still needed bits to
 %%     the right location (i.e. probably the corresponding events docs)
@@ -2286,6 +2311,14 @@ implements the following methods:\par
 }
 
 
+\membersection{wxWindow::PrevControlId}\label{wxwindowprevcontrolid}
+
+\func{static int}{PrevControlId}{\param{int }{winid}}
+
+This is similar to \helpref{NextControlId}{wxwindownextcontrolid} but returns
+the id of the control created just before the one with the given \arg{winid}.
+
+
 \membersection{wxWindow::PushEventHandler}\label{wxwindowpusheventhandler}
 
 \func{void}{PushEventHandler}{\param{wxEvtHandler* }{handler}}
@@ -2661,9 +2694,9 @@ background, such as a tiled bitmap. Currently the style has no effect on other p
 \helpref{wxWindow::GetBackgroundStyle}{wxwindowgetbackgroundstyle}
 
 
-\membersection{wxWindow::SetBestFittingSize}\label{wxwindowsetbestfittingsize}
+\membersection{wxWindow::SetInitialSize}\label{wxwindowsetinitialsize}
 
-\func{void}{SetBestFittingSize}{\param{const wxSize\& }{size = wxDefaultSize}}
+\func{void}{SetInitialSize}{\param{const wxSize\& }{size = wxDefaultSize}}
 
 A {\it smart} SetSize that will fill in default size components with the
 window's {\it best} size values.  Also sets the window's minsize to
@@ -2672,11 +2705,15 @@ partial size is passed to this function then the sizers will use that
 size instead of the results of GetBestSize to determine the minimum
 needs of the window for layout.
 
+Most controls will use this to set their initial size, and their min
+size to the passed in value (if any.)
+
+
 \wxheading{See also}
 
 \helpref{wxWindow::SetSize}{wxwindowsetsize},\rtfsp
 \helpref{wxWindow::GetBestSize}{wxwindowgetbestsize},\rtfsp
-\helpref{wxWindow::GetBestFittingSize}{wxwindowgetbestfittingsize}
+\helpref{wxWindow::GetEffectiveMinSize}{wxwindowgeteffectiveminsize}
 
 
 \membersection{wxWindow::SetCaret}\label{wxwindowsetcaret}
@@ -3292,8 +3329,13 @@ implements the following methods:\par
 
 \membersection{wxWindow::SetSizeHints}\label{wxwindowsetsizehints}
 
-This method does nothing for a normal wxWindow and is only kept
-for backwards compatibility. The actual implementation is in
+Use of this function for windows which are not toplevel windows
+(such as wxDialog or wxFrame) is discouraged. Please use 
+\helpref{SetMinSize}{wxwindowsetminsize} and \helpref{SetMaxSize}{wxwindowsetmaxsize}
+instead.
+
+\wxheading{See also}
+
 \helpref{wxTopLevelWindow::SetSizeHints}{wxtoplevelwindowsetsizehints}.
 
 
@@ -3426,7 +3468,8 @@ Identical to \helpref{SetWindowStyleFlag}{wxwindowsetwindowstyleflag}.
 
 Sets the style of the window. Please note that some styles cannot be changed
 after the window creation and that \helpref{Refresh()}{wxwindowrefresh} might
-be called after changing the others for the change to take place immediately.
+need to be be called after changing the others for the change to take place
+immediately.
 
 See \helpref{Window styles}{windowstyles} for more information about flags.
 
@@ -3506,6 +3549,28 @@ exactly the same number of times as \helpref{Freeze}{wxwindowfreeze}.
 \helpref{wxWindowUpdateLocker}{wxwindowupdatelocker}
 
 
+\membersection{wxWindow::ToggleWindowStyle}\label{wxwindowtogglewindowstyle}
+
+\func{bool}{ToggleWindowStyle}{\param{int }{flag}}
+
+Turns the given \arg{flag} on if it's currently turned off and vice versa.
+This function cannot be used if the value of the flag is $0$ (which is often
+the case for default flags).
+
+Also, please notice that not all styles can be changed after the control
+creation.
+
+\wxheading{Return value}
+
+Returns \true if the style was turned on by this function, \false if it was
+switched off.
+
+\wxheading{See also}
+
+\helpref{wxWindow::SetWindowStyleFlag}{wxwindowsetwindowstyleflag},\rtfsp
+\helpref{wxWindow::HasFlag}{wxwindowhasflag}
+
+
 \membersection{wxWindow::TransferDataFromWindow}\label{wxwindowtransferdatafromwindow}
 
 \func{virtual bool}{TransferDataFromWindow}{\void}