4#ifndef FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
5#define FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
121 Color background_active,
122 Color foreground_active);
An adapter. Own or reference an immutable object.
An adapter. Reference a list of strings.
An adapter. Own or reference a constant string. For convenience, this class convert multiple immutabl...
An adapter. Own or reference an mutable object.
An adapter. Own or reference a constant string. For convenience, this class convert multiple mutable ...
std::function< void()> on_click
std::function< Element()> elements_prefix
MenuEntryOption entries_option
animation::easing::Function function
Ref< bool > insert
Insert or overtype character mode.
std::function< void()> on_enter
UnderlineOption underline
std::function< Element(const EntryState &state)> transform
Ref< int > cursor_position
animation::Duration duration
ConstStringListRef entries
Ref< bool > password
Obscure the input content using '*'.
std::function< Element(InputState)> transform
std::function< Element()> elements_infix
Ref< bool > open
Whether the dropdown is open or closed:
StringRef placeholder
The content of the input when it's empty.
std::function< Element()> elements_postfix
AnimatedColorsOption animated_colors
std::function< void()> on_change
StringRef content
The content of the input.
std::function< Element(bool open, Element checkbox, Element radiobox)> transform
Ref< bool > multiline
Whether the input can be multiline.
std::function< Element(const EntryState &)> transform
static ButtonOption Animated()
Create a ButtonOption, using animated colors.
static MenuOption Toggle()
Standard options for a horizontal menu with some separator. This can be useful to implement a tab bar...
static InputOption Default()
Create the default input style:
static ButtonOption Border()
Create a ButtonOption. The button is shown using a border, inverted when focused. This is the current...
void SetAnimationFunction(animation::easing::Function f)
Set how the underline should animate.
static InputOption Spacious()
A white on black style with high margins:
static CheckboxOption Simple()
Option for standard Checkbox.
static ButtonOption Simple()
Create a ButtonOption, inverted when focused.
static MenuOption Horizontal()
Standard options for a horizontal menu. This can be useful to implement a tab bar.
static MenuOption VerticalAnimated()
Standard options for an animated vertical menu. This can be useful to implement a list of selectable ...
static MenuOption Vertical()
Standard options for a vertical menu. This can be useful to implement a list of selectable items.
static ButtonOption Ascii()
Create a ButtonOption, highlighted using [] characters.
void SetAnimation(animation::Duration d, animation::easing::Function f)
Set how the underline should animate.
void SetAnimationDuration(animation::Duration d)
Set how the underline should animate.
void Set(Color inactive, Color active, animation::Duration duration=std::chrono::milliseconds(250), animation::easing::Function function=animation::easing::QuadraticInOut)
A color option that can be animated. @params _inactive The color when the component is inactive....
static MenuOption HorizontalAnimated()
Standard options for an animated horizontal menu. This can be useful to implement a tab bar.
static RadioboxOption Simple()
Option for standard Radiobox.
Option about a potentially animated color.
Option for the Checkbox component.
Option for the Dropdown component.A dropdown menu is a checkbox opening/closing a radiobox.
Option for the Radiobox component.
A class representing terminal colors.
float QuadraticInOut(float p)
std::function< float(float)> Function
std::chrono::duration< float > Duration
The FTXUI ftxui:: namespace.
std::shared_ptr< Node > Element
std::shared_ptr< ComponentBase > Component
AnimatedColorOption foreground
AnimatedColorOption background
arguments for transform from |ButtonOption|, |CheckboxOption|, |RadioboxOption|, |MenuEntryOption|,...
bool active
Whether the entry is the active one.
std::string label
The label to display.
bool focused
Whether the entry is one focused by the user.
int index
Index of the entry when applicable or -1.
bool state
The state of the button/checkbox/radiobox.
std::function< Element()> separator_func
Ref< Direction > direction
std::function< void()> on_change
animation::Duration follower_duration
animation::easing::Function leader_function
animation::Duration follower_delay
animation::Duration leader_duration
animation::easing::Function follower_function
animation::Duration leader_delay
Ref< bool > resize_down
Can the down side be resized?
Component inner
The component wrapped by this window.
Ref< bool > resize_left
Can the left side be resized?
Ref< int > height
The height of the window.
Ref< bool > resize_top
Can the top side be resized?
Ref< int > width
The width of the window.
std::function< Element(const WindowRenderState &)> render
An optional function to customize how the window looks like:
ConstStringRef title
The title displayed by this window.
Ref< bool > resize_right
Can the right side be resized?
Ref< int > left
The left side position of the window.
Ref< int > top
The top side position of the window.
bool active
Whether the window is the active one.
bool drag
Whether the window is being dragged.
bool hover_down
Whether the resizeable down side is hovered.
const std::string & title
The title of the window.
bool resize
Whether the window is being resized.
Element inner
The element wrapped inside this window.
bool hover_right
Whether the resizeable right side is hovered.
bool hover_left
Whether the resizeable left side is hovered.
bool hover_top
Whether the resizeable top side is hovered.