22 lines
602 B
Go
22 lines
602 B
Go
package objects
|
|
|
|
import "git.tebibyte.media/tomo/tomo"
|
|
|
|
var _ tomo.ContentObject = new(Container)
|
|
|
|
// Container is an object that can contain other objects. It is plain looking,
|
|
// and is intended to be used within other containers as a primitive for
|
|
// building more complex layouts.
|
|
type Container struct {
|
|
abstractContainer
|
|
}
|
|
|
|
// NewContainer creates a new container.
|
|
func NewContainer (layout tomo.Layout, children ...tomo.Object) *Container {
|
|
this := &Container { }
|
|
this.init(layout, children...)
|
|
this.box.SetRole(tomo.R("objects", "Container"))
|
|
this.box.SetTag("outer", true)
|
|
return this
|
|
}
|