runs against nocui
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
b39e2e1c5e
commit
4f59e4bb8d
4
Makefile
4
Makefile
|
@ -1,8 +1,8 @@
|
||||||
all: build
|
all: build
|
||||||
./helloworld
|
./basicwindow
|
||||||
|
|
||||||
build:
|
build:
|
||||||
-rm -f helloworld
|
-rm -f basicwindow
|
||||||
go build -v -x
|
go build -v -x
|
||||||
|
|
||||||
stderr: build
|
stderr: build
|
||||||
|
|
10
main.go
10
main.go
|
@ -4,6 +4,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
"go.wit.com/gui/gui"
|
"go.wit.com/gui/gui"
|
||||||
|
"go.wit.com/gui/gadgets"
|
||||||
)
|
)
|
||||||
|
|
||||||
var myGui *gui.Node // This is the beginning of the binary tree of widgets
|
var myGui *gui.Node // This is the beginning of the binary tree of widgets
|
||||||
|
@ -19,6 +20,15 @@ func main() {
|
||||||
|
|
||||||
// This initializes the first window, a group and a button
|
// This initializes the first window, a group and a button
|
||||||
func helloworld() {
|
func helloworld() {
|
||||||
|
basicWin := gadgets.NewBasicWindow(myGui, "basic window test")
|
||||||
|
basicWin.Make()
|
||||||
|
basicWin.StandardExit()
|
||||||
|
|
||||||
|
box1 := basicWin.Box()
|
||||||
|
group1 := box1.NewGroup("choices")
|
||||||
|
group1.NewButton("hello", func() {})
|
||||||
|
basicWin.Draw()
|
||||||
|
|
||||||
window := myGui.NewWindow("hello world")
|
window := myGui.NewWindow("hello world")
|
||||||
|
|
||||||
box := window.NewBox("vbox", false)
|
box := window.NewBox("vbox", false)
|
||||||
|
|
Loading…
Reference in New Issue