X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/205bdf2069b93743848d69a39c0bd4a32e9ff8b7..b5aaf62e977b828214d65c3712478410fb2c8a05:/samples/dataview/mymodels.h diff --git a/samples/dataview/mymodels.h b/samples/dataview/mymodels.h index a078c59150..a0b98bc832 100644 --- a/samples/dataview/mymodels.h +++ b/samples/dataview/mymodels.h @@ -188,6 +188,15 @@ private: class MyListModel: public wxDataViewVirtualListModel { public: + enum + { + Col_EditableText, + Col_IconText, + Col_TextWithAttr, + Col_Custom, + Col_Max + }; + MyListModel(); // helper methods to change the model @@ -202,12 +211,12 @@ public: virtual unsigned int GetColumnCount() const { - return 3; + return Col_Max; } virtual wxString GetColumnType( unsigned int col ) const { - if (col == 1) + if (col == Col_IconText) return wxT("wxDataViewIconText"); return wxT("string"); @@ -220,7 +229,8 @@ public: virtual void GetValueByRow( wxVariant &variant, unsigned int row, unsigned int col ) const; - virtual bool GetAttrByRow( unsigned int row, unsigned int col, wxDataViewItemAttr &attr ); + virtual bool GetAttrByRow( unsigned int row, unsigned int col, + wxDataViewItemAttr &attr ) const; virtual bool SetValueByRow( const wxVariant &variant, unsigned int row, unsigned int col );