16class Inverted :
public NodeDecorator {
20 void Render(Screen& screen)
override {
22 for (
int y = box_.y_min;
y <= box_.y_max; ++
y) {
23 for (
int x = box_.x_min; x <= box_.x_max; ++x) {
24 screen.CellAt(x,
y).inverted ^=
true;
35 return std::make_shared<Inverted>(std::move(child));
NodeDecorator(Element child)
Element inverted(Element child)
Add a filter that will invert the foreground and the background colors.
The FTXUI ftxui:: namespace.
std::shared_ptr< Node > Element
void Render(Screen &screen, Node *node, Selection &selection)