Trait gtk::prelude::TreeStoreExt
source · [−]pub trait TreeStoreExt: 'static {
Show 13 methods
fn append(&self, parent: Option<&TreeIter>) -> TreeIter;
fn clear(&self);
fn insert(&self, parent: Option<&TreeIter>, position: i32) -> TreeIter;
fn insert_after(
&self,
parent: Option<&TreeIter>,
sibling: Option<&TreeIter>
) -> TreeIter;
fn insert_before(
&self,
parent: Option<&TreeIter>,
sibling: Option<&TreeIter>
) -> TreeIter;
fn is_ancestor(&self, iter: &TreeIter, descendant: &TreeIter) -> bool;
fn iter_depth(&self, iter: &TreeIter) -> i32;
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, parent: Option<&TreeIter>) -> TreeIter;
fn remove(&self, iter: &TreeIter) -> bool;
fn swap(&self, a: &TreeIter, b: &TreeIter);
}
Expand description
Required Methods
Appends a new row to self
. If parent
is non-None
, then it will append the
new row after the last child of parent
, otherwise it will append a row to
the top level. 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
TreeStoreExtManual::set()
or TreeStoreExtManual::set_value()
.
parent
Returns
iter
An unset TreeIter
to set to the appended row
Creates a new row at position
. If parent is non-None
, then the row will be
made a child of parent
. Otherwise, the row will be created at the toplevel.
If position
is -1 or is larger than the number of rows at that level, then
the new row will be inserted 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 TreeStoreExtManual::set()
or
TreeStoreExtManual::set_value()
.
parent
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 parent
’s children. If parent
and sibling
are None
, then
the row will be prepended to the toplevel. If both sibling
and parent
are
set, then parent
must be the parent of sibling
. When sibling
is set,
parent
is optional.
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
TreeStoreExtManual::set()
or TreeStoreExtManual::set_value()
.
parent
sibling
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 parent
’s children. If parent
and sibling
are None
, then
the row will be appended to the toplevel. If both sibling
and parent
are
set, then parent
must be the parent of sibling
. When sibling
is set,
parent
is optional.
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
TreeStoreExtManual::set()
or TreeStoreExtManual::set_value()
.
parent
sibling
Returns
iter
An unset TreeIter
to set to the new row
fn is_ancestor(&self, iter: &TreeIter, descendant: &TreeIter) -> bool
fn is_ancestor(&self, iter: &TreeIter, descendant: &TreeIter) -> bool
fn iter_depth(&self, iter: &TreeIter) -> i32
fn iter_depth(&self, iter: &TreeIter) -> i32
fn iter_is_valid(&self, iter: &TreeIter) -> bool
fn iter_is_valid(&self, iter: &TreeIter) -> bool
fn move_after(&self, iter: &TreeIter, position: Option<&TreeIter>)
fn move_after(&self, iter: &TreeIter, position: Option<&TreeIter>)
fn move_before(&self, iter: &TreeIter, position: Option<&TreeIter>)
fn move_before(&self, iter: &TreeIter, position: Option<&TreeIter>)
Prepends a new row to self
. If parent
is non-None
, then it will prepend
the new row before the first child of parent
, otherwise it will prepend a row
to the top level. 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 TreeStoreExtManual::set()
or TreeStoreExtManual::set_value()
.
parent
Returns
iter
An unset TreeIter
to set to the prepended row