cohtml.InputSystem.PointerEvent

Base class for any event based on a pointing device and can be sent to a CohtmlView component.

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

Inherited by cohtml.InputSystem.GestureEvent, cohtml.InputSystem.MouseEvent, cohtml.InputSystem.TouchEvent

Public Types

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

Public Functions

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

Name
Vector2IntPosition
The position of the pointer event.
intX
The X coordinate of the events position.
intY
The Y coordinate of the events position.
abstract EventTypePointerEventType
Returns the type of the pointer event.

Additional inherited members

Public Functions inherited from cohtml.InputSystem.InputEvent

Name
virtual voidSend(CohtmlView view)
Sends the input event to a CohtmlView component.
voidDispose()

Public Functions inherited from cohtml.InputSystem.IViewSendable

Name
voidSend(CohtmlView view)

Public Types Documentation

enum EventType

EnumeratorValueDescription
Up
Down
Move

The type of the pointer event.

Public Functions Documentation

function AddView

void AddView(
    CohtmlView view,
    Vector2Int position
)

Temporarily stores the CohtmlView component and the position where the event happened.

Parameters:

  • view The CohtmlView component hit by the event.
  • position The position where the event happened.

function GetViewPosition

Vector2Int GetViewPosition(
    CohtmlView view
)

Returns the position of the event that hit a CohtmlView.

Parameters:

function RemoveView

void RemoveView(
    CohtmlView view
)

Removes the CohtmlView from the temporary collection of events that happened.

Parameters:

function ClearViews

void ClearViews()

Clears the collection of CohtmlView components hit by this event.

Public Property Documentation

property Position

Vector2Int Position;

The position of the pointer event.

property X

int X;

The X coordinate of the events position.

property Y

int Y;

The Y coordinate of the events position.

property PointerEventType

abstract EventType PointerEventType;

Returns the type of the pointer event.