summaryrefslogtreecommitdiff
path: root/window-demo.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2022-10-19 13:23:22 -0500
committerJeff Carr <[email protected]>2022-10-19 13:23:22 -0500
commitf3af1f5b7ff78b3f73d7510622fc9633dec36d35 (patch)
treee4868584d5e19942938aaa122b2e1cab377db000 /window-demo.go
parentf7b1036e544238d65b0e3ad46d08075aa4177032 (diff)
Refactor to 'gui/toolkit/'
* add a example cmds/consolemouse uses a console button to launch the andlabs/ui * fix wrong return value in toolkit/NewLabel() * redirect STDIN output to a file * wonderful fix of Window() exit * finally remove the ancient stupid variables x & y * phase out struct 'box' and use 'node' instead * better names for things: use NewFoo() and NewBar()
Diffstat (limited to 'window-demo.go')
-rw-r--r--window-demo.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/window-demo.go b/window-demo.go
new file mode 100644
index 0000000..c4e0374
--- /dev/null
+++ b/window-demo.go
@@ -0,0 +1,20 @@
+package gui
+
+import "log"
+// import "time"
+// import toolkit "git.wit.org/wit/gui/toolkit/andlabs"
+
+//
+// This creates a window that shows how this package works
+//
+func DemoWindow() {
+ var w, t1 *Node
+ log.Println("DemoWindow() START")
+
+ w = NewStandardWindow("Demo of WIT/GUI")
+
+ t1 = w.DebugTab("WIT GUI Debug Tab t1")
+ t1.DebugTab("WIT GUI Debug Tab t2")
+
+ log.Println("DemoWindow() END")
+}