FTXUI 6.1.9 C++ functional terminal UI.

Loading...
Searching...
No Matches
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
6#include "ftxui/dom/node_decorator.hpp"
7#include "ftxui/dom/requirement.hpp" // for Requirement
8#include "ftxui/screen/box.hpp" // for Box
9
10 namespace ftxui {
11
12 void NodeDecorator::ComputeRequirement() {
13 Node::ComputeRequirement();
14 requirement_ = children_[0]->requirement();
15}
16
17 void NodeDecorator::SetBox(Box box) {
18 Node::SetBox(box);
19 children_[0]->SetBox(box);
20}
21
22} // namespace ftxui
box.hpp
ftxui::NodeDecorator::SetBox
void SetBox(Box box) override
Assign a position and a dimension to an element for drawing.
Definition node_decorator.cpp:17
ftxui::NodeDecorator::ComputeRequirement
void ComputeRequirement() override
Compute how much space an element needs.
Definition node_decorator.cpp:12
ftxui::Node::children_
Elements children_
Definition node.hpp:79
ftxui::Node::SetBox
virtual void SetBox(Box box)
Assign a position and a dimension to an element for drawing.
Definition node.cpp:41
ftxui::Node::requirement_
Requirement requirement_
Definition node.hpp:80
ftxui::Node::ComputeRequirement
virtual void ComputeRequirement()
Compute how much space an element needs.
Definition node.cpp:20
ftxui::Box
Box is a structure that represents a rectangular area in a 2D space.
Definition box.hpp:16
ftxui
The FTXUI ftxui:: namespace.
Definition animation.hpp:10
node.hpp
node_decorator.hpp
requirement.hpp