FTXUI
5.0.0
C++ functional terminal UI.
flexbox_helper.hpp
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
#ifndef FTXUI_DOM_FLEXBOX_HELPER_HPP
5
#define FTXUI_DOM_FLEXBOX_HELPER_HPP
6
7
#include <vector>
8
#include "
ftxui/dom/flexbox_config.hpp
"
9
10
namespace
ftxui
{
11
namespace
flexbox_helper {
12
13
struct
Block
{
14
// Input:
15
int
min_size_x
= 0;
16
int
min_size_y
= 0;
17
int
flex_grow_x
= 0;
18
int
flex_grow_y
= 0;
19
int
flex_shrink_x
= 0;
20
int
flex_shrink_y
= 0;
21
22
// Output:
23
int
line
;
24
int
line_position
;
25
int
x
= 0;
26
int
y
= 0;
27
int
dim_x
= 0;
28
int
dim_y
= 0;
29
bool
overflow
=
false
;
30
};
31
32
struct
Global
{
33
std::vector<Block>
blocks
;
34
FlexboxConfig
config
;
35
int
size_x
;
36
int
size_y
;
37
};
38
39
void
Compute
(
Global
& global);
40
41
}
// namespace flexbox_helper
42
}
// namespace ftxui
43
44
#endif
/* end of include guard: FTXUI_DOM_FLEXBOX_HELPER_HPP*/
flexbox_config.hpp
ftxui::flexbox_helper::Block::y
int y
Definition:
flexbox_helper.hpp:26
ftxui::flexbox_helper::Block::flex_grow_y
int flex_grow_y
Definition:
flexbox_helper.hpp:18
ftxui::flexbox_helper::Global::size_y
int size_y
Definition:
flexbox_helper.hpp:36
ftxui::flexbox_helper::Block::min_size_y
int min_size_y
Definition:
flexbox_helper.hpp:16
ftxui::flexbox_helper::Block::line
int line
Definition:
flexbox_helper.hpp:23
ftxui::flexbox_helper::Block::overflow
bool overflow
Definition:
flexbox_helper.hpp:29
ftxui::flexbox_helper::Block::x
int x
Definition:
flexbox_helper.hpp:25
ftxui::flexbox_helper::Block::dim_x
int dim_x
Definition:
flexbox_helper.hpp:27
ftxui::flexbox_helper::Block::flex_grow_x
int flex_grow_x
Definition:
flexbox_helper.hpp:17
ftxui::flexbox_helper::Block::line_position
int line_position
Definition:
flexbox_helper.hpp:24
ftxui::flexbox_helper::Compute
void Compute(Global &global)
Definition:
flexbox_helper.cpp:354
ftxui::flexbox_helper::Block::flex_shrink_y
int flex_shrink_y
Definition:
flexbox_helper.hpp:20
ftxui::flexbox_helper::Block::min_size_x
int min_size_x
Definition:
flexbox_helper.hpp:15
ftxui::flexbox_helper::Global::blocks
std::vector< Block > blocks
Definition:
flexbox_helper.hpp:33
ftxui::flexbox_helper::Block::dim_y
int dim_y
Definition:
flexbox_helper.hpp:28
ftxui::flexbox_helper::Block::flex_shrink_x
int flex_shrink_x
Definition:
flexbox_helper.hpp:19
ftxui::flexbox_helper::Global::config
FlexboxConfig config
Definition:
flexbox_helper.hpp:34
ftxui::flexbox_helper::Global::size_x
int size_x
Definition:
flexbox_helper.hpp:35
ftxui::flexbox_helper::Block
Definition:
flexbox_helper.hpp:13
ftxui::flexbox_helper::Global
Definition:
flexbox_helper.hpp:32
ftxui
Definition:
animation.hpp:12
ftxui::FlexboxConfig
Definition:
flexbox_config.hpp:15