16class Reflect :
public Node {
18 Reflect(
Element child, Box& box)
19 : Node(unpack(std::move(child))), reflected_box_(box) {}
21 void ComputeRequirement() final {
23 requirement_ = children_[0]->requirement();
26 void SetBox(Box box)
final {
29 children_[0]->SetBox(box);
32 void Render(Screen& screen)
final {
44 return std::make_shared<Reflect>(std::move(child), box);
virtual void SetBox(Box box)
描画のために要素に位置と次元を割り当てます。
virtual void ComputeRequirement()
要素が必要とするスペースを計算します。
friend void Render(Screen &screen, Node *node, Selection &selection)
void Render(Screen &screen, const Element &element)
要素をftxui::Screenに表示します。
static auto Intersection(Box a, Box b) -> Box
Boxは、2D空間における矩形領域を表す構造体です。
std::function< Element(Element)> Decorator
std::shared_ptr< Node > Element
Decorator reflect(Box &box)