Loading...
Searching...
No Matches
node_decorator.cpp
Go to the documentation of this file.
// Copyright 2020 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.
#include <ftxui/dom/node.hpp> // for Node, Elements
#include "ftxui/dom/node_decorator.hpp"
#include "ftxui/dom/requirement.hpp" // for Requirement
#include "ftxui/screen/box.hpp" // for Box
namespace ftxui {
void NodeDecorator::ComputeRequirement() {
Node::ComputeRequirement();
requirement_ = children_[0]->requirement();
}
void NodeDecorator::SetBox(Box box) {
Node::SetBox(box);
children_[0]->SetBox(box);
}
} // 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 elements needs.
Definition node_decorator.cpp:12
ftxui::Node::children_
Elements children_
Definition node.hpp:65
ftxui::Node::SetBox
virtual void SetBox(Box box)
Assign a position and a dimension to an element for drawing.
Definition node.cpp:43
ftxui::Node::requirement_
Requirement requirement_
Definition node.hpp:66
ftxui::Node::ComputeRequirement
virtual void ComputeRequirement()
Compute how much space an elements needs.
Definition node.cpp:21
ftxui
Definition animation.hpp:10
node.hpp
node_decorator.hpp
requirement.hpp
ftxui::Box
Definition box.hpp:9