]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/ilayout.tex
added wxEXPLICIT macro
[wxWidgets.git] / docs / latex / wx / ilayout.tex
1 \section{\class{wxIndividualLayoutConstraint}}\label{wxindividuallayoutconstraint}
2
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.
5
6 Constraints are initially set to have the relationship wxUnconstrained,
7 which means that their values should be calculated by looking at known constraints.
8
9 \wxheading{Derived from}
10
11 \helpref{wxObject}{wxobject}
12
13 \wxheading{Include files}
14
15 <wx/layout.h>
16
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
26 The {\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
37 The {\it wxRelationship}\index{wxRelationship} enumerated type specifies the relationship that
38 this edge or dimension has with another specified edge or dimension. Normally, the user
39 doesn't use these directly because functions such as {\it Below} and {\it RightOf} are a convenience
40 for 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
45 default 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
59 Constructor. Not used by the end-user.
60
61 \membersection{wxIndividualLayoutConstraint::Above}
62
63 \func{void}{Above}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
64
65 Constrains this edge to be above the given window, with an
66 optional 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
72 Constrains this edge or dimension to be the given absolute value.
73
74 \membersection{wxIndividualLayoutConstraint::AsIs}
75
76 \func{void}{AsIs}{\void}
77
78 Sets this edge or constraint to be whatever the window's value is
79 at the moment. If either of the width and height constraints
80 are {\it as is}, the window will not be resized, but moved instead.
81 This is important when considering panel items which are intended
82 to have a default size, such as a button, which may take its size
83 from the size of the button label.
84
85 \membersection{wxIndividualLayoutConstraint::Below}
86
87 \func{void}{Below}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
88
89 Constrains this edge to be below the given window, with an
90 optional 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
96 Sets this edge or dimension to be unconstrained, that is, dependent on
97 other 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
103 Constrains this edge to be to the left of the given window, with an
104 optional margin. Implicitly, this is relative to the left edge of the other window.
105
106 \membersection{wxIndividualLayoutConstraint::PercentOf}
107
108 \func{void}{PercentOf}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ per}}
109
110 Constrains this edge or dimension to be to a percentage of the given window, with an
111 optional margin.
112
113 \membersection{wxIndividualLayoutConstraint::RightOf}
114
115 \func{void}{RightOf}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
116
117 Constrains this edge to be to the right of the given window, with an
118 optional 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
124 Constrains this edge or dimension to be to the same as the edge of the given window, with an
125 optional 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
132 Sets the properties of the constraint. Normally called by one of the convenience
133 functions such as Above, RightOf, SameAs.
134
135