ftxui::Node
#include <ftxui/dom/node.hpp>Node is the base class for all elements in the DOM tree.
It represents a single node in the document object model (DOM) and provides the basic structure for layout and rendering. It contains methods for computing layout requirements, setting the box dimensions, selecting content, rendering to the screen, and checking the layout status. It typically contains child elements, which are also instances of Node.
Users are expected to derive from this class to create custom elements.
A list of builtin elements can be found in the elements.hpp file.
Summary
| Symbol | Description |
|---|---|
Node | |
operator= | |
~Node | |
ComputeRequirement | Compute how much space an element needs. |
requirement | |
SetBox | Assign a position and a dimension to an element for drawing. |
Select | Compute the selection of an element. |
Render | Display an element on a ftxui::Screen. |
GetSelectedContent | |
Check |
Public Member Functions
Node
Node();Node
Node
Node
operator=
operator=
~Node
virtual ~Node();ComputeRequirement
virtual void ComputeRequirement();Compute how much space an element needs.
requirement
Requirement requirement();SetBox
Assign a position and a dimension to an element for drawing.
Select
Compute the selection of an element.
Render
Display an element on a ftxui::Screen.
Examples: component/button, component/button_animated, component/button_in_frame, component/canvas_animated, component/checkbox_in_frame, component/collapsible, component/composition, component/flexbox_gallery, component/focus, component/gallery, component/homescreen, component/input (+62 more)
GetSelectedContent
virtual std::string GetSelectedContent(Selection & selection);Check
virtual void Check(Status * status);