FTXUI 6.1.9
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 Set the flexbox direction.
9FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::Direction d) {
10 this->direction = d;
11 return *this;
12}
13
14/// @brief Set the flexbox wrap.
15FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::Wrap w) {
16 this->wrap = w;
17 return *this;
18}
19
20/// @brief Set the flexbox justify content.
21FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::JustifyContent j) {
22 this->justify_content = j;
23 return *this;
24}
25
26/// @brief Set the flexbox align items.
27FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::AlignItems a) {
28 this->align_items = a;
29 return *this;
30}
31
32/// @brief Set the flexbox align content.
33FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::AlignContent a) {
34 this->align_content = a;
35 return *this;
36}
37
38/// @brief Set the flexbox flex direction.
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
The FTXUI ftxui:: namespace.
Definition animation.hpp:11
Direction direction
Definition elements.hpp:82
int y
Definition elements.hpp:126