ftxui::MenuOption
cpp
#include <ftxui/component/component_options.hpp>Option for the Menu component.
Examples: component/homescreen, component/menu, component/menu2, component/menu_in_frame_horizontal, component/menu_style, component/menu_underline_animated_gallery
Summary
| Symbol | Description |
|---|---|
entries | |
selected | The list of entries. |
underline | The index of the selected entry. |
entries_option | |
direction | |
elements_prefix | |
elements_infix | |
elements_postfix | |
on_change | |
on_enter | Called when the selected entry changes. |
focused_entry | Called when the user presses enter. |
Public Attributes
entries
cpp
ConstStringListRef entries;selected
cpp
Ref< int > selected = 0;The list of entries.
underline
cpp
UnderlineOption underline;The index of the selected entry.
entries_option
cpp
MenuEntryOption entries_option;direction
elements_prefix
cpp
std::function< Element()> elements_prefix;elements_infix
cpp
std::function< Element()> elements_infix;elements_postfix
cpp
std::function< Element()> elements_postfix;on_change
cpp
std::function< void()> on_change;on_enter
cpp
std::function< void()> on_enter;Called when the selected entry changes.
Examples: component/menu
focused_entry
cpp
Ref< int > focused_entry = 0;Called when the user presses enter.