Add wxDataViewListCtrl::{Set,Get}ItemData() methods.

These methods are convenient when migrating the code that previously used
wxListCtrl to wxDataViewCtrl.

Closes #11088.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-05-25 17:02:35 +00:00
parent 41abc29aa6
commit 518cef0470
4 changed files with 68 additions and 0 deletions

View File

@@ -972,6 +972,9 @@ public:
void DeleteItem( unsigned int pos );
void DeleteAllItems();
void SetItemData( const wxDataViewItem& item, wxUIntPtr data );
wxUIntPtr GetItemData( const wxDataViewItem& item ) const;
// override base virtuals
virtual unsigned int GetColumnCount() const;
@@ -1077,6 +1080,11 @@ public:
bool GetToggleValue( unsigned int row, unsigned int col ) const
{ wxVariant value; GetStore()->GetValueByRow( value, row, col ); return value.GetBool(); }
void SetItemData( const wxDataViewItem& item, wxUIntPtr data )
{ GetStore()->SetItemData( item, data ); }
wxUIntPtr GetItemData( const wxDataViewItem& item ) const
{ return GetStore()->GetItemData( item ); }
void OnSize( wxSizeEvent &event );
private: