2023-08-08 10:46:19 -06:00
|
|
|
package objects
|
|
|
|
|
|
|
|
import "git.tebibyte.media/tomo/tomo"
|
|
|
|
|
|
|
|
// Label is a simple text label.
|
2023-08-09 09:35:24 -06:00
|
|
|
type Label struct {
|
|
|
|
tomo.TextBox
|
|
|
|
}
|
2023-08-08 10:46:19 -06:00
|
|
|
|
|
|
|
// NewLabel creates a new text label.
|
2023-08-09 09:35:24 -06:00
|
|
|
func NewLabel (text string) *Label {
|
|
|
|
this := &Label { TextBox: tomo.NewTextBox() }
|
2024-06-03 19:13:18 -06:00
|
|
|
this.SetRole(tomo.R("objects", "Label", ""))
|
|
|
|
tomo.Apply(this)
|
2023-08-09 09:35:24 -06:00
|
|
|
this.SetText(text)
|
|
|
|
return this
|
2023-08-08 10:46:19 -06:00
|
|
|
}
|