25 child->ComputeRequirement();
32 for (
size_t i = 1; i <
children_.size(); ++i) {
34 children_[i]->requirement().focused.enabled) {
54 child->Select(selection);
61 child->Render(screen);
76 content += child->GetSelectedContent(selection);
86 Render(screen, element.get(), selection);
93 Render(screen, node, selection);
104 node->
Check(&status);
105 const int max_iterations = 20;
116 node->
Check(&status);
125#
if defined(FTXUI_MICROSOFT_TERMINAL_FALLBACK)
178 node->
Check(&status);
179 const int max_iterations = 20;
190 node->
Check(&status);
const Box & GetBox() const
Get the box of the selection.
virtual void Select(Selection &selection)
Compute the selection of an element.
virtual std::string GetSelectedContent(Selection &selection)
virtual void SetBox(Box box)
Assign a position and a dimension to an element for drawing.
Requirement requirement()
virtual void ComputeRequirement()
Compute how much space an element needs.
virtual void Check(Status *status)
virtual void Render(Screen &screen)
Display an element on a ftxui::Screen.
friend void Render(Screen &screen, Node *node, Selection &selection)
Node is the base class for all elements in the DOM tree.
Represents a selection in a terminal user interface.
void Render(Screen &screen, const Element &element)
Display an element on a ftxui::Screen.
void SetCursor(Cursor cursor)
static auto Intersection(Box a, Box b) -> Box
A rectangular grid of Pixel.
Box is a structure that represents a rectangular area in a 2D space.
The FTXUI ftxui:: namespace.
std::string GetNodeSelectedContent(Screen &screen, Node *node, Selection &selection)
std::shared_ptr< Node > Element
std::vector< Element > Elements
Screen::Cursor::Shape cursor_shape