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.
92 \membersection{wxSizerItem::GetMinSize
}\label{wxsizeritemgetminsize
}
94 \constfunc{wxSize
}{GetMinSize
}{\void}
96 Get the minimum size needed for the item.
98 \membersection{wxSizerItem::GetPosition
}\label{wxsizeritemgetposition
}
100 \constfunc{wxPoint
}{GetPosition
}{\void}
102 What is the current position of the item, as set in the last Layout.
104 \membersection{wxSizerItem::GetProportion
}\label{wxsizeritemgetproportion
}
106 \constfunc{int
}{GetProportion
}{\void}
108 Get the proportion item attribute.
110 \membersection{wxSizerItem::GetRatio
}\label{wxsizeritemgetratio
}
112 \constfunc{float
}{GetRatio
}{\void}
114 Get the ration item attribute.
116 \membersection{wxSizerItem::GetRect
}\label{wxsizeritemgetrect
}
118 \func{wxRect
}{GetRect
}{\void}
120 Get the rectangle of the item on the parent window, excluding borders.
122 \membersection{wxSizerItem::GetSize
}\label{wxsizeritemgetsize
}
124 \constfunc{wxSize
}{GetSize
}{\void}
126 Get the current size of the item, as set in the last Layout.
128 \membersection{wxSizerItem::GetSizer
}\label{wxsizeritemgetsizer
}
130 \constfunc{wxSizer*
}{GetSizer
}{\void}
132 If this item is tracking a sizer, return it. NULL otherwise.
135 \membersection{wxSizerItem::GetSpacer
}\label{wxsizeritemgetspacer
}
137 \constfunc{const wxSize\&
}{GetSpacer
}{\void}
139 If this item is tracking a spacer, return its size.
142 \membersection{wxSizerItem::GetUserData
}\label{wxsizeritemgetuserdata
}
144 \constfunc{wxObject*
}{GetUserData
}{\void}
146 Get the userData item attribute.
149 \membersection{wxSizerItem::GetWindow
}\label{wxsizeritemgetwindow
}
151 \constfunc{wxWindow*
}{GetWindow
}{\void}
153 If this item is tracking a window then return it. NULL otherwise.
156 \membersection{wxSizerItem::IsSizer
}\label{wxsizeritemissizer
}
158 \constfunc{bool
}{IsSizer
}{\void}
160 Is this item a sizer?
163 \membersection{wxSizerItem::IsShown
}\label{wxsizeritemisshown
}
165 \constfunc{bool
}{IsShown
}{\void}
167 Returns
\true if this item is a window or a spacer and it is shown or if this
168 item is a sizer and not all its elements are hidden. In other words, for sizer
169 items, all of the child elements must be hidden for the sizer itself to be
173 \membersection{wxSizerItem::IsSpacer
}\label{wxsizeritemisspacer
}
175 \constfunc{bool
}{IsSpacer
}{\void}
177 Is this item a spacer?
180 \membersection{wxSizerItem::IsWindow
}\label{wxsizeritemiswindow
}
182 \constfunc{bool
}{IsWindow
}{\void}
184 Is this item a window?
187 \membersection{wxSizerItem::SetBorder
}\label{wxsizeritemsetborder
}
189 \func{void
}{SetBorder
}{\param{int
}{border
}}
191 Set the border item attribute.
193 \membersection{wxSizerItem::SetDimension
}\label{wxsizeritemsetdimension
}
195 \func{void
}{SetDimension
}{\param{const wxPoint\&
}{pos
},
\param{const wxSize\&
}{size
}}
197 Set the position and size of the space allocated to the sizer, and
198 adjust the position and size of the item to be within that space
199 taking alignment and borders into account.
202 \membersection{wxSizerItem::SetFlag
}\label{wxsizeritemsetflag
}
204 \func{void
}{SetFlag
}{\param{int
}{flag
}}
206 Set the flag item attribute.
209 \membersection{wxSizerItem::SetInitSize
}\label{wxsizeritemsetinitsize
}
211 \func{void
}{SetInitSize
}{\param{int
}{x
},
\param{int
}{y
}}
214 \membersection{wxSizerItem::SetProportion
}\label{wxsizeritemsetproportion
}
216 \func{void
}{SetProportion
}{\param{int
}{proportion
}}
218 Set the proportion item attribute.
220 \membersection{wxSizerItem::SetRatio
}\label{wxsizeritemsetratio
}
222 \func{void
}{SetRatio
}{\param{int
}{width
},
\param{int
}{height
}}
224 \func{void
}{SetRatio
}{\param{wxSize
}{size
}}
226 \func{void
}{SetRatio
}{\param{float
}{ratio
}}
228 Set the ratio item attribute.
231 \membersection{wxSizerItem::SetSizer
}\label{wxsizeritemsetsizer
}
233 \func{void
}{SetSizer
}{\param{wxSizer*
}{sizer
}}
235 Set the sizer tracked by this item.
238 \membersection{wxSizerItem::SetSpacer
}\label{wxsizeritemsetspacer
}
240 \func{void
}{SetSpacer
}{\param{const wxSize\&
}{size
}}
242 Set the size of the spacer tracked by this item.
245 \membersection{wxSizerItem::SetWindow
}\label{wxsizeritemsetwindow
}
247 \func{void
}{SetWindow
}{\param{wxWindow*
}{window
}}
249 Set the window to be tracked by thsi item.
252 \membersection{wxSizerItem::Show
}\label{wxsizeritemshow
}
254 \func{void
}{Show
}{\param{bool
}{show
}}
256 Set the show item attribute, which sizers use to determine if the item
257 is to be made part of the layout or not. If the item is tracking a
258 window then it is shown or hidden as needed.