mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-19 18:18:09 +08:00
Implement flexbox (#277)
This implement the flexbox elements, following the HTML one. Built from them, there is also the following elements: - `paragraph` - `paragraphAlignLeft` - `paragraphAlignRight` - `paragraphAlignCenter` - `paragraphAlignJustify` This is a breaking change.
This commit is contained in:
@@ -24,6 +24,19 @@ bool Box::Contain(int x, int y) {
|
||||
y_max >= y;
|
||||
}
|
||||
|
||||
/// @return whether |other| is the same as |this|
|
||||
/// @ingroup screen
|
||||
bool Box::operator==(const Box& other) const {
|
||||
return (x_min == other.x_min) && (x_max == other.x_max) &&
|
||||
(y_min == other.y_min) && (y_max == other.y_max);
|
||||
}
|
||||
|
||||
/// @return whether |other| and |this| are different.
|
||||
/// @ingroup screen
|
||||
bool Box::operator!=(const Box& other) const {
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
} // namespace ftxui
|
||||
|
||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||
|
Reference in New Issue
Block a user