2006-03-28 06:34:55 -05:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
%% Name: flexsizr.tex
|
|
|
|
%% Purpose: wxFlexGridSizer
|
|
|
|
%% Author: wxWidgets Team
|
|
|
|
%% Modified by:
|
|
|
|
%% Created:
|
|
|
|
%% RCS-ID: $Id$
|
|
|
|
%% Copyright: (c) wxWidgets Team
|
|
|
|
%% License: wxWindows license
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
\section{\class{wxFlexGridSizer}}\label{wxflexgridsizer}
|
|
|
|
|
|
|
|
A flex grid sizer is a sizer which lays out its children in a two-dimensional
|
2001-05-01 19:14:40 -04:00
|
|
|
table with all table fields in one row having the same
|
|
|
|
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}.
|
2000-07-15 15:51:35 -04:00
|
|
|
|
2004-05-04 04:27:20 -04:00
|
|
|
Since wxWidgets 2.5.0, wxFlexGridSizer can also size items equally in one
|
2003-01-25 19:04:24 -05:00
|
|
|
direction but unequally ("flexibly") in the other. If the sizer is only
|
2006-03-28 06:34:55 -05:00
|
|
|
flexible in one direction (this can be changed using
|
|
|
|
\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection}),
|
2006-05-28 19:56:51 -04:00
|
|
|
it needs to be decided how the sizer should grow in the other ("non-flexible")
|
2006-03-28 06:34:55 -05:00
|
|
|
direction in order to fill the available space. The
|
2003-01-25 19:04:24 -05:00
|
|
|
\helpref{SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode} method
|
|
|
|
serves this purpose.
|
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
2001-05-01 19:14:40 -04:00
|
|
|
\helpref{wxGridSizer}{wxgridsizer}\\
|
2000-07-15 15:51:35 -04:00
|
|
|
\helpref{wxSizer}{wxsizer}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
2004-09-23 19:17:12 -04:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/sizer.h>
|
|
|
|
|
2002-01-27 14:58:13 -05:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSizer}{wxsizer}, \helpref{Sizer overview}{sizeroverview}
|
|
|
|
|
2005-02-20 12:06:25 -05:00
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
2003-01-25 19:04:24 -05:00
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
\membersection{wxFlexGridSizer::wxFlexGridSizer}\label{wxflexgridsizerwxflexgridsizer}
|
|
|
|
|
|
|
|
\func{}{wxFlexGridSizer}{\param{int }{rows}, \param{int }{cols}, \param{int }{vgap}, \param{int }{hgap}}
|
|
|
|
|
|
|
|
\func{}{wxFlexGridSizer}{\param{int }{cols}, \param{int }{vgap = 0}, \param{int }{hgap = 0}}
|
|
|
|
|
|
|
|
Constructor for a wxGridSizer. {\it rows} and {\it cols} determine the number of
|
|
|
|
columns and rows in the sizer - if either of the parameters is zero, it will be
|
|
|
|
calculated to form the total number of children in the sizer, thus making the
|
|
|
|
sizer grow dynamically. {\it vgap} and {\it hgap} define extra space between
|
|
|
|
all children.
|
|
|
|
|
2001-05-01 19:14:40 -04:00
|
|
|
|
|
|
|
\membersection{wxFlexGridSizer::AddGrowableCol}\label{wxflexgridsizeraddgrowablecol}
|
|
|
|
|
2003-02-27 06:55:26 -05:00
|
|
|
\func{void}{AddGrowableCol}{\param{size\_t }{idx}, \param{int }{proportion = $0$}}
|
2001-05-01 19:14:40 -04:00
|
|
|
|
2003-02-27 06:55:26 -05:00
|
|
|
Specifies that column {\it idx} (starting from zero) should be grown if
|
2001-05-01 19:14:40 -04:00
|
|
|
there is extra space available to the sizer.
|
|
|
|
|
2003-02-27 06:55:26 -05:00
|
|
|
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).
|
|
|
|
|
2001-05-01 19:14:40 -04:00
|
|
|
\membersection{wxFlexGridSizer::AddGrowableRow}\label{wxflexgridsizeraddgrowablerow}
|
|
|
|
|
2003-02-27 06:55:26 -05:00
|
|
|
\func{void}{AddGrowableRow}{\param{size\_t }{idx}, \param{int }{proportion = $0$}}
|
2001-05-01 19:14:40 -04:00
|
|
|
|
|
|
|
Specifies that row idx (starting from zero) should be grown if there
|
|
|
|
is extra space available to the sizer.
|
|
|
|
|
2003-02-27 06:55:26 -05:00
|
|
|
See \helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} for the description
|
|
|
|
of {\it proportion} parameter.
|
|
|
|
|
2003-01-25 19:04:24 -05:00
|
|
|
\membersection{wxFlexGridSizer::GetFlexibleDirection}\label{wxflexgridsizergetflexibledrection}
|
|
|
|
|
2006-03-28 06:34:55 -05:00
|
|
|
\constfunc{int}{GetFlexibleDirection}{\void}
|
2003-01-25 19:04:24 -05:00
|
|
|
|
|
|
|
Returns a wxOrientation value that specifies whether the sizer flexibly
|
|
|
|
resizes its columns, rows, or both (default).
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
One of the following values:
|
|
|
|
|
|
|
|
\begin{twocollist}
|
|
|
|
\twocolitem{wxVERTICAL}{Rows are flexibly sized.}
|
|
|
|
\twocolitem{wxHORIZONTAL}{Columns are flexibly sized.}
|
|
|
|
\twocolitem{wxBOTH}{Both rows and columns are flexibly sized (this is the default value).}
|
|
|
|
\end{twocollist}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
2006-03-28 06:34:55 -05:00
|
|
|
\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection}
|
2003-01-25 19:04:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxFlexGridSizer::GetNonFlexibleGrowMode}\label{wxflexgridsizergetnonflexiblegrowmode}
|
|
|
|
|
|
|
|
\constfunc{int}{GetNonFlexibleGrowMode}{\void}
|
|
|
|
|
2006-05-28 19:56:51 -04:00
|
|
|
Returns the value that specifies how the sizer grows in the "non-flexible"
|
2003-01-25 19:04:24 -05:00
|
|
|
direction if there is one.
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
One of the following values:
|
|
|
|
|
|
|
|
\begin{twocollist}
|
2006-05-28 19:56:51 -04:00
|
|
|
\twocolitem{wxFLEX\_GROWMODE\_NONE}{Sizer doesn't grow in the non-flexible direction.}
|
2003-01-25 19:04:24 -05:00
|
|
|
\twocolitem{wxFLEX\_GROWMODE\_SPECIFIED}{Sizer honors growable columns/rows set with
|
2006-03-28 06:34:55 -05:00
|
|
|
\helpref{AddGrowableCol}{wxflexgridsizeraddgrowablecol} and
|
2003-01-25 19:04:24 -05:00
|
|
|
\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
|
2006-05-28 19:56:51 -04:00
|
|
|
in the non-flexible direction, whether they are growable or not in the flexible
|
2003-01-25 19:04:24 -05:00
|
|
|
direction.}
|
|
|
|
\end{twocollist}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
2006-03-28 06:34:55 -05:00
|
|
|
\helpref{SetFlexibleDirection}{wxflexgridsizersetflexibledirection},
|
2003-01-25 19:04:24 -05:00
|
|
|
\helpref{SetNonFlexibleGrowMode}{wxflexgridsizersetnonflexiblegrowmode}
|
|
|
|
|
|
|
|
|
2001-05-01 19:14:40 -04:00
|
|
|
\membersection{wxFlexGridSizer::RemoveGrowableCol}\label{wxflexgridsizerremovegrowablecol}
|
|
|
|
|
2001-05-24 06:39:33 -04:00
|
|
|
\func{void}{RemoveGrowableCol}{\param{size\_t }{idx}}
|
2001-05-01 19:14:40 -04:00
|
|
|
|
|
|
|
Specifies that column idx is no longer growable.
|
|
|
|
|
2003-01-25 19:04:24 -05:00
|
|
|
|
2001-05-01 19:14:40 -04:00
|
|
|
\membersection{wxFlexGridSizer::RemoveGrowableRow}\label{wxflexgridsizerremovegrowablerow}
|
|
|
|
|
2001-05-24 06:39:33 -04:00
|
|
|
\func{void}{RemoveGrowableRow}{\param{size\_t }{idx}}
|
2001-05-01 19:14:40 -04:00
|
|
|
|
|
|
|
Specifies that row idx is no longer growable.
|
|
|
|
|
2003-01-25 19:04:24 -05:00
|
|
|
|
2003-02-05 07:17:18 -05:00
|
|
|
\membersection{wxFlexGridSizer::SetFlexibleDirection}\label{wxflexgridsizersetflexibledirection}
|
2003-01-25 19:04:24 -05:00
|
|
|
|
2006-03-28 08:00:42 -05:00
|
|
|
\func{void}{SetFlexibleDirection}{\param{int }{direction}}
|
2003-01-25 19:04:24 -05:00
|
|
|
|
|
|
|
Specifies whether the sizer should flexibly resize its columns, rows, or
|
2006-03-28 06:34:55 -05:00
|
|
|
both. Argument {\tt direction} can be {\tt wxVERTICAL}, {\tt wxHORIZONTAL}
|
2003-01-25 19:04:24 -05:00
|
|
|
or {\tt wxBOTH} (which is the default value). Any other value is ignored. See
|
|
|
|
\helpref{GetFlexibleDirection()}{wxflexgridsizergetflexibledrection} for the
|
|
|
|
explanation of these values.
|
|
|
|
|
|
|
|
Note that this method does not trigger relayout.
|
|
|
|
|
|
|
|
|
2003-02-05 07:17:18 -05:00
|
|
|
\membersection{wxFlexGridSizer::SetNonFlexibleGrowMode}\label{wxflexgridsizersetnonflexiblegrowmode}
|
2003-01-25 19:04:24 -05:00
|
|
|
|
2005-02-06 12:27:04 -05:00
|
|
|
\func{void}{SetNonFlexibleGrowMode}{\param{wxFlexSizerGrowMode }{mode}}
|
2003-01-25 19:04:24 -05:00
|
|
|
|
2006-05-28 19:56:51 -04:00
|
|
|
Specifies how the sizer should grow in the non-flexible direction if
|
2003-01-25 19:04:24 -05:00
|
|
|
there is one (so
|
2006-03-28 08:00:42 -05:00
|
|
|
\helpref{SetFlexibleDirection()}{wxflexgridsizersetflexibledirection} must have
|
2003-01-25 19:04:24 -05:00
|
|
|
been called previously). Argument {\it mode} can be one of those documented in
|
|
|
|
\helpref{GetNonFlexibleGrowMode}{wxflexgridsizergetnonflexiblegrowmode}, please
|
|
|
|
see there for their explanation.
|
|
|
|
|
|
|
|
Note that this method does not trigger relayout.
|
2006-10-10 13:46:49 -04:00
|
|
|
|