From 207cf7ea16f1da8fa9f893504d77a2856298cc22 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 13 Nov 2022 08:53:03 -0600 Subject: Massive refactor to use go plugins. This is neat. update README.md set xterm title. make os.Exit() default on window close add a toolkit.Widget to the node structure remove 'Greeter' symbol mapping scheme removed the testing greeter code plugins: attempt to load plugins in a sensible order andlabs/ui: working andlabs/ui plugin (andlabs2) buttons work in andlabs plugin TODO: re-implement non-plugin version for Windows mswindows doesn't support go plugins yet gocui: put the gocui console so file in the binary does a full init of gocui plugin Button() and Group() working very well with gogui cleanly exit gocui technically you can load two toolkits at the same time kinda both working at the same time. esoteric two working plugins at the same time give up working on two gui's at the same time this is fun, but _not interesting wow. this actually works. NewButton() from both toolkits examples: all the examples run again remove early helloplugin example buttonplugin example cmd code buttonplugin runs and ldd is minimum Signed-off-by: Jeff Carr --- example_window_demo_toolkit.go | 45 ------------------------------------------ 1 file changed, 45 deletions(-) delete mode 100644 example_window_demo_toolkit.go (limited to 'example_window_demo_toolkit.go') diff --git a/example_window_demo_toolkit.go b/example_window_demo_toolkit.go deleted file mode 100644 index 0872448..0000000 --- a/example_window_demo_toolkit.go +++ /dev/null @@ -1,45 +0,0 @@ -package gui - -import "log" -// import "time" -// import toolkit "git.wit.org/wit/gui/toolkit/andlabs" - -func NewStandardWindow(title string) *Node { - log.Println("NewStandardWindow() creating", title) - - Config.Title = title - Config.Width = 640 - Config.Height = 480 - Config.Exit = StandardClose - return NewWindow() -} - -// -// This creates a window that shows how the toolkit works -// internally using it's raw unchanged code for the toolkit itself -// -// This is a way to test and see if the toolkit is working at all -// right now it shows the andlabs/ui/DemoNumbersPage() -// -func DemoToolkitWindow() { - var w *Node - - w = NewStandardWindow("Demo of the GUI Toolkit") - -// d = w.New("demo") - - w.toolkit.DemoNumbersPage() - /* - tk = w.Toolkit.DemoNumbersPage() - tk.OnChanged = func(t *toolkit.Toolkit) { - log.Println("toolkit.NewSlider() value =", t.Value()) - if (d.OnChanged != nil) { - log.Println("toolkit.Demo() running node.OnChanged") - d.OnChanged(d) - } - } - d.Toolkit = tk - */ - - log.Println("ToolkitDemoWindow() END") -} -- cgit v1.2.3