17class Reflect :
public Node {
22 void ComputeRequirement()
final {
24 requirement_ = children_[0]->requirement();
27 void SetBox(Box
box)
final {
30 children_[0]->SetBox(
box);
45 return std::make_shared<Reflect>(std::move(
child),
box);
virtual void SetBox(Box box)
Assign a position and a dimension to an element for drawing.
virtual void ComputeRequirement()
Compute how much space an elements needs.
virtual void Render(Screen &screen)
Display an element on a ftxui::Screen.
std::function< Element(Element)> Decorator
std::shared_ptr< Node > Element
std::shared_ptr< T > Make(Args &&... args)
Decorator reflect(Box &box)
void Render(Screen &screen, const Element &element)
Display an element on a ftxui::Screen.
static auto Intersection(Box a, Box b) -> Box