X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2746bccf233379382f2017ef35d2dfcc114b70cb..ac687ddffb6f199603abc2415f7bcf0d051f1eca:/samples/dataview/mymodels.h diff --git a/samples/dataview/mymodels.h b/samples/dataview/mymodels.h index 6d110d645e..d925779655 100644 --- a/samples/dataview/mymodels.h +++ b/samples/dataview/mymodels.h @@ -4,9 +4,8 @@ // Author: Robert Roebling // Modified by: Francesco Montorsi, Bo Yang // Created: 06/01/06 -// RCS-ID: $Id$ // Copyright: (c) Robert Roebling -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -163,6 +162,9 @@ public: virtual bool SetValue( const wxVariant &variant, const wxDataViewItem &item, unsigned int col ); + virtual bool IsEnabled( const wxDataViewItem &item, + unsigned int col ) const; + virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const; virtual bool IsContainer( const wxDataViewItem &item ) const; virtual unsigned int GetChildren( const wxDataViewItem &parent, @@ -193,6 +195,7 @@ public: Col_EditableText, Col_IconText, Col_TextWithAttr, + Col_Custom, Col_Max }; @@ -221,11 +224,6 @@ public: return wxT("string"); } - virtual unsigned int GetRowCount() - { - return m_textColValues.GetCount(); - } - virtual void GetValueByRow( wxVariant &variant, unsigned int row, unsigned int col ) const; virtual bool GetAttrByRow( unsigned int row, unsigned int col, @@ -237,6 +235,14 @@ private: wxArrayString m_textColValues; wxArrayString m_iconColValues; wxIcon m_icon[2]; - int m_virtualItems; }; +// ---------------------------------------------------------------------------- +// MyListStoreDerivedModel +// ---------------------------------------------------------------------------- + +class MyListStoreDerivedModel : public wxDataViewListStore +{ +public: + virtual bool IsEnabledByRow(unsigned int row, unsigned int col) const; +};