summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-08 08:40:31 -0500
committerJeff Carr <[email protected]>2023-04-08 08:40:31 -0500
commit5d2f6e7fb241298eb15b1917c1947089a12247fe (patch)
tree0f67fc7c2955b40904a3ac4600cf82f53938398b /window.go
parent0f3074ab5d606822ae0d170da84507d6e24471e6 (diff)
gocui: keep deprecating non-gochannel code
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'window.go')
-rw-r--r--window.go23
1 files changed, 21 insertions, 2 deletions
diff --git a/window.go b/window.go
index e829b41..2935043 100644
--- a/window.go
+++ b/window.go
@@ -4,8 +4,6 @@ import (
"git.wit.org/wit/gui/toolkit"
)
-//import toolkit "git.wit.org/wit/gui/toolkit/andlabs"
-
// This routine creates a blank window with a Title and size (W x H)
//
// This routine can not have any arguements due to the nature of how
@@ -48,3 +46,24 @@ func NewWindow() *Node {
return newNode
}
+
+// This routine creates a blank window with a Title
+//
+func (n *Node) NewWindow2(title string) *Node {
+ var newNode *Node
+
+ // Windows are created off of the master node of the Binary Tree
+ newNode = n.New(Config.Title, toolkit.Window, StandardExit)
+
+ log(logInfo, "NewWindow()", Config.Title)
+
+ var a toolkit.Action
+ a.ActionType = toolkit.Add
+ a.Width = Config.Width
+ a.Height = Config.Height
+ a.Name = Config.Title
+ a.Text = Config.Title
+ newaction(&a, newNode, n)
+
+ return newNode
+}