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());
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, [&] {
54 text(
"value = " + std::to_string(value)),
62 screen.Loop(component);
Component Renderer(Component child, std::function< Element()>)
Return a new Component, similar to |child|, but using |render| as the Component::Render() event.
arguments for transform from |ButtonOption|, |CheckboxOption|, |RadioboxOption|, |MenuEntryOption|,...