From 5d2f6e7fb241298eb15b1917c1947089a12247fe Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 8 Apr 2023 08:40:31 -0500 Subject: gocui: keep deprecating non-gochannel code Signed-off-by: Jeff Carr --- window.go | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'window.go') 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 +} -- cgit v1.2.3