MCPcopy
hub / github.com/g3n/engine / onCursor

Method onCursor

gui/edit.go:279–293  ·  view source on GitHub ↗

onCursor receives subscribed cursor events

(evname string, ev interface{})

Source from the content-addressed store, hash-verified

277
278// onCursor receives subscribed cursor events
279func (ed *Edit) onCursor(evname string, ev interface{}) {
280
281 if evname == OnCursorEnter {
282 window.Get().SetCursor(window.IBeamCursor)
283 ed.cursorOver = true
284 ed.update()
285 return
286 }
287 if evname == OnCursorLeave {
288 window.Get().SetCursor(window.ArrowCursor)
289 ed.cursorOver = false
290 ed.update()
291 return
292 }
293}
294
295// blink blinks the caret
296func (ed *Edit) blink(arg interface{}) {

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
GetFunction · 0.92
SetCursorMethod · 0.65

Tested by

no test coverage detected