alphaTab.platform.IMouseEventArgs
This interface represents the information about a mouse event that occured on the UI.
interface IMouseEventArgsProperties​
isLeftMouseButton​
Gets a value indicating whether the left mouse button was pressed.
- JavaScript
- C#
- Kotlin
readonly isLeftMouseButton: boolean;bool IsLeftMouseButton { get; }val isLeftMouseButton: BooleanMethods​
getX​
Gets the X-position of the cursor at the time of the event relative to the given UI container.
- JavaScript
- C#
- Kotlin
getX(relativeTo: IContainer): numberdouble GetX(IContainer relativeTo)fun getX(relativeTo: IContainer): Double| Parameter | Summary |
|---|---|
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.
- JavaScript
- C#
- Kotlin
getY(relativeTo: IContainer): numberdouble GetY(IContainer relativeTo)fun getY(relativeTo: IContainer): Double| Parameter | Summary |
|---|---|
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.
- JavaScript
- C#
- Kotlin
preventDefault(): voidvoid PreventDefault()fun preventDefault(): Unit