FTXUI
5.0.0
C++ functional terminal UI.
|
Public Types | |
enum class | Direction { Row , RowInversed , Column , ColumnInversed } |
enum class | Wrap { NoWrap , Wrap , WrapInversed } |
enum class | JustifyContent { FlexStart , FlexEnd , Center , Stretch , SpaceBetween , SpaceAround , SpaceEvenly } |
enum class | AlignItems { FlexStart , FlexEnd , Center , Stretch } |
enum class | AlignContent { FlexStart , FlexEnd , Center , Stretch , SpaceBetween , SpaceAround , SpaceEvenly } |
Public Member Functions | |
FlexboxConfig & | Set (FlexboxConfig::Direction) |
Set the flexbox direction. More... | |
FlexboxConfig & | Set (FlexboxConfig::Wrap) |
Set the flexbox wrap. More... | |
FlexboxConfig & | Set (FlexboxConfig::JustifyContent) |
Set the flexbox justify content. More... | |
FlexboxConfig & | Set (FlexboxConfig::AlignItems) |
Set the flexbox align items. More... | |
FlexboxConfig & | Set (FlexboxConfig::AlignContent) |
Set the flexbox align content. More... | |
FlexboxConfig & | SetGap (int gap_x, int gap_y) |
Set the flexbox flex direction. More... | |
Data Fields | |
Direction | direction = Direction::Row |
Wrap | wrap = Wrap::Wrap |
JustifyContent | justify_content = JustifyContent::FlexStart |
AlignItems | align_items = AlignItems::FlexStart |
AlignContent | align_content = AlignContent::FlexStart |
int | gap_x = 0 |
int | gap_y = 0 |
Definition at line 15 of file flexbox_config.hpp.
|
strong |
This establishes the main-axis, thus defining the direction flex items are placed in the flex container. Flexbox is (aside wrapping) single-direction layout concept. Think of flex items as primarily laying out either in horizontal rows or vertical columns.
Definition at line 20 of file flexbox_config.hpp.
|
strong |
By default, flex items will all try to fit onto one line. You can change that and allow the items to wrap as needed with this property.
Enumerator | |
---|---|
NoWrap | Flex items will all try to fit onto one line. |
Wrap | Flex items will wrap onto multiple lines. |
WrapInversed | Flex items will wrap onto multiple lines, but in reverse order. |
Definition at line 31 of file flexbox_config.hpp.
|
strong |
This defines the alignment along the main axis. It helps distribute extra free space leftover when either all the flex items on a line are inflexible, or are flexible but have reached their maximum size. It also exerts some control over the alignment of items when they overflow the line.
Definition at line 44 of file flexbox_config.hpp.
|
strong |
This defines the default behavior for how flex items are laid out along the cross axis on the current line. Think of it as the justify-content version for the cross-axis (perpendicular to the main-axis).
Definition at line 71 of file flexbox_config.hpp.
|
strong |
Definition at line 82 of file flexbox_config.hpp.
FlexboxConfig & Set | ( | FlexboxConfig::Direction | d | ) |
Set the flexbox direction.
Definition at line 10 of file flexbox_config.cpp.
FlexboxConfig & Set | ( | FlexboxConfig::Wrap | w | ) |
Set the flexbox wrap.
Definition at line 17 of file flexbox_config.cpp.
FlexboxConfig & Set | ( | FlexboxConfig::JustifyContent | j | ) |
Set the flexbox justify content.
Definition at line 24 of file flexbox_config.cpp.
FlexboxConfig & Set | ( | FlexboxConfig::AlignItems | a | ) |
Set the flexbox align items.
Definition at line 31 of file flexbox_config.cpp.
FlexboxConfig & Set | ( | FlexboxConfig::AlignContent | a | ) |
Set the flexbox align content.
Definition at line 38 of file flexbox_config.cpp.
FlexboxConfig & SetGap | ( | int | gap_x, |
int | gap_y | ||
) |
Set the flexbox flex direction.
Definition at line 45 of file flexbox_config.cpp.
Direction direction = Direction::Row |
Definition at line 27 of file flexbox_config.hpp.
Wrap wrap = Wrap::Wrap |
Definition at line 37 of file flexbox_config.hpp.
JustifyContent justify_content = JustifyContent::FlexStart |
Definition at line 66 of file flexbox_config.hpp.
AlignItems align_items = AlignItems::FlexStart |
Definition at line 77 of file flexbox_config.hpp.
AlignContent align_content = AlignContent::FlexStart |
Definition at line 93 of file flexbox_config.hpp.
int gap_x = 0 |
Definition at line 95 of file flexbox_config.hpp.
int gap_y = 0 |
Definition at line 96 of file flexbox_config.hpp.