summaryrefslogtreecommitdiff
path: root/new-structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-11-01 01:26:31 -0500
committerJeff Carr <[email protected]>2021-11-01 01:26:31 -0500
commitbd6617223273dc8e808d018458f6ca52e9a6f639 (patch)
treeae2515300a984aba5c753cab51bba132d8fd3058 /new-structs.go
parent86e73bab9f490ddeccb2744f3e7ee1094042616f (diff)
BREAK: add vertical and horizontal breaks
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'new-structs.go')
-rw-r--r--new-structs.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/new-structs.go b/new-structs.go
index daeab64..b320b24 100644
--- a/new-structs.go
+++ b/new-structs.go
@@ -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)