summaryrefslogtreecommitdiff
path: root/toolkit/gocui/plugin.go
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/gocui/plugin.go')
-rw-r--r--toolkit/gocui/plugin.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/toolkit/gocui/plugin.go b/toolkit/gocui/plugin.go
new file mode 100644
index 0000000..5be26f3
--- /dev/null
+++ b/toolkit/gocui/plugin.go
@@ -0,0 +1,28 @@
+package main
+
+import (
+ "log"
+
+ "git.wit.org/wit/gui/toolkit"
+
+ "github.com/awesome-gocui/gocui"
+)
+
+// This is a map between the widgets in wit/gui and the internal structures of gocui
+var viewWidget map[*gocui.View]*toolkit.Widget
+var stringWidget map[string]*toolkit.Widget
+
+func Quit() {
+ baseGui.Close()
+}
+
+// This lists out the know mappings
+func listMap() {
+ for v, w := range viewWidget {
+ log.Println("view =", v.Name, "widget name =", w.Name)
+ }
+ for s, w := range stringWidget {
+ log.Println("string =", s, "widget =", w)
+ }
+}
+