Crate tui_menu

Crate tui_menu 

Source
Expand description

Drop-down main menu for Ratatui.

Ratatui immediate mode split visual elements in a Widget and a WidgetState. The first holds the configuration, and never changes. The second holds the parts that can be affected by user actions.

In this case the style is found in the Widget Menu and the menu tree is found in WidgetState MenuState.

The menu tree is built with one MenuItem per possible selection. A MenuItem with children is called a group.

When a menu item is selected, this generates an event which will be stored in MenuState.events.

To define a menu, see examples in MenuState.

Structs§

Menu
Widget focus on display/render
MenuItem
MenuItem is the node in menu tree. If children is not empty, then this item is the group item.
MenuState
The state for menu, keep track of runtime info

Enums§

MenuEvent
Events this widget produce Now only emit Selected, may add few in future