Table of Contents

Class EventRouter

Namespace
Xui.Core.UI.Input
Assembly
Xui.Core.dll

Routes pointer, mouse, scroll, and touch events through the view tree, performing hit testing, pointer capture, and enter/leave tracking.

public class EventRouter
Inheritance
EventRouter
Inherited Members

Constructors

EventRouter(View)

Initializes a new EventRouter rooted at the given view.

public EventRouter(View rootView)

Parameters

rootView View

The root of the view tree to route events through.

Methods

CapturePointer(View, int)

Captures all subsequent pointer events for the given pointer ID to view.

public void CapturePointer(View view, int pointerId)

Parameters

view View

The view that will exclusively receive events for this pointer.

pointerId int

The pointer identifier to capture.

Dispatch(ref MouseDownEventRef)

Dispatches a mouse button down event as a pointer down event.

public void Dispatch(ref MouseDownEventRef e)

Parameters

e MouseDownEventRef

Dispatch(ref MouseMoveEventRef)

Dispatches a mouse move event as a pointer move event.

public void Dispatch(ref MouseMoveEventRef e)

Parameters

e MouseMoveEventRef

Dispatch(ref MouseUpEventRef)

Dispatches a mouse button up event as a pointer up event.

public void Dispatch(ref MouseUpEventRef e)

Parameters

e MouseUpEventRef

Dispatch(ref ScrollWheelEventRef, Point)

Dispatches a scroll wheel event to the deepest view under position that handles it, bubbling up until Handled is set.

public void Dispatch(ref ScrollWheelEventRef e, Point position)

Parameters

e ScrollWheelEventRef
position Point

Dispatch(ref TouchEventRef)

Dispatches a touch event, translating each touch point into a pointer event.

public void Dispatch(ref TouchEventRef touchEvent)

Parameters

touchEvent TouchEventRef

ReleasePointer(View, int)

Releases pointer capture previously set by CapturePointer(View, int).

public void ReleasePointer(View view, int pointerId)

Parameters

view View

The view that currently holds the capture.

pointerId int

The pointer identifier to release.