2023-08-19 19:56:36 +08:00
|
|
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
|
|
|
// Use of this source code is governed by the MIT license that can be found in
|
|
|
|
// the LICENSE file.
|
2019-01-20 05:06:05 +08:00
|
|
|
#ifndef FTXUI_SCREEN_BOX_HPP
|
|
|
|
#define FTXUI_SCREEN_BOX_HPP
|
|
|
|
|
|
|
|
namespace ftxui {
|
|
|
|
|
|
|
|
struct Box {
|
2021-08-08 14:49:46 +08:00
|
|
|
int x_min = 0;
|
|
|
|
int x_max = 0;
|
|
|
|
int y_min = 0;
|
|
|
|
int y_max = 0;
|
2019-01-20 05:06:05 +08:00
|
|
|
|
2022-03-31 08:17:43 +08:00
|
|
|
static auto Intersection(Box a, Box b) -> Box;
|
2022-05-23 03:41:29 +08:00
|
|
|
static auto Union(Box a, Box b) -> Box;
|
2022-03-31 08:17:43 +08:00
|
|
|
bool Contain(int x, int y) const;
|
2021-12-12 00:58:25 +08:00
|
|
|
bool operator==(const Box& other) const;
|
|
|
|
bool operator!=(const Box& other) const;
|
2019-01-20 05:06:05 +08:00
|
|
|
};
|
|
|
|
|
2020-02-12 04:44:55 +08:00
|
|
|
} // namespace ftxui
|
2019-01-20 05:06:05 +08:00
|
|
|
|
2022-03-31 08:17:43 +08:00
|
|
|
#endif // FTXUI_SCREEN_BOX_HPP
|