]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datavcmn.cpp
Don't use generic wxListCtrl style for wxListMainWindow.
[wxWidgets.git] / src / common / datavcmn.cpp
index ef43faa33b6e0e6d5d74fe9f49e53c309857cd28..1dcf8a10053c258c9d119d90422b9e37ca83673e 100644 (file)
@@ -1705,6 +1705,11 @@ unsigned int wxDataViewListStore::GetColumnCount() const
     return m_cols.GetCount();
 }
 
+unsigned int wxDataViewListStore::GetItemCount() const
+{
+    return m_data.size();
+}
+
 wxString wxDataViewListStore::GetColumnType( unsigned int pos ) const
 {
     return m_cols[pos];
@@ -1761,6 +1766,22 @@ void wxDataViewListStore::DeleteAllItems()
     Reset( 0 );
 }
 
+void wxDataViewListStore::SetItemData( const wxDataViewItem& item, wxUIntPtr data )
+{
+    wxDataViewListStoreLine* line = m_data[wxPtrToUInt( item.GetID() ) - 1];
+    if (!line) return;
+
+    line->SetData( data );
+}
+
+wxUIntPtr wxDataViewListStore::GetItemData( const wxDataViewItem& item ) const
+{
+    wxDataViewListStoreLine* line = m_data[wxPtrToUInt( item.GetID() ) - 1];
+    if (!line) return static_cast<wxUIntPtr>(NULL);
+
+    return line->GetData();
+}
+
 void wxDataViewListStore::GetValueByRow( wxVariant &value, unsigned int row, unsigned int col ) const
 {
     wxDataViewListStoreLine *line = m_data[row];