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