FTXUI  5.0.0
C++ functional terminal UI.
node_decorator.cpp
Go to the documentation of this file.
1 // Copyright 2020 Arthur Sonzogni. All rights reserved.
2 // Use of this source code is governed by the MIT license that can be found in
3 // the LICENSE file.
4 #include <ftxui/dom/node.hpp> // for Node, Elements
5 #include <memory> // for __shared_ptr_access
6 #include <vector> // for __alloc_traits<>::value_type
7 
9 #include "ftxui/dom/requirement.hpp" // for Requirement
10 #include "ftxui/screen/box.hpp" // for Box
11 
12 namespace ftxui {
13 
16  requirement_ = children_[0]->requirement();
17 }
18 
20  Node::SetBox(box);
21  children_[0]->SetBox(box);
22 }
23 
24 } // namespace ftxui
void SetBox(Box box) override
Assign a position and a dimension to an element for drawing.
void ComputeRequirement() override
Compute how much space an elements needs.
Elements children_
Definition: node.hpp:56
virtual void SetBox(Box box)
Assign a position and a dimension to an element for drawing.
Definition: node.cpp:26
Requirement requirement_
Definition: node.hpp:57
virtual void ComputeRequirement()
Compute how much space an elements needs.
Definition: node.cpp:18