18 class ClearUnder :
public NodeDecorator {
22 void Render(Screen& screen)
override {
23 for (
int y = box_.y_min; y <= box_.y_max; ++y) {
24 for (
int x = box_.x_min; x <= box_.x_max; ++x) {
25 screen.PixelAt(x, y) = Pixel();
26 screen.PixelAt(x, y).character =
" ";
39 return std::make_shared<ClearUnder>(std::move(element));
NodeDecorator(Element child)
virtual void Render(Screen &screen)
Display an element on a ftxui::Screen.
A rectangular grid of Pixel.
Element clear_under(Element element)
Before drawing |child|, clear the pixels below. This is useful in.
std::shared_ptr< Node > Element
void Render(Screen &screen, const Element &element)
Display an element on a ftxui::Screen.