2022-06-12 23:08:22 +08:00
|
|
|
#include <ftxui/dom/node.hpp> // for Node, Elements
|
|
|
|
#include <memory> // for __shared_ptr_access
|
|
|
|
#include <vector> // for __alloc_traits<>::value_type
|
2021-05-02 02:40:35 +08:00
|
|
|
|
2018-10-12 15:23:37 +08:00
|
|
|
#include "ftxui/dom/node_decorator.hpp"
|
2021-05-02 02:40:35 +08:00
|
|
|
#include "ftxui/dom/requirement.hpp" // for Requirement
|
|
|
|
#include "ftxui/screen/box.hpp" // for Box
|
2018-10-12 15:23:37 +08:00
|
|
|
|
2019-01-12 22:00:08 +08:00
|
|
|
namespace ftxui {
|
2018-10-12 15:23:37 +08:00
|
|
|
|
|
|
|
void NodeDecorator::ComputeRequirement() {
|
|
|
|
Node::ComputeRequirement();
|
2021-05-16 23:18:11 +08:00
|
|
|
requirement_ = children_[0]->requirement();
|
2018-10-12 15:23:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void NodeDecorator::SetBox(Box box) {
|
|
|
|
Node::SetBox(box);
|
2021-05-16 23:18:11 +08:00
|
|
|
children_[0]->SetBox(box);
|
2018-10-12 15:23:37 +08:00
|
|
|
}
|
|
|
|
|
2020-02-12 04:44:55 +08:00
|
|
|
} // namespace ftxui
|
2020-08-16 06:24:18 +08:00
|
|
|
|
|
|
|
// 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.
|