Class Mouse
Implements mouse device and routed events
Inheritance
Inherited Members
Namespace: EmptyKeys.UserInterface.Input
Assembly: EmptyKeys.UserInterface.dll
Syntax
public sealed class Mouse
Constructors
Mouse()
Initializes the Mouse class.
Declaration
public Mouse()
Fields
DoubleClickDeltaX
The double click delta x (px)
Declaration
public static int DoubleClickDeltaX
Field Value
Type | Description |
---|---|
System.Int32 |
DoubleClickDeltaY
The double click delta y (px)
Declaration
public static int DoubleClickDeltaY
Field Value
Type | Description |
---|---|
System.Int32 |
DoubleClickTime
The double click time (ms)
Declaration
public static uint DoubleClickTime
Field Value
Type | Description |
---|---|
System.UInt32 |
MouseDownEvent
The mouse down event
Declaration
public static readonly RoutedEvent MouseDownEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
MouseEnterEvent
The mouse enter event
Declaration
public static readonly RoutedEvent MouseEnterEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
MouseLeaveEvent
The mouse leave event
Declaration
public static readonly RoutedEvent MouseLeaveEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
MouseMoveEvent
The mouse move event
Declaration
public static readonly RoutedEvent MouseMoveEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
MouseUpEvent
The mouse up event
Declaration
public static readonly RoutedEvent MouseUpEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
MouseWheelEvent
The mouse wheel event
Declaration
public static readonly RoutedEvent MouseWheelEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
PreviewMouseDownEvent
The preview mouse down event
Declaration
public static readonly RoutedEvent PreviewMouseDownEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
PreviewMouseMoveEvent
The preview mouse move event
Declaration
public static readonly RoutedEvent PreviewMouseMoveEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
PreviewMouseUpEvent
The preview mouse up event
Declaration
public static readonly RoutedEvent PreviewMouseUpEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
PreviewMouseWheelEvent
The preview mouse wheel event
Declaration
public static readonly RoutedEvent PreviewMouseWheelEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
Properties
Captured
Gets the captured.
Declaration
public UIElement Captured { get; }
Property Value
Type | Description |
---|---|
UIElement | The captured. |
CursorType
Gets or sets the type of the cursor.
Declaration
public CursorType CursorType { get; set; }
Property Value
Type | Description |
---|---|
CursorType | The type of the cursor. |
MouseOverElement
Gets the mouse over element.
Declaration
public UIElement MouseOverElement { get; }
Property Value
Type | Description |
---|---|
UIElement | The mouse over element. |
OverrideCursorType
Gets or sets the type of the cursor and override default behavior
Declaration
public CursorType? OverrideCursorType { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<CursorType> | The type of the cursor. |
Methods
Capture(UIElement)
Captures the specified input element.
Declaration
public void Capture(UIElement inputElement)
Parameters
Type | Name | Description |
---|---|---|
UIElement | inputElement | The input element. |
GetPosition()
Gets the position in screen space
Declaration
public PointF GetPosition()
Returns
Type | Description |
---|---|
EmptyKeys.UserInterface.PointF |
GetPosition(UIElement)
Gets the position relative to element
Declaration
public PointF GetPosition(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element. |
Returns
Type | Description |
---|---|
EmptyKeys.UserInterface.PointF |
Update(UIRoot, Double, Double)
Updates listeners of mouse
Declaration
public void Update(UIRoot uiContainer, double elapsedGameTime, double totalGameTime)
Parameters
Type | Name | Description |
---|---|---|
UIRoot | uiContainer | The UI container. |
System.Double | elapsedGameTime | The elapsed game time. |
System.Double | totalGameTime | The total game time. |