diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-11-17 12:54:55 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-11-17 12:54:55 +0800 |
| commit | 0f8f98b9005803ab154b43dcad0db1f292072a4d (patch) | |
| tree | 0a43d5a9c4e3b747ad955fc30a143aa07ab5888d /include/cru/ui/Base.h | |
| parent | b68f9f52a3ecdd8e379dd60ac1c1366e76695464 (diff) | |
| download | cru-0f8f98b9005803ab154b43dcad0db1f292072a4d.tar.gz cru-0f8f98b9005803ab154b43dcad0db1f292072a4d.tar.bz2 cru-0f8f98b9005803ab154b43dcad0db1f292072a4d.zip | |
Refactor window host.
Diffstat (limited to 'include/cru/ui/Base.h')
| -rw-r--r-- | include/cru/ui/Base.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/include/cru/ui/Base.h b/include/cru/ui/Base.h index 3f270b39..9e24cfa2 100644 --- a/include/cru/ui/Base.h +++ b/include/cru/ui/Base.h @@ -35,12 +35,9 @@ namespace colors = cru::platform::colors; namespace controls { class Control; +class Window; } // namespace controls -namespace host { -class WindowHost; -} - //-------------------- region: basic types -------------------- enum class Direction { Horizontal, Vertical }; enum class Alignment { Start, End, Center, Stretch }; @@ -67,21 +64,12 @@ struct CornerRadius { return *this; } + bool operator==(const CornerRadius& other) const = default; + Point left_top; Point right_top; Point left_bottom; Point right_bottom; }; -inline bool operator==(const CornerRadius& left, const CornerRadius& right) { - return left.left_top == right.left_top && - left.left_bottom == right.left_bottom && - left.right_top == right.right_top && - left.right_bottom == right.right_bottom; -} - -inline bool operator!=(const CornerRadius& left, const CornerRadius& right) { - return !(left == right); -} - } // namespace cru::ui |
