FTXUI
6.1.9
C++ functional terminal UI.
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
// 輔助類別。
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
Definition
node_decorator.hpp:16
ftxui::NodeDecorator::NodeDecorator
NodeDecorator(Element child)
Definition
node_decorator.hpp:18
ftxui::NodeDecorator::SetBox
void SetBox(Box box) override
為元素分配繪圖位置和尺寸。
Definition
node_decorator.cpp:17
ftxui::NodeDecorator::ComputeRequirement
void ComputeRequirement() override
計算元素所需的空間大小。
Definition
node_decorator.cpp:12
elements.hpp
ftxui::Node
節點是DOM樹中所有元素的基底類別。
Definition
node.hpp:34
ftxui::Box
Box 是一個表示二維空間中矩形區域的結構。
Definition
box.hpp:14
ftxui
FTXUI 的 ftxui:: 命名空間
Definition
animation.hpp:10
ftxui::Element
std::shared_ptr< Node > Element
Definition
elements.hpp:22
node.hpp