FTXUI  3.0.0
C++ functional terminal UI.
Loading...
Searching...
No Matches
flexbox_helper.hpp
Go to the documentation of this file.
1#ifndef FTXUI_DOM_FLEXBOX_HELPER_HPP
2#define FTXUI_DOM_FLEXBOX_HELPER_HPP
3
4#include <vector>
6
7namespace ftxui {
8namespace flexbox_helper {
9
10struct Block {
11 // Input:
12 int min_size_x = 0;
13 int min_size_y = 0;
14 int flex_grow_x = 0;
15 int flex_grow_y = 0;
18
19 // Output:
20 int line;
22 int x = 0;
23 int y = 0;
24 int dim_x = 0;
25 int dim_y = 0;
26 bool overflow = false;
27};
28
29struct Global {
30 std::vector<Block> blocks;
32 int size_x;
33 int size_y;
34};
35
36void Compute(Global& global);
37
38} // namespace flexbox_helper
39} // namespace ftxui
40
41#endif /* end of include guard: FTXUI_DOM_FLEXBOX_HELPER_HPP*/
42
43// Copyright 2020 Arthur Sonzogni. All rights reserved.
44// Use of this source code is governed by the MIT license that can be found in
45// the LICENSE file.
void Compute(Global &global)