4#ifndef FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
5#define FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
121 Color background_active,
122 Color foreground_active);
A class representing terminal colors.
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 ...
float QuadraticInOut(float p)
std::function< float(float)> Function
std::chrono::duration< float > Duration
std::shared_ptr< Node > Element
std::shared_ptr< ComponentBase > Component
Decorator color(Color)
Decorate using a foreground color.
Option about a potentially animated color.
animation::easing::Function function
animation::Duration duration
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....
AnimatedColorOption foreground
AnimatedColorOption background
Option for the Checkbox component.
static CheckboxOption Simple()
Option for standard Checkbox.
std::function< void()> on_change
Called when the user change the state.
std::function< Element(const EntryState &)> transform
Option for the Dropdown component.A dropdown menu is a checkbox opening/closing a radiobox.
Ref< bool > open
Whether the dropdown is open or closed:
std::function< Element(bool open, Element checkbox, Element radiobox)> transform
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.
Option for the Radiobox component.
ConstStringListRef entries
std::function< void()> on_change
Called when the selected entry changes.
static RadioboxOption Simple()
Option for standard Radiobox.
std::function< Element(const EntryState &)> transform
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
void SetAnimationFunction(animation::easing::Function f)
Set how the underline should animate.
animation::Duration leader_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.
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.