Skip to main content

GtkListStoreExt

Trait GtkListStoreExt 

Source
pub trait GtkListStoreExt: IsA<ListStore> + 'static {
    // Provided methods
    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

Provided Methods§

Source

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

§Returns
§iter

An unset TreeIter to set to the appended row

Source

fn clear(&self)

Removes all rows from the list store.

Source

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 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

Source

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

§sibling

A valid TreeIter, or None

§Returns
§iter

An unset TreeIter to set to the new row

Source

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

§sibling

A valid TreeIter, or None

§Returns
§iter

An unset TreeIter to set to the new row

Source

fn iter_is_valid(&self, iter: &TreeIter) -> bool

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.

Source

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.

Source

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.

Source

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

§Returns
§iter

An unset TreeIter to set to the prepend row

Source

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.

Source

fn swap(&self, a: &TreeIter, b: &TreeIter)

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

§a

A TreeIter.

§b

Another TreeIter.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§