Details
struct GtkListStore
struct GtkListStore
{
GObject parent;
/*< private >*/
gint stamp;
gpointer root;
gpointer tail;
GList *sort_list;
gint n_columns;
gint sort_column_id;
GtkTreeSortOrder order;
GType *column_headers;
gint length;
}; |
gtk_list_store_new ()
Creates a new GtkListStore. A GtkListStore implements the
GtkTreeModel interface, and stores a linked list of
rows; each row can have any number of columns. Columns are of uniform type,
i.e. all cells in a column have the same type such as G_TYPE_STRING or
GDK_TYPE_PIXBUF. Use GtkListStore to store data to be displayed in a
GtkTreeView.
gtk_list_store_new_with_types ()
GtkListStore* gtk_list_store_new_with_types (gint n_columns,
...); |
Creates a new list store as with gtk_list_store_new(), simultaneously setting
up the columns and column types as with gtk_list_store_set_n_columns() and
gtk_list_store_set_column_type(). As an example,
gtk_tree_store_new_with_types (3, G_TYPE_INT, G_TYPE_STRING,
GTK_TYPE_PIXBUF); will create a new GtkListStore with three columns, of type
int, string and GtkPixbuf respectively.
gtk_list_store_set_n_columns ()
void gtk_list_store_set_n_columns (GtkListStore *store,
gint n_columns); |
Sets the number of columns in the GtkListStore.
gtk_list_store_set_column_type ()
void gtk_list_store_set_column_type (GtkListStore *store,
gint column,
GType type); |
Supported types include: G_TYPE_UINT, G_TYPE_INT, G_TYPE_UCHAR,
G_TYPE_CHAR, G_TYPE_BOOLEAN, G_TYPE_POINTER, G_TYPE_FLOAT,
G_TYPE_DOUBLE, G_TYPE_STRING, G_TYPE_OBJECT, and G_TYPE_BOXED, along with
subclasses of those types such as GDK_TYPE_PIXBUF.
gtk_list_store_remove ()
Removes the given row from the list store, emitting the
"deleted" signal on GtkTreeModel.
gtk_list_store_insert ()
Creates a new row at position, initializing iter to point to the
new row, and emitting the "inserted" signal from the GtkTreeModel
interface.
gtk_list_store_insert_before ()
Inserts a new row before sibling, initializing iter to point to
the new row, and emitting the "inserted" signal from the
GtkTreeModel interface.
gtk_list_store_insert_after ()
Inserts a new row after sibling, initializing iter to point to
the new row, and emitting the "inserted" signal from the
GtkTreeModel interface.
gtk_list_store_prepend ()
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.
gtk_list_store_append ()
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.