From ed382bec55be25039e4dcf020d1512139855c9bb Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 9 Nov 2022 08:38:50 -0600 Subject: cleanup of the example commands. more plugin work 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 --- cmds/buttonAsPlugin/main.go | 54 --------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 cmds/buttonAsPlugin/main.go (limited to 'cmds/buttonAsPlugin/main.go') diff --git a/cmds/buttonAsPlugin/main.go b/cmds/buttonAsPlugin/main.go deleted file mode 100644 index e26c75e..0000000 --- a/cmds/buttonAsPlugin/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// This is a simple example -package main - -import ( - "log" - "git.wit.org/wit/gui" -) - -func main() { - // go loadPlugin(plugHello, "../../toolkit/hello.so") - - // this doesn't seem to work - captureSTDOUT() - - // go loadPlugin("../../toolkit/gocli.so") - gui.Main(buttonWindow) -} - -// This creates a window -func buttonWindow() { - var w, g *gui.Node - gui.Config.Title = "Demo Plugin Window" - gui.Config.Width = 640 - gui.Config.Height = 480 - - w = gui.NewWindow() - g = w.NewGroup("buttonGroup") - - g.NewButton("hello", func () { - log.Println("world") - }) - - /* - g.NewButton("LoadPlugin()", func () { - log.Println("world") - gui.LoadPlugin("../../toolkit/gocli.so") - }) - */ - - g.NewButton("RunGreet()", func () { - log.Println("world") - go gui.RunGreet() - }) - - g.NewButton("gui.LookupJcarrButton()", func () { - log.Println("gui.LookupJcarrButton()") - gui.LookupJcarrButton() - }) - - g.NewButton("gui.GocuiAddButton()", func () { - log.Println("gui.GocuiAddButton()") - gui.GocuiAddButton("new foobar") - }) -} -- cgit v1.2.3