Package: gtk

Function gtk:list-store-insert-with-values

Lambda List

gtk:list-store-insert-with-values (model pos &rest values)

Arguments

model -- a gtk:list-store object
pos -- an integer with the position to insert the new row, or -1 to append after existing rows
values -- values to store in model

Return Value

The gtk:tree-iter iterator to the new row.

Details

Creates a new row at pos. The returned iterator will point to this new row. If pos 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 the gtk:list-store-insert-with-values function has the same effect as calling
 (let ((iter (gtk:list-store-insert model pos)))
   (gtk:list-store-set model 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" signals. Since emitting the "rows-reordered" signal repeatedly can affect the performance of the program, the gtk:list-store-insert-with-values function should generally be preferred when inserting rows in a sorted list store.

Warning

The gtk:list-store implementation is deprecated since 4.10. Use the g:list-store object instead.
 

See also

2024-4-7