FTXUI
6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
composite_decorator.cpp
Go to the documentation of this file.
1
// Copyright 2020 Arthur Sonzogni. 全著作権所有。
2
// このソースコードの使用は、以下に記載されているMITライセンスに準拠します。
3
// LICENSEファイル。
4
5
#include <utility>
// for move
6
7
#include "
ftxui/dom/elements.hpp
"
// for Element, filler, operator|, hbox, flex_grow, vbox, xflex_grow, yflex_grow, align_right, center, hcenter, vcenter
8
9
namespace
ftxui
{
10
11
/// @brief 要素を水平方向に中央揃えします。
12
/// @param child 装飾される要素。
13
/// @return 中央揃えされた要素。
14
/// @ingroup dom
15
Element
hcenter
(
Element
child) {
16
return
hbox
(
filler
(), std::move(child),
filler
());
17
}
18
19
/// @brief 要素を垂直方向に中央揃えします。
20
/// @param child 装飾される要素。
21
/// @return 中央揃えされた要素。
22
/// @ingroup dom
23
Element
vcenter
(
Element
child) {
24
return
vbox
(
filler
(), std::move(child),
filler
());
25
}
26
27
/// @brief 要素を水平方向および垂直方向に中央揃えします。
28
/// @param child 装飾される要素。
29
/// @return 中央揃えされた要素。
30
/// @ingroup dom
31
Element
center
(
Element
child) {
32
return
hcenter
(
vcenter
(std::move(child)));
33
}
34
35
/// @brief 要素を右側に揃えます。
36
/// @param child 装飾される要素。
37
/// @return 右揃えされた要素。
38
/// @ingroup dom
39
Element
align_right
(
Element
child) {
40
return
hbox
(
filler
(), std::move(child));
41
}
42
43
}
// namespace ftxui
elements.hpp
ftxui::center
Element center(Element)
要素を水平方向および垂直方向に中央揃えします。
Definition
composite_decorator.cpp:31
ftxui::align_right
Element align_right(Element)
要素を右側に揃えます。
Definition
composite_decorator.cpp:39
ftxui::filler
Element filler()
コンテナに残されたスペースに比例して拡大する要素。
Definition
flex.cpp:96
ftxui::vcenter
Element vcenter(Element)
要素を垂直方向に中央揃えします。
Definition
composite_decorator.cpp:23
ftxui::hcenter
Element hcenter(Element)
要素を水平方向に中央揃えします。
Definition
composite_decorator.cpp:15
ftxui::vbox
Element vbox(Elements)
要素を縦に一つずつ表示するコンテナ。
Definition
vbox.cpp:94
ftxui
FTXUI ftxui:: 名前空間
Definition
animation.hpp:9
ftxui::Element
std::shared_ptr< Node > Element
Definition
elements.hpp:21
ftxui::hbox
Element hbox(Elements)
要素を水平方向に1つずつ表示するコンテナ。
Definition
hbox.cpp:93