]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/sizeritem.tex
[ 1507795 ] Small doc patch.
[wxWidgets.git] / docs / latex / wx / sizeritem.tex
CommitLineData
20b35a69
RD
1
2\section{\class{wxSizerItem}}\label{wxsizeritem}
3
4The wxSizerItem class is used to track the position, size and other
1b2afc5a
VZ
5attributes of each item managed by a \helpref{wxSizer}{wxsizer}. It is not
6usually necessary to use this class because the sizer elements can also be
7identified by their positions or window or sizer pointers but sometimes it may
8be more convenient to use it directly.
20b35a69
RD
9
10
11\wxheading{Derived from}
12
13\helpref{wxObject}{wxobject}
14
15\wxheading{Include files}
16
17<wx/sizer.h>
18
19
20\latexignore{\rtfignore{\wxheading{Members}}}
21
22
23\membersection{wxSizerItem::wxSizerItem}\label{wxsizeritemwxsizeritem}
24
25\func{}{wxSizerItem}{\param{int }{width}, \param{int }{height}, \param{int }{proportion}, \param{int }{flag}, \param{int }{border}, \param{wxObject* }{userData}}
26
27Construct a sizer item for tracking a spacer.
28
29
40210d8a
RN
30\func{}{wxSizerItem}{\param{wxWindow* }{window}, \param{const wxSizerFlags\& }{flags}}
31
20b35a69
RD
32\func{}{wxSizerItem}{\param{wxWindow* }{window}, \param{int }{proportion}, \param{int }{flag}, \param{int }{border}, \param{wxObject* }{userData}}
33
34Construct a sizer item for tracking a window.
35
36
40210d8a
RN
37\func{}{wxSizerItem}{\param{wxSizer* }{window}, \param{const wxSizerFlags\& }{flags}}
38
20b35a69
RD
39\func{}{wxSizerItem}{\param{wxSizer* }{sizer}, \param{int }{proportion}, \param{int }{flag}, \param{int }{border}, \param{wxObject* }{userData}}
40
41Construct a sizer item for tracking a subsizer.
42
43
44
45\membersection{wxSizerItem::\destruct{wxSizerItem}}\label{wxsizeritemdtor}
46
47\func{}{\destruct{wxSizerItem}}{\void}
48
49Deletes the user data and subsizer, if any.
50
51
52\membersection{wxSizerItem::CalcMin}\label{wxsizeritemcalcmin}
53
54\func{wxSize}{CalcMin}{\void}
55
56Calculates the minimum desired size for the item, including any space
57needed by borders.
58
59
60\membersection{wxSizerItem::DeleteWindows}\label{wxsizeritemdeletewindows}
61
62\func{void}{DeleteWindows}{\void}
63
64Destroy the window or the windows in a subsizer, depending on the type
65of item.
66
67
68\membersection{wxSizerItem::DetachSizer}\label{wxsizeritemdetachsizer}
69
70\func{void}{DetachSizer}{\void}
71
72Enable deleting the SizerItem without destroying the contained sizer.
73
74
75\membersection{wxSizerItem::GetBorder}\label{wxsizeritemgetborder}
76
77\constfunc{int}{GetBorder}{\void}
78
79Return the border attribute.
80
81\membersection{wxSizerItem::GetFlag}\label{wxsizeritemgetflag}
82
83\constfunc{int}{GetFlag}{\void}
84
85Return the flags attribute.
86
87
88\membersection{wxSizerItem::GetMinSize}\label{wxsizeritemgetminsize}
89
90\constfunc{wxSize}{GetMinSize}{\void}
91
92Get the minimum size needed for the item.
93
94\membersection{wxSizerItem::GetPosition}\label{wxsizeritemgetposition}
95
96\constfunc{wxPoint}{GetPosition}{\void}
97
98What is the current position of the item, as set in the last Layout.
99
100\membersection{wxSizerItem::GetProportion}\label{wxsizeritemgetproportion}
101
102\constfunc{int}{GetProportion}{\void}
103
104Get the proportion item attribute.
105
106\membersection{wxSizerItem::GetRatio}\label{wxsizeritemgetratio}
107
108\constfunc{float}{GetRatio}{\void}
109
110Get the ration item attribute.
111
56eee37f
WS
112\membersection{wxSizerItem::GetRect}\label{wxsizeritemgetrect}
113
114\func{wxRect}{GetRect}{\void}
115
e6994168 116Get the rectangle of the item on the parent window, excluding borders.
56eee37f 117
20b35a69
RD
118\membersection{wxSizerItem::GetSize}\label{wxsizeritemgetsize}
119
120\constfunc{wxSize}{GetSize}{\void}
121
122Get the current size of the item, as set in the last Layout.
123
124\membersection{wxSizerItem::GetSizer}\label{wxsizeritemgetsizer}
125
126\constfunc{wxSizer*}{GetSizer}{\void}
127
128If this item is tracking a sizer, return it. NULL otherwise.
129
130
131\membersection{wxSizerItem::GetSpacer}\label{wxsizeritemgetspacer}
132
133\constfunc{const wxSize\&}{GetSpacer}{\void}
134
135If this item is tracking a spacer, return its size.
136
137
138\membersection{wxSizerItem::GetUserData}\label{wxsizeritemgetuserdata}
139
140\constfunc{wxObject*}{GetUserData}{\void}
141
142Get the userData item attribute.
143
144
145\membersection{wxSizerItem::GetWindow}\label{wxsizeritemgetwindow}
146
147\constfunc{wxWindow*}{GetWindow}{\void}
148
3103e8a9 149If this item is tracking a window then return it. NULL otherwise.
20b35a69 150
20b35a69
RD
151
152\membersection{wxSizerItem::IsSizer}\label{wxsizeritemissizer}
153
154\constfunc{bool}{IsSizer}{\void}
155
156Is this item a sizer?
157
158
c86fd3a7
VZ
159\membersection{wxSizerItem::IsShown}\label{wxsizeritemisshown}
160
161\constfunc{bool}{IsShown}{\void}
162
163Returns \true if this item is a window or a spacer and it is shown or if this
164item is a sizer and not all its elements are hidden. In other words, for sizer
165items, all of the child elements must be hidden for the sizer itself to be
166considered hidden.
167
168
20b35a69
RD
169\membersection{wxSizerItem::IsSpacer}\label{wxsizeritemisspacer}
170
171\constfunc{bool}{IsSpacer}{\void}
172
173Is this item a spacer?
174
175
176\membersection{wxSizerItem::IsWindow}\label{wxsizeritemiswindow}
177
178\constfunc{bool}{IsWindow}{\void}
179
180Is this item a window?
181
182
183\membersection{wxSizerItem::SetBorder}\label{wxsizeritemsetborder}
184
185\func{void}{SetBorder}{\param{int }{border}}
186
187Set the border item attribute.
188
189\membersection{wxSizerItem::SetDimension}\label{wxsizeritemsetdimension}
190
fbfb8bcc 191\func{void}{SetDimension}{\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size}}
20b35a69
RD
192
193Set the position and size of the space allocated to the sizer, and
194adjust the position and size of the item to be within that space
195taking alignment and borders into account.
196
197
198\membersection{wxSizerItem::SetFlag}\label{wxsizeritemsetflag}
199
200\func{void}{SetFlag}{\param{int }{flag}}
201
202Set the flag item attribute.
203
204
205\membersection{wxSizerItem::SetInitSize}\label{wxsizeritemsetinitsize}
206
207\func{void}{SetInitSize}{\param{int }{x}, \param{int }{y}}
208
209
210\membersection{wxSizerItem::SetProportion}\label{wxsizeritemsetproportion}
211
212\func{void}{SetProportion}{\param{int }{proportion}}
213
214Set the proportion item attribute.
215
216\membersection{wxSizerItem::SetRatio}\label{wxsizeritemsetratio}
217
218\func{void}{SetRatio}{\param{int }{width}, \param{int }{height}}
219
220\func{void}{SetRatio}{\param{wxSize }{size}}
221
222\func{void}{SetRatio}{\param{float }{ratio}}
223
224Set the ratio item attribute.
225
226
227\membersection{wxSizerItem::SetSizer}\label{wxsizeritemsetsizer}
228
229\func{void}{SetSizer}{\param{wxSizer* }{sizer}}
230
231Set the sizer tracked by this item.
232
233
234\membersection{wxSizerItem::SetSpacer}\label{wxsizeritemsetspacer}
235
236\func{void}{SetSpacer}{\param{const wxSize\& }{size}}
237
238Set the size of the spacer tracked by this item.
239
240
241\membersection{wxSizerItem::SetWindow}\label{wxsizeritemsetwindow}
242
243\func{void}{SetWindow}{\param{wxWindow* }{window}}
244
245Set the window to be tracked by thsi item.
246
247
248\membersection{wxSizerItem::Show}\label{wxsizeritemshow}
249
250\func{void}{Show}{\param{bool }{show}}
251
252Set the show item attribute, which sizers use to determine if the item
253is to be made part of the layout or not. If the item is tracking a
254window then it is shown or hidden as needed.
255