From 006921d69077a329adf4981ded3a603861b03aa4 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Mon, 3 Jun 2024 20:42:54 -0400 Subject: [PATCH] Store Role in Box --- internal/system/box.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/system/box.go b/internal/system/box.go index f08ebb0..57a74b5 100644 --- a/internal/system/box.go +++ b/internal/system/box.go @@ -19,6 +19,8 @@ type box struct { parent parent outer anyBox + role tomo.Role + bounds image.Rectangle minSize image.Point userMinSize image.Point @@ -106,6 +108,10 @@ func (this *box) MinimumSize () image.Point { return this.minSize } +func (this *box) Role () tomo.Role { + return this.role +} + func (this *box) borderSum () tomo.Inset { sum := tomo.Inset { } for _, border := range this.border { @@ -182,6 +188,10 @@ func (this *box) SetPadding (padding tomo.Inset) { this.invalidateMinimum() } +func (this *box) SetRole (role tomo.Role) { + this.role = role +} + func (this *box) SetDNDData (dat data.Data) { this.dndData = dat }