Skip to main content

TheTreeLayoutTrait

Trait TheTreeLayoutTrait 

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

Source

fn set_headerless(&mut self, headerless: bool)

Set whether the root snapper should be hidden.

Source

fn is_headerless(&self) -> bool

Returns true if the layout is headerless.

Source

fn get_node_by_id(&self, uuid: &Uuid) -> Option<&TheTreeNode>

Returns a reference to the node with the given uuid (if any).

Source

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

Source

fn new_item_selected(&mut self, item: TheId)

Notifies the layout that a tree item was selected.

Source

fn get_root(&mut self) -> &mut TheTreeNode

Get the root node

Source

fn tree_node_state_changed(&mut self, id: TheId, open: bool)

Set the state of a node

Source

fn scroll_by(&mut self, delta: Vec2<i32>)

Scroll by the given amount.

Implementors§