cohtml.InputSystem.GestureEvent

A class storing gesture input event data.

Inherits from cohtml.InputSystem.PointerEvent, IGestureEventData, cohtml.InputSystem.InputEvent, cohtml.InputSystem.IViewSendable

Public Functions

Name
floatGetDeltaX()
Returns the X coordinate of the difference between the current and previous event position.
voidSetDeltaX(float newDeltaX)
Sets the X coordinate of the difference between the current and previous event position.
floatGetDeltaY()
Gets the Y coordinate of the difference between the current and previous event position.
voidSetDeltaY(float newDeltaY)
Sets the Y coordinate of the difference between the current and previous event position.
floatGetDuration()
Returns the event’s duration from start to end.
voidSetDuration(float newDuration)
Sets the duration of the event.
virtual override voidSend(CohtmlView view)
Sends the gesture event to a CohtmlView component.
voidSetGesture(GestureEventData.EventType type, float currentX, float currentY, float startX =default, float startY =default, float deltaX =default, float deltaY =default, float duration =default) =default
Sets the gesture event data.

Public Properties

Name
floatStartLocationX
Returns the X coordinate of the event’s starting location.
floatStartLocationY
Returns the Y coordinate of the event’s starting location.
floatCurrentLocationX
Returns the X coordinate of the event’s current location.
floatCurrentLocationY
Returns the Y coordinate of the event’s current location.
override EventTypePointerEventType
Returns the pointer event type.
GestureEventData.EventTypeType
The gesture event type which can be Pan, Fling or Tap.

Additional inherited members

Public Types inherited from cohtml.InputSystem.PointerEvent

Name
enum classEventType { Up, Down, Move}
The type of the pointer event.

Public Functions inherited from cohtml.InputSystem.PointerEvent

Name
voidAddView(CohtmlView view, Vector2Int position)
Temporarily stores the CohtmlView component and the position where the event happened.
Vector2IntGetViewPosition(CohtmlView view)
Returns the position of the event that hit a CohtmlView.
voidRemoveView(CohtmlView view)
Removes the CohtmlView from the temporary collection of events that happened.
voidClearViews()
Clears the collection of CohtmlView components hit by this event.

Public Properties inherited from cohtml.InputSystem.PointerEvent

Name
Vector2IntPosition
The position of the pointer event.
intX
The X coordinate of the events position.
intY
The Y coordinate of the events position.

Public Functions inherited from cohtml.InputSystem.InputEvent

Name
voidDispose()

Public Functions Documentation

function GetDeltaX

float GetDeltaX()

Returns the X coordinate of the difference between the current and previous event position.

function SetDeltaX

void SetDeltaX(
    float newDeltaX
)

Sets the X coordinate of the difference between the current and previous event position.

function GetDeltaY

float GetDeltaY()

Gets the Y coordinate of the difference between the current and previous event position.

function SetDeltaY

void SetDeltaY(
    float newDeltaY
)

Sets the Y coordinate of the difference between the current and previous event position.

function GetDuration

float GetDuration()

Returns the event’s duration from start to end.

function SetDuration

void SetDuration(
    float newDuration
)

Sets the duration of the event.

function Send

virtual override void Send(
    CohtmlView view
)

Sends the gesture event to a CohtmlView component.

Parameters:

  • view The CohtmlView component to receive the event.

Reimplements: cohtml.InputSystem.InputEvent.Send

function SetGesture

void SetGesture(
    GestureEventData.EventType type,
    float currentX,
    float currentY,
    float startX =default,
    float startY =default,
    float deltaX =default,
    float deltaY =default,
    float duration =default
) =default

Sets the gesture event data.

Parameters:

  • type The type of the gesture.
  • currentX The events current X coordinate.
  • currentY The events current Y coordinate.
  • startX The events start X coordinate.
  • startY The events start Y coordinate.
  • deltaX The events delta X coordinate.
  • deltaY The events delta Y coordinate.
  • duration The events duration.

Public Property Documentation

property StartLocationX

float StartLocationX;

Returns the X coordinate of the event’s starting location.

property StartLocationY

float StartLocationY;

Returns the Y coordinate of the event’s starting location.

property CurrentLocationX

float CurrentLocationX;

Returns the X coordinate of the event’s current location.

property CurrentLocationY

float CurrentLocationY;

Returns the Y coordinate of the event’s current location.

property PointerEventType

override EventType PointerEventType;

Returns the pointer event type.

property Type

GestureEventData.EventType Type;

The gesture event type which can be Pan, Fling or Tap.