FTXUI  5.0.0
C++ functional terminal UI.
ButtonOption Struct Reference

Option for the AnimatedButton component. More...

Static Public Member Functions

static ButtonOption Ascii ()
 Create a ButtonOption, highlighted using [] characters. More...
 
static ButtonOption Simple ()
 Create a ButtonOption, inverted when focused. More...
 
static ButtonOption Border ()
 Create a ButtonOption. The button is shown using a border, inverted when focused. This is the current default. More...
 
static ButtonOption Animated ()
 Create a ButtonOption, using animated colors. More...
 
static ButtonOption Animated (Color color)
 Create a ButtonOption, using animated colors. More...
 
static ButtonOption Animated (Color background, Color foreground)
 Create a ButtonOption, using animated colors. More...
 
static ButtonOption Animated (Color background, Color foreground, Color background_active, Color foreground_active)
 Create a ButtonOption, using animated colors. More...
 

Data Fields

ConstStringRef label = "Button"
 
std::function< void()> on_click = [] {}
 
std::function< Element(const EntryState &)> transform
 
AnimatedColorsOption animated_colors
 

Detailed Description

Option for the AnimatedButton component.

Examples
examples/component/button.cpp.

Definition at line 112 of file component_options.hpp.

Member Function Documentation

◆ Ascii()

ButtonOption Ascii ( )
static

Create a ButtonOption, highlighted using [] characters.

Definition at line 165 of file component_options.cpp.

◆ Simple()

ButtonOption Simple ( )
static

Create a ButtonOption, inverted when focused.

Definition at line 178 of file component_options.cpp.

◆ Border()

ButtonOption Border ( )
static

Create a ButtonOption. The button is shown using a border, inverted when focused. This is the current default.

Definition at line 193 of file component_options.cpp.

◆ Animated() [1/4]

ButtonOption Animated ( )
static

Create a ButtonOption, using animated colors.

Definition at line 211 of file component_options.cpp.

◆ Animated() [2/4]

ButtonOption Animated ( Color  color)
static

Create a ButtonOption, using animated colors.

Definition at line 219 of file component_options.cpp.

◆ Animated() [3/4]

ButtonOption Animated ( Color  background,
Color  foreground 
)
static

Create a ButtonOption, using animated colors.

Definition at line 230 of file component_options.cpp.

◆ Animated() [4/4]

ButtonOption Animated ( Color  background,
Color  foreground,
Color  background_active,
Color  foreground_active 
)
static

Create a ButtonOption, using animated colors.

Definition at line 243 of file component_options.cpp.

Field Documentation

◆ label

ConstStringRef label = "Button"

Definition at line 125 of file component_options.hpp.

◆ on_click

std::function<void()> on_click = [] {}

Definition at line 126 of file component_options.hpp.

◆ transform

std::function<Element(const EntryState&)> transform

Definition at line 129 of file component_options.hpp.

◆ animated_colors

AnimatedColorsOption animated_colors

Definition at line 130 of file component_options.hpp.


The documentation for this struct was generated from the following files: