objects/root.go
2024-09-12 14:54:14 -04:00

21 lines
531 B
Go

package objects
import "git.tebibyte.media/tomo/tomo"
var _ tomo.ContentObject = new(Root)
// Root is an object that can contain other objects. It is intended to be used
// as the root of a window in order to contain its segments.
type Root struct {
abstractContainer
}
// NewRoot creates a new container.
func NewRoot (layout tomo.Layout, children ...tomo.Object) *Container {
this := &Container { }
this.init(layout, children...)
this.box.SetRole(tomo.R("objects", "Root"))
this.box.SetTag("outer", true)
return this
}