summaryrefslogtreecommitdiff
path: root/cmds/consolemouse/gocui.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2022-11-09 08:38:50 -0600
committerJeff Carr <[email protected]>2022-11-09 08:38:50 -0600
commited382bec55be25039e4dcf020d1512139855c9bb (patch)
treefb3a671fd07c03a75cedb8d56b2241108cd792ff /cmds/consolemouse/gocui.go
parentb410d0fd083ee89eed410cda2123a22cddcd3f44 (diff)
cleanup of the example commands. more plugin workv0.4.6
add a button in two plugins at the same time! added a button in andlabs/ui & gocui attempt a common widget struct between wit/gui & the plugins start handling missing plugins rename Makefile command examples remote examples used for testing filename improvements golang src code uses lowercase and _ in filenames fix crash when button click function == nil fix wrong name 'gocli' -> 'gocui' keep fighting with goreadme generated README.md Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'cmds/consolemouse/gocui.go')
-rw-r--r--cmds/consolemouse/gocui.go51
1 files changed, 0 insertions, 51 deletions
diff --git a/cmds/consolemouse/gocui.go b/cmds/consolemouse/gocui.go
deleted file mode 100644
index 7da888e..0000000
--- a/cmds/consolemouse/gocui.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// This creates a simple hello world window
-package main
-
-import (
- "log"
- "time"
- "git.wit.org/wit/gui"
-)
-
-import toolkit "git.wit.org/wit/gui/toolkit/gocui"
-
-func configureGogui() {
- toolkit.Init()
- toolkit.OnExit(mycallback)
-}
-
-func startGogui() {
- toolkit.StartConsoleMouse()
-}
-
-func mycallback(name string) {
- log.Println("run andlabs here? name =", name)
- if (name == "andlabs") {
- go gui.Main(initGUI)
- }
- if (name == "something") {
- log.Println("add something to do here")
- }
- if (name == "DemoToolkitWindow") {
- gui.Queue( func () {
- gui.DemoToolkitWindow()
- })
- }
- if (name == "addDemoTab") {
- gui.Queue( func () {
- addDemoTab(w, "A Tab from gocui")
- })
- }
- if (name == "DebugWindow") {
- log.Println("Opening a Debug Window via the gui.Queue()")
- gui.Config.Width = 800
- gui.Config.Height = 300
- gui.Config.Exit = myExit
- gui.Queue(gui.DebugWindow)
- time.Sleep(1 * time.Second)
- gui.Queue(gui.DebugTab)
- }
- if (name == "exit") {
- myExit(nil)
- }
-}