13 using namespace ftxui;
14 auto screen = ScreenInteractive::FitComponent();
18 auto renderer_focusable = Renderer([](
bool focused) {
20 return text(
"FOCUSABLE RENDERER()") | center | bold |
border;
22 return text(
" Focusable renderer() ") | center |
border;
27 auto renderer_non_focusable = Renderer([&] {
28 return text(
"~~~~~ Non Focusable renderer() ~~~~~");
32 auto button = Button(
"Wrapped quit button", screen.ExitLoopClosure());
33 auto renderer_wrap = Renderer(button, [&] {
34 if (button->Focused()) {
35 return button->Render() | bold |
color(Color::Red);
37 return button->Render();
42 screen.Loop(Container::Vertical({
44 renderer_non_focusable,