FTXUI
5.0.0
C++ functional terminal UI.
requirement.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_REQUIREMENT_HPP
5
#define FTXUI_DOM_REQUIREMENT_HPP
6
7
#include "
ftxui/screen/box.hpp
"
8
9
namespace
ftxui
{
10
11
struct
Requirement
{
12
// The required size to fully draw the element.
13
int
min_x
= 0;
14
int
min_y
= 0;
15
16
// How much flexibility is given to the component.
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
// Focus management to support the frame/focus/select element.
23
enum
Selection
{
24
NORMAL
= 0,
25
SELECTED
= 1,
26
FOCUSED
= 2,
27
};
28
Selection
selection
=
NORMAL
;
29
Box
selected_box
;
30
};
31
32
}
// namespace ftxui
33
34
#endif
// FTXUI_DOM_REQUIREMENT_HPP
box.hpp
ftxui
Definition:
animation.hpp:10
ftxui::Box
Definition:
box.hpp:9
ftxui::Requirement
Definition:
requirement.hpp:11
ftxui::Requirement::flex_grow_y
int flex_grow_y
Definition:
requirement.hpp:18
ftxui::Requirement::Selection
Selection
Definition:
requirement.hpp:23
ftxui::Requirement::SELECTED
@ SELECTED
Definition:
requirement.hpp:25
ftxui::Requirement::NORMAL
@ NORMAL
Definition:
requirement.hpp:24
ftxui::Requirement::FOCUSED
@ FOCUSED
Definition:
requirement.hpp:26
ftxui::Requirement::selection
Selection selection
Definition:
requirement.hpp:28
ftxui::Requirement::min_y
int min_y
Definition:
requirement.hpp:14
ftxui::Requirement::flex_grow_x
int flex_grow_x
Definition:
requirement.hpp:17
ftxui::Requirement::min_x
int min_x
Definition:
requirement.hpp:13
ftxui::Requirement::flex_shrink_y
int flex_shrink_y
Definition:
requirement.hpp:20
ftxui::Requirement::flex_shrink_x
int flex_shrink_x
Definition:
requirement.hpp:19
ftxui::Requirement::selected_box
Box selected_box
Definition:
requirement.hpp:29