Store Role in Box

This commit is contained in:
Sasha Koshka 2024-06-03 20:42:54 -04:00
parent f2bcc217a4
commit 006921d690

View File

@ -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
}