FTXUI 6.1.9
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// このソースコードの使用は、LICENSEファイルにあるMITライセンスに準拠します。
3#ifndef FTXUI_SCREEN_BOX_HPP
4#define FTXUI_SCREEN_BOX_HPP
5
6namespace ftxui {
7
8/// @brief Boxは、2D空間における矩形領域を表す構造体です。
9///
10/// これは、x軸とy軸に沿った最小座標と最大座標によって定義されます。
11/// 座標は包括的であり、ボックスには最小値と最大値の両方が含まれることに注意してください。
12///
13/// @ingroup screen
14struct Box {
15 int x_min = 0;
16 int x_max = 0;
17 int y_min = 0;
18 int y_max = 0;
19
20 static auto Intersection(Box a, Box b) -> Box;
21 static auto Union(Box a, Box b) -> Box;
22 void Shift(int x, int y);
23 bool Contain(int x, int y) const;
24 bool IsEmpty() const;
25 bool operator==(const Box& other) const;
26 bool operator!=(const Box& other) const;
27};
28
29} // namespace ftxui
30
31#endif // FTXUI_SCREEN_BOX_HPP
bool operator!=(const Box &other) const
Definition box.cpp:60
bool Contain(int x, int y) const
Definition box.cpp:41
void Shift(int x, int y)
Definition box.cpp:33
int x_max
Definition box.hpp:16
int y_min
Definition box.hpp:17
static auto Intersection(Box a, Box b) -> Box
Definition box.cpp:10
bool IsEmpty() const
Definition box.cpp:49
int y_max
Definition box.hpp:18
bool operator==(const Box &other) const
Definition box.cpp:54
static auto Union(Box a, Box b) -> Box
Definition box.cpp:21
int x_min
Definition box.hpp:15
Boxは、2D空間における矩形領域を表す構造体です。
Definition box.hpp:14
FTXUI ftxui:: 名前空間
Definition animation.hpp:9