Loading...
Searching...
No Matches
component_options.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | EntryState
| arguments for |ButtonOption::transform|, |CheckboxOption::transform|, |Radiobox::transform|, |MenuEntryOption::transform|, |MenuOption::transform|. More...
struct | UnderlineOption
struct | AnimatedColorOption
| Option about a potentially animated color. More...
struct | AnimatedColorsOption
struct | MenuEntryOption
| Option for the MenuEntry component. More...
struct | MenuOption
| Option for the Menu component. More...
struct | ButtonOption
| Option for the AnimatedButton component. More...
struct | CheckboxOption
| Option for the Checkbox component. More...
struct | InputState
| Used to define style for the Input component. More...
struct | InputOption
| Option for the Input component. More...
struct | RadioboxOption
| Option for the Radiobox component. More...
struct | ResizableSplitOption
struct | SliderOption< T >
struct | WindowRenderState
struct | WindowOptions
struct | DropdownOption
| Option for the Dropdown component.A dropdown menu is a checkbox opening/closing a radiobox. More...

## Namespaces

namespace | ftxui

## Data Structure Documentation

## ftxui::EntryState

struct ftxui::EntryState

arguments for |ButtonOption::transform|, |CheckboxOption::transform|, |Radiobox::transform|, |MenuEntryOption::transform|, |MenuOption::transform|.

Examples
  examples/component/dropdown_custom.cpp, examples/component/menu_entries.cpp, and examples/component/menu_style.cpp.

Definition at line 23 of file component_options.hpp.

Data Fields
string | label | The label to display.
bool | state | The state of the button/checkbox/radiobox.
bool | active | Whether the entry is the active one.
bool | focused | Whether the entry is one focused by the user.
int | index | Index of the entry when applicable or -1.

## ftxui::AnimatedColorsOption

struct ftxui::AnimatedColorsOption

Definition at line 70 of file component_options.hpp.

Data Fields
AnimatedColorOption | background |
AnimatedColorOption | foreground |

## ftxui::MenuEntryOption

struct ftxui::MenuEntryOption

Option for the MenuEntry component.

Examples
  examples/component/menu_entries.cpp, and examples/component/menu_entries_animated.cpp.

Definition at line 77 of file component_options.hpp.

Data Fields
ConstStringRef | label = "MenuEntry" |
function< Element(const EntryState &state)> | transform |
AnimatedColorsOption | animated_colors |

## ftxui::InputState

struct ftxui::InputState

Used to define style for the Input component.

Examples
  examples/component/input_style.cpp.

Definition at line 152 of file component_options.hpp.

Data Fields
Element | element |
bool | hovered | Whether the input is hovered by the mouse.
bool | focused | Whether the input is focused by the user.
bool | is_placeholder | Whether the input is empty and displaying the placeholder.

## ftxui::ResizableSplitOption

struct ftxui::ResizableSplitOption

Definition at line 210 of file component_options.hpp.

Data Fields
Component | main |
Component | back |
Ref< Direction > | direction = Direction::Left |
Ref< int > | main_size |
function< Element()> | separator_func = [] { return ::ftxui::separator(); } |

## ftxui::SliderOption

struct ftxui::SliderOption

template<typename T>
struct ftxui::SliderOption< T >

Examples
  examples/component/scrollbar.cpp, and examples/component/slider_direction.cpp.

Definition at line 223 of file component_options.hpp.

Data Fields
Ref< T > | value |
ConstRef< T > | min = T(0) |
ConstRef< T > | max = T(100) |
ConstRef< T > | increment = (max() - min()) / 20 |
Direction | direction = Direction::Right |
Color | color_active = Color::White |
Color | color_inactive = Color::GrayDark |
function< void()> | on_change |

## ftxui::WindowRenderState

struct ftxui::WindowRenderState

Definition at line 235 of file component_options.hpp.

Data Fields
Element | inner | The element wrapped inside this window.
const string & | title | The title of the window.
bool | active = false | Whether the window is the active one.
bool | drag = false | Whether the window is being dragged.
bool | resize = false | Whether the window is being resized.
bool | hover_left = false | Whether the resizeable left side is hovered.
bool | hover_right = false | Whether the resizeable right side is hovered.
bool | hover_top = false | Whether the resizeable top side is hovered.
bool | hover_down = false | Whether the resizeable down side is hovered.

## ftxui::WindowOptions

struct ftxui::WindowOptions

Definition at line 249 of file component_options.hpp.

Data Fields
Component | inner | The component wrapped by this window.
ConstStringRef | title = "" | The title displayed by this window.
Ref< int > | left = 0 | The left side position of the window.
Ref< int > | top = 0 | The top side position of the window.
Ref< int > | width = 20 | The width of the window.
Ref< int > | height = 10 | The height of the window.
Ref< bool > | resize_left = true | Can the left side be resized?
Ref< bool > | resize_right = true | Can the right side be resized?
Ref< bool > | resize_top = true | Can the top side be resized?
Ref< bool > | resize_down = true | Can the down side be resized?
function< Element(const WindowRenderState &)> | render | An optional function to customize how the window looks like:

## ftxui::DropdownOption

struct ftxui::DropdownOption

Option for the Dropdown component.

A dropdown menu is a checkbox opening/closing a radiobox.

Definition at line 270 of file component_options.hpp.

Data Fields
Ref< bool > | open = false | Whether the dropdown is open or closed:
CheckboxOption | checkbox |
RadioboxOption | radiobox |
function< Element(bool open, Element checkbox, Element radiobox)> | transform |