Static methods
staticsetWheelEventBlockBehavior(behavior:MouseEventBlockBehavior):Void
Allows fine grained control of mouse wheel browser default actions (html5 only).
Parameters:
behavior | can be: Full - block wheel events. None - do not block wheel events. Custom(func:(event:WheelEvent)->Bool) - set custom handler for wheel event (should return true if wheel event blocked). |
---|
Methods
lock():Void
Locks the cursor position and hides it. For catching movements, use the moveX
/moveY
arguments of your moveListener
handler.
notify(?downListener:(button:Int, x:Int, y:Int) ‑> Void, ?upListener:(button:Int, x:Int, y:Int) ‑> Void, ?moveListener:(x:Int, y:Int, moveX:Int, moveY:Int) ‑> Void, ?wheelListener:(delta:Int) ‑> Void, ?leaveListener:() ‑> Void):Void
Creates event handlers from passed functions.
Parameters:
downListener | (optional) function with |
---|---|
upListener | (optional) function with |
moveListener | (optional) function with |
wheelListener | (optional) function with |
leaveListener | (optional) function without` arguments, when fired mouse leave canvas. |
notifyOnLockChange(change:() ‑> Void, error:() ‑> Void):Void
Creates event handlers from passed functions.
Parameters:
change | function fired when the lock is turned on / off. |
---|---|
error | function fired when a toggle error occurs. |
notifyWindowed(windowId:Int, ?downListener:(Int, Int, Int) ‑> Void, ?upListener:(Int, Int, Int) ‑> Void, ?moveListener:(Int, Int, Int, Int) ‑> Void, ?wheelListener:Int ‑> Void, ?leaveListener:() ‑> Void):Void
Creates event handlers from passed functions like notify
function, but only for window with windowId:Int
id argument. The windows are not supported by all the targets.
remove(?downListener:(button:Int, x:Int, y:Int) ‑> Void, ?upListener:(button:Int, x:Int, y:Int) ‑> Void, ?moveListener:(x:Int, y:Int, moveX:Int, moveY:Int) ‑> Void, ?wheelListener:(delta:Int) ‑> Void, ?leaveListener:() ‑> Void):Void
Removes event handlers from the passed functions that were passed to notify
function.
removeFromLockChange(change:() ‑> Void, error:() ‑> Void):Void
Removes event handlers from the passed functions that were passed to notifyOnLockChange
function.
removeWindowed(windowId:Int, ?downListener:(Int, Int, Int) ‑> Void, ?upListener:(Int, Int, Int) ‑> Void, ?moveListener:(Int, Int, Int, Int) ‑> Void, ?wheelListener:Int ‑> Void, ?leaveListener:() ‑> Void):Void
Removes event handlers for windowId:Int
from the passed functions that were passed to notifyWindowed
function.
setSystemCursor(cursor:MouseCursor):Void
Set the native system cursor
Parameters:
cursor | The native cursor to show. |
---|
unlock():Void
Unlock the cursor position and hides it. For catching movements, use the moveX
/moveY
arguments of your moveListener
handler.