mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-06-25 00:52:09 +08:00
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
// 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.
|
|
#include "ftxui/dom/flexbox_config.hpp"
|
|
|
|
namespace ftxui {
|
|
|
|
/// @brief Set the flexbox direction.
|
|
FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::Direction d) {
|
|
this->direction = d;
|
|
return *this;
|
|
}
|
|
|
|
/// @brief Set the flexbox wrap.
|
|
FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::Wrap w) {
|
|
this->wrap = w;
|
|
return *this;
|
|
}
|
|
|
|
/// @brief Set the flexbox justify content.
|
|
FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::JustifyContent j) {
|
|
this->justify_content = j;
|
|
return *this;
|
|
}
|
|
|
|
/// @brief Set the flexbox align items.
|
|
FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::AlignItems a) {
|
|
this->align_items = a;
|
|
return *this;
|
|
}
|
|
|
|
/// @brief Set the flexbox align content.
|
|
FlexboxConfig& FlexboxConfig::Set(FlexboxConfig::AlignContent a) {
|
|
this->align_content = a;
|
|
return *this;
|
|
}
|
|
|
|
/// @brief Set the flexbox flex direction.
|
|
FlexboxConfig& FlexboxConfig::SetGap(int x, int y) {
|
|
this->gap_x = x;
|
|
this->gap_y = y;
|
|
return *this;
|
|
}
|
|
|
|
} // namespace ftxui
|