Struct cursive::menu::MenuTree[][src]

pub struct MenuTree {
    pub children: Vec<MenuItem>,
}

Root of a menu tree.

Fields

Menu items

Methods

impl MenuTree
[src]

Creates a new, empty tree.

Remove every children from this tree.

Inserts an item at the given position.

Inserts a delimiter at the given position.

Adds a delimiter to the end of this tree.

Adds a delimiter to the end of this tree - chainable variant.

Adds a actionnable leaf to the end of this tree.

Inserts a leaf at the given position.

Adds a actionnable leaf to the end of this tree - chainable variant.

Inserts a subtree at the given position.

Adds a submenu to the end of this tree.

Adds a submenu to the end of this tree - chainable variant.

Looks for the child at the given position.

Returns None if i >= self.len().

Returns the item at the given position.

Returns None if i > self.len() or if the item is not a subtree.

Looks for a child with the given title.

Returns None if no such label was found.

Looks for a subtree with the given title.

Returns the position of a child with the given label.

Returns None if no such label was found.

Removes the item at the given position.

Returns the number of direct children in this node.

  • Includes delimiters.
  • Does not count nested children.

Returns true if this tree has no children.

Trait Implementations

impl Default for MenuTree
[src]

Returns the "default value" for a type. Read more

impl Clone for MenuTree
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl !Send for MenuTree

impl !Sync for MenuTree