Loading...
Searching...
No Matches
ButtonOption Struct Reference

Option for the AnimatedButton component. More...

## Static Public Member Functions

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

## 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.

Definition at line 112 of file component_options.hpp.

## Member Function Documentation

## Ascii()

ButtonOption Ascii | ( |  | ) |

static

Create a ButtonOption, highlighted using [] characters.

Examples
  examples/component/button_style.cpp.

Definition at line 164 of file component_options.cpp.

## Simple()

ButtonOption Simple | ( |  | ) |

static

Create a ButtonOption, inverted when focused.

Examples
  examples/component/button_style.cpp.

Definition at line 177 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 192 of file component_options.cpp.

## Animated() [1/4]

ButtonOption Animated | ( |  | ) |

static

Create a ButtonOption, using animated colors.

Examples
  examples/component/button_animated.cpp, examples/component/button_in_frame.cpp, examples/component/button_style.cpp, examples/component/homescreen.cpp, examples/component/modal_dialog.cpp, and examples/component/selection.cpp.

Definition at line 210 of file component_options.cpp.

## Animated() [2/4]

ButtonOption Animated | ( | Color | color | ) |

static

Create a ButtonOption, using animated colors.

Definition at line 218 of file component_options.cpp.

## Animated() [3/4]

ButtonOption Animated | ( | Color | background,
|  | Color | foreground )

static

Create a ButtonOption, using animated colors.

Definition at line 229 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 242 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:

- include/ftxui/component/component_options.hpp
- src/ftxui/component/component_options.cpp