FTXUI 7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
box.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_SCREEN_BOX_HPP
5#define FTXUI_SCREEN_BOX_HPP
6
8
9namespace ftxui {
10
11/// @brief Box est une structure qui représente une zone rectangulaire dans un espace 2D.
12///
13/// Elle est définie par ses coordonnées minimales et maximales le long des axes x et y.
14/// Notez que les coordonnées sont inclusives, ce qui signifie que la boîte comprend à la fois
15/// les valeurs minimales et maximales.
16///
17/// @ingroup screen
18struct FTXUI_EXPORT(SCREEN) Box {
19 int x_min = 0;
20 int x_max = 0;
21 int y_min = 0;
22 int y_max = 0;
23
24 static auto Intersection(Box a, Box b) -> Box;
25 static auto Union(Box a, Box b) -> Box;
26 void Shift(int x, int y);
27 bool Contain(int x, int y) const;
28 bool IsEmpty() const;
29 bool operator==(const Box& other) const;
30 bool operator!=(const Box& other) const;
31};
32
33} // namespace ftxui
34
35#endif // FTXUI_SCREEN_BOX_HPP
L'espace de noms FTXUI ftxui::
Definition animation.hpp:11
int y
Definition elements.hpp:134