X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5eb16fe200346c41de14bff0fc84128faaec5496..43c42c18d36c703a88b1b7b697bac27fe5608eca:/include/wx/gbsizer.h diff --git a/include/wx/gbsizer.h b/include/wx/gbsizer.h index 9ee4d48635..d9120a607b 100644 --- a/include/wx/gbsizer.h +++ b/include/wx/gbsizer.h @@ -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 =