The wxGBSizerItem class is used by the wxGridBagSizer for tracking the items in the sizer. It adds grid position and spanning information to the normal wxSizerItem by adding wxGBPosition and wxGBSpan attrbibutes. Most of the time you will not need to use a wxGBSizerItem directly in your code, but there are a couple of cases where it is handy.
Derived from
Include files
<wx/gbsizer.h>
Members
wxGBSizerItem::wxGBSizerItem
wxGBSizerItem::GetEndPos
wxGBSizerItem::GetPos
wxGBSizerItem::GetSpan
wxGBSizerItem::Intersects
wxGBSizerItem::SetPos
wxGBSizerItem::SetSpan
wxGBSizerItem(int width, int height, const wxGBPosition& pos, const wxGBSpan& span, int flag, int border, wxObject* userData)
Construct a sizer item for tracking a spacer.
wxGBSizerItem(wxWindow* window, const wxGBPosition& pos, const wxGBSpan& span, int flag, int border, wxObject* userData)
Construct a sizer item for tracking a window.
wxGBSizerItem(wxSizer* sizer, const wxGBPosition& pos, const wxGBSpan& span, int flag, int border, wxObject* userData)
Construct a sizer item for tracking a subsizer.
void GetEndPos(int& row, int& col)
Get the row and column of the endpoint of this item
wxGBPosition GetPos() const
void GetPos(int& row, int& col) const
Get the grid position of the item.
wxGBSpan GetSpan() const
void GetSpan(int& rowspan, int& colspan) const
Get the row and column spanning of the item.
bool Intersects(const wxGBSizerItem& other)
Returns true if this item and the other item instersect
bool Intersects(const wxGBPosition& pos, const wxGBSpan& span)
Returns true if the given pos/span would intersect with this item.
bool SetPos(const wxGBPosition& pos)
If the item is already a member of a sizer then first ensure that there is no other item that would intersect with this one at the new position, then set the new position. Returns true if the change is successful and after the next Layout the item will be moved.
bool SetSpan(const wxGBSpan& span)
If the item is already a member of a sizer then first ensure that there is no other item that would intersect with this one with its new spanning size, then set the new spanning. Returns true if the change is successful and after the next Layout the item will be resized.