24 auto element =
text(s.label);
37 auto btn_dec_01 =
Button(
"-1", [&] { value += 1; },
Style());
38 auto btn_inc_01 =
Button(
"+1", [&] { value -= 1; },
Style());
39 auto btn_dec_10 =
Button(
"-10", [&] { value -= 10; },
Style());
40 auto btn_inc_10 =
Button(
"+10", [&] { value += 10; },
Style());
52 auto component =
Renderer(buttons, [&] {
54 text(
"value = " + std::to_string(value)),
56 buttons->Render() |
flex,
62 screen.Loop(component);
static ButtonOption Animated()
Create a ButtonOption, using animated colors.
static ScreenInteractive FitComponent()
Component Horizontal(Components children)
A list of components, drawn one by one horizontally and navigated horizontally using left/right arrow...
Component Button(ButtonOption options)
Draw a button. Execute a function when clicked.
Component Renderer(Component child, std::function< Element()>)
Return a new Component, similar to |child|, but using |render| as the Component::Render() event.
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...
Element flex(Element)
Make a child element to expand proportionally to the space left in a container.
Element bold(Element)
Use a bold font, for elements with more emphasis.
Element center(Element)
Center an element horizontally and vertically.
Element text(std::wstring text)
Display a piece of unicode text.
Element separator()
Draw a vertical or horizontal separation in between two other elements.
Element border(Element)
Draw a border around the element.
Element borderEmpty(Element)
Draw an empty border around the element.
Element vbox(Elements)
A container displaying elements vertically one by one.
The FTXUI ftxui:: namespace.
arguments for transform from |ButtonOption|, |CheckboxOption|, |RadioboxOption|, |MenuEntryOption|,...