14 using namespace ftxui;
15 auto screen = App::FitComponent();
22 auto renderer_focusable = Renderer([](
bool focused) {
24 return text(
"FOCUSABLE RENDERER()") | center | bold | border;
26 return text(
" Focusable renderer() ") | center | border;
31 auto renderer_non_focusable = Renderer([&] {
32 return text(
"~~~~~ Non Focusable renderer() ~~~~~");
36 auto button = Button(
"Wrapped quit button", screen.ExitLoopClosure());
37 auto renderer_wrap = Renderer(button, [&] {
38 if (button->Focused()) {
39 return button->Render() | bold | color(Color::Red);
41 return button->Render();
46 screen.Loop(Container::Vertical({
48 renderer_non_focusable,