FTXUI 7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
flexbox_config.cpp
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.
5
6namespace ftxui {
7
8/// @brief 設定 flexbox 方向。
9FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::Direction d) {
10 this->direction = d;
11 return *this;
12}
13
14/// @brief 設定 flexbox 換行。
15FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::Wrap w) {
16 this->wrap = w;
17 return *this;
18}
19
20/// @brief 設定 flexbox 內容對齊。
21FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::JustifyContent j) {
22 this->justify_content = j;
23 return *this;
24}
25
26/// @brief 設定 flexbox 項目對齊。
27FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::AlignItems a) {
28 this->align_items = a;
29 return *this;
30}
31
32/// @brief 設定 flexbox 內容對齊。
33FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::AlignContent a) {
34 this->align_content = a;
35 return *this;
36}
37
38/// @brief 設定 flexbox 彈性方向。
39FlexboxConfig& FlexboxConfig::SetGap(int x, int y) {
40 this->gap_x = x;
41 this->gap_y = y;
42 return *this;
43}
44
45} // namespace ftxui
FTXUI ftxui:: 命名空間
Definition animation.hpp:11
Direction direction
Definition elements.hpp:80
int y
Definition elements.hpp:131