From 9be6fbf5eae8c4b902b818881a4dc34f87bb630d Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 11 Nov 2023 14:37:17 +0000 Subject: decorations: Decoration Positioner (#3800) --- src/helpers/Box.hpp | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'src/helpers/Box.hpp') diff --git a/src/helpers/Box.hpp b/src/helpers/Box.hpp index 592bb417..cb07df06 100644 --- a/src/helpers/Box.hpp +++ b/src/helpers/Box.hpp @@ -39,26 +39,29 @@ class CBox { h = size.y; } - wlr_box wlr(); - wlr_box* pWlr(); + wlr_box wlr(); + wlr_box* pWlr(); - CBox& applyFromWlr(); - CBox& scale(double scale); - CBox& scaleFromCenter(double scale); - CBox& scale(const Vector2D& scale); - CBox& translate(const Vector2D& vec); - CBox& round(); - CBox& transform(const wl_output_transform t, double w, double h); - CBox& addExtents(const SWindowDecorationExtents& e); + CBox& applyFromWlr(); + CBox& scale(double scale); + CBox& scaleFromCenter(double scale); + CBox& scale(const Vector2D& scale); + CBox& translate(const Vector2D& vec); + CBox& round(); + CBox& transform(const wl_output_transform t, double w, double h); + CBox& addExtents(const SWindowDecorationExtents& e); + CBox& expand(const double& value); - Vector2D middle() const; - Vector2D pos() const; - Vector2D size() const; + SWindowDecorationExtents extentsFrom(const CBox&); // this is the big box - bool containsPoint(const Vector2D& vec) const; - bool empty() const; + Vector2D middle() const; + Vector2D pos() const; + Vector2D size() const; - double x = 0, y = 0; + bool containsPoint(const Vector2D& vec) const; + bool empty() const; + + double x = 0, y = 0; union { double w; double width; -- cgit v1.2.3