1 \section{\class{wxIndividualLayoutConstraint
}}\label{wxindividuallayoutconstraint
}
3 Objects of this class are stored in the wxLayoutConstraint 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
}
13 \wxheading{Include files
}
19 \helpref{wxCore
}{librarieslist
}
23 \helpref{Overview and examples
}{constraintsoverview
},
\rtfsp
24 \helpref{wxLayoutConstraints
}{wxlayoutconstraints
},
\helpref{wxWindow::SetConstraints
}{wxwindowsetconstraints
}.
26 \latexignore{\rtfignore{\wxheading{Members
}}}
28 \subsection{Edges and relationships
}\label{edgesandrelationships
}
30 The
{\it wxEdge
}\index{wxEdge
} enumerated type specifies the type of edge or dimension of a window.
32 \begin{twocollist
}\itemsep=
0pt
33 \twocolitem{wxLeft
}{The left edge.
}
34 \twocolitem{wxTop
}{The top edge.
}
35 \twocolitem{wxRight
}{The right edge.
}
36 \twocolitem{wxBottom
}{The bottom edge.
}
37 \twocolitem{wxCentreX
}{The x-coordinate of the centre of the window.
}
38 \twocolitem{wxCentreY
}{The y-coordinate of the centre of the window.
}
41 The
{\it wxRelationship
}\index{wxRelationship
} enumerated type specifies the relationship that
42 this edge or dimension has with another specified edge or dimension. Normally, the user
43 doesn't use these directly because functions such as
{\it Below
} and
{\it RightOf
} are a convenience
44 for using the more general
{\it Set
} function.
46 \begin{twocollist
}\itemsep=
0pt
47 \twocolitem{wxUnconstrained
}{The edge or dimension is unconstrained (the default for edges.
}
48 \twocolitem{wxAsIs
}{The edge or dimension is to be taken from the current window position or size (the
49 default for dimensions.
}
50 \twocolitem{wxAbove
}{The edge should be above another edge.
}
51 \twocolitem{wxBelow
}{The edge should be below another edge.
}
52 \twocolitem{wxLeftOf
}{The edge should be to the left of another edge.
}
53 \twocolitem{wxRightOf
}{The edge should be to the right of another edge.
}
54 \twocolitem{wxSameAs
}{The edge or dimension should be the same as another edge or dimension.
}
55 \twocolitem{wxPercentOf
}{The edge or dimension should be a percentage of another edge or dimension.
}
56 \twocolitem{wxAbsolute
}{The edge or dimension should be a given absolute value.
}
59 \membersection{wxIndividualLayoutConstraint::wxIndividualLayoutConstraint
}\label{wxindividuallayoutconstraintctor
}
61 \func{void
}{wxIndividualLayoutConstraint
}{\void}
63 Constructor. Not used by the end-user.
65 \membersection{wxIndividualLayoutConstraint::Above
}\label{wxindividuallayoutconstraintabove
}
67 \func{void
}{Above
}{\param{wxWindow *
}{otherWin
},
\param{int
}{ margin =
0}}
69 Constrains this edge to be above the given window, with an
70 optional margin. Implicitly, this is relative to the top edge of the other window.
72 \membersection{wxIndividualLayoutConstraint::Absolute
}\label{wxindividuallayoutconstraintabsolute
}
74 \func{void
}{Absolute
}{\param{int
}{ value
}}
76 Constrains this edge or dimension to be the given absolute value.
78 \membersection{wxIndividualLayoutConstraint::AsIs
}\label{wxindividuallayoutconstraintasis
}
80 \func{void
}{AsIs
}{\void}
82 Sets this edge or constraint to be whatever the window's value is
83 at the moment. If either of the width and height constraints
84 are
{\it as is
}, the window will not be resized, but moved instead.
85 This is important when considering panel items which are intended
86 to have a default size, such as a button, which may take its size
87 from the size of the button label.
89 \membersection{wxIndividualLayoutConstraint::Below
}\label{wxindividuallayoutconstraintbelow
}
91 \func{void
}{Below
}{\param{wxWindow *
}{otherWin
},
\param{int
}{ margin =
0}}
93 Constrains this edge to be below the given window, with an
94 optional margin. Implicitly, this is relative to the bottom edge of the other window.
96 \membersection{wxIndividualLayoutConstraint::Unconstrained
}\label{wxindividuallayoutconstraintunconstrained
}
98 \func{void
}{Unconstrained
}{\void}
100 Sets this edge or dimension to be unconstrained, that is, dependent on
101 other edges and dimensions from which this value can be deduced.
103 \membersection{wxIndividualLayoutConstraint::LeftOf
}\label{wxindividuallayoutconstraintleftof
}
105 \func{void
}{LeftOf
}{\param{wxWindow *
}{otherWin
},
\param{int
}{ margin =
0}}
107 Constrains this edge to be to the left of the given window, with an
108 optional margin. Implicitly, this is relative to the left edge of the other window.
110 \membersection{wxIndividualLayoutConstraint::PercentOf
}\label{wxindividuallayoutconstraintpercentof
}
112 \func{void
}{PercentOf
}{\param{wxWindow *
}{otherWin
},
\param{wxEdge
}{ edge
},
\param{int
}{ per
}}
114 Constrains this edge or dimension to be to a percentage of the given window, with an
117 \membersection{wxIndividualLayoutConstraint::RightOf
}\label{wxindividuallayoutconstraintrightof
}
119 \func{void
}{RightOf
}{\param{wxWindow *
}{otherWin
},
\param{int
}{ margin =
0}}
121 Constrains this edge to be to the right of the given window, with an
122 optional margin. Implicitly, this is relative to the right edge of the other window.
124 \membersection{wxIndividualLayoutConstraint::SameAs
}\label{wxindividuallayoutconstraintsameas
}
126 \func{void
}{SameAs
}{\param{wxWindow *
}{otherWin
},
\param{wxEdge
}{ edge
},
\param{int
}{ margin =
0}}
128 Constrains this edge or dimension to be to the same as the edge of the given window, with an
131 \membersection{wxIndividualLayoutConstraint::Set
}\label{wxindividuallayoutconstraintset
}
133 \func{void
}{Set
}{\param{wxRelationship
}{ rel
},
\param{wxWindow *
}{otherWin
},
\param{wxEdge
}{ otherEdge
},
134 \param{int
}{ value =
0},
\param{int
}{ margin =
0}}
136 Sets the properties of the constraint. Normally called by one of the convenience
137 functions such as Above, RightOf, SameAs.