Skip to main content

alphaTab.platform.IMouseEventArgs

This interface represents the information about a mouse event that occured on the UI.

 interface IMouseEventArgs

Properties​

isLeftMouseButton​

Gets a value indicating whether the left mouse button was pressed.

readonly isLeftMouseButton: boolean;

Methods​

getX​

Gets the X-position of the cursor at the time of the event relative to the given UI container.

getX(relativeTo: IContainer): number
ParameterSummary
relativeToAll

The UI element to which the relative position should be calculated.

Returns​

The relative X-position of the cursor to the given UI container at the time the event occured.

getY​

Gets the Y-position of the cursor at the time of the event relative to the given UI container.

getY(relativeTo: IContainer): number
ParameterSummary
relativeToAll

The UI element to which the relative position should be calculated.

Returns​

The relative Y-position of the cursor to the given UI container at the time the event occured.

preventDefault​

If called, the original mouse action is prevented and the event is flagged as handled.

preventDefault(): void