pub struct TreeModel { /* private fields */ }Expand description
A tree model whose rows are supplied as flat (parent, cells, icon) rows;
group/root rows use parent == -1, children point at their parent’s flat
row.
Implementations§
Source§impl TreeModel
impl TreeModel
Sourcepub fn bind(&self, signal: &Signal<Vec<(i32, Vec<String>, String)>>)
pub fn bind(&self, signal: &Signal<Vec<(i32, Vec<String>, String)>>)
Bind the whole tree to a signal of flat (parent, cells, icon) rows.
The subscription lives as long as the model.
Sourcepub fn bind_headers(&self, signal: &Signal<Vec<String>>)
pub fn bind_headers(&self, signal: &Signal<Vec<String>>)
Bind the column headers to a signal.
Sourcepub fn reset(&self, rows: impl IntoIterator<Item = (i32, Vec<String>, String)>)
pub fn reset(&self, rows: impl IntoIterator<Item = (i32, Vec<String>, String)>)
Imperatively replace the whole tree with flat (parent, cells, icon)
rows.
Sourcepub fn set_headers(&self, headers: impl IntoIterator<Item = String>)
pub fn set_headers(&self, headers: impl IntoIterator<Item = String>)
Replace the column headers.
Sourcepub fn set_column_alignment(&self, column: usize, align: TextAlign)
pub fn set_column_alignment(&self, column: usize, align: TextAlign)
Set the horizontal alignment of column.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TreeModel
impl !Send for TreeModel
impl !Sync for TreeModel
impl !UnwindSafe for TreeModel
impl Freeze for TreeModel
impl Unpin for TreeModel
impl UnsafeUnpin for TreeModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more