4 #ifndef FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
5 #define FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
122 Color background_active,
123 Color foreground_active);
222 template <
typename T>
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 a constant string. For convenience, this class convert multiple mutable ...
float QuadraticInOut(float p)
std::function< float(float)> Function
std::chrono::duration< float > Duration
bool active
Whether the entry is the active one.
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?
AnimatedColorOption foreground
std::string label
The label to display.
bool drag
Whether the window is being dragged.
std::function< Element()> separator_func
std::shared_ptr< Node > Element
bool focused
Whether the entry is one focused by the user.
bool hover_down
Whether the resizeable down side is hovered.
std::shared_ptr< ComponentBase > Component
const std::string & title
The title of the window.
Ref< int > height
The height of the window.
bool resize
Whether the window is being resized.
Element inner
The element wrapped inside this window.
AnimatedColorOption background
std::function< Element(const EntryState &state)> transform
int index
Index of the entry when applicable or -1.
Ref< bool > resize_top
Can the top side be resized?
bool hover_right
Whether the resizeable right side is hovered.
bool hovered
Whether the input is hovered by the mouse.
Ref< int > width
The width of the window.
std::function< Element(const WindowRenderState &)> render
An optional function to customize how the window looks like:
Ref< bool > open
Whether the dropdown is open or closed:
bool state
The state of the button/checkbox/radiobox.
AnimatedColorsOption animated_colors
ConstStringRef title
The title displayed by this window.
Ref< bool > resize_right
Can the right side be resized?
bool hover_left
Whether the resizeable left side is hovered.
std::function< void()> on_change
Element separator()
Draw a vertical or horizontal separation in between two other elements.
bool hover_top
Whether the resizeable top side is hovered.
Ref< int > left
The left side position of the window.
Ref< Direction > direction
std::function< Element(bool open, Element checkbox, Element radiobox)> transform
Ref< int > top
The top side position of the window.
Decorator color(Color)
Decorate using a foreground color.
Option for the Dropdown component.A dropdown menu is a checkbox opening/closing a radiobox.
arguments for |ButtonOption::transform|, |CheckboxOption::transform|, |Radiobox::transform|,...
Option about a potentially animated color.
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....
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 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
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