2 \section{\class{wxSizerItem
}}\label{wxsizeritem
}
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.
11 \wxheading{Derived from
}
13 \helpref{wxObject
}{wxobject
}
15 \wxheading{Include files
}
21 \helpref{wxCore
}{librarieslist
}
24 \latexignore{\rtfignore{\wxheading{Members
}}}
27 \membersection{wxSizerItem::wxSizerItem
}\label{wxsizeritemwxsizeritem
}
29 \func{}{wxSizerItem
}{\param{int
}{width
},
\param{int
}{height
},
\param{int
}{proportion
},
\param{int
}{flag
},
\param{int
}{border
},
\param{wxObject*
}{userData
}}
31 Construct a sizer item for tracking a spacer.
34 \func{}{wxSizerItem
}{\param{wxWindow*
}{window
},
\param{const wxSizerFlags\&
}{flags
}}
36 \func{}{wxSizerItem
}{\param{wxWindow*
}{window
},
\param{int
}{proportion
},
\param{int
}{flag
},
\param{int
}{border
},
\param{wxObject*
}{userData
}}
38 Construct a sizer item for tracking a window.
41 \func{}{wxSizerItem
}{\param{wxSizer*
}{window
},
\param{const wxSizerFlags\&
}{flags
}}
43 \func{}{wxSizerItem
}{\param{wxSizer*
}{sizer
},
\param{int
}{proportion
},
\param{int
}{flag
},
\param{int
}{border
},
\param{wxObject*
}{userData
}}
45 Construct a sizer item for tracking a subsizer.
49 \membersection{wxSizerItem::
\destruct{wxSizerItem
}}\label{wxsizeritemdtor
}
51 \func{}{\destruct{wxSizerItem
}}{\void}
53 Deletes the user data and subsizer, if any.
56 \membersection{wxSizerItem::CalcMin
}\label{wxsizeritemcalcmin
}
58 \func{wxSize
}{CalcMin
}{\void}
60 Calculates the minimum desired size for the item, including any space
64 \membersection{wxSizerItem::DeleteWindows
}\label{wxsizeritemdeletewindows
}
66 \func{void
}{DeleteWindows
}{\void}
68 Destroy the window or the windows in a subsizer, depending on the type
72 \membersection{wxSizerItem::DetachSizer
}\label{wxsizeritemdetachsizer
}
74 \func{void
}{DetachSizer
}{\void}
76 Enable deleting the SizerItem without destroying the contained sizer.
79 \membersection{wxSizerItem::GetBorder
}\label{wxsizeritemgetborder
}
81 \constfunc{int
}{GetBorder
}{\void}
83 Return the border attribute.
85 \membersection{wxSizerItem::GetFlag
}\label{wxsizeritemgetflag
}
87 \constfunc{int
}{GetFlag
}{\void}
89 Return the flags attribute.
91 \membersection{wxSizerItem::GetId
}\label{wxsizeritemgetid
}
93 \constfunc{int
}{GetId
}{\void}
95 Return the numeric id of wxSizerItem, or
\texttt{wxID
\_NONE} if the id has
99 \membersection{wxSizerItem::GetMinSize
}\label{wxsizeritemgetminsize
}
101 \constfunc{wxSize
}{GetMinSize
}{\void}
103 Get the minimum size needed for the item.
105 \membersection{wxSizerItem::GetPosition
}\label{wxsizeritemgetposition
}
107 \constfunc{wxPoint
}{GetPosition
}{\void}
109 What is the current position of the item, as set in the last Layout.
111 \membersection{wxSizerItem::GetProportion
}\label{wxsizeritemgetproportion
}
113 \constfunc{int
}{GetProportion
}{\void}
115 Get the proportion item attribute.
117 \membersection{wxSizerItem::GetRatio
}\label{wxsizeritemgetratio
}
119 \constfunc{float
}{GetRatio
}{\void}
121 Get the ration item attribute.
123 \membersection{wxSizerItem::GetRect
}\label{wxsizeritemgetrect
}
125 \func{wxRect
}{GetRect
}{\void}
127 Get the rectangle of the item on the parent window, excluding borders.
129 \membersection{wxSizerItem::GetSize
}\label{wxsizeritemgetsize
}
131 \constfunc{wxSize
}{GetSize
}{\void}
133 Get the current size of the item, as set in the last Layout.
135 \membersection{wxSizerItem::GetSizer
}\label{wxsizeritemgetsizer
}
137 \constfunc{wxSizer*
}{GetSizer
}{\void}
139 If this item is tracking a sizer, return it. NULL otherwise.
142 \membersection{wxSizerItem::GetSpacer
}\label{wxsizeritemgetspacer
}
144 \constfunc{const wxSize\&
}{GetSpacer
}{\void}
146 If this item is tracking a spacer, return its size.
149 \membersection{wxSizerItem::GetUserData
}\label{wxsizeritemgetuserdata
}
151 \constfunc{wxObject*
}{GetUserData
}{\void}
153 Get the userData item attribute.
156 \membersection{wxSizerItem::GetWindow
}\label{wxsizeritemgetwindow
}
158 \constfunc{wxWindow*
}{GetWindow
}{\void}
160 If this item is tracking a window then return it. NULL otherwise.
163 \membersection{wxSizerItem::IsSizer
}\label{wxsizeritemissizer
}
165 \constfunc{bool
}{IsSizer
}{\void}
167 Is this item a sizer?
170 \membersection{wxSizerItem::IsShown
}\label{wxsizeritemisshown
}
172 \constfunc{bool
}{IsShown
}{\void}
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
180 \membersection{wxSizerItem::IsSpacer
}\label{wxsizeritemisspacer
}
182 \constfunc{bool
}{IsSpacer
}{\void}
184 Is this item a spacer?
187 \membersection{wxSizerItem::IsWindow
}\label{wxsizeritemiswindow
}
189 \constfunc{bool
}{IsWindow
}{\void}
191 Is this item a window?
194 \membersection{wxSizerItem::SetBorder
}\label{wxsizeritemsetborder
}
196 \func{void
}{SetBorder
}{\param{int
}{border
}}
198 Set the border item attribute.
200 \membersection{wxSizerItem::SetDimension
}\label{wxsizeritemsetdimension
}
202 \func{void
}{SetDimension
}{\param{const wxPoint\&
}{pos
},
\param{const wxSize\&
}{size
}}
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.
209 \membersection{wxSizerItem::SetFlag
}\label{wxsizeritemsetflag
}
211 \func{void
}{SetFlag
}{\param{int
}{flag
}}
213 Set the flag item attribute.
215 \membersection{wxSizerItem::SetId
}\label{wxsizeritemSetId
}
217 \func{void
}{SetId
}{\param{int
}{id
}}
219 Sets the numeric id of the wxSizerItem to
\arg{id
}.
222 \membersection{wxSizerItem::SetInitSize
}\label{wxsizeritemsetinitsize
}
224 \func{void
}{SetInitSize
}{\param{int
}{x
},
\param{int
}{y
}}
227 \membersection{wxSizerItem::SetProportion
}\label{wxsizeritemsetproportion
}
229 \func{void
}{SetProportion
}{\param{int
}{proportion
}}
231 Set the proportion item attribute.
233 \membersection{wxSizerItem::SetRatio
}\label{wxsizeritemsetratio
}
235 \func{void
}{SetRatio
}{\param{int
}{width
},
\param{int
}{height
}}
237 \func{void
}{SetRatio
}{\param{wxSize
}{size
}}
239 \func{void
}{SetRatio
}{\param{float
}{ratio
}}
241 Set the ratio item attribute.
244 \membersection{wxSizerItem::SetSizer
}\label{wxsizeritemsetsizer
}
246 \func{void
}{SetSizer
}{\param{wxSizer*
}{sizer
}}
248 Set the sizer tracked by this item.
251 \membersection{wxSizerItem::SetSpacer
}\label{wxsizeritemsetspacer
}
253 \func{void
}{SetSpacer
}{\param{const wxSize\&
}{size
}}
255 Set the size of the spacer tracked by this item.
258 \membersection{wxSizerItem::SetWindow
}\label{wxsizeritemsetwindow
}
260 \func{void
}{SetWindow
}{\param{wxWindow*
}{window
}}
262 Set the window to be tracked by thsi item.
265 \membersection{wxSizerItem::Show
}\label{wxsizeritemshow
}
267 \func{void
}{Show
}{\param{bool
}{show
}}
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.