FTXUI  5.0.0
C++ functional terminal UI.
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
7namespace ftxui {
8
9struct Box {
10 int x_min = 0;
11 int x_max = 0;
12 int y_min = 0;
13 int y_max = 0;
14
15 static auto Intersection(Box a, Box b) -> Box;
16 static auto Union(Box a, Box b) -> Box;
17 bool Contain(int x, int y) const;
18 bool operator==(const Box& other) const;
19 bool operator!=(const Box& other) const;
20};
21
22} // namespace ftxui
23
24#endif // FTXUI_SCREEN_BOX_HPP
bool operator!=(const Box &other) const
Definition: box.cpp:51
bool Contain(int x, int y) const
Definition: box.cpp:35
int x_max
Definition: box.hpp:11
int y_min
Definition: box.hpp:12
static auto Intersection(Box a, Box b) -> Box
Definition: box.cpp:12
int y_max
Definition: box.hpp:13
bool operator==(const Box &other) const
Definition: box.cpp:44
static auto Union(Box a, Box b) -> Box
Definition: box.cpp:24
int x_min
Definition: box.hpp:10