insert_with_values


Description:

[ CCode ( sentinel = "-1" ) ]
[ Version ( since = "2.6" ) ]
public void insert_with_values (out TreeIter iter, int position, ...)

Creates a new row at position.

iter will be changed to point to this new row. If position is -1, or larger than the number of rows in the list, then the new row will be appended to the list. The row will be filled with the values given to this function.

Calling `gtk_list_store_insert_with_values (list_store, iter, position...)` has the same effect as calling

static void
insert_value (GtkListStore *list_store,
GtkTreeIter *iter,
int position)
{
gtk_list_store_insert (list_store, iter, position);
gtk_list_store_set (list_store,
iter
// ...
);
}
with the difference that the former will only emit a row_inserted signal, while the latter will emit row_inserted, row_changed and, if the list store is sorted, rows_reordered. Since emitting the rows_reordered signal repeatedly can affect the performance of the program, insert_with_values should generally be preferred when inserting rows in a sorted list store.

Parameters:

this

A ListStore

iter

An unset TreeIter to set to the new row, or null

position

position to insert the new row, or -1 to append after existing rows

...

pairs of column number and value, terminated with -1