Store Role in Box
This commit is contained in:
parent
f2bcc217a4
commit
006921d690
@ -19,6 +19,8 @@ type box struct {
|
|||||||
parent parent
|
parent parent
|
||||||
outer anyBox
|
outer anyBox
|
||||||
|
|
||||||
|
role tomo.Role
|
||||||
|
|
||||||
bounds image.Rectangle
|
bounds image.Rectangle
|
||||||
minSize image.Point
|
minSize image.Point
|
||||||
userMinSize image.Point
|
userMinSize image.Point
|
||||||
@ -106,6 +108,10 @@ func (this *box) MinimumSize () image.Point {
|
|||||||
return this.minSize
|
return this.minSize
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *box) Role () tomo.Role {
|
||||||
|
return this.role
|
||||||
|
}
|
||||||
|
|
||||||
func (this *box) borderSum () tomo.Inset {
|
func (this *box) borderSum () tomo.Inset {
|
||||||
sum := tomo.Inset { }
|
sum := tomo.Inset { }
|
||||||
for _, border := range this.border {
|
for _, border := range this.border {
|
||||||
@ -182,6 +188,10 @@ func (this *box) SetPadding (padding tomo.Inset) {
|
|||||||
this.invalidateMinimum()
|
this.invalidateMinimum()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *box) SetRole (role tomo.Role) {
|
||||||
|
this.role = role
|
||||||
|
}
|
||||||
|
|
||||||
func (this *box) SetDNDData (dat data.Data) {
|
func (this *box) SetDNDData (dat data.Data) {
|
||||||
this.dndData = dat
|
this.dndData = dat
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user