]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gbsizer.h
Define WXBUILDING in Xcode projects.
[wxWidgets.git] / include / wx / gbsizer.h
index f0012b7a44390fb38efc3139150d1e7310aa0e0b..d9120a607b4a6d24197ae05d154669af35dc678c 100644 (file)
@@ -67,6 +67,14 @@ public:
 
     // default copy ctor and assignment operator are okay.
 
+    // Factor constructor creating an invalid wxGBSpan: this is mostly supposed
+    // to be used as return value for functions returning wxGBSpan in case of
+    // errors.
+    static wxGBSpan Invalid()
+    {
+        return wxGBSpan(NULL);
+    }
+
     int GetRowspan() const { return m_rowspan; }
     int GetColspan() const { return m_colspan; }
     void SetRowspan(int rowspan)
@@ -87,6 +95,13 @@ public:
     bool operator!=(const wxGBSpan& o) const { return !(*this == o); }
 
 private:
+    // This private ctor is used by Invalid() only.
+    wxGBSpan(struct InvalidCtorTag*)
+    {
+        m_rowspan =
+        m_colspan = -1;
+    }
+
     void Init()
     {
         m_rowspan =
@@ -115,26 +130,26 @@ public:
     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);
 
     // 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 );
 
     // 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 );
 
     // default ctor
     wxGBSizerItem();