26 void ComputeRequirement()
override {
28 requirement_ = children_[0]->requirement();
32 void SetBox(
Box box)
override {
35 children_[0]->SetBox(
box);
59 const int x = stencil.
x_max;
60 for (
int y = stencil.
y_min; y <= stencil.
y_max; ++y) {
61 const int y_up = 2 * y + 0;
62 const int y_down = 2 * y + 1;
66 const char*
c =
up ? (down ?
"┃" :
"╹") : (down ?
"╻" :
" ");
68 screen.PixelAt(x, y).character =
c;
72 return std::make_shared<Impl>(std::move(
child));
NodeDecorator(Element child)
void ComputeRequirement() override
Compute how much space an elements needs.
virtual void Render(Screen &screen)
Display an element on a ftxui::Screen.
A rectangular grid of Pixel.
Element vscroll_indicator(Element)
Add a filter that will invert the foreground and the background colors.
Decorator size(WidthOrHeight, Constraint, int value)
Apply a constraint on the size of an element.
std::shared_ptr< Node > Element
Component Slider(SliderOption< T > options)
A slider in any direction.
void Render(Screen &screen, const Element &element)
Display an element on a ftxui::Screen.
A unicode character and its associated style.