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
}
20 \latexignore{\rtfignore{\wxheading{Members
}}}
23 \membersection{wxSizerItem::wxSizerItem
}\label{wxsizeritemwxsizeritem
}
25 \func{}{wxSizerItem
}{\param{int
}{width
},
\param{int
}{height
},
\param{int
}{proportion
},
\param{int
}{flag
},
\param{int
}{border
},
\param{wxObject*
}{userData
}}
27 Construct a sizer item for tracking a spacer.
30 \func{}{wxSizerItem
}{\param{wxWindow*
}{window
},
\param{const wxSizerFlags\&
}{flags
}}
32 \func{}{wxSizerItem
}{\param{wxWindow*
}{window
},
\param{int
}{proportion
},
\param{int
}{flag
},
\param{int
}{border
},
\param{wxObject*
}{userData
}}
34 Construct a sizer item for tracking a window.
37 \func{}{wxSizerItem
}{\param{wxSizer*
}{window
},
\param{const wxSizerFlags\&
}{flags
}}
39 \func{}{wxSizerItem
}{\param{wxSizer*
}{sizer
},
\param{int
}{proportion
},
\param{int
}{flag
},
\param{int
}{border
},
\param{wxObject*
}{userData
}}
41 Construct a sizer item for tracking a subsizer.
45 \membersection{wxSizerItem::
\destruct{wxSizerItem
}}\label{wxsizeritemdtor
}
47 \func{}{\destruct{wxSizerItem
}}{\void}
49 Deletes the user data and subsizer, if any.
52 \membersection{wxSizerItem::CalcMin
}\label{wxsizeritemcalcmin
}
54 \func{wxSize
}{CalcMin
}{\void}
56 Calculates the minimum desired size for the item, including any space
60 \membersection{wxSizerItem::DeleteWindows
}\label{wxsizeritemdeletewindows
}
62 \func{void
}{DeleteWindows
}{\void}
64 Destroy the window or the windows in a subsizer, depending on the type
68 \membersection{wxSizerItem::DetachSizer
}\label{wxsizeritemdetachsizer
}
70 \func{void
}{DetachSizer
}{\void}
72 Enable deleting the SizerItem without destroying the contained sizer.
75 \membersection{wxSizerItem::GetBorder
}\label{wxsizeritemgetborder
}
77 \constfunc{int
}{GetBorder
}{\void}
79 Return the border attribute.
81 \membersection{wxSizerItem::GetFlag
}\label{wxsizeritemgetflag
}
83 \constfunc{int
}{GetFlag
}{\void}
85 Return the flags attribute.
88 \membersection{wxSizerItem::GetMinSize
}\label{wxsizeritemgetminsize
}
90 \constfunc{wxSize
}{GetMinSize
}{\void}
92 Get the minimum size needed for the item.
94 \membersection{wxSizerItem::GetPosition
}\label{wxsizeritemgetposition
}
96 \constfunc{wxPoint
}{GetPosition
}{\void}
98 What is the current position of the item, as set in the last Layout.
100 \membersection{wxSizerItem::GetProportion
}\label{wxsizeritemgetproportion
}
102 \constfunc{int
}{GetProportion
}{\void}
104 Get the proportion item attribute.
106 \membersection{wxSizerItem::GetRatio
}\label{wxsizeritemgetratio
}
108 \constfunc{float
}{GetRatio
}{\void}
110 Get the ration item attribute.
112 \membersection{wxSizerItem::GetRect
}\label{wxsizeritemgetrect
}
114 \func{wxRect
}{GetRect
}{\void}
116 Get the rectangle of the item on the parent window, excluding borders.
118 \membersection{wxSizerItem::GetSize
}\label{wxsizeritemgetsize
}
120 \constfunc{wxSize
}{GetSize
}{\void}
122 Get the current size of the item, as set in the last Layout.
124 \membersection{wxSizerItem::GetSizer
}\label{wxsizeritemgetsizer
}
126 \constfunc{wxSizer*
}{GetSizer
}{\void}
128 If this item is tracking a sizer, return it. NULL otherwise.
131 \membersection{wxSizerItem::GetSpacer
}\label{wxsizeritemgetspacer
}
133 \constfunc{const wxSize\&
}{GetSpacer
}{\void}
135 If this item is tracking a spacer, return its size.
138 \membersection{wxSizerItem::GetUserData
}\label{wxsizeritemgetuserdata
}
140 \constfunc{wxObject*
}{GetUserData
}{\void}
142 Get the userData item attribute.
145 \membersection{wxSizerItem::GetWindow
}\label{wxsizeritemgetwindow
}
147 \constfunc{wxWindow*
}{GetWindow
}{\void}
149 If this item is tracking a window then return it. NULL otherwise.
152 \membersection{wxSizerItem::IsSizer
}\label{wxsizeritemissizer
}
154 \constfunc{bool
}{IsSizer
}{\void}
156 Is this item a sizer?
159 \membersection{wxSizerItem::IsShown
}\label{wxsizeritemisshown
}
161 \constfunc{bool
}{IsShown
}{\void}
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
169 \membersection{wxSizerItem::IsSpacer
}\label{wxsizeritemisspacer
}
171 \constfunc{bool
}{IsSpacer
}{\void}
173 Is this item a spacer?
176 \membersection{wxSizerItem::IsWindow
}\label{wxsizeritemiswindow
}
178 \constfunc{bool
}{IsWindow
}{\void}
180 Is this item a window?
183 \membersection{wxSizerItem::SetBorder
}\label{wxsizeritemsetborder
}
185 \func{void
}{SetBorder
}{\param{int
}{border
}}
187 Set the border item attribute.
189 \membersection{wxSizerItem::SetDimension
}\label{wxsizeritemsetdimension
}
191 \func{void
}{SetDimension
}{\param{const wxPoint\&
}{pos
},
\param{const wxSize\&
}{size
}}
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.
198 \membersection{wxSizerItem::SetFlag
}\label{wxsizeritemsetflag
}
200 \func{void
}{SetFlag
}{\param{int
}{flag
}}
202 Set the flag item attribute.
205 \membersection{wxSizerItem::SetInitSize
}\label{wxsizeritemsetinitsize
}
207 \func{void
}{SetInitSize
}{\param{int
}{x
},
\param{int
}{y
}}
210 \membersection{wxSizerItem::SetProportion
}\label{wxsizeritemsetproportion
}
212 \func{void
}{SetProportion
}{\param{int
}{proportion
}}
214 Set the proportion item attribute.
216 \membersection{wxSizerItem::SetRatio
}\label{wxsizeritemsetratio
}
218 \func{void
}{SetRatio
}{\param{int
}{width
},
\param{int
}{height
}}
220 \func{void
}{SetRatio
}{\param{wxSize
}{size
}}
222 \func{void
}{SetRatio
}{\param{float
}{ratio
}}
224 Set the ratio item attribute.
227 \membersection{wxSizerItem::SetSizer
}\label{wxsizeritemsetsizer
}
229 \func{void
}{SetSizer
}{\param{wxSizer*
}{sizer
}}
231 Set the sizer tracked by this item.
234 \membersection{wxSizerItem::SetSpacer
}\label{wxsizeritemsetspacer
}
236 \func{void
}{SetSpacer
}{\param{const wxSize\&
}{size
}}
238 Set the size of the spacer tracked by this item.
241 \membersection{wxSizerItem::SetWindow
}\label{wxsizeritemsetwindow
}
243 \func{void
}{SetWindow
}{\param{wxWindow*
}{window
}}
245 Set the window to be tracked by thsi item.
248 \membersection{wxSizerItem::Show
}\label{wxsizeritemshow
}
250 \func{void
}{Show
}{\param{bool
}{show
}}
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.