Murl Engine Lua Addon API  Version 1.0 beta
Murl.Input.ITouchableHandler

The ITouchableHandler interface.

The touchable handler is used by Graph::ICamera and Graph::IButton to track the input positions and buttons on the display surface depending on the scene graph.


Table members

Methods


Init()

Initialize the touchable handler.

Boolean Init()

Returns
Boolean true if successful.

DeInit()

Deinitialize the touchable handler.

Boolean DeInit()

Returns
Boolean true if successful.

CreateScreenArea()

Create a screen area object.

Murl.Input.IScreenArea CreateScreenArea()

Returns
Murl.Input.IScreenArea The created screen area object

DestroyScreenArea(screenArea)

Destroy a screen area object.

Boolean, Murl.Input.IScreenArea DestroyScreenArea(Murl.Input.IScreenArea screenArea)

Parameters
screenAreaA reference to the screen area object pointer. After destruction the pointer is set to null.
Returns
Boolean true if successful.
Murl.Input.IScreenArea screenArea A reference to the screen area object pointer. After destruction the pointer is set to null.

CreateProjection()

Create a projection object.

Murl.Input.IProjection CreateProjection()

Returns
Murl.Input.IProjection The created projection object

DestroyProjection(screenProjection)

Destroy a projection object.

Boolean, Murl.Input.IProjection DestroyProjection(Murl.Input.IProjection screenProjection)

Parameters
screenProjectionA reference to the projection object pointer. After destruction the pointer is set to null.
Returns
Boolean true if successful.
Murl.Input.IProjection screenProjection A reference to the projection object pointer. After destruction the pointer is set to null.

CreateTouchArea(type)

Create a touch area object.

Murl.Input.ITouchArea CreateTouchArea(Murl.IEnums.TouchAreaShape type)

Parameters
typeThe kind of touch area to create.
Returns
Murl.Input.ITouchArea The created touch area object

DestroyTouchArea(touchArea)

Destroy a touch area object.

Boolean, Murl.Input.ITouchArea DestroyTouchArea(Murl.Input.ITouchArea touchArea)

Parameters
touchAreaA reference to the touch area pointer. After destruction the pointer is set to null.
Returns
Boolean true if successful.
Murl.Input.ITouchArea touchArea A reference to the touch area pointer. After destruction the pointer is set to null.

Reset()

Reset all screen projections.

Boolean Reset()

Returns
Boolean true if successful.

SetCurrentLayer(layer)

Set the current layer.

Boolean SetCurrentLayer(Integer layer)

Parameters
layerThe current layer.
Returns
Boolean true if successful.

AddCurrentProjection(projection, screenArea)

Add and set the current projection.

Boolean AddCurrentProjection(Murl.Input.IProjection projection, Murl.Input.IScreenArea screenArea)

Parameters
projectionThe current projection to add or null.
screenAreaThe screen area the projection belongs to, or null for default.
Returns
Boolean true if successful, false if null is added.

AddTouchArea(touchArea, subScreenArea)

Add a touch area to the current screen projection considering the current tansformation, depth order and layer.

Boolean AddTouchArea(Murl.Input.ITouchArea touchArea, Murl.Input.IScreenArea subScreenArea)

Parameters
touchAreaThe touch area to add.
subScreenAreaThe optional screen area to delegate input to, or null if no delegation is desired.
Returns
Boolean true if successful.

ReportBegin()

Begin reporting device inputs.

Boolean ReportBegin()

Returns
Boolean true if successful.

ReportDevice(deviceType, deviceId, hasUpdate, buttons, posX, posY, inRangeX, inRangeY, moved, cancelled)

Report a device input.

Boolean ReportDevice(Murl.IEnums.InputDeviceType deviceType, Integer deviceId, Boolean hasUpdate, Murl.Input.IMouseButtons buttons, Number posX, Number posY, Boolean inRangeX, Boolean inRangeY, Boolean moved, Boolean cancelled)

Parameters
deviceTypeThe device type.
deviceIdThe device identifier.
hasUpdatetrue if the device has received new data since the last report.
buttonsThe mouse buttons interface.
posXThe device x-position on the display surface.
posYThe device y-position on the display surface.
inRangeXtrue if posX was not clamped to the window area.
inRangeYtrue if posY was not clamped to the window area.
movedtrue if the device was moved.
cancelledtrue if the device input was cancelled.
Returns
Boolean true if successful.

ReportEnd()

End reporting device inputs.

Boolean ReportEnd()

Returns
Boolean true if successful.