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