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 es una estructura que representa un área rectangular en un espacio 2D.
12///
13/// Se define por sus coordenadas mínimas y máximas a lo largo de los ejes x e y.
14/// Tenga en cuenta que las coordenadas son inclusivas, lo que significa que la caja incluye
15/// tanto los valores mínimos como los máximos.
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
El espacio de nombres ftxui:: de FTXUI.
Definition animation.hpp:11
int y
Definition elements.hpp:134