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

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

Root of a menu tree.

Fields

Menu items

Methods

impl MenuTree
[src]

[src]

Creates a new, empty tree.

[src]

Remove every children from this tree.

[src]

Inserts an item at the given position.

[src]

Inserts a delimiter at the given position.

[src]

Adds a delimiter to the end of this tree.

[src]

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

[src]

Adds a actionnable leaf to the end of this tree.

[src]

Inserts a leaf at the given position.

[src]

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

[src]

Inserts a subtree at the given position.

[src]

Adds a submenu to the end of this tree.

[src]

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

[src]

Looks for the child at the given position.

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

[src]

Returns the item at the given position.

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

[src]

Looks for a child with the given title.

Returns None if no such label was found.

[src]

Looks for a subtree with the given title.

[src]

Returns the position of a child with the given label.

Returns None if no such label was found.

[src]

Removes the item at the given position.

[src]

Returns the number of direct children in this node.

  • Includes delimiters.
  • Does not count nested children.

[src]

Returns true if this tree has no children.

Trait Implementations

impl Default for MenuTree
[src]

[src]

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

impl Clone for MenuTree
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl !Send for MenuTree

impl !Sync for MenuTree