Class WebMouseDispatcher
Implements
Inherited Members
Namespace: Evergine.Web
Assembly: Evergine.Web.dll
Syntax
public class WebMouseDispatcher : MouseDispatcher, IDpiAwarenessDispatcher
Constructors
WebMouseDispatcher(JSObject)
Initializes a new instance of the WebMouseDispatcher class.
Declaration
public WebMouseDispatcher(JSObject element)
Parameters
Type | Name | Description |
---|---|---|
JSObject | element | A DOM element. |
Properties
CursorType
Gets the active cursor type. It can be changed by calling the method TrySetCursorType(CursorTypes).
Declaration
public override CursorTypes CursorType { get; }
Property Value
Type | Description |
---|---|
CursorTypes |
Overrides
DevicePixelRatio
Gets or sets the ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device. This value could also be interpreted as the ratio of pixel sizes: the size of one CSS pixel to the size of one physical pixel.
Declaration
public double DevicePixelRatio { get; set; }
Property Value
Type | Description |
---|---|
double |
ElementOffset
Gets or sets the element offset (left and top) in pixels.
Declaration
public Point ElementOffset { get; set; }
Property Value
Type | Description |
---|---|
Point |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
NativeSetCursorPosition(Point)
Sets the cursor position natively.
Declaration
protected override bool NativeSetCursorPosition(Point position)
Parameters
Type | Name | Description |
---|---|---|
Point | position | The new position. |
Returns
Type | Description |
---|---|
bool | True if the operation was successful; false otherwise. |
Overrides
TrySetCursorType(CursorTypes)
Tries to change the mouse cursor type.
Declaration
public override bool TrySetCursorType(CursorTypes cursorType)
Parameters
Type | Name | Description |
---|---|---|
CursorTypes | cursorType | The new cursor type. |
Returns
Type | Description |
---|---|
bool |
|