// Name: manager.h
// Purpose: interface of wxPropertyGridManager
// Author: wxWidgets team
-// RCS-ID: $Id:
+// RCS-ID: $Id$
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
wxPropertyGridPage* page;
- pgMan->AddPage(wxT("First Page"));
- page = pgMan->GetLastPage();
+ page = pgMan->AddPage(wxT("First Page"));
page->Append( new wxPropertyCategory(wxT("Category A1")) );
page->Append( new wxColourProperty(wxT("Colour"),wxPG_LABEL,*wxWHITE) );
- pgMan->AddPage(wxT("Second Page"));
- page = pgMan->GetLastPage();
+ page = pgMan->AddPage(wxT("Second Page"));
page->Append( wxT("Text"),wxPG_LABEL,wxT("(no text)") );
wxPropertyGridPage instance. Manager will take ownership of this
object. NULL indicates that a default page instance should be created.
- @return Returns index to the page created.
+ @return Returns pointer to created property grid page.
@remarks If toolbar is used, it is highly recommended that the pages are
added when the toolbar is not turned off using window style flag
switching. Otherwise toolbar buttons might not be added properly.
*/
- int AddPage( const wxString& label = wxEmptyString,
- const wxBitmap& bmp = wxPG_NULL_BITMAP,
- wxPropertyGridPage* pageObj = (wxPropertyGridPage*) NULL )
- {
- return InsertPage(-1,label,bmp,pageObj);
- }
-
- void ClearModifiedStatus( wxPGPropArg id );
-
- void ClearModifiedStatus()
- {
- m_pPropGrid->ClearModifiedStatus();
- }
+ wxPropertyGridPage* AddPage( const wxString& label = wxEmptyString,
+ const wxBitmap& bmp = wxPG_NULL_BITMAP,
+ wxPropertyGridPage* pageObj = NULL );
/**
Deletes all properties and all pages.
*/
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.
*/
wxPropertyGridPage* GetCurrentPage() const;
- /**
- Returns last page.
- */
- wxPropertyGridPage* GetLastPage() const
- {
- return GetPage(m_arrPages.size()-1);
- }
-
/**
Returns page object for given page index.
*/
wxPropertyGridPage instance. Manager will take ownership of this
object. If NULL, default page object is constructed.
- @return Returns index to the page created.
+ @return Returns pointer to created page.
*/
- virtual int InsertPage( int index, const wxString& label,
- const wxBitmap& bmp = wxNullBitmap,
- wxPropertyGridPage* pageObj = NULL );
+ virtual wxPropertyGridPage* InsertPage( int index, const wxString& label,
+ const wxBitmap& bmp = wxNullBitmap,
+ wxPropertyGridPage* pageObj = NULL );
/**
Returns @true if any property on any page has been modified by the user.