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/consolemouse/main.go | 52 ----------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 cmds/consolemouse/main.go (limited to 'cmds/consolemouse/main.go') diff --git a/cmds/consolemouse/main.go b/cmds/consolemouse/main.go deleted file mode 100644 index 3f4ce58..0000000 --- a/cmds/consolemouse/main.go +++ /dev/null @@ -1,52 +0,0 @@ -// This creates a simple hello world window -package main - -import ( - "os" - "log" -// "time" - "git.wit.org/wit/gui" -) - -import toolkit "git.wit.org/wit/gui/toolkit/gocui" - -var w *gui.Node - -func main() { - go gui.Main(initGUI) - - configureGogui() - startGogui() -} - -// This initializes the first window -func initGUI() { - gui.Config.Title = "Hello World golang wit/gui Window" - gui.Config.Width = 640 - gui.Config.Height = 480 - gui.Config.Exit = myExit - - w = gui.NewWindow() - w.Dump() - addDemoTab(w, "A Simple Tab Demo") - addDemoTab(w, "A Second Tab") -} - -func addDemoTab(w *gui.Node, title string) { - var newNode, g *gui.Node - - newNode = w.NewTab(title) - - g = newNode.NewGroup("group 1") - - dd := g.NewDropdown("demoCombo2") - dd.AddDropdown("more 1") - dd.AddDropdown("less 2") - dd.AddDropdown("foo 3") -} - -func myExit(n *gui.Node) { - log.Println("You can Do exit() things here") - toolkit.Exit() - os.Exit(0) -} -- cgit v1.2.3