MouseEvent
classin packageklyn.gui.event
public class MouseEvent extends GuiEvent:
└ MouseEvent

Pointer event payload emitted by GUI widgets.

Coordinates are window-client coordinates, matching widget bounds and custom painting coordinates.

canvas.mouseMoved += lambda(e: MouseEvent): print(e.x)
Properties
Modifier and Type Member Description
public readonly property alt
alt as Boolean
Whether Alt was held during the pointer event.
public readonly property button
button as Int
Pointer button index, or 0 when no button is associated with the event.
public readonly property clickCount
clickCount as Int
Number of clicks represented by the event.
public readonly property control
control as Boolean
Whether Control was held during the pointer event.
public readonly property shift
shift as Boolean
Whether Shift was held during the pointer event.
public readonly property x
x as Int
Pointer x coordinate in window-client coordinates.
public readonl y
y property y as Int
Pointer y coordinate in window-client coordinates.
Properties inherited from Event: source, timestamp
Constructors
Modifier and Type Member Description
public MouseEvent
MouseEvent(source as Object, x as Int, y as Int, button as Int = 0, clickCount as Int = 1, alt as Boolean = false, control as Boolean = false, shift as Boolean = false):
Creates a pointer event payload.