Store role in Boxes

This commit is contained in:
2024-06-03 21:13:18 -04:00
parent d8ae20d739
commit 2ab920eb26
14 changed files with 40 additions and 19 deletions

View File

@@ -15,7 +15,8 @@ func NewHeading (level int, text string) *Heading {
if level < 0 { level = 0 }
if level > 2 { level = 2 }
this := &Heading { TextBox: tomo.NewTextBox() }
tomo.Apply(this, tomo.R("objects", "Heading", fmt.Sprint(level)))
this.SetRole(tomo.R("objects", "Heading", fmt.Sprint(level)))
tomo.Apply(this)
this.SetText(text)
return this
}