objects/label.go
2024-06-03 21:13:18 -04:00

18 lines
347 B
Go

package objects
import "git.tebibyte.media/tomo/tomo"
// Label is a simple text label.
type Label struct {
tomo.TextBox
}
// NewLabel creates a new text label.
func NewLabel (text string) *Label {
this := &Label { TextBox: tomo.NewTextBox() }
this.SetRole(tomo.R("objects", "Label", ""))
tomo.Apply(this)
this.SetText(text)
return this
}