diff options
| author | Jeff Carr <[email protected]> | 2023-12-16 06:57:39 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-12-16 06:57:39 -0600 |
| commit | 87ab9a958d9eb9f4db35d5c9f9ce923df3132dad (patch) | |
| tree | fd3ee29d828e9e69175a6ca04fec6ae0fe60fcc0 /toolkit/gocui/keybindings.go | |
| parent | dcce32583387be7fc4f6cd8c8dea62fd7dc42ecf (diff) | |
correct line hight
dump non-working size rectangle code
somehow works better
better dropdown menu debugging
minor fixes to common.go
more common code
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/keybindings.go')
| -rw-r--r-- | toolkit/gocui/keybindings.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/toolkit/gocui/keybindings.go b/toolkit/gocui/keybindings.go index 658d09a..38ada12 100644 --- a/toolkit/gocui/keybindings.go +++ b/toolkit/gocui/keybindings.go @@ -29,6 +29,9 @@ func defaultKeybindings(g *gocui.Gui) error { if err := g.SetKeybinding("", gocui.MouseLeft, gocui.ModMouseCtrl, ctrlDown); err != nil { return err } +// if err := g.SetKeybinding(w.v.Name(), gocui.MouseLeft, gocui.ModNone, click); err != nil { +// return err +// } /* if err := g.SetKeybinding("", gocui.MouseLeft, gocui.ModNone, globalDown); err != nil { return err @@ -45,8 +48,6 @@ func addDebugKeys(g *gocui.Gui) { // show debugging buttons g.SetKeybinding("", 'd', gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { - log(logNow, "gocui.SetKeyBinding() dumpTree() START") - // me.rootNode.dumpTree(true) fakeStartWidth = me.FakeW fakeStartHeight = me.TabH + me.FramePadH if (showDebug) { @@ -106,6 +107,13 @@ func addDebugKeys(g *gocui.Gui) { return nil }) + // list all widgets with positions + g.SetKeybinding("", 'M', gocui.ModNone, + func(g *gocui.Gui, v *gocui.View) error { + me.rootNode.dumpTree(true) + return nil + }) + // log to output window g.SetKeybinding("", 'o', gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { @@ -136,7 +144,7 @@ func addDebugKeys(g *gocui.Gui) { var a toolkit.Action a.B = true a.ActionType = toolkit.EnableDebug - me.callback <- a + callback <- a logInfo = true logVerbose = true } else { |
