From 62637495c9171337b25c7a160fa7b1d965996970 Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Mon, 9 Oct 2006 19:29:16 +0000
Subject: [PATCH] extended wxSizerFlags docs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/sizer.tex | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

diff --git a/docs/latex/wx/sizer.tex b/docs/latex/wx/sizer.tex
index c196117396..2a29941542 100644
--- a/docs/latex/wx/sizer.tex
+++ b/docs/latex/wx/sizer.tex
@@ -528,13 +528,35 @@ Returns true if the child item was found, false otherwise.
 
 \section{\class{wxSizerFlags}}\label{wxsizerflags}
 
-PRELIMINARY.
+Normally, when you add an item to a sizer via 
+\helpref{wxSizer::Add}{wxsizeradd}, you have to specify a lot of flags and
+parameters which can be unwieldy. This is where wxSizerFlags comes in: it
+allows you to specify all parameters using the named methods instead. For
+example, instead of
 
-Normally, when you add something to a sizer via \helpref{wxSizer::Add}{wxsizeradd}, you have to specify a lot of flags and parameters.  This can be unwieldy.
+\begin{verbatim}
+    sizer->Add(ctrl, 0, wxEXPAND | wxBORDER, 10);
+\end{verbatim}
 
-This is where wxSizerFlags comes in.  Instead of a bunch of flags and other stuff, you can use wxSizerFlags, which is a convenient class for doing so.
+you can now write
 
-Note that by specification, all methods of wxSizerFlags return the wxSizerFlags object itself to ease the calling of multiple methods at a time.
+\begin{verbatim}
+    sizer->Add(ctrl, wxSizerFlags().Expand().Border(10));
+\end{verbatim}
+
+This is more readable and also allows you to create wxSizerFlags objects which
+can be reused for several sizer items.
+\begin{verbatim}
+    wxSizerFlags flagsExpand(1);
+    flagsExpand.Expand().Border(10);
+
+    sizer->Add(ctrl1, flagsExpand);
+    sizer->Add(ctrl2, flagsExpand);
+\end{verbatim}
+
+Note that by specification, all methods of wxSizerFlags return the wxSizerFlags
+object itself to allowing chaining multiple methods calls like in the examples
+above.
 
 
 \membersection{wxSizerFlags::wxSizerFlags}\label{wxsizerflagsctor}
@@ -591,6 +613,7 @@ Sets the object of the wxSizerFlags to center itself in the area it is given.
 Sets the object of the wxSizerFlags to expand to fill as much area as it can.
 
 
+\membersection{wxSizerFlags::Left}\label{wxsizerflagsleft}
 \membersection{wxSizerFlags::Left}\label{wxsizerflagsleft}
 
 \func{wxSizerFlags\& }{Left}{\void}
-- 
2.50.0

