BREAK: add vertical and horizontal breaks

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2021-11-01 01:26:31 -05:00
parent 91e4ad1351
commit f92435a726
1 changed files with 25 additions and 0 deletions

View File

@ -237,6 +237,31 @@ func (n *Node) AddTabNode(title string) *Node {
return newNode
}
func (n *Node) AddHorizontalBreak() *Node {
log.Println("AddHorizontalBreak added to node =", n.Name)
if (n.uiBox != nil) {
tmp := ui.NewHorizontalSeparator()
n.uiBox.Append(tmp, false)
} else {
n.Dump()
// panic("AddHorizontalBreak")
return nil
}
return n
}
func (n *Node) AddVerticalBreak() *Node {
log.Println("AddVerticalBreak added to node =", n.Name)
if (n.uiBox != nil) {
tmp := ui.NewVerticalSeparator()
n.uiBox.Append(tmp, false)
} else {
n.Dump()
return nil
}
return n
}
func (n *Node) AddHorizontalBox(title string) *Node {
hbox := ui.NewHorizontalBox()
hbox.SetPadded(true)