2019-01-06 17:10:35 +01:00
|
|
|
#ifndef FTXUI_DOM_REQUIREMENT_HPP
|
|
|
|
|
#define FTXUI_DOM_REQUIREMENT_HPP
|
2018-09-18 08:48:40 +02:00
|
|
|
|
2019-01-19 22:06:05 +01:00
|
|
|
#include "ftxui/screen/box.hpp"
|
|
|
|
|
|
2019-01-12 15:00:08 +01:00
|
|
|
namespace ftxui {
|
2018-09-18 08:48:40 +02:00
|
|
|
|
|
|
|
|
struct Requirement {
|
2019-01-06 16:10:57 +01:00
|
|
|
// The required size to fully draw the element.
|
2020-03-23 21:26:00 +01:00
|
|
|
struct {
|
|
|
|
|
int x = 0;
|
|
|
|
|
int y = 0;
|
|
|
|
|
} min;
|
2018-09-18 08:48:40 +02:00
|
|
|
|
2019-01-06 16:10:57 +01:00
|
|
|
// How much flexibility is given to the component.
|
2020-03-23 21:26:00 +01:00
|
|
|
struct {
|
|
|
|
|
int x = 0;
|
|
|
|
|
int y = 0;
|
|
|
|
|
} flex;
|
2019-01-19 22:06:05 +01:00
|
|
|
|
|
|
|
|
// Frame.
|
|
|
|
|
enum Selection {
|
|
|
|
|
NORMAL = 0,
|
|
|
|
|
SELECTED = 1,
|
|
|
|
|
FOCUSED = 2,
|
|
|
|
|
} selection = NORMAL;
|
|
|
|
|
Box selected_box;
|
2018-09-18 08:48:40 +02:00
|
|
|
};
|
|
|
|
|
|
2020-03-23 21:26:00 +01:00
|
|
|
} // namespace ftxui
|
2018-09-18 08:48:40 +02:00
|
|
|
|
2018-10-09 19:06:03 +02:00
|
|
|
#endif /* end of include guard: FTXUI_REQUIREMENT_HPP */
|