Class: MouseEventManager

olympe.ui.events. MouseEventManager

Manages mouse and touch events.


new MouseEventManager(uiProxy)

Parameters:
Name Type Description
uiProxy olympe.uiapi.UIElement
Implements:

Extends

Members


<non-null> touches :olympe.df.Map.<!olympe.ui.events.TouchEventDetails>

Type:

Methods


getEventClickOrTap()

Gets the 'Click' or 'Tap' events.

Implements:
Returns:

Data flow for mouse events.

Type
olympe.ui.events.MouseEvent | olympe.df.Proxy.<olympe.ui.events.MouseEvent>

getEventDoubleClick()

Gets the 'Double click' events. These events are generated when the mouse button is clicked twice in rapid succession.

Implements:
Returns:

Dataflow for double click events

Type
olympe.df.Proxy.<olympe.ui.events.MouseEvent> | olympe.ui.events.MouseEvent

getEventMouseDown()

Gets then 'Mouse Down' events.

Implements:
Returns:

Dataflow of mouse down events

Type
olympe.df.Proxy.<olympe.ui.events.MouseEvent> | olympe.ui.events.MouseEvent

getEventMouseEnter()

Gets the 'Mouse Enter' events. These events are generated when the pointer enters the bounding box of the element.

Implements:
Returns:

Dataflow of mouse enter events

Type
olympe.df.Proxy.<olympe.ui.events.MouseEvent> | olympe.ui.events.MouseEvent

getEventMouseLeave()

Gets the 'Mouse Leave' events. These events are generated when the pointer leaves the bounding box of the element.

Implements:
Returns:

Dataflow of mouse leave events

Type
olympe.df.Proxy.<olympe.ui.events.MouseEvent> | olympe.ui.events.MouseEvent

getEventMouseMove()

Gets the 'Mouse Move' events.

Implements:
Returns:

Dataflow of mouse moves events

Type
olympe.df.Proxy.<olympe.ui.events.MouseEvent> | olympe.ui.events.MouseEvent

getEventMouseOver()

Gets the 'Mouse Over' events.

Implements:
Returns:

Dataflow of mouse moves events

Type
olympe.df.Proxy.<olympe.ui.events.MouseEvent> | olympe.ui.events.MouseEvent

getEventMouseUp()

Gets the 'Mouse Up' events.

Implements:
Returns:

Dataflow of mouse up events

Type
olympe.df.Proxy.<olympe.ui.events.MouseEvent> | olympe.ui.events.MouseEvent

getEventMouseWheel()

Gets the 'Mouse Wheel' events.

Implements:
Returns:

Dataflow of mouse wheel events

Type
olympe.df.Proxy.<olympe.ui.events.MouseWheelEvent> | olympe.ui.events.MouseWheelEvent

getEventTouchCancel()

Gets the 'Touch Cancel' events.

Implements:
Returns:

Dataflow of touch cancel events

Type
olympe.ui.events.TouchEvent

getEventTouchEnd()

Gets the 'Touch End' events.

Implements:
Returns:

Dataflow of touch end events

Type
olympe.ui.events.TouchEvent

getEventTouchMove()

Gets the 'Touch Move' events.

Implements:
Returns:

Dataflow of touch move events

Type
olympe.ui.events.TouchEvent

getEventTouchStart()

Gets the 'Touch Start' events.

Implements:
Returns:

Dataflow of touch start events

Type
olympe.ui.events.TouchEvent

getMoveEvent()

Gets the 'Move' events. These events are generated when the mouse moves.

Implements:
Returns:
Type
olympe.ui.events.MoveEvent | olympe.df.Proxy.<olympe.ui.events.MoveEvent>

initMoveEvents()

Initializes move events


isMouseDown()

Checks whether the mouse button is pressed down.

Implements:
Returns:

True if a mouse button is down on this object

Type
olympe.df.POBoolean

isMouseOver()

Checks whether the pointer is over this element.

Implements:
Returns:

True if mouse is over object

Type
olympe.df.POBoolean

isMouseUp()

Checks whether the mouse button is not pressed down.

Implements:
Returns:

True if a mouse button is up on this object

Type
olympe.df.POBoolean

offClickOrTap(id)

Unregisters a callback for 'click or tap' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onClickOrTap)

Implements:

offDoubleClick(id)

Unregisters a callback for 'Double Click' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onClickOrTap)

Implements:

<protected> offEvent(id, callbackList)

Removes a specific callback from a callback list.

Parameters:
Name Type Description
id string | olympe.df.Proxy.<string>

ID of the callback to remove

callbackList olympe.ui.events.EventCallbackList

callback list

Inherited From:
Overrides:

offMouseDown(id)

Unregisters a callback for 'Mouse Down' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onMouseDown)

Implements:

offMouseEnter(id)

Unregisters a callback for 'Mouse Enter' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onMouseEnter)

Implements:

offMouseLeave(id)

Unregisters a callback for 'Mouse Leave' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onMouseLeave)

Implements:

offMouseMove(id)

Unregisters a callback for 'Mouse Move' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onMouseMove)

Implements:

offMouseOver(id)

Unregisters a callback for 'Mouse Over' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onMouseOver)

Implements:

offMouseUp(id)

Unregisters a callback for 'Mouse Up' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onMouseUp)

Implements:

offMouseWheel(id)

Unregisters a callback for 'Mouse Wheel' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onMouseWheel)

Implements:

offMoveEnd(id)

Unregisters a callback for 'Move End' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onMoveEnd)

Implements:

offMoveStart(id)

Unregisters a callback for 'Move Start' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onMoveStart)

Implements:

offTouchCancel(id)

Unregisters a callback for 'Touch Cancel' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onTouchCancel)

Implements:

offTouchEnd(id)

Unregisters a callback for 'Touch End' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onTouchEnd)

Implements:

offTouchMove(id)

Unregisters a callback for 'Touch Move' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onTouchMove)

Implements:

offTouchStart(id)

Unregisters a callback for 'Touch Start' events.

Parameters:
Name Type Description
id string

ID of callback (returned by onTouchStart)

Implements:

onClickOrTap(callback [, id] [, priority])

Registers a callback for 'click or tap' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnMouseEventCallback

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onDoubleClick(callback [, id] [, priority])

Registers a callback for 'Double Click' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnMouseEventCallback

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

<protected> onEvent(callback, id, priority, callbackList, offFunction)

Creates an EventCallback and add to a list of callbacks, inserting it according to its priority.

Parameters:
Name Type Description
callback function

the function to associate to the callback

id string | undefined

ID for this new callback

priority number | undefined

Priority for the new callback.

callbackList olympe.ui.events.EventCallbackList

the list to add this callback to

offFunction function

Function to execute when the context is destroyed

Inherited From:
Overrides:
Returns:

Id ID of the created callback

Type
string

onMouseDown(callback [, id] [, priority])

Registers a callback for the 'Mouse Down' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnMouseEventCallback

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onMouseEnter(callback [, id] [, priority])

Registers a callback for the 'Mouse Enter' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnMouseEventCallback

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onMouseLeave(callback [, id] [, priority])

Registers a callback for the 'Mouse Leave' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnMouseEventCallback

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onMouseMove(callback [, id] [, priority])

Registers a callback for the 'Mouse Move' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnMouseEventCallback

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onMouseOver(callback [, id] [, priority])

Registers a callback for the 'Mouse Over' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnMouseEventCallback

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onMouseUp(callback [, id] [, priority])

Registers a callback for the 'Mouse Up' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnMouseEventCallback

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onMouseWheel(callback [, id] [, priority])

Registers a callback for the 'Mouse Wheel' events.

Parameters:
Name Type Argument Default Description
callback function

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onMoveEnd(callback [, id] [, priority])

Registers a callback for the 'Move End' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnMoveEventCallback

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onMoveStart(callback [, id] [, priority])

Registers a callback for the 'Move Start' events.

Parameters:
Name Type Argument Default Description
callback olympe.ui.events.OnMoveEventCallback

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onTouchCancel(callback [, id] [, priority])

Registers a callback for the 'Touch Cancel' events.

Parameters:
Name Type Argument Default Description
callback function

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onTouchEnd(callback [, id] [, priority])

Registers a callback for the 'Touch End' events.

Parameters:
Name Type Argument Default Description
callback function

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onTouchMove(callback [, id] [, priority])

Registers a callback for the 'Touch Move' events.

Parameters:
Name Type Argument Default Description
callback function

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

onTouchStart(callback [, id] [, priority])

Registers a callback for the 'Touch Start' events.

Parameters:
Name Type Argument Default Description
callback function

the function to call

id string <optional>

Id of callback, auto-generated if omitted

priority number <optional>
0

Priority of event (higher number = higher priority)

Implements:
Returns:

Id of the callback

Type
string

<protected> registerOnEvent(event, eventsList)

Registers a list of callbacks to an Event.

Parameters:
Name Type Description
event olympe.df.Proxy.<olympe.ui.events.Event> | olympe.ui.events.Event
eventsList olympe.ui.events.EventCallbackList
Inherited From:
Overrides: