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 class | EventType { Up, Down, Move} The type of the pointer event. |
Public Functions
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
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. |
abstract EventType | PointerEventType Returns the type of the pointer event. |
Additional inherited members
Public Functions inherited from cohtml.InputSystem.InputEvent
Name | |
---|---|
virtual void | Send(CohtmlView view) Sends the input event to a CohtmlView component. |
void | Dispose() |
Public Functions inherited from cohtml.InputSystem.IViewSendable
Name | |
---|---|
void | Send(CohtmlView view) |
Public Types Documentation
enum EventType
Enumerator | Value | Description |
---|---|---|
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:
- view The CohtmlView hit by this event.
function RemoveView
void RemoveView(
CohtmlView view
)
Removes the CohtmlView from the temporary collection of events that happened.
Parameters:
- view The CohtmlView component to remove.
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.