FTXUI  5.0.0
C++ functional terminal UI.
node_decorator.hpp
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#ifndef FTXUI_DOM_NODE_DECORATOR_H_
5#define FTXUI_DOM_NODE_DECORATOR_H_
6
7#include <utility> // for move
8
9#include "ftxui/dom/elements.hpp" // for Element, unpack
10#include "ftxui/dom/node.hpp" // for Node
11
12namespace ftxui {
13struct Box;
14
15// Helper class.
16class NodeDecorator : public Node {
17 public:
18 NodeDecorator(Element child) : Node(unpack(std::move(child))) {}
19 void ComputeRequirement() override;
20 void SetBox(Box box) override;
21};
22
23} // namespace ftxui
24
25#endif /* end of include guard: FTXUI_DOM_NODE_DECORATOR_H_ */
NodeDecorator(Element child)
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.
std::shared_ptr< Node > Element
Definition: elements.hpp:23