]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/ilayout.tex
typo fixed
[wxWidgets.git] / docs / latex / wx / ilayout.tex
CommitLineData
a660d684
KB
1\section{\class{wxIndividualLayoutConstraint}}\label{wxindividuallayoutconstraint}
2
3f8e5072 3Objects of this class are stored in the wxLayoutConstraint class
a660d684
KB
4as one of eight possible constraints that a window can be involved in.
5
6Constraints are initially set to have the relationship wxUnconstrained,
7which means that their values should be calculated by looking at known constraints.
8
9\wxheading{Derived from}
10
11\helpref{wxObject}{wxobject}
12
954b8ae6
JS
13\wxheading{Include files}
14
15<wx/layout.h>
16
a660d684
KB
17\wxheading{See also}
18
19\helpref{Overview and examples}{constraintsoverview},\rtfsp
20\helpref{wxLayoutConstraints}{wxlayoutconstraints}, \helpref{wxWindow::SetConstraints}{wxwindowsetconstraints}.
21
22\latexignore{\rtfignore{\wxheading{Members}}}
23
24\subsection{Edges and relationships}
25
a660d684
KB
26The {\it wxEdge}\index{wxEdge} enumerated type specifies the type of edge or dimension of a window.
27
28\begin{twocollist}\itemsep=0pt
29\twocolitem{wxLeft}{The left edge.}
30\twocolitem{wxTop}{The top edge.}
31\twocolitem{wxRight}{The right edge.}
32\twocolitem{wxBottom}{The bottom edge.}
33\twocolitem{wxCentreX}{The x-coordinate of the centre of the window.}
34\twocolitem{wxCentreY}{The y-coordinate of the centre of the window.}
35\end{twocollist}
36
37The {\it wxRelationship}\index{wxRelationship} enumerated type specifies the relationship that
38this edge or dimension has with another specified edge or dimension. Normally, the user
39doesn't use these directly because functions such as {\it Below} and {\it RightOf} are a convenience
40for using the more general {\it Set} function.
41
42\begin{twocollist}\itemsep=0pt
43\twocolitem{wxUnconstrained}{The edge or dimension is unconstrained (the default for edges.}
44\twocolitem{wxAsIs}{The edge or dimension is to be taken from the current window position or size (the
45default for dimensions.}
46\twocolitem{wxAbove}{The edge should be above another edge.}
47\twocolitem{wxBelow}{The edge should be below another edge.}
48\twocolitem{wxLeftOf}{The edge should be to the left of another edge.}
49\twocolitem{wxRightOf}{The edge should be to the right of another edge.}
50\twocolitem{wxSameAs}{The edge or dimension should be the same as another edge or dimension.}
51\twocolitem{wxPercentOf}{The edge or dimension should be a percentage of another edge or dimension.}
52\twocolitem{wxAbsolute}{The edge or dimension should be a given absolute value.}
53\end{twocollist}
54
55\membersection{wxIndividualLayoutConstraint::wxIndividualLayoutConstraint}
56
57\func{void}{wxIndividualLayoutConstraint}{\void}
58
59Constructor. Not used by the end-user.
60
61\membersection{wxIndividualLayoutConstraint::Above}
62
63\func{void}{Above}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
64
65Constrains this edge to be above the given window, with an
66optional margin. Implicitly, this is relative to the top edge of the other window.
67
68\membersection{wxIndividualLayoutConstraint::Absolute}
69
70\func{void}{Absolute}{\param{int}{ value}}
71
72Constrains this edge or dimension to be the given absolute value.
73
74\membersection{wxIndividualLayoutConstraint::AsIs}
75
76\func{void}{AsIs}{\void}
77
78Sets this edge or constraint to be whatever the window's value is
79at the moment. If either of the width and height constraints
80are {\it as is}, the window will not be resized, but moved instead.
81This is important when considering panel items which are intended
82to have a default size, such as a button, which may take its size
83from the size of the button label.
84
85\membersection{wxIndividualLayoutConstraint::Below}
86
87\func{void}{Below}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
88
89Constrains this edge to be below the given window, with an
90optional margin. Implicitly, this is relative to the bottom edge of the other window.
91
92\membersection{wxIndividualLayoutConstraint::Unconstrained}
93
94\func{void}{Unconstrained}{\void}
95
96Sets this edge or dimension to be unconstrained, that is, dependent on
97other edges and dimensions from which this value can be deduced.
98
99\membersection{wxIndividualLayoutConstraint::LeftOf}
100
101\func{void}{LeftOf}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
102
103Constrains this edge to be to the left of the given window, with an
104optional margin. Implicitly, this is relative to the left edge of the other window.
105
106\membersection{wxIndividualLayoutConstraint::PercentOf}
107
3f8e5072 108\func{void}{PercentOf}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ per}}
a660d684
KB
109
110Constrains this edge or dimension to be to a percentage of the given window, with an
111optional margin.
112
113\membersection{wxIndividualLayoutConstraint::RightOf}
114
115\func{void}{RightOf}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
116
117Constrains this edge to be to the right of the given window, with an
118optional margin. Implicitly, this is relative to the right edge of the other window.
119
120\membersection{wxIndividualLayoutConstraint::SameAs}
121
122\func{void}{SameAs}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ margin = 0}}
123
124Constrains this edge or dimension to be to the same as the edge of the given window, with an
125optional margin.
126
127\membersection{wxIndividualLayoutConstraint::Set}
128
129\func{void}{Set}{\param{wxRelationship}{ rel}, \param{wxWindow *}{otherWin}, \param{wxEdge}{ otherEdge},
130 \param{int}{ value = 0}, \param{int}{ margin = 0}}
131
132Sets the properties of the constraint. Normally called by one of the convenience
133functions such as Above, RightOf, SameAs.
134
135