X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..9e9574fe45b176ee74bba8fad7574cf9906145d1:/interface/wx/gbsizer.h diff --git a/interface/wx/gbsizer.h b/interface/wx/gbsizer.h index 30ffb83eab..5279db00c0 100644 --- a/interface/wx/gbsizer.h +++ b/interface/wx/gbsizer.h @@ -2,13 +2,11 @@ // Name: gbsizer.h // Purpose: interface of wxGBPosition // Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @class wxGBPosition - @wxheader{gbsizer.h} This class represents the position of an item in a virtual grid of rows and columns managed by a wxGridBagSizer. @@ -49,9 +47,9 @@ public: void SetRow(int row); /** - Checks if the position is valid. An invalid position is (-1,-1). + Compare inequality of two wxGBPositions. */ - bool operator!(const wxGBPosition& p) const; + bool operator!=(const wxGBPosition& p) const; /** Compare equality of two wxGBPositions. @@ -63,7 +61,6 @@ public: /** @class wxGridBagSizer - @wxheader{gbsizer.h} A 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 @@ -95,12 +92,20 @@ public: wxSizerItem* Add(wxSizer* sizer, const wxGBPosition& pos, const wxGBSpan& span = wxDefaultSpan, int flag = 0, int border = 0, wxObject* userData = NULL); + wxSizerItem* Add(wxGBSizerItem* item); + + /** + Adds a spacer to the given position. + @a width and @a height specify the dimension of the spacer to be added. + + @return A valid pointer if the spacer was successfully placed at the + given position, or @NULL if something was already there. + */ 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); - //@} + //@} /** Called when the managed size of the sizer is needed or when layout needs done. @@ -216,11 +221,10 @@ public: /** @class wxGBSizerItem - @wxheader{gbsizer.h} 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 + normal wxSizerItem by adding wxGBPosition and wxGBSpan attributes. 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. @@ -234,20 +238,20 @@ public: Construct a sizer item for tracking a spacer. */ wxGBSizerItem(int width, int height, const wxGBPosition& pos, - const wxGBSpan& span, int flag, int border, - wxObject* userData); + const wxGBSpan& span=wxDefaultSpan, int flag=0, int border=0, + wxObject* userData=NULL); /** Construct a sizer item for tracking a window. */ wxGBSizerItem(wxWindow* window, const wxGBPosition& pos, - const wxGBSpan& span, int flag, int border, - wxObject* userData); + const wxGBSpan& span=wxDefaultSpan, int flag=0, int border=0, + wxObject* userData=NULL); /** Construct a sizer item for tracking a subsizer. */ wxGBSizerItem(wxSizer* sizer, const wxGBPosition& pos, - const wxGBSpan& span, int flag, int border, - wxObject* userData); + const wxGBSpan& span=wxDefaultSpan, int flag=0, int border=0, + wxObject* userData=NULL); /** Get the row and column of the endpoint of this item. @@ -271,7 +275,7 @@ public: //@} /** - Returns @true if this item and the @a other item instersect. + Returns @true if this item and the @a other item intersect. */ bool Intersects(const wxGBSizerItem& other); /** @@ -294,13 +298,16 @@ public: is successful and after the next Layout the item will be resized. */ bool SetSpan(const wxGBSpan& span); + + + wxGridBagSizer* GetGBSizer() const; + void SetGBSizer(wxGridBagSizer* sizer); }; /** @class wxGBSpan - @wxheader{gbsizer.h} This class is used to hold the row and column spanning attributes of items in a wxGridBagSizer. @@ -342,9 +349,9 @@ public: void SetRowspan(int rowspan); /** - Checks if the span is valid. An invalid span is (-1,-1). + Compare inequality of two wxGBSpans. */ - bool operator!(const wxGBSpan& o) const; + bool operator!=(const wxGBSpan& o) const; /** Compare equality of two wxGBSpans. @@ -352,3 +359,5 @@ public: bool operator==(const wxGBSpan& o) const; }; + +const wxGBSpan wxDefaultSpan;