18class 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.CellAt(x,
y) = Cell();
26 screen.CellAt(x,
y).character =
" ";
39 return std::make_shared<ClearUnder>(std::move(
element));
NodeDecorator(Element child)
Element clear_under(Element element)
Before drawing |child|, clear the cells below. This is useful in combination with dbox.
The FTXUI ftxui:: namespace.
std::shared_ptr< Node > Element
void Render(Screen &screen, Node *node, Selection &selection)