summaryrefslogtreecommitdiff
path: root/gocui.go
diff options
context:
space:
mode:
Diffstat (limited to 'gocui.go')
-rw-r--r--gocui.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/gocui.go b/gocui.go
index 1118a7d..bdb3bb4 100644
--- a/gocui.go
+++ b/gocui.go
@@ -6,12 +6,15 @@ package main
import (
"errors"
+ "fmt"
"github.com/awesome-gocui/gocui"
"go.wit.com/log"
)
+var ecount int = 3
+
// Thanks to the gocui developers -- your package kicks ass
// This function is called on every event. It is a callback function from the gocui package
// which has an excellent implementation. While gocui handles things like text highlighting
@@ -19,6 +22,7 @@ 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 {
+ ecount += 1
maxX, maxY := g.Size()
mx, my := g.MousePosition()
log.Verbose("handleEvent() START", maxX, maxY, mx, my, msgMouseDown)
@@ -32,7 +36,13 @@ func gocuiEvent(g *gocui.Gui) error {
// setOutput(me.logStdout)
// me.logStdout.Write("test out")
w := me.logStdout.TK.(*guiWidget)
- w.Write([]byte("test out"))
+ msg := fmt.Sprintf("test out %d\n", ecount)
+ msg += fmt.Sprintf("test out %d\n", ecount)
+ msg += fmt.Sprintf("test out %d\n", ecount)
+ w.Write([]byte(msg + msg + msg))
+ w.Write([]byte(msg + msg + msg))
+ w.Write([]byte(msg + msg + msg))
+ w.Write([]byte(msg + msg + msg))
// log.CaptureMode(w)
log.Log(NOW, "logStdout test out")
}