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

Returns None if no such label was found.

[src]

Returns the position of a child with the given label.

Returns None if no such label was found.

[src]

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.

[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