12 bool checked[3] = {
false,
false,
false};
21 Slider(
"Slider", &slider, 0.f, 100.f),
29 int window_1_left = 20;
30 int window_1_top = 10;
31 int window_1_width = 40;
32 int window_1_height = 20;
36 .title =
"First window",
37 .left = &window_1_left,
39 .width = &window_1_width,
40 .height = &window_1_height,
61 auto window_5 =
Window({});
72 return text(
"window_1: " +
73 std::to_string(window_1_width) +
"x" +
74 std::to_string(window_1_height) +
" + " +
75 std::to_string(window_1_left) +
"," +
76 std::to_string(window_1_top));
It implement rendering itself as ftxui::Element. It implement keyboard navigation by responding to ft...
void Add(Component children)
Add a child. @param child The child to be attached.
static ScreenInteractive Fullscreen()
Component DummyWindowContent()
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...
Component Stacked(Components children)
A list of components to be stacked on top of each other. Events are propagated to the first component...
std::shared_ptr< T > Make(Args &&... args)
Component Renderer(Component child, std::function< Element()>)
Return a new Component, similar to |child|, but using |render| as the Component::Render() event.
Component Window(WindowOptions option)
A draggeable / resizeable window. To use multiple of them, they must be stacked using Container::Stac...
Element text(std::wstring text)
Display a piece of unicode text.
Component Slider(SliderOption< T > options)
A slider in any direction.
Component Checkbox(CheckboxOption options)
Draw checkable element.
std::shared_ptr< ComponentBase > Component