parent
52f207a105
commit
9f35ee8d3c
15
Makefile
15
Makefile
|
@ -4,7 +4,7 @@ all: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
ifeq ($(GO111MODULE),)
|
ifeq ($(GO111MODULE),)
|
||||||
echo no. you must use GO111MODULE here
|
echo no. you must use GO111MODULE to build here
|
||||||
false
|
false
|
||||||
else
|
else
|
||||||
-rm -f basicwindow
|
-rm -f basicwindow
|
||||||
|
@ -12,13 +12,14 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
stderr: build
|
stderr: build
|
||||||
echo "writing to /tmp/basicwindow.stderr"
|
echo "writing to /tmp/basicwindow.out"
|
||||||
./basicwindow >/tmp/basicwindow.stderr 2>&1
|
./basicwindow >/tmp/basicwindow.out 2>&1
|
||||||
|
|
||||||
push:
|
gocui:
|
||||||
git add --all
|
./basicwindow --gui gocui >/tmp/basicwindow.out 2>&1
|
||||||
git commit -a
|
|
||||||
git push
|
goimports:
|
||||||
|
goimports -w *.go
|
||||||
|
|
||||||
redomod:
|
redomod:
|
||||||
rm -f go.*
|
rm -f go.*
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
/*
|
||||||
|
enables GUI options and the debugger in your application
|
||||||
|
*/
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go.wit.com/dev/alexflint/arg"
|
||||||
|
"go.wit.com/lib/debugger"
|
||||||
|
"go.wit.com/log"
|
||||||
|
)
|
||||||
|
|
||||||
|
var args struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
arg.MustParse(&args)
|
||||||
|
|
||||||
|
if debugger.ArgDebug() {
|
||||||
|
log.Info("cmd line --debugger == true")
|
||||||
|
go func() {
|
||||||
|
log.Sleep(2)
|
||||||
|
debugger.DebugWindow()
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
}
|
2
main.go
2
main.go
|
@ -35,7 +35,7 @@ func main() {
|
||||||
|
|
||||||
// This initializes the first window and some widgets
|
// This initializes the first window and some widgets
|
||||||
func helloworld() {
|
func helloworld() {
|
||||||
mainWindow = myGui.NewWindow("hello world").SetProgName("BASEWIN1")
|
mainWindow = myGui.NewWindow("primary helloworld window").SetProgName("BASEWIN1")
|
||||||
|
|
||||||
box := mainWindow.NewBox("vbox", false)
|
box := mainWindow.NewBox("vbox", false)
|
||||||
group := box.NewGroup("choices")
|
group := box.NewGroup("choices")
|
||||||
|
|
Loading…
Reference in New Issue