// Author: Jaakko Salli
// Modified by:
// Created: 2005-01-14
-// RCS-ID: $Id:
+// RCS-ID: $Id$
// Copyright: (c) Jaakko Salli
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
@param pageObj
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.
+ Returns pointer to created 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.
*/
- int AddPage( const wxString& label = wxEmptyString,
- const wxBitmap& bmp = wxPG_NULL_BITMAP,
- wxPropertyGridPage* pageObj = (wxPropertyGridPage*) NULL )
+ wxPropertyGridPage* AddPage( const wxString& label = wxEmptyString,
+ const wxBitmap& bmp = wxPG_NULL_BITMAP,
+ wxPropertyGridPage* pageObj = NULL )
{
- return InsertPage(-1,label,bmp,pageObj);
- }
-
- void ClearModifiedStatus ( wxPGPropArg id );
-
- void ClearModifiedStatus ()
- {
- m_pPropGrid->ClearModifiedStatus();
+ return InsertPage(-1, label, bmp, pageObj);
}
/** Deletes all 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. */
int GetColumnCount( int page = -1 ) const;
return GetPage(m_selPage);
}
- /** Returns last page.
- */
- wxPropertyGridPage* GetLastPage() const
- {
- return GetPage(m_arrPages.size()-1);
- }
-
/** Returns page object for given page index.
*/
wxPropertyGridPage* GetPage( unsigned int ind ) const
{
- return (wxPropertyGridPage*)m_arrPages.Item(ind);
+ return m_arrPages[ind];
}
/** Returns page object for given page name.
/** Returns index to currently selected page. */
int GetSelectedPage() const { return m_selPage; }
+ /** Alias for GetSelection(). */
+ wxPGProperty* GetSelectedProperty() const
+ {
+ return GetSelection();
+ }
+
/** Shortcut for GetGrid()->GetSelection(). */
wxPGProperty* GetSelection() const
{
@param pageObj
wxPropertyGridPage instance. Manager will take ownership of this object.
If NULL, default page object is constructed.
+
@return
- Returns index to the page created.
+ 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.
public:
-#ifndef DOXYGEN
-
//
// Overridden functions - no documentation required.
//
wxPropertyGrid* m_pPropGrid;
- wxArrayPtrVoid m_arrPages;
+ wxVector<wxPropertyGridPage*> m_arrPages;
#if wxUSE_TOOLBAR
wxToolBar* m_pToolbar;
void SetDescribedProperty( wxPGProperty* p );
+ // Reimplement these to handle "descboxheight" state item
+ virtual bool SetEditableStateItem( const wxString& name, wxVariant value );
+ virtual wxVariant GetEditableStateItem( const wxString& name ) const;
+
virtual bool ProcessEvent( wxEvent& event );
private:
DECLARE_EVENT_TABLE()
#endif // #ifndef SWIG
-#endif // #ifndef DOXYGEN
};
// -----------------------------------------------------------------------