Class AvaloniaMouseDispatcher
Provides mouse input dispatching functionality for Avalonia-based Evergine applications. This dispatcher translates Avalonia mouse events into Evergine's mouse input system.
Inherited Members
Namespace: Evergine.Avalonia
Assembly: Evergine.Avalonia.dll
Syntax
public class AvaloniaMouseDispatcher : MouseDispatcher
Constructors
AvaloniaMouseDispatcher()
Initializes a new instance of the AvaloniaMouseDispatcher class.
Declaration
public AvaloniaMouseDispatcher()
Properties
CursorType
Gets the current cursor type.
Declaration
public override CursorTypes CursorType { get; }
Property Value
| Type | Description |
|---|---|
| CursorTypes |
Overrides
Methods
DispatchMouseDown(MouseButtons)
Dispatches a mouse button down event to the Evergine input system.
Declaration
public void DispatchMouseDown(MouseButtons button)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseButtons | button | The mouse button that was pressed. |
DispatchMouseMove(int, int)
Dispatches a mouse move event to the Evergine input system. Automatically handles mouse enter events if the mouse was not previously over the control.
Declaration
public void DispatchMouseMove(int x, int y)
Parameters
| Type | Name | Description |
|---|---|---|
| int | x | The x-coordinate of the mouse position. |
| int | y | The y-coordinate of the mouse position. |
DispatchMouseUp(MouseButtons)
Dispatches a mouse button up event to the Evergine input system.
Declaration
public void DispatchMouseUp(MouseButtons button)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseButtons | button | The mouse button that was released. |
DispatchMouseWheel(int)
Dispatches a mouse wheel scroll event to the Evergine input system.
Declaration
public void DispatchMouseWheel(int delta)
Parameters
| Type | Name | Description |
|---|---|---|
| int | delta | The scroll delta value. Positive values indicate upward scrolling, negative values indicate downward scrolling. |
NativeSetCursorPosition(Point)
Sets the cursor position natively. This implementation does not perform actual positioning.
Declaration
protected override bool NativeSetCursorPosition(Point position)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | position | The target position for the cursor. |
Returns
| Type | Description |
|---|---|
| bool | Always returns |
Overrides
TrySetCursorType(CursorTypes)
Attempts to set the cursor type.
Declaration
public override bool TrySetCursorType(CursorTypes cursorType)
Parameters
| Type | Name | Description |
|---|---|---|
| CursorTypes | cursorType | The cursor type to set. |
Returns
| Type | Description |
|---|---|
| bool | Always returns |