mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-05-06 17:21:13 +08:00
41 lines
890 B
C++
41 lines
890 B
C++
![]() |
#include "ftxui/dom/flexbox_config.hpp"
|
||
|
|
||
|
namespace ftxui {
|
||
|
|
||
|
FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::Direction d) {
|
||
|
this->direction = d;
|
||
|
return *this;
|
||
|
}
|
||
|
|
||
|
FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::Wrap w) {
|
||
|
this->wrap = w;
|
||
|
return *this;
|
||
|
}
|
||
|
|
||
|
FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::JustifyContent j) {
|
||
|
this->justify_content = j;
|
||
|
return *this;
|
||
|
}
|
||
|
|
||
|
FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::AlignItems a) {
|
||
|
this->align_items = a;
|
||
|
return *this;
|
||
|
}
|
||
|
|
||
|
FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::AlignContent a) {
|
||
|
this->align_content = a;
|
||
|
return *this;
|
||
|
}
|
||
|
|
||
|
FlexboxConfig& FlexboxConfig::SetGap(int x, int y) {
|
||
|
this->gap_x = x;
|
||
|
this->gap_y = y;
|
||
|
return *this;
|
||
|
}
|
||
|
|
||
|
} // namespace ftxui
|
||
|
|
||
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||
|
// Use of this source code is governed by the MIT license that can be found in
|
||
|
// the LICENSE file.
|