#include <memory>
#include <string>
int main() {
int counter = 0;
auto on_click = [&] { counter++; };
for (int i = 0; i < 30; ++i) {
container->Add(button);
}
auto renderer =
Renderer(container, [&] {
}),
}) |
});
screen.Loop(renderer);
return 0;
}
static ScreenInteractive FitComponent()
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...
Element vscroll_indicator(Element)
Display a vertical scrollbar to the right. colors.
Decorator size(WidthOrHeight, Constraint, int value)
Apply a constraint on the size of an element.
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.
Element hbox(Elements)
A container displaying elements horizontally one by one.
std::string to_string(const std::wstring &s)
Convert a UTF8 std::string into a std::wstring.
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 frame(Element)
Allow an element to be displayed inside a 'virtual' area. It size can be larger than its container....
Element border(Element)
Draw a border around the element.
Element vbox(Elements)
A container displaying elements vertically one by one.