Implement most of AppendRow(), PrependRow(), InsertRow(),

DeleteRow() for GTK+ version and sorted model.
  Added tests for these.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-09-25 21:11:14 +00:00
parent 627e49c80c
commit 4627af27d4
4 changed files with 273 additions and 22 deletions

View File

@@ -783,12 +783,26 @@ bool wxGtkDataViewListModelNotifier::RowPrepended()
bool wxGtkDataViewListModelNotifier::RowInserted( size_t before )
{
return false;
GtkTreeIter iter;
iter.stamp = m_gtk_store->stamp;
iter.user_data = (gpointer) before;
GtkTreePath *path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, (gint) before);
gtk_tree_model_row_inserted (GTK_TREE_MODEL (m_gtk_store), path, &iter);
gtk_tree_path_free (path);
return true;
}
bool wxGtkDataViewListModelNotifier::RowDeleted( size_t row )
{
return false;
GtkTreePath *path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, (gint) row);
gtk_tree_model_row_deleted (GTK_TREE_MODEL (m_gtk_store), path);
gtk_tree_path_free (path);
return true;
}
bool wxGtkDataViewListModelNotifier::RowChanged( size_t row )