initial commit

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-07 05:13:01 -06:00
commit 0bdc53d0fa
2 changed files with 46 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*
!.gitignore
!*.go

43
main.go Normal file
View File

@ -0,0 +1,43 @@
// This is a simple example
package main
import (
"log"
"go.wit.com/gui/gui"
"go.wit.com/gui/gadgets"
"go.wit.com/control-panels/dns/smartwindow"
)
var myGui *gui.Node
func main() {
myGui = gui.New().Default()
helloworld()
// hellosmart()
// This is just a optional goroutine to watch that things are alive
gui.Watchdog()
}
// This creates a window
func helloworld() {
win := gadgets.NewBasicWindow(myGui, "helloworld golang wit/gui window")
win.Box().NewButton("hello", func () {
log.Println("world")
})
}
// This creates a window
func hellosmart() {
myGui = gui.New().Default()
win := smartwindow.New()
win.Title("helloworld golang wit/gui window")
win.Vertical()
win.Draw()
win.Box().NewButton("hello", func () {
log.Println("world")
})
}