FTXUI/include/ftxui/dom/requirement.hpp

27 lines
537 B
C++
Raw Normal View History

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