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

import (
	"git.wit.org/wit/gui/toolkit"
)

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

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

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

	log(logInfo, "NewWindow()", title)

	var a toolkit.Action
	a.ActionType = toolkit.Add
	a.X         = n.X
	a.Y         = n.Y
	a.Name      = title
	a.Text      = title
	newaction(&a, newNode, n)

	return newNode
}