summaryrefslogtreecommitdiff
path: root/window.go
blob: a0676b21a6a3133309ecfe06cd8b2e31a9abc425 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package gui

import (
	"go.wit.com/log"
	"go.wit.com/gui/widget"
)

// This routine creates a blank window with a Title and size (W x H)

func (parent *Node) NewWindow(title string) *Node {
	var newNode *Node

	// Windows are created off of the master node of the Binary Tree
	newNode = parent.newNode(title, widget.Window)
	newNode.Custom = StandardExit

	log.Info("NewWindow()", title)

	a := newAction(newNode, widget.Add)
	sendAction(a)
	return newNode
}