FTXUI 6.1.9
C++ functional terminal UI.
载入中...
搜索中...
未找到
node_decorator.cpp
浏览该文件的文档.
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#include <ftxui/dom/node.hpp> // for Node, Elements
5
7#include "ftxui/dom/requirement.hpp" // for Requirement
8#include "ftxui/screen/box.hpp" // for Box
9
10namespace ftxui {
11
16
18 Node::SetBox(box);
19 children_[0]->SetBox(box);
20}
21
22} // namespace ftxui
void SetBox(Box box) override
为绘图元素分配位置和尺寸。
void ComputeRequirement() override
计算元素所需的空间。
Elements children_
virtual void SetBox(Box box)
为绘图元素分配位置和尺寸。
Requirement requirement_
virtual void ComputeRequirement()
计算元素所需的空间。
Box是一个表示2D空间中矩形区域的结构体。
定义 box.hpp:15
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase