AddPage(), InsertPage() now return page ptr instead of index

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-09-25 17:19:49 +00:00
parent 0f457f4de2
commit 9288df3401
3 changed files with 29 additions and 44 deletions

View File

@@ -705,13 +705,15 @@ size_t wxPropertyGridManager::GetPageCount() const
// -----------------------------------------------------------------------
int wxPropertyGridManager::InsertPage( int index, const wxString& label,
const wxBitmap& bmp, wxPropertyGridPage* pageObj )
wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index,
const wxString& label,
const wxBitmap& bmp,
wxPropertyGridPage* pageObj )
{
if ( index < 0 )
index = GetPageCount();
wxCHECK_MSG( (size_t)index == GetPageCount(), -1,
wxCHECK_MSG( (size_t)index == GetPageCount(), NULL,
wxT("wxPropertyGridManager currently only supports appending pages (due to wxToolBar limitation)."));
bool needInit = true;
@@ -826,7 +828,7 @@ int wxPropertyGridManager::InsertPage( int index, const wxString& label,
wxASSERT( pageObj->GetGrid() );
return index;
return pageObj;
}
// -----------------------------------------------------------------------