]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/sizeritem.tex
document GetStrings() (patch 1552225)
[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
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
27 Construct a sizer item for tracking a spacer.
28
29
30 \func{}{wxSizerItem}{\param{wxWindow* }{window}, \param{const wxSizerFlags\& }{flags}}
31
32 \func{}{wxSizerItem}{\param{wxWindow* }{window}, \param{int }{proportion}, \param{int }{flag}, \param{int }{border}, \param{wxObject* }{userData}}
33
34 Construct a sizer item for tracking a window.
35
36
37 \func{}{wxSizerItem}{\param{wxSizer* }{window}, \param{const wxSizerFlags\& }{flags}}
38
39 \func{}{wxSizerItem}{\param{wxSizer* }{sizer}, \param{int }{proportion}, \param{int }{flag}, \param{int }{border}, \param{wxObject* }{userData}}
40
41 Construct a sizer item for tracking a subsizer.
42
43
44
45 \membersection{wxSizerItem::\destruct{wxSizerItem}}\label{wxsizeritemdtor}
46
47 \func{}{\destruct{wxSizerItem}}{\void}
48
49 Deletes the user data and subsizer, if any.
50
51
52 \membersection{wxSizerItem::CalcMin}\label{wxsizeritemcalcmin}
53
54 \func{wxSize}{CalcMin}{\void}
55
56 Calculates the minimum desired size for the item, including any space
57 needed by borders.
58
59
60 \membersection{wxSizerItem::DeleteWindows}\label{wxsizeritemdeletewindows}
61
62 \func{void}{DeleteWindows}{\void}
63
64 Destroy the window or the windows in a subsizer, depending on the type
65 of item.
66
67
68 \membersection{wxSizerItem::DetachSizer}\label{wxsizeritemdetachsizer}
69
70 \func{void}{DetachSizer}{\void}
71
72 Enable deleting the SizerItem without destroying the contained sizer.
73
74
75 \membersection{wxSizerItem::GetBorder}\label{wxsizeritemgetborder}
76
77 \constfunc{int}{GetBorder}{\void}
78
79 Return the border attribute.
80
81 \membersection{wxSizerItem::GetFlag}\label{wxsizeritemgetflag}
82
83 \constfunc{int}{GetFlag}{\void}
84
85 Return the flags attribute.
86
87
88 \membersection{wxSizerItem::GetMinSize}\label{wxsizeritemgetminsize}
89
90 \constfunc{wxSize}{GetMinSize}{\void}
91
92 Get the minimum size needed for the item.
93
94 \membersection{wxSizerItem::GetPosition}\label{wxsizeritemgetposition}
95
96 \constfunc{wxPoint}{GetPosition}{\void}
97
98 What 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
104 Get the proportion item attribute.
105
106 \membersection{wxSizerItem::GetRatio}\label{wxsizeritemgetratio}
107
108 \constfunc{float}{GetRatio}{\void}
109
110 Get the ration item attribute.
111
112 \membersection{wxSizerItem::GetRect}\label{wxsizeritemgetrect}
113
114 \func{wxRect}{GetRect}{\void}
115
116 Get the rectangle of the item on the parent window, excluding borders.
117
118 \membersection{wxSizerItem::GetSize}\label{wxsizeritemgetsize}
119
120 \constfunc{wxSize}{GetSize}{\void}
121
122 Get 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
128 If 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
135 If this item is tracking a spacer, return its size.
136
137
138 \membersection{wxSizerItem::GetUserData}\label{wxsizeritemgetuserdata}
139
140 \constfunc{wxObject*}{GetUserData}{\void}
141
142 Get the userData item attribute.
143
144
145 \membersection{wxSizerItem::GetWindow}\label{wxsizeritemgetwindow}
146
147 \constfunc{wxWindow*}{GetWindow}{\void}
148
149 If this item is tracking a window then return it. NULL otherwise.
150
151
152 \membersection{wxSizerItem::IsSizer}\label{wxsizeritemissizer}
153
154 \constfunc{bool}{IsSizer}{\void}
155
156 Is this item a sizer?
157
158
159 \membersection{wxSizerItem::IsShown}\label{wxsizeritemisshown}
160
161 \constfunc{bool}{IsShown}{\void}
162
163 Returns \true if this item is a window or a spacer and it is shown or if this
164 item is a sizer and not all its elements are hidden. In other words, for sizer
165 items, all of the child elements must be hidden for the sizer itself to be
166 considered hidden.
167
168
169 \membersection{wxSizerItem::IsSpacer}\label{wxsizeritemisspacer}
170
171 \constfunc{bool}{IsSpacer}{\void}
172
173 Is this item a spacer?
174
175
176 \membersection{wxSizerItem::IsWindow}\label{wxsizeritemiswindow}
177
178 \constfunc{bool}{IsWindow}{\void}
179
180 Is this item a window?
181
182
183 \membersection{wxSizerItem::SetBorder}\label{wxsizeritemsetborder}
184
185 \func{void}{SetBorder}{\param{int }{border}}
186
187 Set the border item attribute.
188
189 \membersection{wxSizerItem::SetDimension}\label{wxsizeritemsetdimension}
190
191 \func{void}{SetDimension}{\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size}}
192
193 Set the position and size of the space allocated to the sizer, and
194 adjust the position and size of the item to be within that space
195 taking alignment and borders into account.
196
197
198 \membersection{wxSizerItem::SetFlag}\label{wxsizeritemsetflag}
199
200 \func{void}{SetFlag}{\param{int }{flag}}
201
202 Set 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
214 Set 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
224 Set the ratio item attribute.
225
226
227 \membersection{wxSizerItem::SetSizer}\label{wxsizeritemsetsizer}
228
229 \func{void}{SetSizer}{\param{wxSizer* }{sizer}}
230
231 Set the sizer tracked by this item.
232
233
234 \membersection{wxSizerItem::SetSpacer}\label{wxsizeritemsetspacer}
235
236 \func{void}{SetSpacer}{\param{const wxSize\& }{size}}
237
238 Set 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
245 Set 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
252 Set the show item attribute, which sizers use to determine if the item
253 is to be made part of the layout or not. If the item is tracking a
254 window then it is shown or hidden as needed.
255