1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxLayoutConstraints}}\label{wxlayoutconstraints}
|
|
|
|
|
2002-04-03 08:04:21 -05:00
|
|
|
{\bf Note:} constraints are now deprecated and you should use \helpref{sizers}{sizeroverview} instead.
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
Objects of this class can be associated with a window to define its
|
|
|
|
layout constraints, with respect to siblings or its parent.
|
|
|
|
|
|
|
|
The class consists of the following eight constraints of class wxIndividualLayoutConstraint,
|
|
|
|
some or all of which should be accessed directly to set the appropriate
|
|
|
|
constraints.
|
|
|
|
|
|
|
|
\begin{itemize}\itemsep=0pt
|
|
|
|
\item {\bf left:} represents the left hand edge of the window
|
|
|
|
\item {\bf right:} represents the right hand edge of the window
|
|
|
|
\item {\bf top:} represents the top edge of the window
|
|
|
|
\item {\bf bottom:} represents the bottom edge of the window
|
|
|
|
\item {\bf width:} represents the width of the window
|
|
|
|
\item {\bf height:} represents the height of the window
|
|
|
|
\item {\bf centreX:} represents the horizontal centre point of the window
|
|
|
|
\item {\bf centreY:} represents the vertical centre point of the window
|
|
|
|
\end{itemize}
|
|
|
|
|
|
|
|
Most constraints are initially set to have the relationship wxUnconstrained,
|
|
|
|
which means that their values should be calculated by looking at known constraints.
|
|
|
|
The exceptions are {\it width} and {\it height}, which are set to wxAsIs to
|
|
|
|
ensure that if the user does not specify a constraint, the existing
|
|
|
|
width and height will be used, to be compatible with panel items which often
|
|
|
|
have take a default size. If the constraint is wxAsIs, the dimension will
|
|
|
|
not be changed.
|
|
|
|
|
2000-12-20 11:10:46 -05:00
|
|
|
\perlnote{In wxPerl the constraints are accessed as
|
|
|
|
\begin{verbatim}
|
2001-11-23 17:08:45 -05:00
|
|
|
constraint = Wx::LayoutConstraints->new();
|
|
|
|
constraint->centreX->AsIs();
|
|
|
|
constraint->centreY->Unconstrained();
|
2000-12-20 11:10:46 -05:00
|
|
|
\end{verbatim}
|
|
|
|
}
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/layout.h>
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{Overview and examples}{constraintsoverview},\rtfsp
|
|
|
|
\helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint}, \helpref{wxWindow::SetConstraints}{wxwindowsetconstraints}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxLayoutConstraints::wxLayoutConstraints}\label{wxlayoutconstraintsctor}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{}{wxLayoutConstraints}{\void}
|
|
|
|
|
|
|
|
Constructor.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxLayoutConstraints::bottom}\label{wxlayoutconstraintsbottom}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\member{wxIndividualLayoutConstraint}{bottom}
|
|
|
|
|
|
|
|
Constraint for the bottom edge.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxLayoutConstraints::centreX}\label{wxlayoutconstraintscentrex}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\member{wxIndividualLayoutConstraint}{centreX}
|
|
|
|
|
|
|
|
Constraint for the horizontal centre point.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxLayoutConstraints::centreY}\label{wxlayoutconstraintscentrey}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\member{wxIndividualLayoutConstraint}{centreY}
|
|
|
|
|
|
|
|
Constraint for the vertical centre point.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxLayoutConstraints::height}\label{wxlayoutconstraintsheight}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\member{wxIndividualLayoutConstraint}{height}
|
|
|
|
|
|
|
|
Constraint for the height.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxLayoutConstraints::left}\label{wxlayoutconstraintsleft}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\member{wxIndividualLayoutConstraint}{left}
|
|
|
|
|
|
|
|
Constraint for the left-hand edge.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxLayoutConstraints::right}\label{wxlayoutconstraintsright}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\member{wxIndividualLayoutConstraint}{right}
|
|
|
|
|
|
|
|
Constraint for the right-hand edge.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxLayoutConstraints::top}\label{wxlayoutconstraintstop}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\member{wxIndividualLayoutConstraint}{top}
|
|
|
|
|
|
|
|
Constraint for the top edge.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxLayoutConstraints::width}\label{wxlayoutconstraintswidth}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\member{wxIndividualLayoutConstraint}{width}
|
|
|
|
|
|
|
|
Constraint for the width.
|
|
|
|
|
|
|
|
|