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 | |
---|---|
float | GetDeltaX() Returns the X coordinate of the difference between the current and previous event position. |
void | SetDeltaX(float newDeltaX) Sets the X coordinate of the difference between the current and previous event position. |
float | GetDeltaY() Gets the Y coordinate of the difference between the current and previous event position. |
void | SetDeltaY(float newDeltaY) Sets the Y coordinate of the difference between the current and previous event position. |
float | GetDuration() Returns the event’s duration from start to end. |
void | SetDuration(float newDuration) Sets the duration of the event. |
virtual override void | Send(CohtmlView view) Sends the gesture event to a CohtmlView component. |
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. |
Public Properties
Name | |
---|---|
float | StartLocationX Returns the X coordinate of the event’s starting location. |
float | StartLocationY Returns the Y coordinate of the event’s starting location. |
float | CurrentLocationX Returns the X coordinate of the event’s current location. |
float | CurrentLocationY Returns the Y coordinate of the event’s current location. |
override EventType | PointerEventType Returns the pointer event type. |
GestureEventData.EventType | Type The gesture event type which can be Pan, Fling or Tap. |
Additional inherited members
Public Types inherited from cohtml.InputSystem.PointerEvent
Name | |
---|---|
enum class | EventType { Up, Down, Move} The type of the pointer event. |
Public Functions inherited from cohtml.InputSystem.PointerEvent
Name | |
---|---|
void | AddView(CohtmlView view, Vector2Int position) Temporarily stores the CohtmlView component and the position where the event happened. |
Vector2Int | GetViewPosition(CohtmlView view) Returns the position of the event that hit a CohtmlView. |
void | RemoveView(CohtmlView view) Removes the CohtmlView from the temporary collection of events that happened. |
void | ClearViews() Clears the collection of CohtmlView components hit by this event. |
Public Properties inherited from cohtml.InputSystem.PointerEvent
Name | |
---|---|
Vector2Int | Position The position of the pointer event. |
int | X The X coordinate of the events position. |
int | Y The Y coordinate of the events position. |
Public Functions inherited from cohtml.InputSystem.InputEvent
Name | |
---|---|
void | Dispose() |
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.