X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d76f4628261a5d80ca18e45b311efa2e79f3d57..b0b96f667dbc2fc2d3ebaa342c50bdea10f84a91:/docs/latex/wx/flexsizr.tex diff --git a/docs/latex/wx/flexsizr.tex b/docs/latex/wx/flexsizr.tex index 0ce1e99fe4..138a85290b 100644 --- a/docs/latex/wx/flexsizr.tex +++ b/docs/latex/wx/flexsizr.tex @@ -1,3 +1,14 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: flexsizr.tex +%% Purpose: wxFlexGridSizer +%% Author: wxWidgets Team +%% Modified by: +%% Created: +%% RCS-ID: $Id$ +%% Copyright: (c) wxWidgets Team +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \section{\class{wxFlexGridSizer}}\label{wxflexgridsizer} A flex grid sizer is a sizer which lays out its children in a two-dimensional @@ -6,12 +17,12 @@ height and all fields in one column having the same width, but all rows or all columns are not necessarily the same height or width as in the \helpref{wxGridSizer}{wxgridsizer}. -Since wxWindows 2.5.0, wxFlexGridSizer can also size items equally in one +Since wxWidgets 2.5.0, wxFlexGridSizer can also size items equally in one direction but unequally ("flexibly") in the other. If the sizer is only -flexible in one direction (this can be changed using -\helpref{SetFlexibleDrection}{wxflexgridsizersetflexibledrection}), -it needs to be decided how the sizer should grow in the other ("non flexible") -direction in order to fill the available space. The +flexible in one direction (this can be changed using +\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection}), +it needs to be decided how the sizer should grow in the other ("non-flexible") +direction in order to fill the available space. The \helpref{SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode} method serves this purpose. @@ -21,10 +32,15 @@ serves this purpose. \helpref{wxSizer}{wxsizer}\\ \helpref{wxObject}{wxobject} +\wxheading{Include files} + + + \wxheading{See also} \helpref{wxSizer}{wxsizer}, \helpref{Sizer overview}{sizeroverview} +\latexignore{\rtfignore{\wxheading{Members}}} \membersection{wxFlexGridSizer::wxFlexGridSizer}\label{wxflexgridsizerwxflexgridsizer} @@ -41,21 +57,28 @@ all children. \membersection{wxFlexGridSizer::AddGrowableCol}\label{wxflexgridsizeraddgrowablecol} -\func{void}{AddGrowableCol}{\param{size\_t }{idx}} +\func{void}{AddGrowableCol}{\param{size\_t }{idx}, \param{int }{proportion = $0$}} -Specifies that column idx (starting from zero) should be grown if +Specifies that column {\it idx} (starting from zero) should be grown if there is extra space available to the sizer. +The {\it proportion} parameter has the same meaning as the stretch factor for +the \helpref{sizers}{sizeroverview} except that if all proportions are $0$, +then all columns are resized equally (instead of not being resized at all). + \membersection{wxFlexGridSizer::AddGrowableRow}\label{wxflexgridsizeraddgrowablerow} -\func{void}{AddGrowableRow}{\param{size\_t }{idx}} +\func{void}{AddGrowableRow}{\param{size\_t }{idx}, \param{int }{proportion = $0$}} Specifies that row idx (starting from zero) should be grown if there is extra space available to the sizer. +See \helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} for the description +of {\it proportion} parameter. + \membersection{wxFlexGridSizer::GetFlexibleDirection}\label{wxflexgridsizergetflexibledrection} -\constfunc{int}{GetFlexibleDirections}{\void} +\constfunc{int}{GetFlexibleDirection}{\void} Returns a wxOrientation value that specifies whether the sizer flexibly resizes its columns, rows, or both (default). @@ -72,14 +95,14 @@ One of the following values: \wxheading{See also} -\helpref{SetFlexibleDrection}{wxflexgridsizersetflexibledrection} +\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection} \membersection{wxFlexGridSizer::GetNonFlexibleGrowMode}\label{wxflexgridsizergetnonflexiblegrowmode} \constfunc{int}{GetNonFlexibleGrowMode}{\void} -Returns the value that specifies how the sizer grows in the "non flexible" +Returns the value that specifies how the sizer grows in the "non-flexible" direction if there is one. \wxheading{Return value} @@ -87,20 +110,20 @@ direction if there is one. One of the following values: \begin{twocollist} -\twocolitem{wxFLEX\_GROWMODE\_NONE}{Sizer doesn't grow in the non flexible direction.} +\twocolitem{wxFLEX\_GROWMODE\_NONE}{Sizer doesn't grow in the non-flexible direction.} \twocolitem{wxFLEX\_GROWMODE\_SPECIFIED}{Sizer honors growable columns/rows set with -\helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} and +\helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} and \helpref{AddGrowableRow}{wxflexgridsizeraddgrowablerow}. In this case equal sizing applies to minimum sizes of columns or rows (this is the default value).} \twocolitem{wxFLEX\_GROWMODE\_ALL}{Sizer equally stretches all columns or rows -in the non flexible direction, whether they are growable or not in the flexbile +in the non-flexible direction, whether they are growable or not in the flexible direction.} \end{twocollist} \wxheading{See also} -\helpref{SetFlexibleDrection}{wxflexgridsizersetflexibledrection}, +\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection}, \helpref{SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode} @@ -118,12 +141,12 @@ Specifies that column idx is no longer growable. Specifies that row idx is no longer growable. -\membersection{wxFlexGridSizer::SetFlexibleDirection}{wxflexgridsizersetflexibledrection} +\membersection{wxFlexGridSizer::SetFlexibleDirection}\label{wxflexgridsizersetflexibledirection} -\func{void}{SetFlexibleDirections}{\param{int }{direction}} +\func{void}{SetFlexibleDirection}{\param{int }{direction}} Specifies whether the sizer should flexibly resize its columns, rows, or -both. Argument {\t direction} can be {\tt wxVERTICAL}, {\tt wxHORIZONTAL} +both. Argument {\tt direction} can be {\tt wxVERTICAL}, {\tt wxHORIZONTAL} or {\tt wxBOTH} (which is the default value). Any other value is ignored. See \helpref{GetFlexibleDirection()}{wxflexgridsizergetflexibledrection} for the explanation of these values. @@ -131,13 +154,13 @@ explanation of these values. Note that this method does not trigger relayout. -\membersection{wxFlexGridSizer::SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode} +\membersection{wxFlexGridSizer::SetNonFlexibleGrowMode}\label{wxflexgridsizersetnonflexiblegrowmode} -\func{void}{SetNonFlexibleGrowMode}{\param{int }{mode}} +\func{void}{SetNonFlexibleGrowMode}{\param{wxFlexSizerGrowMode }{mode}} -Specifies how the sizer should grow in the non flexible direction if +Specifies how the sizer should grow in the non-flexible direction if there is one (so -\helpref{SetFlexibleDirections()}{wxflexgridsizersetflexibledrection} must have +\helpref{SetFlexibleDirection()}{wxflexgridsizersetflexibledirection} must have been called previously). Argument {\it mode} can be one of those documented in \helpref{GetNonFlexibleGrowMode}{wxflexgridsizergetnonflexiblegrowmode}, please see there for their explanation.