pub trait GtkListStoreExt: 'static {
    fn append(&self) -> TreeIter;
    fn clear(&self);
    fn insert(&self, position: i32) -> TreeIter;
    fn insert_after(&self, sibling: Option<&TreeIter>) -> TreeIter;
    fn insert_before(&self, sibling: Option<&TreeIter>) -> TreeIter;
    fn iter_is_valid(&self, iter: &TreeIter) -> bool;
    fn move_after(&self, iter: &TreeIter, position: Option<&TreeIter>);
    fn move_before(&self, iter: &TreeIter, position: Option<&TreeIter>);
    fn prepend(&self) -> TreeIter;
    fn remove(&self, iter: &TreeIter) -> bool;
    fn swap(&self, a: &TreeIter, b: &TreeIter);
}
Expand description

Trait containing all ListStore methods.

Implementors

ListStore

Required Methods

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 GtkListStoreExtManual::set() or GtkListStoreExtManual::set_value().

Returns
iter

An unset TreeIter to set to the appended row

Removes all rows from the list store.

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 GtkListStoreExtManual::set() or GtkListStoreExtManual::set_value().

position

position to insert the new row, or -1 for last

Returns
iter

An unset TreeIter to set to the new row

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 GtkListStoreExtManual::set() or GtkListStoreExtManual::set_value().

sibling

A valid TreeIter, or None

Returns
iter

An unset TreeIter to set to the new row

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 GtkListStoreExtManual::set() or GtkListStoreExtManual::set_value().

sibling

A valid TreeIter, or None

Returns
iter

An unset TreeIter to set to the new row

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.

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.

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.

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 GtkListStoreExtManual::set() or GtkListStoreExtManual::set_value().

Returns
iter

An unset TreeIter to set to the prepend row

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.

Swaps a and b in self. Note that this function only works with unsorted stores.

a

A TreeIter.

b

Another TreeIter.

Implementors