summaryrefslogtreecommitdiff
path: root/eventGocui.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-01 16:44:43 -0600
committerJeff Carr <[email protected]>2025-02-01 16:44:43 -0600
commit3d5ee3f89b73dd5ba0d78a0b0d816fe96ed9f8a0 (patch)
tree09e887a22ae34ab184abc3024bc0c6707549a706 /eventGocui.go
parent2e0465e44a7db03f804b6c66699f8eed3d9fbfad (diff)
this gocui package is really cool
Diffstat (limited to 'eventGocui.go')
-rw-r--r--eventGocui.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/eventGocui.go b/eventGocui.go
index ea327b8..2ce9f94 100644
--- a/eventGocui.go
+++ b/eventGocui.go
@@ -9,7 +9,6 @@ package main
import (
"errors"
- "fmt"
"github.com/awesome-gocui/gocui"
@@ -23,37 +22,10 @@ import (
// complicated console handling, it sends events here in a clean way.
// This is equivalent to the linux command xev (apt install x11-utils)
func gocuiEvent(g *gocui.Gui) error {
- me.ecount += 1
- maxX, maxY := g.Size()
- mx, my := g.MousePosition()
- log.Verbose("handleEvent() START", maxX, maxY, mx, my, msgMouseDown)
- if _, err := g.View("msg"); msgMouseDown && err == nil {
- moveMsg(g)
- }
- if widgetView, _ := g.View("msg"); widgetView == nil {
- log.Log(NOW, "handleEvent() create output widget now", maxX, maxY, mx, my)
- makeOutputWidget(g, "this is a create before a mouse click")
- if me.logStdout != nil {
- // setOutput(me.logStdout)
- // me.logStdout.Write("test out")
- w := me.logStdout.TK.(*guiWidget)
- msg := fmt.Sprintf("test out gocuiEvent() %d\n", me.ecount)
- w.Write([]byte(msg))
- // log.CaptureMode(w)
- log.Log(NOW, "logStdout test out")
- }
- } else {
- log.Verbose("output widget already exists", maxX, maxY, mx, my)
- }
mouseMove(g)
- log.Verbose("handleEvent() END ", maxX, maxY, mx, my, msgMouseDown)
return nil
}
-func dragOutputWindow() {
- log.Log(GOCUI, "todo: make dragOutputWindow")
-}
-
// turns off the frame on the global window
func setFrame(b bool) {
// TODO: figure out what this might be useful for