#include <memory>
auto screen = ScreenInteractive::Fullscreen();
int size = 40;
int size_min = 10;
int size_max = 80;
auto split = ResizableSplit({
.main = Renderer([] { return text("Left") | center; }),
.back = Renderer([] { return text("Right") | center; }),
.direction = Direction::Left,
.main_size = &size,
.min = &size_min,
.max = &size_max,
});
auto renderer = Renderer(split, [&] {
return window(text("Drag the separator with the mouse"),
vbox({
text("Min: " + std::to_string(size_min)),
text("Max: " + std::to_string(size_max)),
text("Size: " + std::to_string(size)),
separator(),
split->Render() | flex,
}));
});
screen.Loop(renderer);
}
The FTXUI ftxui:: namespace.