X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..6f63704ff4db9da6976547a1378d7e85b966eea7:/docs/latex/wx/sizer.tex

diff --git a/docs/latex/wx/sizer.tex b/docs/latex/wx/sizer.tex
index b7d1b8ee4e..74951d8f52 100644
--- a/docs/latex/wx/sizer.tex
+++ b/docs/latex/wx/sizer.tex
@@ -60,10 +60,9 @@ The destructor.
 
 \func{void}{Add}{\param{int }{width}, \param{int }{height}, \param{int }{proportion = 0}, \param{int }{flag = 0}, \param{int }{border = 0}, \param{wxObject* }{userData = NULL}}
 
-Adds the {\it window} to the sizer. As wxSizer itself is an abstract class, the parameters
-have no meaning in the wxSizer class itself, but as there currently is only one class
-deriving directly from wxSizer and this class does not override these methods, the meaning
-of the parameters is described here:
+Appends a child to the sizer.  wxSizer itself is an abstract class, but the parameters are
+equivalent in the derived classes that you will instantiate to use it so they are described
+here:
 
 \docparam{window}{The window to be added to the sizer. Its initial size (either set explicitly by the
 user or calculated internally when using wxDefaultSize) is interpreted as the minimal and in many
@@ -123,6 +122,26 @@ complex than the {\it proportion} and {\it flag} will allow for.}
 This method is abstract and has to be overwritten by any derived class.
 Here, the sizer will do the actual calculation of its children minimal sizes.
 
+\membersection{wxSizer::Detach}\label{wxsizerdetach}
+
+\func{bool}{Detach}{\param{wxWindow* }{window}}
+
+\func{bool}{Detach}{\param{wxSizer* }{sizer}}
+
+\func{bool}{Detach}{\param{size\_t }{index}}
+
+Detach a child from the sizer without destroying it. {\it window} is the window to be
+detached, {\it sizer} is the equivalent sizer and {\it index} is the position of
+the child in the sizer, typically 0 for the first item. This method does not
+cause any layout or resizing to take place, call \helpref{wxSizer::Layout}{wxsizerlayout}
+to update the layout "on screen" after detaching a child from the sizer.
+
+Returns true if the child item was found and detached, false otherwise.
+
+\wxheading{See also}
+
+\helpref{wxSizer::Remove}{wxsizerremove}
+
 \membersection{wxSizer::Fit}\label{wxsizerfit}
 
 \func{wxSize}{Fit}{\param{wxWindow* }{window}}
@@ -165,6 +184,20 @@ Returns the minimal size of the sizer. This is either the combined minimal
 size of all the children and their borders or the minimal size set by 
 \helpref{SetMinSize}{wxsizersetminsize}, depending on which is bigger.
 
+\membersection{wxSizer::Insert}\label{wxsizerinsert}
+
+\func{void}{Insert}{\param{size\_t }{index}, \param{wxWindow* }{window}, \param{int }{proportion = 0},\param{int }{flag = 0}, \param{int }{border = 0}, \param{wxObject* }{userData = NULL}}
+
+\func{void}{Insert}{\param{size\_t }{index}, \param{wxSizer* }{sizer}, \param{int }{proportion = 0}, \param{int }{flag = 0}, \param{int }{border = 0}, \param{wxObject* }{userData = NULL}}
+
+\func{void}{Insert}{\param{size\_t }{index}, \param{int }{width}, \param{int }{height}, \param{int }{proportion = 0}, \param{int }{flag = 0}, \param{int }{border = 0}, \param{wxObject* }{userData = NULL}}
+
+Insert a child into the sizer before any existing item at {\it index}.
+
+\docparam{index}{The position this child should assume in the sizer.}
+
+See \helpref{wxSizer::Add}{wxsizeradd} for the meaning of the other parameters.
+
 \membersection{wxSizer::Layout}\label{wxsizerlayout}
 
 \func{void}{Layout}{\void}
@@ -198,15 +231,20 @@ and sizes.
 
 \func{bool}{Remove}{\param{wxSizer* }{sizer}}
 
-\func{bool}{Remove}{\param{int }{nth}}
+\func{bool}{Remove}{\param{size\_t }{index}}
+
+Removes a child from the sizer and destroys it.  {\it sizer} is the wxSizer to be removed,
+{\it index} is the position of the child in the sizer, typically 0 for the first item.
+This method does not cause any layout or resizing to take place, call
+\helpref{wxSizer::Layout}{wxsizerlayout} to update the layout "on screen" after removing a
+child from the sizer.
 
-Removes a child from the sizer. {\it window} is the window to be removed, {\it sizer} is the
-equivalent sizer and {\it nth} is the position of the child in the sizer, typically 0 for
-the first item. This method does not cause any layout or resizing to take place and does
-not delete the window itself. Call \helpref{wxSizer::Layout}{wxsizerlayout} to update
-the layout "on screen" after removing a child from the sizer.
+{\bf NB:} The method taking a wxWindow* parameter is deprecated.  For historical reasons
+it does not destroy the window as would usually be expected from Remove.  You should use
+\helpref{wxSizer::Detach}{wxsizerdetach} in new code instead.  There is currently no wxSizer
+method that will both detach and destroy a wxWindow item.
 
-Returns TRUE if the child item was found and removed, FALSE otherwise.
+Returns true if the child item was found and removed, false otherwise.
 
 \membersection{wxSizer::SetDimension}\label{wxsizersetdimension}
 
@@ -234,7 +272,7 @@ bigger.
 
 \func{void}{SetItemMinSize}{\param{wxSizer* }{sizer}, \param{int}{ width}, \param{int}{ height}}
 
-\func{void}{SetItemMinSize}{\param{int}{ pos}, \param{int}{ width}, \param{int}{ height}}
+\func{void}{SetItemMinSize}{\param{size\_t }{index}, \param{int}{ width}, \param{int}{ height}}
 
 Set an item's minimum size by window, sizer, or position. The item will be found recursively
 in the sizer's descendants. This function enables an application to set the size of an item
@@ -262,10 +300,15 @@ minimal size. For windows with managed scrollbars this will set them appropriate
 
 \membersection{wxSizer::Show}\label{wxsizershow}
 
-\func{void}{Show}{\param{wxWindow* }{window}, \param{bool }{show = TRUE}}
+\func{void}{Show}{\param{wxWindow* }{window}, \param{bool }{show = true}}
+
+\func{void}{Show}{\param{wxSizer* }{sizer}, \param{bool }{show = true}}
+
+\func{void}{Show}{\param{size\_t }{index}, \param{bool }{show = true}}
 
-\func{void}{Show}{\param{wxSizer* }{sizer}, \param{bool }{show = TRUE}}
+Shows or hides the {\it window}, {\it sizer}, or item at {\it index}.
+To make a sizer item disappear or reappear, use Show() followed by Layout().
 
-Shows or hides a window or sizer. To make a sizer item disappear or 
-reappear, use Show() followed by Layout().
+Note that this only works with wxBoxSizer and wxFlexGridSizer, since they
+are the only two sizer classes that can size rows/columns independently.
 
