add mirror widget support

This commit is contained in:
Jeff Carr 2024-02-19 14:42:06 -06:00
parent 4bce280460
commit 64f2a2ecdd
1 changed files with 10 additions and 0 deletions

View File

@ -26,6 +26,16 @@ func (n *OneLiner) String() string {
return n.v.String()
}
// returns a widget of the last tag that acts as a mirror
func (n *OneLiner) MirrorLabel() *gui.Node {
return gui.RawMirror(n.l)
}
// returns a widget of the last tag that acts as a mirror
func (n *OneLiner) MirrorValue() *gui.Node {
return gui.RawMirror(n.v)
}
func (n *OneLiner) SetText(s string) *OneLiner {
log.Log(GADGETS, "OneLiner.Set() =", s)
n.v.SetLabel(s)