diff options
| author | Jeff Carr <[email protected]> | 2025-02-08 08:36:08 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-08 08:36:08 -0600 |
| commit | 078a23e0e080b9eca82c8ef9a582675d81e2f30f (patch) | |
| tree | afec9f8a18030e6521e4f77bc506dcdc2949c9d5 /structs.go | |
| parent | 44264df09d6e7b44dc45417c4fbcc5fdc470580e (diff) | |
detect double click
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -63,16 +63,12 @@ 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 - globalMouseDown bool // yep, mouse is pressed newWindowTrigger chan *guiWidget // work around hack to redraw windows a bit after NewWindow() stdout stdout // information for the STDOUT window showDebug bool // todo: move this into config struct dropdown dropdown // the dropdown menu textbox dropdown // the textbox popup window allwin []*guiWidget // for tracking which window is next - downW int // where the mouse was pressed down - downH int // where the mouse was pressed down - currentDrag *guiWidget // what widget is currently being moved around dark bool // use a 'dark' color palette mouse mouse // mouse settings } @@ -83,6 +79,9 @@ type mouse struct { up time.Time // when the mouse was released. used to detect click vs drag clicktime time.Duration // how long is too long for a mouse click vs drag mouseUp bool // is the mouse up? + double bool // user is double clicking + doubletime time.Duration // how long is too long for double click + resize bool // mouse is resizing something downW int // where the mouse was pressed down downH int // where the mouse was pressed down currentDrag *guiWidget // what widget is currently being moved around @@ -102,7 +101,6 @@ type stdout struct { // mouseOffsetW int // the current 'w' offset // mouseOffsetH int // the current 'h' offset init bool // moves the window offscreen on startup - resize bool // user is resizing the window outputS []string // the buffer of all the output pager int // allows the user to page through the buffer } |
