15class Unselectable :
public NodeDecorator {
19 void Select(Selection& ignored)
override {
20 std::ignore = ignored;
40 std::min(start_x, end_x),
41 std::max(start_x, end_x),
42 std::min(start_y, end_y),
43 std::max(start_y, end_y),
57 std::min(start_x, end_x),
58 std::max(start_x, end_x),
59 std::min(start_y, end_y),
60 std::max(start_y, end_y),
76 int start_x = start_x_;
77 int start_y = start_y_;
81 const bool start_outside = !box.
Contain(start_x, start_y);
82 const bool end_outside = !box.
Contain(end_x, end_y);
83 const bool properly_ordered =
84 start_y < end_y || (start_y == end_y && start_x <= end_x);
85 if (properly_ordered) {
105 start_x, start_y, end_x, end_y, parent_,
114 int start_x = start_x_;
115 int start_y = start_y_;
119 const bool start_outside = !box.
Contain(start_x, start_y);
120 const bool end_outside = !box.
Contain(end_x, end_y);
121 const bool properly_ordered =
122 start_y < end_y || (start_y == end_y && start_x <= end_x);
124 if (properly_ordered) {
143 return {start_x, start_y, end_x, end_y, parent_};
147 if (parent_ !=
this) {
148 parent_->
AddPart(part, y, left, right);
152 if (parts_.str().empty()) {
158 parts_ <<
'\n' << part;
162 if (x_ == left + 1) {
NodeDecorator(Element child)
const Box & GetBox() const
Récupère la boîte de sélection.
void AddPart(const std::string &part, int y, int left, int right)
Selection SaturateVertical(Box box)
Sature la sélection pour qu'elle soit à l'intérieur de la boîte. Ceci est appelé par vbox pour propag...
Selection()
Crée une sélection vide.
Selection SaturateHorizontal(Box box)
Sature la sélection pour qu'elle soit à l'intérieur de la boîte. Ceci est appelé par hbox pour propag...
Représente une sélection dans une interface utilisateur de terminal.
bool Contain(int x, int y) const
Box est une structure qui représente une zone rectangulaire dans un espace 2D.
L'espace de noms FTXUI ftxui::