From 6e1f851b1760803b32c3d1d61bcc76feace46f9d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 1 Jan 2009 23:25:37 +0000 Subject: [PATCH] also add wxSizer::IsEmpty() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/sizer.h | 1 + interface/wx/sizer.h | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/include/wx/sizer.h b/include/wx/sizer.h index 4f3312d668..316602ca44 100644 --- a/include/wx/sizer.h +++ b/include/wx/sizer.h @@ -666,6 +666,7 @@ public: { SetDimension(wxPoint(x, y), wxSize(width, height)); } size_t GetItemCount() const { return m_children.GetCount(); } + bool IsEmpty() const { return m_children.IsEmpty(); } wxSizerItem* GetItem( wxWindow *window, bool recursive = false ); wxSizerItem* GetItem( wxSizer *sizer, bool recursive = false ); diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index f7f2832033..86269f643f 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -1093,6 +1093,9 @@ public: /** Returns the number of items in the sizer. + + If you just need to test whether the sizer is empty or not you can also + use IsEmpty() function. */ size_t GetItemCount() const; @@ -1246,6 +1249,13 @@ public: */ wxSizerItem* InsertStretchSpacer(size_t index, int prop = 1); + /** + Return @true if the sizer has no elements. + + @see GetItemCount() + */ + bool IsEmpty() const; + /** Returns @true if the @a window is shown. -- 2.45.2