2019-05-15 13:03:42 -05:00
|
|
|
package gui
|
|
|
|
|
|
|
|
import "log"
|
|
|
|
|
|
|
|
import "github.com/andlabs/ui"
|
|
|
|
import _ "github.com/andlabs/ui/winmanifest"
|
|
|
|
|
|
|
|
func ShowVM() {
|
2019-05-22 21:18:55 -05:00
|
|
|
name := Data.CurrentVM
|
|
|
|
log.Println("setupDemoUI() START Data.CurrentVM=", Data.CurrentVM)
|
2019-05-15 13:03:42 -05:00
|
|
|
VMwin := ui.NewWindow("VM " + name, 500, 300, false)
|
|
|
|
VMwin.OnClosing(func(*ui.Window) bool {
|
|
|
|
return true
|
|
|
|
})
|
|
|
|
ui.OnShouldQuit(func() bool {
|
|
|
|
VMwin.Destroy()
|
|
|
|
VMwin = nil
|
|
|
|
return true
|
|
|
|
})
|
|
|
|
|
|
|
|
VMtab := ui.NewTab()
|
|
|
|
VMwin.SetChild(VMtab)
|
|
|
|
VMwin.SetMargined(true)
|
|
|
|
|
|
|
|
// VMtab.Append("List examples", makeNumbersPage())
|
|
|
|
// VMtab.SetMargined(0, true)
|
|
|
|
|
|
|
|
VMwin.Show()
|
|
|
|
}
|