1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxIndividualLayoutConstraint}}\label{wxindividuallayoutconstraint}
|
|
|
|
|
2000-03-10 06:18:22 -05:00
|
|
|
Objects of this class are stored in the wxLayoutConstraint class
|
1998-05-20 10:25:30 -04:00
|
|
|
as one of eight possible constraints that a window can be involved in.
|
|
|
|
|
|
|
|
Constraints are initially set to have the relationship wxUnconstrained,
|
|
|
|
which means that their values should be calculated by looking at known constraints.
|
|
|
|
|
|
|
|
\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{wxLayoutConstraints}{wxlayoutconstraints}, \helpref{wxWindow::SetConstraints}{wxwindowsetconstraints}.
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\subsection{Edges and relationships}\label{edgesandrelationships}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
The {\it wxEdge}\index{wxEdge} enumerated type specifies the type of edge or dimension of a window.
|
|
|
|
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\twocolitem{wxLeft}{The left edge.}
|
|
|
|
\twocolitem{wxTop}{The top edge.}
|
|
|
|
\twocolitem{wxRight}{The right edge.}
|
|
|
|
\twocolitem{wxBottom}{The bottom edge.}
|
|
|
|
\twocolitem{wxCentreX}{The x-coordinate of the centre of the window.}
|
|
|
|
\twocolitem{wxCentreY}{The y-coordinate of the centre of the window.}
|
|
|
|
\end{twocollist}
|
|
|
|
|
|
|
|
The {\it wxRelationship}\index{wxRelationship} enumerated type specifies the relationship that
|
|
|
|
this edge or dimension has with another specified edge or dimension. Normally, the user
|
|
|
|
doesn't use these directly because functions such as {\it Below} and {\it RightOf} are a convenience
|
|
|
|
for using the more general {\it Set} function.
|
|
|
|
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\twocolitem{wxUnconstrained}{The edge or dimension is unconstrained (the default for edges.}
|
|
|
|
\twocolitem{wxAsIs}{The edge or dimension is to be taken from the current window position or size (the
|
|
|
|
default for dimensions.}
|
|
|
|
\twocolitem{wxAbove}{The edge should be above another edge.}
|
|
|
|
\twocolitem{wxBelow}{The edge should be below another edge.}
|
|
|
|
\twocolitem{wxLeftOf}{The edge should be to the left of another edge.}
|
|
|
|
\twocolitem{wxRightOf}{The edge should be to the right of another edge.}
|
|
|
|
\twocolitem{wxSameAs}{The edge or dimension should be the same as another edge or dimension.}
|
|
|
|
\twocolitem{wxPercentOf}{The edge or dimension should be a percentage of another edge or dimension.}
|
|
|
|
\twocolitem{wxAbsolute}{The edge or dimension should be a given absolute value.}
|
|
|
|
\end{twocollist}
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxIndividualLayoutConstraint::wxIndividualLayoutConstraint}\label{wxindividuallayoutconstraintctor}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{wxIndividualLayoutConstraint}{\void}
|
|
|
|
|
|
|
|
Constructor. Not used by the end-user.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxIndividualLayoutConstraint::Above}\label{wxindividuallayoutconstraintabove}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{Above}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
|
|
|
|
|
|
|
|
Constrains this edge to be above the given window, with an
|
|
|
|
optional margin. Implicitly, this is relative to the top edge of the other window.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxIndividualLayoutConstraint::Absolute}\label{wxindividuallayoutconstraintabsolute}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{Absolute}{\param{int}{ value}}
|
|
|
|
|
|
|
|
Constrains this edge or dimension to be the given absolute value.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxIndividualLayoutConstraint::AsIs}\label{wxindividuallayoutconstraintasis}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{AsIs}{\void}
|
|
|
|
|
|
|
|
Sets this edge or constraint to be whatever the window's value is
|
|
|
|
at the moment. If either of the width and height constraints
|
|
|
|
are {\it as is}, the window will not be resized, but moved instead.
|
|
|
|
This is important when considering panel items which are intended
|
|
|
|
to have a default size, such as a button, which may take its size
|
|
|
|
from the size of the button label.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxIndividualLayoutConstraint::Below}\label{wxindividuallayoutconstraintbelow}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{Below}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
|
|
|
|
|
|
|
|
Constrains this edge to be below the given window, with an
|
|
|
|
optional margin. Implicitly, this is relative to the bottom edge of the other window.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxIndividualLayoutConstraint::Unconstrained}\label{wxindividuallayoutconstraintunconstrained}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{Unconstrained}{\void}
|
|
|
|
|
|
|
|
Sets this edge or dimension to be unconstrained, that is, dependent on
|
|
|
|
other edges and dimensions from which this value can be deduced.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxIndividualLayoutConstraint::LeftOf}\label{wxindividuallayoutconstraintleftof}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{LeftOf}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
|
|
|
|
|
|
|
|
Constrains this edge to be to the left of the given window, with an
|
|
|
|
optional margin. Implicitly, this is relative to the left edge of the other window.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxIndividualLayoutConstraint::PercentOf}\label{wxindividuallayoutconstraintpercentof}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2000-03-10 06:18:22 -05:00
|
|
|
\func{void}{PercentOf}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ per}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Constrains this edge or dimension to be to a percentage of the given window, with an
|
|
|
|
optional margin.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxIndividualLayoutConstraint::RightOf}\label{wxindividuallayoutconstraintrightof}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{RightOf}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
|
|
|
|
|
|
|
|
Constrains this edge to be to the right of the given window, with an
|
|
|
|
optional margin. Implicitly, this is relative to the right edge of the other window.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxIndividualLayoutConstraint::SameAs}\label{wxindividuallayoutconstraintsameas}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{SameAs}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ margin = 0}}
|
|
|
|
|
|
|
|
Constrains this edge or dimension to be to the same as the edge of the given window, with an
|
|
|
|
optional margin.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxIndividualLayoutConstraint::Set}\label{wxindividuallayoutconstraintset}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{Set}{\param{wxRelationship}{ rel}, \param{wxWindow *}{otherWin}, \param{wxEdge}{ otherEdge},
|
|
|
|
\param{int}{ value = 0}, \param{int}{ margin = 0}}
|
|
|
|
|
|
|
|
Sets the properties of the constraint. Normally called by one of the convenience
|
|
|
|
functions such as Above, RightOf, SameAs.
|
|
|
|
|
|
|
|
|