FTXUI 6.1.9
C++ functional terminal UI.
Chargement...
Recherche...
Aucune correspondance
box.hpp
Aller à la documentation de ce fichier.
1// Copyright 2020 Arthur Sonzogni. Tous droits réservés.
2// L'utilisation de ce code source est régie par la licence MIT qui se trouve
3// dans le fichier LICENSE.
4#ifndef FTXUI_SCREEN_BOX_HPP
5#define FTXUI_SCREEN_BOX_HPP
6
7namespace ftxui {
8
9/// @brief Box est une structure qui représente une zone rectangulaire dans un espace 2D.
10///
11/// Elle est définie par ses coordonnées minimales et maximales le long des axes x et y.
12/// Notez que les coordonnées sont inclusives, ce qui signifie que la boîte comprend à la fois
13/// les valeurs minimales et maximales.
14///
15/// @ingroup screen
16struct Box {
17 int x_min = 0;
18 int x_max = 0;
19 int y_min = 0;
20 int y_max = 0;
21
22 static auto Intersection(Box a, Box b) -> Box;
23 static auto Union(Box a, Box b) -> Box;
24 void Shift(int x, int y);
25 bool Contain(int x, int y) const;
26 bool IsEmpty() const;
27 bool operator==(const Box& other) const;
28 bool operator!=(const Box& other) const;
29};
30
31} // namespace ftxui
32
33#endif // FTXUI_SCREEN_BOX_HPP
bool operator!=(const Box &other) const
Definition box.cpp:61
bool Contain(int x, int y) const
Definition box.cpp:42
void Shift(int x, int y)
Definition box.cpp:34
int x_max
Definition box.hpp:18
int y_min
Definition box.hpp:19
static auto Intersection(Box a, Box b) -> Box
Definition box.cpp:11
bool IsEmpty() const
Definition box.cpp:50
int y_max
Definition box.hpp:20
bool operator==(const Box &other) const
Definition box.cpp:55
static auto Union(Box a, Box b) -> Box
Definition box.cpp:22
int x_min
Definition box.hpp:17
Box est une structure qui représente une zone rectangulaire dans un espace 2D.
Definition box.hpp:16
L'espace de noms FTXUI ftxui::
Definition animation.hpp:10