package main

import "os"

import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest"

import "git.wit.com/wit/gui"

func main() {
	ui.Main(setupUI)
}

func setupUI() {
	mainwin := ui.NewWindow("gui-example1", 640, 480, true)
	mainwin.OnClosing(func(*ui.Window) bool {
		ui.Quit()
		os.Exit(0)
		return true
	})
	ui.OnShouldQuit(func() bool {
		mainwin.Destroy()
		return true
	})

	tab := ui.NewTab()
	mainwin.SetChild(tab)
	mainwin.SetMargined(true)

	vbox := gui.ShowSplashBox(nil, nil, nil)

	tab.Append("WIT Splash", vbox)
	tab.SetMargined(0, true)

	mainwin.Show()

}