summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eventMouse.go12
-rw-r--r--eventMouseMove.go18
-rw-r--r--help.go2
-rw-r--r--structs.go1
4 files changed, 1 insertions, 32 deletions
diff --git a/eventMouse.go b/eventMouse.go
index b14bd7e..63e0165 100644
--- a/eventMouse.go
+++ b/eventMouse.go
@@ -23,10 +23,6 @@ func msgDown(g *gocui.Gui, v *gocui.View) error {
tk.dumpWidget("mouseDown()")
}
- // debugging output
- // log.Log(GOCUI, "msgDown() X,Y", initialMouseX, initialMouseY)
-
- //
vx, vy, _, _, err := g.ViewPosition("msg")
if err == nil {
xOffset = initialMouseX - vx
@@ -50,12 +46,6 @@ func mouseUp(g *gocui.Gui, v *gocui.View) error {
if msgMouseDown {
msgMouseDown = false
- if me.movingMsg {
- me.movingMsg = false
- return nil
- } else {
- g.DeleteView("msg")
- }
} else if globalMouseDown {
globalMouseDown = false
g.DeleteView("globalDown")
@@ -63,8 +53,6 @@ func mouseUp(g *gocui.Gui, v *gocui.View) error {
return nil
}
-// func isMouseInMsg
-
// this is where you have to figure out what
// widget was underneath so you can active
// the right response for the toolkit user's app
diff --git a/eventMouseMove.go b/eventMouseMove.go
index d67c3c3..a88f64c 100644
--- a/eventMouseMove.go
+++ b/eventMouseMove.go
@@ -59,29 +59,11 @@ func mouseMove(g *gocui.Gui) {
// this is how the window gets dragged around
func (tk *guiWidget) moveNew(g *gocui.Gui) {
mx, my := g.MousePosition()
- if !me.movingMsg && (mx != initialMouseX || my != initialMouseY) {
- me.movingMsg = true
- }
- // tk.DrawAt(mx-xOffset, my-yOffset)
- g.SetView("msg", mx-xOffset, my-yOffset, mx-xOffset+outputW, my-yOffset+outputH+me.FramePadH, 0)
- me.startOutputW = mx - xOffset
- me.startOutputH = my - yOffset
- g.SetViewOnBottom("msg")
-}
-
-/*
-// this is how the window gets dragged around
-func moveMsg(g *gocui.Gui) {
- mx, my := g.MousePosition()
- if !me.movingMsg && (mx != initialMouseX || my != initialMouseY) {
- me.movingMsg = true
- }
g.SetView("msg", mx-xOffset, my-yOffset, mx-xOffset+outputW, my-yOffset+outputH+me.FramePadH, 0)
me.startOutputW = mx - xOffset
me.startOutputH = my - yOffset
g.SetViewOnBottom("msg")
}
-*/
func createStdout(g *gocui.Gui) bool {
if widgetView, _ := g.View("msg"); widgetView == nil {
diff --git a/help.go b/help.go
index 12e8c9b..10ae31c 100644
--- a/help.go
+++ b/help.go
@@ -24,7 +24,7 @@ import (
var helpText []string = []string{"KEYBINDINGS",
"",
- "?: toggle help",
+ "?: toggle zhelp",
"S: super mouse",
"M: list all widgets positions",
"L: list all widgets in tree form",
diff --git a/structs.go b/structs.go
index 902c3fc..68c0c37 100644
--- a/structs.go
+++ b/structs.go
@@ -70,7 +70,6 @@ type config struct {
ecount int // counts how many mouse and keyboard events have occurred
supermouse bool // prints out every widget found while you move the mouse around
depth int // used for listWidgets() debugging
- movingMsg bool // means the user id dragging something around with the mouse
}
// deprecate these