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は、2D空間における矩形領域を表す構造体です。
12///
13/// これは、x軸とy軸に沿った最小座標と最大座標によって定義されます。
14/// 座標は包括的であり、ボックスには最小値と最大値の両方が含まれることに注意してください。
15///
16/// @ingroup screen
17struct FTXUI_EXPORT(SCREEN) Box {
18 int x_min = 0;
19 int x_max = 0;
20 int y_min = 0;
21 int y_max = 0;
22
23 static auto Intersection(Box a, Box b) -> Box;
24 static auto Union(Box a, Box b) -> Box;
25 void Shift(int x, int y);
26 bool Contain(int x, int y) const;
27 bool IsEmpty() const;
28 bool operator==(const Box& other) const;
29 bool operator!=(const Box& other) const;
30};
31
32} // namespace ftxui
33
34#endif // FTXUI_SCREEN_BOX_HPP
FTXUI ftxui::名前空間
Definition animation.hpp:11
int y
Definition elements.hpp:131