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 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 a child with the given title.

Returns None if no such label was found.

Returns the position of a child with the given label.

Returns None if no such label was found.

Looks for a subtree child with the given label.

Returns None if the given title was not found, or if it wasn't a subtree.

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