summaryrefslogtreecommitdiff
path: root/example_window_demo.go
blob: be07496f7219fc978f37f4c69ef45e9fcb105f73 (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
27
28
29
30
package gui

import "log"
// import "time"
// import toolkit "git.wit.org/wit/gui/toolkit/andlabs"

//
// This creates a window that shows how this package works
// 
func DemoWindow() {
	var w, t1 *Node
	log.Println("DemoWindow() START")

	w = NewStandardWindow("Demo of WIT/GUI")

	t1 = w.DebugTab("WIT GUI Debug Tab t1")
	t1.DebugTab("WIT GUI Debug Tab t2")

	log.Println("DemoWindow() END")
}

func NewStandardWindow(title string) *Node {
	log.Println("NewStandardWindow() creating", title)

	Config.Title = title
	Config.Width = 640
	Config.Height = 480
	Config.Exit = StandardClose
	return NewWindow()
}