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;
30 auto renderer_non_focusable = Renderer([&] {
31 return text(
"~~~~~ Non Focusable renderer() ~~~~~");
35 auto button = Button(
"Wrapped quit button", screen.ExitLoopClosure());
36 auto renderer_wrap = Renderer(button, [&] {
37 if (button->Focused()) {
38 return button->Render() | bold | color(Color::Red);
40 return button->Render();
45 screen.Loop(Container::Vertical({
47 renderer_non_focusable,