22 auto option = ButtonOption::Animated();
23 option.transform = [](
const EntryState& s) {
46 auto buttons = Container::Vertical({
47 Container::Horizontal({btn_dec_01, btn_inc_01}, &row) | flex,
48 Container::Horizontal({btn_dec_10, btn_inc_10}, &row) | flex,
52 auto component =
Renderer(buttons, [&] {
56 buttons->Render() |
flex,
61 auto screen = App::FitComponent();
62 screen.Loop(component);
Component Button(ConstStringRef label, std::function< void()> on_click, ButtonOption options=ButtonOption::Simple())
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.
Element text(std::string_view text)
Display a piece of UTF8 encoded unicode text.
Element flex(Element child)
Make a child element to expand proportionally to the space left in a container.
Element bold(Element child)
Use a bold font, for elements with more emphasis.
Element separator()
Draw a vertical or horizontal separation in between two other elements.
Element vbox(Elements children)
A container displaying elements vertically one by one.
The FTXUI ftxui:: namespace.