summaryrefslogtreecommitdiff
path: root/cmds/plugin-consoleonly
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/plugin-consoleonly')
-rw-r--r--cmds/plugin-consoleonly/Makefile14
-rw-r--r--cmds/plugin-consoleonly/args.go31
-rw-r--r--cmds/plugin-consoleonly/main.go33
3 files changed, 0 insertions, 78 deletions
diff --git a/cmds/plugin-consoleonly/Makefile b/cmds/plugin-consoleonly/Makefile
deleted file mode 100644
index a8279f6..0000000
--- a/cmds/plugin-consoleonly/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-run: build
- ./helloconsole
-
-build-release:
- go get -v -u -x .
- go install -v -o helloconsole
- helloconsole
-
-build:
- GO111MODULE="off" go get -v -x .
- GO111MODULE="off" go build -v -o helloconsole
-
-update:
- GO111MODULE="off" go get -v -u -x .
diff --git a/cmds/plugin-consoleonly/args.go b/cmds/plugin-consoleonly/args.go
deleted file mode 100644
index dc4a322..0000000
--- a/cmds/plugin-consoleonly/args.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// This creates a simple hello world window
-package main
-
-import (
- "log"
- "git.wit.org/wit/gui"
- arg "github.com/alexflint/go-arg"
-)
-
-type LogOptions struct {
- LogFile string
- Verbose bool
- User string `arg:"env:USER"`
-}
-
-var args struct {
- LogOptions
- gui.GuiArgs
-}
-
-func init() {
- arg.MustParse(&args)
- log.Println("Toolkit = ", args.Toolkit)
-
- if (args.GuiDebug) {
- gui.DebugWindow()
- }
- if (args.GuiVerbose) {
- gui.SetDebug(true)
- }
-}
diff --git a/cmds/plugin-consoleonly/main.go b/cmds/plugin-consoleonly/main.go
deleted file mode 100644
index fa428d6..0000000
--- a/cmds/plugin-consoleonly/main.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// This is a simple example
-package main
-
-import (
- "log"
- "git.wit.org/wit/gui"
-)
-
-func main() {
- gui.InitPlugins([]string{"gocui"})
- gui.Main(helloworld)
-}
-
-// This creates a window
-func helloworld() {
- var w *gui.Node
- gui.Config.Title = "helloworld golang wit/gui window"
- gui.Config.Width = 640
- gui.Config.Height = 480
-
- w = gui.NewWindow()
- w.NewButton("hello", func () {
- log.Println("world")
- })
- w.NewButton("Flags", func () {
- log.Println("the debugging flags window")
- w.DebugFlags(false)
- })
- w.NewButton("Widgets", func () {
- w.DebugWidgets(false)
- log.Println("debug the widgets window")
- })
-}