FTXUI
6.1.9
C++ functional terminal UI.
Toggle main menu visibility
Loading...
Searching...
No Matches
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
12
namespace
ftxui
{
13
struct
Box
;
14
15
// Helper class.
16
class
NodeDecorator
:
public
Node
{
17
public
:
18
explicit
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_ */
ftxui::NodeDecorator::NodeDecorator
NodeDecorator(Element child)
Definition
node_decorator.hpp:18
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::Node
Node()
elements.hpp
ftxui
Definition
animation.hpp:10
ftxui::Element
std::shared_ptr< Node > Element
Definition
elements.hpp:22
node.hpp
ftxui::Box
Definition
box.hpp:9