1 \section{\class{wxIndividualLayoutConstraint
}}\label{wxindividuallayoutconstraint
}
3 Objects of this class are stored in the wxIndividualLayoutConstraint class
4 as one of eight possible constraints that a window can be involved in.
6 Constraints are initially set to have the relationship wxUnconstrained,
7 which means that their values should be calculated by looking at known constraints.
9 \wxheading{Derived from
}
11 \helpref{wxObject
}{wxobject
}
15 \helpref{Overview and examples
}{constraintsoverview
},
\rtfsp
16 \helpref{wxLayoutConstraints
}{wxlayoutconstraints
},
\helpref{wxWindow::SetConstraints
}{wxwindowsetconstraints
}.
18 \latexignore{\rtfignore{\wxheading{Members
}}}
20 \subsection{Edges and relationships
}
22 The
{\it wxEdge
}\index{wxEdge
} enumerated type specifies the type of edge or dimension of a window.
24 \begin{twocollist
}\itemsep=
0pt
25 \twocolitem{wxLeft
}{The left edge.
}
26 \twocolitem{wxTop
}{The top edge.
}
27 \twocolitem{wxRight
}{The right edge.
}
28 \twocolitem{wxBottom
}{The bottom edge.
}
29 \twocolitem{wxCentreX
}{The x-coordinate of the centre of the window.
}
30 \twocolitem{wxCentreY
}{The y-coordinate of the centre of the window.
}
33 The
{\it wxRelationship
}\index{wxRelationship
} enumerated type specifies the relationship that
34 this edge or dimension has with another specified edge or dimension. Normally, the user
35 doesn't use these directly because functions such as
{\it Below
} and
{\it RightOf
} are a convenience
36 for using the more general
{\it Set
} function.
38 \begin{twocollist
}\itemsep=
0pt
39 \twocolitem{wxUnconstrained
}{The edge or dimension is unconstrained (the default for edges.
}
40 \twocolitem{wxAsIs
}{The edge or dimension is to be taken from the current window position or size (the
41 default for dimensions.
}
42 \twocolitem{wxAbove
}{The edge should be above another edge.
}
43 \twocolitem{wxBelow
}{The edge should be below another edge.
}
44 \twocolitem{wxLeftOf
}{The edge should be to the left of another edge.
}
45 \twocolitem{wxRightOf
}{The edge should be to the right of another edge.
}
46 \twocolitem{wxSameAs
}{The edge or dimension should be the same as another edge or dimension.
}
47 \twocolitem{wxPercentOf
}{The edge or dimension should be a percentage of another edge or dimension.
}
48 \twocolitem{wxAbsolute
}{The edge or dimension should be a given absolute value.
}
51 \membersection{wxIndividualLayoutConstraint::wxIndividualLayoutConstraint
}
53 \func{void
}{wxIndividualLayoutConstraint
}{\void}
55 Constructor. Not used by the end-user.
57 \membersection{wxIndividualLayoutConstraint::Above
}
59 \func{void
}{Above
}{\param{wxWindow *
}{otherWin
},
\param{int
}{ margin =
0}}
61 Constrains this edge to be above the given window, with an
62 optional margin. Implicitly, this is relative to the top edge of the other window.
64 \membersection{wxIndividualLayoutConstraint::Absolute
}
66 \func{void
}{Absolute
}{\param{int
}{ value
}}
68 Constrains this edge or dimension to be the given absolute value.
70 \membersection{wxIndividualLayoutConstraint::AsIs
}
72 \func{void
}{AsIs
}{\void}
74 Sets this edge or constraint to be whatever the window's value is
75 at the moment. If either of the width and height constraints
76 are
{\it as is
}, the window will not be resized, but moved instead.
77 This is important when considering panel items which are intended
78 to have a default size, such as a button, which may take its size
79 from the size of the button label.
81 \membersection{wxIndividualLayoutConstraint::Below
}
83 \func{void
}{Below
}{\param{wxWindow *
}{otherWin
},
\param{int
}{ margin =
0}}
85 Constrains this edge to be below the given window, with an
86 optional margin. Implicitly, this is relative to the bottom edge of the other window.
88 \membersection{wxIndividualLayoutConstraint::Unconstrained
}
90 \func{void
}{Unconstrained
}{\void}
92 Sets this edge or dimension to be unconstrained, that is, dependent on
93 other edges and dimensions from which this value can be deduced.
95 \membersection{wxIndividualLayoutConstraint::LeftOf
}
97 \func{void
}{LeftOf
}{\param{wxWindow *
}{otherWin
},
\param{int
}{ margin =
0}}
99 Constrains this edge to be to the left of the given window, with an
100 optional margin. Implicitly, this is relative to the left edge of the other window.
102 \membersection{wxIndividualLayoutConstraint::PercentOf
}
104 \func{void
}{PercentOf
}{\param{wxWindow *
}{otherWin
},
\param{wxEdge
}{ edge
},
\param{int
}{ margin =
0}}
106 Constrains this edge or dimension to be to a percentage of the given window, with an
109 \membersection{wxIndividualLayoutConstraint::RightOf
}
111 \func{void
}{RightOf
}{\param{wxWindow *
}{otherWin
},
\param{int
}{ margin =
0}}
113 Constrains this edge to be to the right of the given window, with an
114 optional margin. Implicitly, this is relative to the right edge of the other window.
116 \membersection{wxIndividualLayoutConstraint::SameAs
}
118 \func{void
}{SameAs
}{\param{wxWindow *
}{otherWin
},
\param{wxEdge
}{ edge
},
\param{int
}{ margin =
0}}
120 Constrains this edge or dimension to be to the same as the edge of the given window, with an
123 \membersection{wxIndividualLayoutConstraint::Set
}
125 \func{void
}{Set
}{\param{wxRelationship
}{ rel
},
\param{wxWindow *
}{otherWin
},
\param{wxEdge
}{ otherEdge
},
126 \param{int
}{ value =
0},
\param{int
}{ margin =
0}}
128 Sets the properties of the constraint. Normally called by one of the convenience
129 functions such as Above, RightOf, SameAs.