#pragma once #include // for Render #include #include #include #include #include #include #include #include #include using ftxui::Renderer, ftxui::Component, ftxui::Element, ftxui::Screen; struct Panel { int x; int y; int width; int height; Component $component; Screen $screen; bool $must_clear = true; std::wstring_convert> $converter; Panel(int width, int height, int x, int y, bool must_clear=true) : x(x), y(y), width(width), height(height), $screen(width, height), $must_clear(must_clear) {}; void resize(int width, int height); void set_renderer(std::function< Element()> render); Screen &render(); std::wstring to_string(); Screen &screen(); };