ftxui::ButtonOption
cpp
#include <ftxui/component/component_options.hpp>Option for the AnimatedButton component.
Examples: component/button, component/button_animated, component/button_in_frame, component/button_style, component/homescreen, component/modal_dialog, component/selection, component/terminal_info
Summary
| Symbol | Description |
|---|---|
label | |
on_click | |
transform | |
animated_colors | |
Ascii | Create a ButtonOption, highlighted using [] characters. |
Simple | Create a ButtonOption, inverted when focused. |
Border | Create a ButtonOption. The button is shown using a border, inverted when focused. This is the current default. |
Animated | Create a ButtonOption, using animated colors. |
Public Attributes
label
cpp
ConstStringRef label = "Button";on_click
cpp
std::function< void()> on_click = [] {};transform
cpp
std::function< Element(const EntryState &)> transform;animated_colors
cpp
AnimatedColorsOption animated_colors;Static Functions
Ascii
cpp
static ButtonOption Ascii();Create a ButtonOption, highlighted using [] characters.
Simple
cpp
static ButtonOption Simple();Create a ButtonOption, inverted when focused.
Border
cpp
static ButtonOption Border();Create a ButtonOption. The button is shown using a border, inverted when focused. This is the current default.
Animated
cpp
static ButtonOption Animated();Create a ButtonOption, using animated colors.
Animated
cpp
static ButtonOption Animated(Color color);Create a ButtonOption, using animated colors.
Animated
cpp
static ButtonOption Animated(Color background, Color foreground);Create a ButtonOption, using animated colors.
Animated
cpp
static ButtonOption Animated(Color background, Color foreground, Color background_active, Color foreground_active);Create a ButtonOption, using animated colors.