ftxui::MenuOption
#include <ftxui/component/component_options.hpp>Option for the Menu component.
Examples: component/homescreen, component/menu, component/menu2, component/menu_style, component/menu_underline_animated_gallery
Summary
| Symbol | Description |
|---|---|
Direction | |
underline | |
entries | |
direction | |
elements_prefix | |
elements_infix | |
elements_postfix | |
on_change | |
on_enter | Called when the seelcted entry changes. |
focused_entry | Called when the user presses enter. |
Horizontal | |
HorizontalAnimated | |
Vertical | |
VerticalAnimated | |
Toggle |
Public Types
Direction
enum Direction { Up, Down, Left, Right };Examples: component/flexbox_gallery
Public Attributes
underline
UnderlineOption underline;entries
MenuEntryOption entries;direction
Direction direction = Down;elements_prefix
std::function< Element()> elements_prefix;elements_infix
std::function< Element()> elements_infix;elements_postfix
std::function< Element()> elements_postfix;on_change
std::function< void()> on_change;on_enter
std::function< void()> on_enter;Called when the seelcted entry changes.
Examples: component/menu
focused_entry
Ref< int > focused_entry = 0;Called when the user presses enter.
Static Functions
Horizontal
static MenuOption Horizontal();Examples: component/button, component/button_animated, component/button_style, component/canvas_animated, component/composition, component/dropdown, component/flexbox_gallery, component/homescreen, component/menu2, component/menu_multiple, component/menu_style, component/modal_dialog (+2 more)
HorizontalAnimated
static MenuOption HorizontalAnimated();Vertical
static MenuOption Vertical();Examples: component/button_in_frame, component/button_style, component/checkbox, component/checkbox_in_frame, component/collapsible, component/dropdown, component/flexbox_gallery, component/focus, component/gallery, component/homescreen, component/input, component/maybe (+10 more)
VerticalAnimated
static MenuOption VerticalAnimated();Toggle
static MenuOption Toggle();Examples: component/gallery, component/menu_style, component/tab_horizontal, component/toggle