aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/Base.h
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-11-17 12:54:55 +0800
committerYuqian Yang <crupest@crupest.life>2025-11-17 12:54:55 +0800
commit0f8f98b9005803ab154b43dcad0db1f292072a4d (patch)
tree0a43d5a9c4e3b747ad955fc30a143aa07ab5888d /include/cru/ui/Base.h
parentb68f9f52a3ecdd8e379dd60ac1c1366e76695464 (diff)
downloadcru-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.h18
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