pub trait TheTreeLayoutTrait: TheLayout {
// Required methods
fn set_headerless(&mut self, headerless: bool);
fn is_headerless(&self) -> bool;
fn get_node_by_id(&self, uuid: &Uuid) -> Option<&TheTreeNode>;
fn get_node_by_id_mut(&mut self, uuid: &Uuid) -> Option<&mut TheTreeNode>;
fn new_item_selected(&mut self, item: TheId);
fn get_root(&mut self) -> &mut TheTreeNode;
fn tree_node_state_changed(&mut self, id: TheId, open: bool);
fn scroll_by(&mut self, delta: Vec2<i32>);
}Expand description
TheTreeLayout specific functions.
Required Methods§
Sourcefn set_headerless(&mut self, headerless: bool)
fn set_headerless(&mut self, headerless: bool)
Set whether the root snapper should be hidden.
Sourcefn is_headerless(&self) -> bool
fn is_headerless(&self) -> bool
Returns true if the layout is headerless.
Sourcefn get_node_by_id(&self, uuid: &Uuid) -> Option<&TheTreeNode>
fn get_node_by_id(&self, uuid: &Uuid) -> Option<&TheTreeNode>
Returns a reference to the node with the given uuid (if any).
Sourcefn get_node_by_id_mut(&mut self, uuid: &Uuid) -> Option<&mut TheTreeNode>
fn get_node_by_id_mut(&mut self, uuid: &Uuid) -> Option<&mut TheTreeNode>
Returns a mutable reference to the node with the given uuid (if any).
Sourcefn new_item_selected(&mut self, item: TheId)
fn new_item_selected(&mut self, item: TheId)
Notifies the layout that a tree item was selected.
Sourcefn get_root(&mut self) -> &mut TheTreeNode
fn get_root(&mut self) -> &mut TheTreeNode
Get the root node
Sourcefn tree_node_state_changed(&mut self, id: TheId, open: bool)
fn tree_node_state_changed(&mut self, id: TheId, open: bool)
Set the state of a node