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
}. In
6 normal usage user code should never need to deal directly with a
7 wxSizerItem, but derived sizer classes will.
10 \wxheading{Derived from
}
12 \helpref{wxObject
}{wxobject
}
14 \wxheading{Include files
}
19 \latexignore{\rtfignore{\wxheading{Members
}}}
22 \membersection{wxSizerItem::wxSizerItem
}\label{wxsizeritemwxsizeritem
}
24 \func{}{wxSizerItem
}{\param{int
}{width
},
\param{int
}{height
},
\param{int
}{proportion
},
\param{int
}{flag
},
\param{int
}{border
},
\param{wxObject*
}{userData
}}
26 Construct a sizer item for tracking a spacer.
29 \func{}{wxSizerItem
}{\param{wxWindow*
}{window
},
\param{const wxSizerFlags\&
}{flags
}}
31 \func{}{wxSizerItem
}{\param{wxWindow*
}{window
},
\param{int
}{proportion
},
\param{int
}{flag
},
\param{int
}{border
},
\param{wxObject*
}{userData
}}
33 Construct a sizer item for tracking a window.
36 \func{}{wxSizerItem
}{\param{wxSizer*
}{window
},
\param{const wxSizerFlags\&
}{flags
}}
38 \func{}{wxSizerItem
}{\param{wxSizer*
}{sizer
},
\param{int
}{proportion
},
\param{int
}{flag
},
\param{int
}{border
},
\param{wxObject*
}{userData
}}
40 Construct a sizer item for tracking a subsizer.
44 \membersection{wxSizerItem::
\destruct{wxSizerItem
}}\label{wxsizeritemdtor
}
46 \func{}{\destruct{wxSizerItem
}}{\void}
48 Deletes the user data and subsizer, if any.
51 \membersection{wxSizerItem::CalcMin
}\label{wxsizeritemcalcmin
}
53 \func{wxSize
}{CalcMin
}{\void}
55 Calculates the minimum desired size for the item, including any space
59 \membersection{wxSizerItem::DeleteWindows
}\label{wxsizeritemdeletewindows
}
61 \func{void
}{DeleteWindows
}{\void}
63 Destroy the window or the windows in a subsizer, depending on the type
67 \membersection{wxSizerItem::DetachSizer
}\label{wxsizeritemdetachsizer
}
69 \func{void
}{DetachSizer
}{\void}
71 Enable deleting the SizerItem without destroying the contained sizer.
74 \membersection{wxSizerItem::GetBorder
}\label{wxsizeritemgetborder
}
76 \constfunc{int
}{GetBorder
}{\void}
78 Return the border attribute.
80 \membersection{wxSizerItem::GetFlag
}\label{wxsizeritemgetflag
}
82 \constfunc{int
}{GetFlag
}{\void}
84 Return the flags attribute.
87 \membersection{wxSizerItem::GetMinSize
}\label{wxsizeritemgetminsize
}
89 \constfunc{wxSize
}{GetMinSize
}{\void}
91 Get the minimum size needed for the item.
93 \membersection{wxSizerItem::GetPosition
}\label{wxsizeritemgetposition
}
95 \constfunc{wxPoint
}{GetPosition
}{\void}
97 What is the current position of the item, as set in the last Layout.
99 \membersection{wxSizerItem::GetProportion
}\label{wxsizeritemgetproportion
}
101 \constfunc{int
}{GetProportion
}{\void}
103 Get the proportion item attribute.
105 \membersection{wxSizerItem::GetRatio
}\label{wxsizeritemgetratio
}
107 \constfunc{float
}{GetRatio
}{\void}
109 Get the ration item attribute.
111 \membersection{wxSizerItem::GetRect
}\label{wxsizeritemgetrect
}
113 \func{wxRect
}{GetRect
}{\void}
115 Get the rectangle of the item on the parent window, excluding borders.
117 \membersection{wxSizerItem::GetSize
}\label{wxsizeritemgetsize
}
119 \constfunc{wxSize
}{GetSize
}{\void}
121 Get the current size of the item, as set in the last Layout.
123 \membersection{wxSizerItem::GetSizer
}\label{wxsizeritemgetsizer
}
125 \constfunc{wxSizer*
}{GetSizer
}{\void}
127 If this item is tracking a sizer, return it. NULL otherwise.
130 \membersection{wxSizerItem::GetSpacer
}\label{wxsizeritemgetspacer
}
132 \constfunc{const wxSize\&
}{GetSpacer
}{\void}
134 If this item is tracking a spacer, return its size.
137 \membersection{wxSizerItem::GetUserData
}\label{wxsizeritemgetuserdata
}
139 \constfunc{wxObject*
}{GetUserData
}{\void}
141 Get the userData item attribute.
144 \membersection{wxSizerItem::GetWindow
}\label{wxsizeritemgetwindow
}
146 \constfunc{wxWindow*
}{GetWindow
}{\void}
148 If this item is tracking a window then return it. NULL otherwise.
151 \membersection{wxSizerItem::IsSizer
}\label{wxsizeritemissizer
}
153 \constfunc{bool
}{IsSizer
}{\void}
155 Is this item a sizer?
158 \membersection{wxSizerItem::IsShown
}\label{wxsizeritemisshown
}
160 \constfunc{bool
}{IsShown
}{\void}
162 Returns
\true if this item is a window or a spacer and it is shown or if this
163 item is a sizer and not all its elements are hidden. In other words, for sizer
164 items, all of the child elements must be hidden for the sizer itself to be
168 \membersection{wxSizerItem::IsSpacer
}\label{wxsizeritemisspacer
}
170 \constfunc{bool
}{IsSpacer
}{\void}
172 Is this item a spacer?
175 \membersection{wxSizerItem::IsWindow
}\label{wxsizeritemiswindow
}
177 \constfunc{bool
}{IsWindow
}{\void}
179 Is this item a window?
182 \membersection{wxSizerItem::SetBorder
}\label{wxsizeritemsetborder
}
184 \func{void
}{SetBorder
}{\param{int
}{border
}}
186 Set the border item attribute.
188 \membersection{wxSizerItem::SetDimension
}\label{wxsizeritemsetdimension
}
190 \func{void
}{SetDimension
}{\param{const wxPoint\&
}{pos
},
\param{const wxSize\&
}{size
}}
192 Set the position and size of the space allocated to the sizer, and
193 adjust the position and size of the item to be within that space
194 taking alignment and borders into account.
197 \membersection{wxSizerItem::SetFlag
}\label{wxsizeritemsetflag
}
199 \func{void
}{SetFlag
}{\param{int
}{flag
}}
201 Set the flag item attribute.
204 \membersection{wxSizerItem::SetInitSize
}\label{wxsizeritemsetinitsize
}
206 \func{void
}{SetInitSize
}{\param{int
}{x
},
\param{int
}{y
}}
209 \membersection{wxSizerItem::SetProportion
}\label{wxsizeritemsetproportion
}
211 \func{void
}{SetProportion
}{\param{int
}{proportion
}}
213 Set the proportion item attribute.
215 \membersection{wxSizerItem::SetRatio
}\label{wxsizeritemsetratio
}
217 \func{void
}{SetRatio
}{\param{int
}{width
},
\param{int
}{height
}}
219 \func{void
}{SetRatio
}{\param{wxSize
}{size
}}
221 \func{void
}{SetRatio
}{\param{float
}{ratio
}}
223 Set the ratio item attribute.
226 \membersection{wxSizerItem::SetSizer
}\label{wxsizeritemsetsizer
}
228 \func{void
}{SetSizer
}{\param{wxSizer*
}{sizer
}}
230 Set the sizer tracked by this item.
233 \membersection{wxSizerItem::SetSpacer
}\label{wxsizeritemsetspacer
}
235 \func{void
}{SetSpacer
}{\param{const wxSize\&
}{size
}}
237 Set the size of the spacer tracked by this item.
240 \membersection{wxSizerItem::SetWindow
}\label{wxsizeritemsetwindow
}
242 \func{void
}{SetWindow
}{\param{wxWindow*
}{window
}}
244 Set the window to be tracked by thsi item.
247 \membersection{wxSizerItem::Show
}\label{wxsizeritemshow
}
249 \func{void
}{Show
}{\param{bool
}{show
}}
251 Set the show item attribute, which sizers use to determine if the item
252 is to be made part of the layout or not. If the item is tracking a
253 window then it is shown or hidden as needed.