4#ifndef FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
5#define FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
123 Color background_active,
124 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 ...
static ButtonOption Animated()
Create a ButtonOption, using animated colors.
bool active
Whether the window is the active one.
std::function< void()> on_click
std::function< Element()> elements_prefix
static MenuOption Toggle()
Standard options for a horizontal menu with some separator. This can be useful to implement a tab bar...
animation::Duration follower_duration
animation::easing::Function leader_function
MenuEntryOption entries_option
bool drag
Whether the window is being dragged.
static InputOption Default()
Create the default input style:
animation::easing::Function function
animation::Duration follower_delay
static ButtonOption Border()
Create a ButtonOption. The button is shown using a border, inverted when focused. This is the current...
bool hover_down
Whether the resizeable down side is hovered.
const std::string & title
The title of the window.
void SetAnimationFunction(animation::easing::Function f)
Set how the underline should animate.
static InputOption Spacious()
A white on black style with high margins:
Ref< bool > insert
Insert or overtype character mode.
static CheckboxOption Simple()
Option for standard Checkbox.
bool resize
Whether the window is being resized.
std::function< void()> on_enter
Element inner
The element wrapped inside this window.
static ButtonOption Simple()
Create a ButtonOption, inverted when focused.
UnderlineOption underline
std::function< Element(const EntryState &state)> transform
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 ...
animation::Duration leader_duration
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.
Ref< int > cursor_position
animation::Duration duration
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.
ConstStringListRef entries
animation::easing::Function follower_function
bool hover_right
Whether the resizeable right side is hovered.
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
bool hover_left
Whether the resizeable left side is hovered.
std::function< void()> on_change
StringRef content
The content of the input.
bool hover_top
Whether the resizeable top side is hovered.
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....
animation::Duration leader_delay
std::function< Element(bool open, Element checkbox, Element radiobox)> transform
static MenuOption HorizontalAnimated()
Standard options for an animated horizontal menu. This can be useful to implement a tab bar.
Ref< bool > multiline
Whether the input can be multiline.
static RadioboxOption Simple()
Option for standard Radiobox.
std::function< Element(const EntryState &)> transform
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.
Option for the underline effect.
State passed to the Window component's render function.
Direction
Direction is an enumeration that represents the four cardinal directions.
Color is a class that represents a color in the terminal user interface.
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
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.