GTK+ Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
#include <gtk/gtk.h> struct GtkListStore; GtkListStore* gtk_list_store_new (gint n_columns, ...); void gtk_list_store_remove (GtkListStore *store, GtkTreeIter *iter); void gtk_list_store_insert (GtkListStore *store, GtkTreeIter *iter, gint position); void gtk_list_store_insert_before (GtkListStore *store, GtkTreeIter *iter, GtkTreeIter *sibling); void gtk_list_store_insert_after (GtkListStore *store, GtkTreeIter *iter, GtkTreeIter *sibling); void gtk_list_store_prepend (GtkListStore *store, GtkTreeIter *iter); void gtk_list_store_append (GtkListStore *store, GtkTreeIter *iter); |
struct GtkListStore { GObject parent; /*< private >*/ gint stamp; gpointer root; gpointer tail; GList *sort_list; gint n_columns; gint sort_column_id; GtkSortType order; GType *column_headers; gint length; GtkTreeIterCompareFunc default_sort_func; gpointer default_sort_data; GtkDestroyNotify default_sort_destroy; }; |
GtkListStore* gtk_list_store_new (gint n_columns, ...); |
Creates a new list store as with n_columns columns each of the types passed in. As an example, gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING, GDK_TYPE_PIXBUF); will create a new GtkListStore with three columns, of type int, string and GDkPixbuf respectively.
n_columns : | number of columns in the list store |
... : | all GType types for the columns, from first to last |
Returns : | a new GtkListStore |
void gtk_list_store_remove (GtkListStore *store, GtkTreeIter *iter); |
Removes the given row from the list store, emitting the "deleted" signal on GtkTreeModel.
store : | a GtkListStore |
iter : | a row in list_store |
void gtk_list_store_insert (GtkListStore *store, GtkTreeIter *iter, gint position); |
Creates a new row at position, initializing iter to point to the new row, and emitting the "inserted" signal from the GtkTreeModel interface.
store : | a GtkListStore |
iter : | iterator to initialize with the new row |
position : | position to insert the new row |
void gtk_list_store_insert_before (GtkListStore *store, GtkTreeIter *iter, GtkTreeIter *sibling); |
Inserts a new row before sibling, initializing iter to point to the new row, and emitting the "inserted" signal from the GtkTreeModel interface.
store : | a GtkListStore |
iter : | iterator to initialize with the new row |
sibling : | an existing row |
void gtk_list_store_insert_after (GtkListStore *store, GtkTreeIter *iter, GtkTreeIter *sibling); |
Inserts a new row after sibling, initializing iter to point to the new row, and emitting the "inserted" signal from the GtkTreeModel interface.
store : | a GtkListStore |
iter : | iterator to initialize with the new row |
sibling : | an existing row |
void gtk_list_store_prepend (GtkListStore *store, GtkTreeIter *iter); |
Prepends a row to store, initializing iter to point to the new row, and emitting the "inserted" signal on the GtkTreeModel interface for the store.
store : | a GtkListStore |
iter : | iterator to initialize with new row |
void gtk_list_store_append (GtkListStore *store, GtkTreeIter *iter); |
Appends a row to store, initializing iter to point to the new row, and emitting the "inserted" signal on the GtkTreeModel interface for the store.
store : | a GtkListStore |
iter : | iterator to initialize with the new row |