mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-25 12:11:33 +08:00
11519ef1c6
- Fix focus in flexbox. This required resetting the focus state at the beginning of the ComputeRequirement(), because it can now run several times. This resolves:https://github.com/ArthurSonzogni/FTXUI/issues/399 - Add Box::Union. - Add a preliminary implementation of forwarding selected_box from within the flexbox.
26 lines
589 B
C++
26 lines
589 B
C++
#ifndef FTXUI_SCREEN_BOX_HPP
|
|
#define FTXUI_SCREEN_BOX_HPP
|
|
|
|
namespace ftxui {
|
|
|
|
struct Box {
|
|
int x_min = 0;
|
|
int x_max = 0;
|
|
int y_min = 0;
|
|
int y_max = 0;
|
|
|
|
static auto Intersection(Box a, Box b) -> Box;
|
|
static auto Union(Box a, Box b) -> Box;
|
|
bool Contain(int x, int y) const;
|
|
bool operator==(const Box& other) const;
|
|
bool operator!=(const Box& other) const;
|
|
};
|
|
|
|
} // namespace ftxui
|
|
|
|
#endif // FTXUI_SCREEN_BOX_HPP
|
|
|
|
// 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.
|