X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d4a1433fccecbd5c3e80f921c6de91cbef287b44..0149e2778396dfac568e1d381b87b44282e12df5:/docs/latex/wx/window.tex

diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex
index b4103f2261..1dae19c773 100644
--- a/docs/latex/wx/window.tex
+++ b/docs/latex/wx/window.tex
@@ -74,7 +74,7 @@ and no longer has an effect.}
 \twocolitem{\windowstyle{wxALWAYS\_SHOW\_SB}}{If a window has scrollbars,
 disable them instead of hiding them when they are not needed (i.e. when the
 size of the window is big enough to not require the scrollbars to navigate it).
-This style is currently only implemented for wxMSW and wxUniversal and does
+This style is currently implemented for wxMSW, wxGTK and wxUniversal and does
 nothing on the other platforms.}
 \twocolitem{\windowstyle{wxCLIP\_CHILDREN}}{Use this style to eliminate flicker caused by the background being
 repainted, then children being painted over them. Windows only.}
@@ -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,17 +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},\rtfsp
-\helpref{wxWindow::SetSizeHints}{wxwindowsetsizehints}
+\helpref{wxWindow::SetInitialSize}{wxwindowsetinitialsize}
 
 
 \membersection{wxWindow::GetBestSize}\label{wxwindowgetbestsize}
@@ -1092,14 +1091,16 @@ by name.
 \constfunc{wxSize}{GetMaxSize}{\void}
 
 Returns the maximum size of the window, an indication to the sizer layout mechanism
-that this is the maximum possible size.
+that this is the maximum possible size. 
 
 \membersection{wxWindow::GetMinSize}\label{wxwindowgetminsize}
 
-\constfunc{wxSize}{GetMinSize}{\void}
+\constfunc{virtual wxSize}{GetMinSize}{\void}
 
 Returns the minimum size of the window, an indication to the sizer layout mechanism
-that this is the minimum required size.
+that this is the minimum required size. It normally just returns the value set
+by \helpref{SetMinSize}{wxwindowsetminsize}, but it can be overridden to do the
+calculation on demand.
 
 \membersection{wxWindow::GetName}\label{wxwindowgetname}
 
@@ -1372,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}
@@ -1495,6 +1504,19 @@ to the dialog via validators.
 Resets the cached best size value so it will be recalculated the next time it is needed.
 
 
+\membersection{wxWindow::IsDoubleBuffered}\label{wxwindowisdoublebuffered}
+
+\constfunc{virtual bool}{IsDoubleBuffered}{\void}
+
+Returns \true if the window contents is double-buffered by the system, i.e. if
+any drawing done on the window is really done on a temporary backing surface
+and transferred to the screen all at once later.
+
+\wxheading{See also}
+
+\helpref{wxBufferedDC}{wxbuffereddc}
+
+
 \membersection{wxWindow::IsEnabled}\label{wxwindowisenabled}
 
 \constfunc{virtual bool}{IsEnabled}{\void}
@@ -1560,21 +1582,12 @@ Returns {\tt true} if the window is shown, {\tt false} if it has been hidden.
 
 \wxheading{See also}
 
-\helpref{wxWindow::IsVisible}{wxwindowisvisible}
+\helpref{wxWindow::IsShownOnScreen}{wxwindowisshownonscreen}
 
 
-\membersection{wxWindow::IsTopLevel}\label{wxwindowistoplevel}
+\membersection{wxWindow::IsShownOnScreen}\label{wxwindowisshownonscreen}
 
-\constfunc{bool}{IsTopLevel}{\void}
-
-Returns {\tt true} if the given window is a top-level one. Currently all frames and
-dialogs are considered to be top-level windows (even if they have a parent
-window).
-
-
-\membersection{wxWindow::IsVisible}\label{wxwindowisvisible}
-
-\constfunc{virtual bool}{IsVisible}{\void}
+\constfunc{virtual bool}{IsShownOnScreen}{\void}
 
 Returns {\tt true} if the window is physically visible on the screen, i.e. it
 is shown and all its parents up to the toplevel window are shown as well.
@@ -1584,6 +1597,15 @@ is shown and all its parents up to the toplevel window are shown as well.
 \helpref{wxWindow::IsShown}{wxwindowisshown}
 
 
+\membersection{wxWindow::IsTopLevel}\label{wxwindowistoplevel}
+
+\constfunc{bool}{IsTopLevel}{\void}
+
+Returns {\tt true} if the given window is a top-level one. Currently all frames and
+dialogs are considered to be top-level windows (even if they have a parent
+window).
+
+
 \membersection{wxWindow::Layout}\label{wxwindowlayout}
 
 \func{void}{Layout}{\void}
@@ -2647,9 +2669,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
@@ -2658,12 +2680,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},\rtfsp
-\helpref{wxWindow::SetSizeHints}{wxwindowsetsizehints}
+\helpref{wxWindow::GetEffectiveMinSize}{wxwindowgeteffectiveminsize}
 
 
 \membersection{wxWindow::SetCaret}\label{wxwindowsetcaret}
@@ -3279,42 +3304,14 @@ implements the following methods:\par
 
 \membersection{wxWindow::SetSizeHints}\label{wxwindowsetsizehints}
 
-\func{virtual void}{SetSizeHints}{\param{int}{ minW}, \param{int}{ minH}, \param{int}{ maxW=-1}, \param{int}{ maxH=-1},
- \param{int}{ incW=-1}, \param{int}{ incH=-1}}
-
-\func{void}{SetSizeHints}{\param{const wxSize\&}{ minSize},
-\param{const wxSize\&}{ maxSize=wxDefaultSize}, \param{const wxSize\&}{ incSize=wxDefaultSize}}
-
-
-Allows specification of minimum and maximum window sizes, and window size increments.
-If a pair of values is not set (or set to -1), the default values will be used.
-
-\wxheading{Parameters}
-
-\docparam{minW}{Specifies the minimum width allowable.}
-
-\docparam{minH}{Specifies the minimum height allowable.}
-
-\docparam{maxW}{Specifies the maximum width allowable.}
-
-\docparam{maxH}{Specifies the maximum height allowable.}
-
-\docparam{incW}{Specifies the increment for sizing the width (Motif/Xt only).}
-
-\docparam{incH}{Specifies the increment for sizing the height (Motif/Xt only).}
-
-\docparam{minSize}{Minimum size.}
-
-\docparam{maxSize}{Maximum size.}
-
-\docparam{incSize}{Increment size (Motif/Xt only).}
-
-\wxheading{Remarks}
+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.
 
-If this function is called, the user will not be able to size the window outside the
-given bounds.
+\wxheading{See also}
 
-The resizing increments are only significant under Motif or Xt.
+\helpref{wxTopLevelWindow::SetSizeHints}{wxtoplevelwindowsetsizehints}.
 
 
 \membersection{wxWindow::SetSizer}\label{wxwindowsetsizer}
@@ -3446,7 +3443,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.
 
@@ -3526,6 +3524,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}
@@ -3590,9 +3610,10 @@ This function is currently only implemented under MSW.
 
 Calling this method immediately repaints the invalidated area of the window and
 all of its children recursively 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
+flow of control returns to the event loop. 
+Notice that this function doesn't invalidate any area of the window so
+nothing happens if nothing has been invalidated (i.e. marked as requiring
+a redraw). Use \helpref{Refresh}{wxwindowrefresh} first if you want to
 immediately redraw the window unconditionally.
 
 
@@ -3679,3 +3700,4 @@ Interface Guidelines forbid moving the mouse cursor programmatically.
 \docparam{x}{The new x position for the cursor.}
 
 \docparam{y}{The new y position for the cursor.}
+
