14 using namespace ftxui;
15 auto screen = ScreenInteractive::FitComponent();
21 auto renderer_focusable = Renderer([](
bool focused) {
23 return text(
"FOCUSABLE RENDERER()") | center | bold | border;
25 return text(
" Focusable renderer() ") | center | border;
29 auto renderer_non_focusable = Renderer([&] {
30 return text(
"~~~~~ Non Focusable renderer() ~~~~~");
34 auto button = Button(
"Wrapped quit button", screen.ExitLoopClosure());
35 auto renderer_wrap = Renderer(button, [&] {
36 if (button->Focused())
37 return button->Render() | bold | color(Color::Red);
39 return button->Render();
43 screen.Loop(Container::Vertical({
45 renderer_non_focusable,