diff options
Diffstat (limited to 'eventBindings.go')
| -rw-r--r-- | eventBindings.go | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/eventBindings.go b/eventBindings.go index 4e4072f..d664b21 100644 --- a/eventBindings.go +++ b/eventBindings.go @@ -38,14 +38,14 @@ func registerHandlers(g *gocui.Gui) { g.SetKeybinding("", 'q', gocui.ModNone, doExit) // 'q' exit // debugging - g.SetKeybinding("", 'f', gocui.ModNone, theFind) // 'f' shows what is under your mouse - g.SetKeybinding("", 'S', gocui.ModNone, setSuperMouse) // 'S' Super Mouse mode! - g.SetKeybinding("", 'h', gocui.ModNone, theHide) // 'h' hide all widgets - g.SetKeybinding("", 'M', gocui.ModNone, dumpWidgetPlacement) // 'M' list all widgets with positions - g.SetKeybinding("", 'L', gocui.ModNone, dumpWidgets) // 'L' list all widgets in tree view - g.SetKeybinding("", 'd', gocui.ModNone, theLetterD) // 'd' toggles on and off debugging buttons - g.SetKeybinding("", '2', gocui.ModNone, theNotsure) // '2' for testing new ideas - g.SetKeybinding("", 'q', gocui.ModNone, quit) // 'q' only exits gocui. plugin stays alive (?) + g.SetKeybinding("", 'f', gocui.ModNone, theFind) // 'f' shows what is under your mouse + g.SetKeybinding("", 'S', gocui.ModNone, setSuperMouse) // 'S' Super Mouse mode! + g.SetKeybinding("", 'h', gocui.ModNone, theHide) // 'h' hide all widgets + g.SetKeybinding("", 'M', gocui.ModNone, printWidgetPlacements) // 'M' list all widgets with positions + g.SetKeybinding("", 'L', gocui.ModNone, printWidgetTree) // 'L' list all widgets in tree view + g.SetKeybinding("", 'd', gocui.ModNone, theLetterD) // 'd' toggles on and off debugging buttons + g.SetKeybinding("", '2', gocui.ModNone, theNotsure) // '2' for testing new ideas + g.SetKeybinding("", 'q', gocui.ModNone, quit) // 'q' only exits gocui. plugin stays alive (?) } // flips on 'super mouse' mode @@ -152,6 +152,7 @@ func theNotsure(g *gocui.Gui, v *gocui.View) error { if notsure == nil { // notsure = makeDropdownView("addWidget() notsure") notsure = addDropdownTK(-118) + notsure.node.State.Label = "apple/pear" notsure.makeTK([]string{"apple", "pear"}) } notsure.MoveToOffset(w+2, h+1) @@ -197,31 +198,6 @@ func doPanic(g *gocui.Gui, v *gocui.View) error { panic("forced panic in gocui") } -func dumpWidgets(g *gocui.Gui, v *gocui.View) error { - me.treeRoot.ListWidgets() - - tk := me.logStdout - // msg := fmt.Sprintf("test out kb %d\n", ecount) - // tk.Write([]byte(msg)) - if tk == nil { - log.Log(ERROR, "tk = nil") - } - if tk.v == nil { - log.Log(ERROR, "tk.v = nil") - } else { - log.Log(ERROR, "setting log.CaptureMode(tk.v)") - log.Log(ERROR, "setting log.CaptureMode(tk.v)") - log.CaptureMode(tk) - } - return nil -} - -func dumpWidgetPlacement(g *gocui.Gui, v *gocui.View) error { - w := me.treeRoot.TK.(*guiWidget) - w.dumpTree("MM") - return nil -} - func openDebuggger(g *gocui.Gui, v *gocui.View) error { me.myTree.SendEnableDebugger() return nil |
