objects/root.go

21 lines
521 B
Go
Raw Permalink Normal View History

2024-09-12 12:07:54 -06:00
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) *Root {
this := &Root { }
2024-09-12 12:07:54 -06:00
this.init(layout, children...)
2024-09-12 12:54:14 -06:00
this.box.SetRole(tomo.R("objects", "Root"))
2024-09-12 12:07:54 -06:00
this.box.SetTag("outer", true)
return this
}