]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/sizeritem.tex
added wxMessageQueue class for inter-thread communications
[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
a7af285d
VZ
19\wxheading{Library}
20
21\helpref{wxCore}{librarieslist}
22
20b35a69
RD
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
31Construct a sizer item for tracking a spacer.
32
33
40210d8a
RN
34\func{}{wxSizerItem}{\param{wxWindow* }{window}, \param{const wxSizerFlags\& }{flags}}
35
20b35a69
RD
36\func{}{wxSizerItem}{\param{wxWindow* }{window}, \param{int }{proportion}, \param{int }{flag}, \param{int }{border}, \param{wxObject* }{userData}}
37
38Construct a sizer item for tracking a window.
39
40
40210d8a
RN
41\func{}{wxSizerItem}{\param{wxSizer* }{window}, \param{const wxSizerFlags\& }{flags}}
42
20b35a69
RD
43\func{}{wxSizerItem}{\param{wxSizer* }{sizer}, \param{int }{proportion}, \param{int }{flag}, \param{int }{border}, \param{wxObject* }{userData}}
44
45Construct a sizer item for tracking a subsizer.
46
47
48
49\membersection{wxSizerItem::\destruct{wxSizerItem}}\label{wxsizeritemdtor}
50
51\func{}{\destruct{wxSizerItem}}{\void}
52
53Deletes the user data and subsizer, if any.
54
55
56\membersection{wxSizerItem::CalcMin}\label{wxsizeritemcalcmin}
57
58\func{wxSize}{CalcMin}{\void}
59
60Calculates the minimum desired size for the item, including any space
61needed by borders.
62
63
64\membersection{wxSizerItem::DeleteWindows}\label{wxsizeritemdeletewindows}
65
66\func{void}{DeleteWindows}{\void}
67
68Destroy the window or the windows in a subsizer, depending on the type
69of item.
70
71
72\membersection{wxSizerItem::DetachSizer}\label{wxsizeritemdetachsizer}
73
74\func{void}{DetachSizer}{\void}
75
76Enable deleting the SizerItem without destroying the contained sizer.
77
78
79\membersection{wxSizerItem::GetBorder}\label{wxsizeritemgetborder}
80
81\constfunc{int}{GetBorder}{\void}
82
83Return the border attribute.
84
85\membersection{wxSizerItem::GetFlag}\label{wxsizeritemgetflag}
86
87\constfunc{int}{GetFlag}{\void}
88
89Return the flags attribute.
90
86909f4c
VZ
91\membersection{wxSizerItem::GetId}\label{wxsizeritemgetid}
92
93\constfunc{int}{GetId}{\void}
94
95Return the numeric id of wxSizerItem, or \texttt{wxID\_NONE} if the id has
96not been set.
97
20b35a69
RD
98
99\membersection{wxSizerItem::GetMinSize}\label{wxsizeritemgetminsize}
100
101\constfunc{wxSize}{GetMinSize}{\void}
102
103Get the minimum size needed for the item.
104
105\membersection{wxSizerItem::GetPosition}\label{wxsizeritemgetposition}
106
107\constfunc{wxPoint}{GetPosition}{\void}
108
109What 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
115Get the proportion item attribute.
116
117\membersection{wxSizerItem::GetRatio}\label{wxsizeritemgetratio}
118
119\constfunc{float}{GetRatio}{\void}
120
121Get the ration item attribute.
122
56eee37f
WS
123\membersection{wxSizerItem::GetRect}\label{wxsizeritemgetrect}
124
125\func{wxRect}{GetRect}{\void}
126
e6994168 127Get the rectangle of the item on the parent window, excluding borders.
56eee37f 128
20b35a69
RD
129\membersection{wxSizerItem::GetSize}\label{wxsizeritemgetsize}
130
131\constfunc{wxSize}{GetSize}{\void}
132
133Get 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
139If 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
146If this item is tracking a spacer, return its size.
147
148
149\membersection{wxSizerItem::GetUserData}\label{wxsizeritemgetuserdata}
150
151\constfunc{wxObject*}{GetUserData}{\void}
152
153Get the userData item attribute.
154
155
156\membersection{wxSizerItem::GetWindow}\label{wxsizeritemgetwindow}
157
158\constfunc{wxWindow*}{GetWindow}{\void}
159
3103e8a9 160If this item is tracking a window then return it. NULL otherwise.
20b35a69 161
20b35a69
RD
162
163\membersection{wxSizerItem::IsSizer}\label{wxsizeritemissizer}
164
165\constfunc{bool}{IsSizer}{\void}
166
167Is this item a sizer?
168
169
c86fd3a7
VZ
170\membersection{wxSizerItem::IsShown}\label{wxsizeritemisshown}
171
172\constfunc{bool}{IsShown}{\void}
173
174Returns \true if this item is a window or a spacer and it is shown or if this
175item is a sizer and not all its elements are hidden. In other words, for sizer
176items, all of the child elements must be hidden for the sizer itself to be
177considered hidden.
178
179
20b35a69
RD
180\membersection{wxSizerItem::IsSpacer}\label{wxsizeritemisspacer}
181
182\constfunc{bool}{IsSpacer}{\void}
183
184Is this item a spacer?
185
186
187\membersection{wxSizerItem::IsWindow}\label{wxsizeritemiswindow}
188
189\constfunc{bool}{IsWindow}{\void}
190
191Is this item a window?
192
193
194\membersection{wxSizerItem::SetBorder}\label{wxsizeritemsetborder}
195
196\func{void}{SetBorder}{\param{int }{border}}
197
198Set the border item attribute.
199
200\membersection{wxSizerItem::SetDimension}\label{wxsizeritemsetdimension}
201
fbfb8bcc 202\func{void}{SetDimension}{\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size}}
20b35a69
RD
203
204Set the position and size of the space allocated to the sizer, and
205adjust the position and size of the item to be within that space
206taking alignment and borders into account.
207
208
209\membersection{wxSizerItem::SetFlag}\label{wxsizeritemsetflag}
210
211\func{void}{SetFlag}{\param{int }{flag}}
212
213Set the flag item attribute.
214
86909f4c
VZ
215\membersection{wxSizerItem::SetId}\label{wxsizeritemSetId}
216
217\func{void}{SetId}{\param{int}{id}}
218
219Sets the numeric id of the wxSizerItem to \arg{id}.
220
20b35a69
RD
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
231Set 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
241Set the ratio item attribute.
242
243
244\membersection{wxSizerItem::SetSizer}\label{wxsizeritemsetsizer}
245
246\func{void}{SetSizer}{\param{wxSizer* }{sizer}}
247
248Set the sizer tracked by this item.
249
250
251\membersection{wxSizerItem::SetSpacer}\label{wxsizeritemsetspacer}
252
253\func{void}{SetSpacer}{\param{const wxSize\& }{size}}
254
255Set 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
262Set 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
269Set the show item attribute, which sizers use to determine if the item
270is to be made part of the layout or not. If the item is tracking a
271window then it is shown or hidden as needed.
272