2019-06-03 20:53:14 -05:00
|
|
|
package gui
|
|
|
|
|
2021-10-06 10:43:58 -05:00
|
|
|
import (
|
2024-01-03 18:15:54 -06:00
|
|
|
"go.wit.com/log"
|
2024-01-03 18:54:08 -06:00
|
|
|
"go.wit.com/gui/toolkits"
|
2021-10-06 10:43:58 -05:00
|
|
|
)
|
2019-06-03 20:53:14 -05:00
|
|
|
|
2021-10-31 14:21:36 -05:00
|
|
|
// This routine creates a blank window with a Title and size (W x H)
|
2023-04-08 15:34:36 -05:00
|
|
|
|
2023-05-09 18:50:16 -05:00
|
|
|
func (parent *Node) NewWindow(title string) *Node {
|
2023-04-08 15:34:36 -05:00
|
|
|
var newNode *Node
|
|
|
|
|
|
|
|
// Windows are created off of the master node of the Binary Tree
|
2023-05-09 20:25:37 -05:00
|
|
|
newNode = parent.newNode(title, toolkit.Window)
|
|
|
|
newNode.Custom = StandardExit
|
2023-04-08 15:34:36 -05:00
|
|
|
|
2024-01-03 18:15:54 -06:00
|
|
|
log.Info("NewWindow()", title)
|
2023-04-08 15:34:36 -05:00
|
|
|
|
2023-05-09 18:50:16 -05:00
|
|
|
a := newAction(newNode, toolkit.Add)
|
2023-05-09 18:53:31 -05:00
|
|
|
sendAction(a)
|
2023-04-08 15:34:36 -05:00
|
|
|
return newNode
|
|
|
|
}
|