diff options
Diffstat (limited to 'eventMouse.go')
| -rw-r--r-- | eventMouse.go | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/eventMouse.go b/eventMouse.go index 383185b..052bc53 100644 --- a/eventMouse.go +++ b/eventMouse.go @@ -1,19 +1,6 @@ // Copyright 2017-2025 WIT.COM Inc. All rights reserved. // Use of this source code is governed by the GPL 3.0 -// NOTE: our code is under the GPL, not BSD - -// note by [email protected] in 2025: this is one of the coolest -// things ever what this does. I've tried to improve -// it while I've been working on making a gocui -// GO plugin so it can be generalized as a useful -// console interface. Well done everyone that has -// contributed to this gocui project !!! - -// Copyright 2014 The gocui Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - package main import ( @@ -25,29 +12,7 @@ import ( "go.wit.com/log" ) -// this function uses the mouse position to highlight & unhighlight things -// this is run every time the user moves the mouse over the terminal window -func mouseMove(g *gocui.Gui) { - mx, my := g.MousePosition() - - w := mx - h := my - - if me.supermouse { - for _, tk := range findByXY(w, h) { - tk.dumpWidget("mouseMove()") - } - } - - for _, view := range g.Views() { - view.Highlight = false - } - if v, err := g.ViewByPosition(mx, my); err == nil { - v.Highlight = true - } -} - -// I think this lets me drag the debugging window +// event triggers when you push down on a mouse button func msgDown(g *gocui.Gui, v *gocui.View) error { initialMouseX, initialMouseY = g.MousePosition() |
