FTXUI
5.0.0
C++ functional terminal UI.
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.
4
#include "
ftxui/dom/flexbox_config.hpp
"
5
6
namespace
ftxui
{
7
8
/// @brief Set the flexbox direction.
9
/// @ingroup dom
10
FlexboxConfig
&
FlexboxConfig::Set
(
FlexboxConfig::Direction
d) {
11
this->
direction
= d;
12
return
*
this
;
13
}
14
15
/// @brief Set the flexbox wrap.
16
/// @ingroup dom
17
FlexboxConfig
&
FlexboxConfig::Set
(
FlexboxConfig::Wrap
w) {
18
this->
wrap
= w;
19
return
*
this
;
20
}
21
22
/// @brief Set the flexbox justify content.
23
/// @ingroup dom
24
FlexboxConfig
&
FlexboxConfig::Set
(
FlexboxConfig::JustifyContent
j) {
25
this->
justify_content
= j;
26
return
*
this
;
27
}
28
29
/// @brief Set the flexbox align items.
30
/// @ingroup dom
31
FlexboxConfig
&
FlexboxConfig::Set
(
FlexboxConfig::AlignItems
a) {
32
this->
align_items
= a;
33
return
*
this
;
34
}
35
36
/// @brief Set the flexbox align content.
37
/// @ingroup dom
38
FlexboxConfig
&
FlexboxConfig::Set
(
FlexboxConfig::AlignContent
a) {
39
this->
align_content
= a;
40
return
*
this
;
41
}
42
43
/// @brief Set the flexbox flex direction.
44
/// @ingroup dom
45
FlexboxConfig
&
FlexboxConfig::SetGap
(
int
x,
int
y) {
46
this->
gap_x
= x;
47
this->
gap_y
= y;
48
return
*
this
;
49
}
50
51
}
// namespace ftxui
flexbox_config.hpp
ftxui
Definition:
animation.hpp:10
ftxui::FlexboxConfig
Definition:
flexbox_config.hpp:15
ftxui::FlexboxConfig::align_content
AlignContent align_content
Definition:
flexbox_config.hpp:93
ftxui::FlexboxConfig::gap_x
int gap_x
Definition:
flexbox_config.hpp:95
ftxui::FlexboxConfig::align_items
AlignItems align_items
Definition:
flexbox_config.hpp:77
ftxui::FlexboxConfig::AlignContent
AlignContent
Definition:
flexbox_config.hpp:82
ftxui::FlexboxConfig::Direction
Direction
Definition:
flexbox_config.hpp:20
ftxui::FlexboxConfig::direction
Direction direction
Definition:
flexbox_config.hpp:27
ftxui::FlexboxConfig::wrap
Wrap wrap
Definition:
flexbox_config.hpp:37
ftxui::FlexboxConfig::Wrap
Wrap
Definition:
flexbox_config.hpp:31
ftxui::FlexboxConfig::AlignItems
AlignItems
Definition:
flexbox_config.hpp:71
ftxui::FlexboxConfig::SetGap
FlexboxConfig & SetGap(int gap_x, int gap_y)
Set the flexbox flex direction.
Definition:
flexbox_config.cpp:45
ftxui::FlexboxConfig::gap_y
int gap_y
Definition:
flexbox_config.hpp:96
ftxui::FlexboxConfig::justify_content
JustifyContent justify_content
Definition:
flexbox_config.hpp:66
ftxui::FlexboxConfig::JustifyContent
JustifyContent
Definition:
flexbox_config.hpp:44
ftxui::FlexboxConfig::Set
FlexboxConfig & Set(FlexboxConfig::Direction)
Set the flexbox direction.
Definition:
flexbox_config.cpp:10