
@c %start of fragment

@deftp Class <gtk-list-store>
Derives from @code{<gtk-buildable>}, @code{<gtk-tree-model>},
@code{<gtk-tree-drag-source>}, @code{<gtk-tree-drag-dest>},
@code{<gtk-tree-sortable>}, @code{<gobject>}.

This class defines no properties, other than those defined by its superclasses.

@end deftp

@deffn Function gtk-list-store-new  (types@tie{}@code{scm}) @result{}@tie{} (ret@tie{}@code{<gtk-list-store>})
Creates a new list store as with @var{n-columns} columns each of the types
passed in. Note that only types derived from standard GObject fundamental types
are supported.

As an example, @samp{gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
GDK_TYPE_PIXBUF);} will create a new @code{<gtk-list-store>} with three columns,
of type int, string and @code{<gdk-pixbuf>} respectively.

@table @var
@item n-columns
number of columns in the list store

@item ...
all @code{<g-type>} types for the columns, from first to last

@item ret
a new @code{<gtk-list-store>}

@end table

@end deffn

@deffn Function gtk-list-store-set-value  (self@tie{}@code{<gtk-list-store>}) (iter@tie{}@code{<gtk-tree-iter>}) (column@tie{}@code{int}) (value@tie{}@code{scm})
@deffnx Method set-value
Sets the data in the cell specified by @var{iter} and @var{column}. The type of
@var{value} must be convertible to the type of the column.

@table @var
@item list-store
A @code{<gtk-list-store>}

@item iter
A valid @code{<gtk-tree-iter>} for the row being modified

@item column
column number to modify

@item value
new value for the cell

@end table

@end deffn

@deffn Function gtk-list-store-remove  (self@tie{}@code{<gtk-list-store>}) (iter@tie{}@code{<gtk-tree-iter>}) @result{}@tie{} (ret@tie{}@code{<gtk-tree-iter>})
@deffnx Method remove
Removes the given row from the list store. After being removed, @var{iter} is
set to be the next valid row, or invalidated if it pointed to the last row in
@var{list-store}.

@table @var
@item list-store
A @code{<gtk-list-store>}

@item iter
A valid @code{<gtk-tree-iter>}

@item ret
@samp{@code{#t}} if @var{iter} is valid, @samp{@code{#f}} if not.

@end table

@end deffn

@deffn Function gtk-list-store-insert  (self@tie{}@code{<gtk-list-store>}) (position@tie{}@code{int}) @result{}@tie{} (ret@tie{}@code{<gtk-tree-iter>})
@deffnx Method insert
Creates a new row at @var{position}. @var{iter} will be changed to point to this
new row. If @var{position} is larger than the number of rows on the list, then
the new row will be appended to the list. The row will be empty after this
function is called. To fill in values, you need to call
@code{gtk-list-store-set} or @code{gtk-list-store-set-value}.

@table @var
@item list-store
A @code{<gtk-list-store>}

@item iter
An unset @code{<gtk-tree-iter>} to set to the new row

@item position
position to insert the new row

@end table

@end deffn

@deffn Function gtk-list-store-insert-before  (self@tie{}@code{<gtk-list-store>}) (sibling@tie{}@code{<gtk-tree-iter>}) @result{}@tie{} (ret@tie{}@code{<gtk-tree-iter>})
@deffnx Method insert-before
Inserts a new row before @var{sibling}. If @var{sibling} is @samp{@code{#f}},
then the row will be appended to the end of the list. @var{iter} will be changed
to point to this new row. The row will be empty after this function is called.
To fill in values, you need to call @code{gtk-list-store-set} or
@code{gtk-list-store-set-value}.

@table @var
@item list-store
A @code{<gtk-list-store>}

@item iter
An unset @code{<gtk-tree-iter>} to set to the new row

@item sibling
A valid @code{<gtk-tree-iter>}, or @samp{@code{#f}}

@end table

@end deffn

@deffn Function gtk-list-store-insert-after  (self@tie{}@code{<gtk-list-store>}) (sibling@tie{}@code{<gtk-tree-iter>}) @result{}@tie{} (ret@tie{}@code{<gtk-tree-iter>})
@deffnx Method insert-after
Inserts a new row after @var{sibling}. If @var{sibling} is @samp{@code{#f}},
then the row will be prepended to the beginning of the list. @var{iter} will be
changed to point to this new row. The row will be empty after this function is
called. To fill in values, you need to call @code{gtk-list-store-set} or
@code{gtk-list-store-set-value}.

@table @var
@item list-store
A @code{<gtk-list-store>}

@item iter
An unset @code{<gtk-tree-iter>} to set to the new row

@item sibling
A valid @code{<gtk-tree-iter>}, or @samp{@code{#f}}

@end table

@end deffn

@deffn Function gtk-list-store-prepend  (self@tie{}@code{<gtk-list-store>}) @result{}@tie{} (ret@tie{}@code{<gtk-tree-iter>})
@deffnx Method prepend
Prepends a new row to @var{list-store}. @var{iter} will be changed to point to
this new row. The row will be empty after this function is called. To fill in
values, you need to call @code{gtk-list-store-set} or
@code{gtk-list-store-set-value}.

@table @var
@item list-store
A @code{<gtk-list-store>}

@item iter
An unset @code{<gtk-tree-iter>} to set to the prepend row

@end table

@end deffn

@deffn Function gtk-list-store-append  (self@tie{}@code{<gtk-list-store>}) @result{}@tie{} (ret@tie{}@code{<gtk-tree-iter>})
@deffnx Method append
Appends a new row to @var{list-store}. @var{iter} will be changed to point to
this new row. The row will be empty after this function is called. To fill in
values, you need to call @code{gtk-list-store-set} or
@code{gtk-list-store-set-value}.

@table @var
@item list-store
A @code{<gtk-list-store>}

@item iter
An unset @code{<gtk-tree-iter>} to set to the appended row

@end table

@end deffn

@deffn Function gtk-list-store-clear  (self@tie{}@code{<gtk-list-store>})
@deffnx Method clear
Removes all rows from the list store.

@table @var
@item list-store
a @code{<gtk-list-store>}.

@end table

@end deffn

@deffn Function gtk-list-store-iter-is-valid  (self@tie{}@code{<gtk-list-store>}) (iter@tie{}@code{<gtk-tree-iter>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method iter-is-valid
@c (warning "This function is slow. Only use it for debugging and/or testing
purposes.")

Checks if the given iter is a valid iter for this @code{<gtk-list-store>}.

@table @var
@item list-store
A @code{<gtk-list-store>}.

@item iter
A @code{<gtk-tree-iter>}.

@item ret
@samp{@code{#t}} if the iter is valid, @samp{@code{#f}} if the iter is invalid.

@end table

Since 2.2

@end deffn

@deffn Function gtk-list-store-reorder  (self@tie{}@code{<gtk-list-store>}) @result{}@tie{} (new_order@tie{}@code{int})
@deffnx Method reorder
Reorders @var{store} to follow the order indicated by @var{new-order}. Note that
this function only works with unsorted stores.

@table @var
@item store
A @code{<gtk-list-store>}.

@item new-order
an array of integers mapping the new position of each child to its old position
before the re-ordering, i.e. @var{new-order}@samp{[newpos] = oldpos}.

@end table

Since 2.2

@end deffn

@deffn Function gtk-list-store-swap  (self@tie{}@code{<gtk-list-store>}) (a@tie{}@code{<gtk-tree-iter>}) (b@tie{}@code{<gtk-tree-iter>})
@deffnx Method swap
Swaps @var{a} and @var{b} in @var{store}. Note that this function only works
with unsorted stores.

@table @var
@item store
A @code{<gtk-list-store>}.

@item a
A @code{<gtk-tree-iter>}.

@item b
Another @code{<gtk-tree-iter>}.

@end table

Since 2.2

@end deffn

@deffn Function gtk-list-store-move-before  (self@tie{}@code{<gtk-list-store>}) (iter@tie{}@code{<gtk-tree-iter>}) (position@tie{}@code{<gtk-tree-iter>})
@deffnx Method move-before
Moves @var{iter} in @var{store} to the position before @var{position}. Note that
this function only works with unsorted stores. If @var{position} is
@samp{@code{#f}}, @var{iter} will be moved to the end of the list.

@table @var
@item store
A @code{<gtk-list-store>}.

@item iter
A @code{<gtk-tree-iter>}.

@item position
A @code{<gtk-tree-iter>}, or @samp{@code{#f}}.

@end table

Since 2.2

@end deffn

@deffn Function gtk-list-store-move-after  (self@tie{}@code{<gtk-list-store>}) (iter@tie{}@code{<gtk-tree-iter>}) (position@tie{}@code{<gtk-tree-iter>})
@deffnx Method move-after
Moves @var{iter} in @var{store} to the position after @var{position}. Note that
this function only works with unsorted stores. If @var{position} is
@samp{@code{#f}}, @var{iter} will be moved to the start of the list.

@table @var
@item store
A @code{<gtk-list-store>}.

@item iter
A @code{<gtk-tree-iter>}.

@item position
A @code{<gtk-tree-iter>} or @samp{@code{#f}}.

@end table

Since 2.2

@end deffn


@c %end of fragment
