From: Robert Roebling Date: Thu, 1 Jan 2009 22:05:29 +0000 (+0000) Subject: Added wxSizer::GetItemCount() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6b527e158d66719088621e11cfd1862d9d1e9c12 Added wxSizer::GetItemCount() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/sizer.h b/include/wx/sizer.h index 771fcf5f1a..80b16bbd0c 100644 --- a/include/wx/sizer.h +++ b/include/wx/sizer.h @@ -665,6 +665,8 @@ public: void SetDimension(int x, int y, int width, int height) { SetDimension(wxPoint(x, y), wxSize(width, height)); } + size_t GetItemCount() { return m_children.GetCount(); } + wxSizerItem* GetItem( wxWindow *window, bool recursive = false ); wxSizerItem* GetItem( wxSizer *sizer, bool recursive = false ); wxSizerItem* GetItem( size_t index ); diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index 406def0a94..34d41a5861 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -1091,6 +1091,11 @@ public: */ wxWindow* GetContainingWindow() const; + /** + Returns the number of items in the sizer. + */ + size_t GetItemCount(); + /** Finds wxSizerItem which holds the given @a window. Use parameter @a recursive to search in subsizers too.