Store role in Boxes
This commit is contained in:
@@ -27,7 +27,8 @@ func newContainer (layout tomo.Layout, children ...tomo.Object) *Container {
|
||||
// window, tab pane, etc.
|
||||
func NewOuterContainer (layout tomo.Layout, children ...tomo.Object) *Container {
|
||||
this := newContainer(layout, children...)
|
||||
tomo.Apply(this, tomo.R("objects", "Container", "outer"))
|
||||
this.SetRole(tomo.R("objects", "Container", "outer"))
|
||||
tomo.Apply(this)
|
||||
return this
|
||||
}
|
||||
|
||||
@@ -35,14 +36,16 @@ func NewOuterContainer (layout tomo.Layout, children ...tomo.Object) *Container
|
||||
// around it. It is meant to be used as a root container for a ScrollContainer.
|
||||
func NewSunkenContainer (layout tomo.Layout, children ...tomo.Object) *Container {
|
||||
this := newContainer(layout, children...)
|
||||
tomo.Apply(this, tomo.R("objects", "Container", "sunken"))
|
||||
this.SetRole(tomo.R("objects", "Container", "sunken"))
|
||||
tomo.Apply(this)
|
||||
return this
|
||||
}
|
||||
|
||||
// NewInnerContainer creates a new container that has no padding around it.
|
||||
func NewInnerContainer (layout tomo.Layout, children ...tomo.Object) *Container {
|
||||
this := newContainer(layout, children...)
|
||||
tomo.Apply(this, tomo.R("objects", "Container", "inner"))
|
||||
this.SetRole(tomo.R("objects", "Container", "inner"))
|
||||
tomo.Apply(this)
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user