From: Jaakko Salli Date: Thu, 25 Sep 2008 17:23:54 +0000 (+0000) Subject: Removed wxPropertyGridManager::GetChildrentCount() member functions - now use page... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5a8009d2f1bdd80865e7f26dd6be90cd7307116e Removed wxPropertyGridManager::GetChildrentCount() member functions - now use page->GetRoot()->GetChildCount() and such git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/propgrid/manager.h b/include/wx/propgrid/manager.h index 544cb0c17d..d3166bc3d6 100644 --- a/include/wx/propgrid/manager.h +++ b/include/wx/propgrid/manager.h @@ -348,25 +348,6 @@ public: */ bool EnsureVisible( wxPGPropArg id ); - /** Returns number of children of the root property of the selected page. */ - size_t GetChildrenCount() - { - return GetChildrenCount( m_pPropGrid->m_pState->m_properties ); - } - - /** Returns number of children of the root property of given page. */ - size_t GetChildrenCount( int pageIndex ); - - /** Returns number of children for the property. - - NB: Cannot be in container methods class due to name hiding. - */ - size_t GetChildrenCount( wxPGPropArg id ) const - { - wxPG_PROP_ARG_CALL_PROLOG_RETVAL(0) - return p->GetChildCount(); - } - /** Returns number of columns on given page. By the default, returns number of columns on current page. */ int GetColumnCount( int page = -1 ) const; diff --git a/interface/wx/propgrid/manager.h b/interface/wx/propgrid/manager.h index 5d926bef75..a61bce65fa 100644 --- a/interface/wx/propgrid/manager.h +++ b/interface/wx/propgrid/manager.h @@ -290,30 +290,6 @@ public: */ bool EnsureVisible( wxPGPropArg id ); - /** - Returns number of children of the root property of the selected page. - */ - size_t GetChildrenCount() - { - return GetChildrenCount( m_pPropGrid->m_pState->m_properties ); - } - - /** - Returns number of children of the root property of given page. - */ - size_t GetChildrenCount( int pageIndex ); - - /** - Returns number of children for the property. - - NB: Cannot be in container methods class due to name hiding. - */ - size_t GetChildrenCount( wxPGPropArg id ) const - { - wxPG_PROP_ARG_CALL_PROLOG_RETVAL(0) - return p->GetChildCount(); - } - /** Returns number of columns on given page. By the default, returns number of columns on current page. diff --git a/samples/propgrid/propgrid.cpp b/samples/propgrid/propgrid.cpp index b01ee0863c..ceeb0748c6 100644 --- a/samples/propgrid/propgrid.cpp +++ b/samples/propgrid/propgrid.cpp @@ -2238,7 +2238,7 @@ void FormMain::OnInsertPropClick( wxCommandEvent& WXUNUSED(event) ) { wxString propLabel; - if ( !m_pPropGridManager->GetChildrenCount() ) + if ( !m_pPropGridManager->GetGrid()->GetRoot()->GetChildCount() ) { wxMessageBox(wxT("No items to relate - first add some with Append.")); return; @@ -2304,7 +2304,7 @@ void FormMain::OnInsertCatClick( wxCommandEvent& WXUNUSED(event) ) { wxString propLabel; - if ( !m_pPropGridManager->GetChildrenCount() ) + if ( !m_pPropGridManager->GetGrid()->GetRoot()->GetChildCount() ) { wxMessageBox(wxT("No items to relate - first add some with Append.")); return; diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 649cee07f0..333a758b9d 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -1337,13 +1337,6 @@ bool wxPropertyGridManager::EnsureVisible( wxPGPropArg id ) // ----------------------------------------------------------------------- -size_t wxPropertyGridManager::GetChildrenCount( int page_index ) -{ - return GetChildrenCount( GetPage(page_index)->GetStatePtr()->m_properties ); -} - -// ----------------------------------------------------------------------- - void wxPropertyGridManager::OnToolbarClick( wxCommandEvent &event ) { int id = event.GetId();