FTXUI
6.0.2
C++ functional terminal UI.
Toggle main menu visibility
Tutorial
Examples
File List
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
box_helper.hpp
Go to the documentation of this file.
1
// Copyright 2021 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.line.
4
#ifndef FTXUI_DOM_BOX_HELPER_HPP
5
#define FTXUI_DOM_BOX_HELPER_HPP
6
7
#include <vector>
8
#include "
ftxui/dom/requirement.hpp
"
9
10
namespace
ftxui::box_helper
{
11
12
struct
Element
{
13
// Input:
14
int
min_size
= 0;
15
int
flex_grow
= 0;
16
int
flex_shrink
= 0;
17
18
// Output;
19
int
size
= 0;
20
};
12
struct
Element
{
…
};
21
22
void
Compute
(std::vector<Element>*
elements
,
int
target_size
);
23
}
// namespace ftxui::box_helper
24
25
#endif
/* end of include guard: FTXUI_DOM_BOX_HELPER_HPP */
ftxui::box_helper
Definition
box_helper.cpp:9
ftxui::box_helper::Element::flex_grow
int flex_grow
Definition
box_helper.hpp:15
ftxui::box_helper::Element::size
int size
Definition
box_helper.hpp:19
ftxui::box_helper::Element::flex_shrink
int flex_shrink
Definition
box_helper.hpp:16
ftxui::box_helper::Element::min_size
int min_size
Definition
box_helper.hpp:14
ftxui::box_helper::Compute
void Compute(std::vector< Element > *elements, int target_size)
Definition
box_helper.cpp:65
ftxui::box_helper::Element
Definition
box_helper.hpp:12
ftxui::Make
std::shared_ptr< T > Make(Args &&... args)
Definition
component.hpp:26
requirement.hpp