[−][src]Trait gtk::prelude::GtkListStoreExt
Required methods
fn append(&self) -> TreeIter
Appends a new row to self
. 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 GtkListStoreExt::set
or ListStore::set_value
.
iter
An unset TreeIter
to set to the appended row
fn clear(&self)
Removes all rows from the list store.
fn insert(&self, position: i32) -> TreeIter
Creates a new row at position
. iter
will be changed to point to this new
row. If position
is -1 or 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
GtkListStoreExt::set
or ListStore::set_value
.
iter
An unset TreeIter
to set to the new row
position
position to insert the new row, or -1 for last
fn insert_after(&self, sibling: Option<&TreeIter>) -> TreeIter
Inserts a new row after sibling
. If sibling
is None
, then the row will be
prepended to the beginning of the list. 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 GtkListStoreExt::set
or ListStore::set_value
.
iter
An unset TreeIter
to set to the new row
sibling
A valid TreeIter
, or None
fn insert_before(&self, sibling: Option<&TreeIter>) -> TreeIter
Inserts a new row before sibling
. If sibling
is None
, then the row will
be appended to the end of the list. 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 GtkListStoreExt::set
or ListStore::set_value
.
iter
An unset TreeIter
to set to the new row
sibling
A valid TreeIter
, or None
fn iter_is_valid(&self, iter: &TreeIter) -> bool
This function is slow. Only use it for debugging and/or testing purposes.
Checks if the given iter is a valid iter for this ListStore
.
iter
A TreeIter
.
Returns
true
if the iter is valid, false
if the iter is invalid.
fn move_after(&self, iter: &TreeIter, position: Option<&TreeIter>)
Moves iter
in self
to the position after position
. Note that this
function only works with unsorted stores. If position
is None
, iter
will be moved to the start of the list.
iter
A TreeIter
.
position
A TreeIter
or None
.
fn move_before(&self, iter: &TreeIter, position: Option<&TreeIter>)
Moves iter
in self
to the position before position
. Note that this
function only works with unsorted stores. If position
is None
, iter
will be moved to the end of the list.
iter
A TreeIter
.
position
A TreeIter
, or None
.
fn prepend(&self) -> TreeIter
Prepends a new row to self
. 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 GtkListStoreExt::set
or ListStore::set_value
.
iter
An unset TreeIter
to set to the prepend row
fn remove(&self, iter: &TreeIter) -> bool
Removes the given row from the list store. After being removed,
iter
is set to be the next valid row, or invalidated if it pointed
to the last row in self
.
iter
A valid TreeIter
Returns
true
if iter
is valid, false
if not.