wxGridBagSizerA wxSizer that can lay out items in a virtual grid like a wxFlexGridSizer but in this case explicit positioning of the items is allowed using wxGBPosition, and items can optionally span more than one row and/or column using wxGBSpan. Derived from
wxFlexGridSizer Include files <wx/gbsizer.h> Members
wxGridBagSizer::wxGridBagSizer
wxGridBagSizer::wxGridBagSizerwxGridBagSizer(int vgap = 0, int hgap = 0) Constructor, with optional parameters to specify the gap between the rows and columns.
wxGridBagSizer::AddwxSizerItem* Add(wxWindow* window, const wxGBPosition& pos, const wxGBSpan& span = wxDefaultSpan, int flag = 0, int border = 0, wxObject* userData = NULL) wxSizerItem* Add(wxSizer* sizer, const wxGBPosition& pos, const wxGBSpan& span = wxDefaultSpan, int flag = 0, int border = 0, wxObject* userData = NULL) wxSizerItem* Add(int width, int height, const wxGBPosition& pos, const wxGBSpan& span = wxDefaultSpan, int flag = 0, int border = 0, wxObject* userData = NULL) wxSizerItem* Add(wxGBSizerItem* item) The Add methods return a valid pointer if the item was successfully placed at the given position, NULL if something was already there.
wxGridBagSizer::CalcMinwxSize CalcMin() Called when the managed size of the sizer is needed or when layout needs done.
wxGridBagSizer::CheckForIntersectionbool CheckForIntersection(wxGBSizerItem* item, wxGBSizerItem* excludeItem = NULL) bool CheckForIntersection(const wxGBPosition& pos, const wxGBSpan& span, wxGBSizerItem* excludeItem = NULL) Look at all items and see if any intersect (or would overlap) the given item. Returns true if so, false if there would be no overlap. If an excludeItem is given then it will not be checked for intersection, for example it may be the item we are checking the position of.
wxGridBagSizer::FindItemwxGBSizerItem* FindItem(wxWindow* window) wxGBSizerItem* FindItem(wxSizer* sizer) Find the sizer item for the given window or subsizer, returns NULL if not found. (non-recursive)
wxGridBagSizer::FindItemAtPointwxGBSizerItem* FindItemAtPoint(const wxPoint& pt) Return the sizer item located at the point given in pt, or NULL if there is no item at that point. The (x,y) coordinates in pt correspond to the client coordinates of the window using the sizer for layout. (non-recursive)
wxGridBagSizer::FindItemAtPositionwxGBSizerItem* FindItemAtPosition(const wxGBPosition& pos) Return the sizer item for the given grid cell, or NULL if there is no item at that position. (non-recursive)
wxGridBagSizer::FindItemWithDatawxGBSizerItem* FindItemWithData(const wxObject* userData) Return the sizer item that has a matching user data (it only compares pointer values) or NULL if not found. (non-recursive)
wxGridBagSizer::GetCellSizewxSize GetCellSize(int row, int col) const Get the size of the specified cell, including hgap and vgap. Only valid after a Layout.
wxGridBagSizer::GetEmptyCellSizewxSize GetEmptyCellSize() const Get the size used for cells in the grid with no item.
wxGridBagSizer::GetItemPositionwxGBPosition GetItemPosition(wxWindow* window) wxGBPosition GetItemPosition(wxSizer* sizer) wxGBPosition GetItemPosition(size_t index) Get the grid position of the specified item.
wxGridBagSizer::GetItemSpanwxGBSpan GetItemSpan(wxWindow* window) wxGBSpan GetItemSpan(wxSizer* sizer) wxGBSpan GetItemSpan(size_t index) Get the row/col spanning of the specified item
wxGridBagSizer::RecalcSizesvoid RecalcSizes() Called when the managed size of the sizer is needed or when layout needs done.
wxGridBagSizer::SetEmptyCellSizevoid SetEmptyCellSize(const wxSize& sz) Set the size used for cells in the grid with no item.
wxGridBagSizer::SetItemPositionbool SetItemPosition(wxWindow* window, const wxGBPosition& pos) bool SetItemPosition(wxSizer* sizer, const wxGBPosition& pos) bool SetItemPosition(size_t index, const wxGBPosition& pos) Set the grid position of the specified item. Returns true on success. If the move is not allowed (because an item is already there) then false is returned.
wxGridBagSizer::SetItemSpanbool SetItemSpan(wxWindow* window, const wxGBSpan& span) bool SetItemSpan(wxSizer* sizer, const wxGBSpan& span) bool SetItemSpan(size_t index, const wxGBSpan& span) Set the row/col spanning of the specified item. Returns true on success. If the move is not allowed (because an item is already there) then false is returned.
|