Interface IGorgonMouse
Provides events and state for mouse data from a physical mouse.
Inherited Members
Namespace: Gorgon.Input
Assembly: Gorgon.Input.dll
Syntax
public interface IGorgonMouse : IGorgonRawInputDevice, IGorgonRawInputDeviceData<GorgonRawMouseData>
Properties
| Edit this page View SourceButtons
Property to set or return the pointing device button(s) that are currently down.
Declaration
MouseButtons Buttons { get; set; }
Property Value
Type | Description |
---|---|
MouseButtons |
DoubleClickDelay
Property to set or return the delay between button clicks, in milliseconds, for a double click event.
Declaration
int DoubleClickDelay { get; set; }
Property Value
Type | Description |
---|---|
int |
DoubleClickSize
Property to set or return the Size
of the area, in pixels, surrounding the cursor that represents a valid double click area.
Declaration
Size2 DoubleClickSize { get; set; }
Property Value
Type | Description |
---|---|
Size2 |
Remarks
When this value is set, and a mouse button is double clicked, this value is checked to see if the mouse Position falls within -value.Size.Width
to value.Size.Width
,
and -value.Size.Height"
to value.Size.Height
on the second click. If the Position is within this area, then the double click event will be triggered. Otherwise, it will
not.
Passing Size.Empty
to this property will disable double clicking.
Info
Property to return information about this mouse.
Declaration
IGorgonMouseInfo Info { get; }
Property Value
Type | Description |
---|---|
IGorgonMouseInfo |
Position
Property to set or return the position of the mouse.
Declaration
Point Position { get; set; }
Property Value
Type | Description |
---|---|
Point |
Remarks
This property is affected by the PositionConstraint value.
PositionConstraint
Property to set or return the Rectangle
used to constrain the mouse Position.
Declaration
Rectangle PositionConstraint { get; set; }
Property Value
Type | Description |
---|---|
Rectangle |
Remarks
This will constrain the value of the Position within the specified Rectangle
. This means that a cursor positioned at 320x200 with a region located at 330x210 with a width
and height of 160x160 will make the Position property return 330x210. If the cursor was positioned at 500x400, the Position property would return 480x360.
Passing Rectangle.Empty
to this property will remove the constraint on the position.
RelativePositionOffset
Property to set or return the last reported relative position movement offset.
Declaration
Point RelativePositionOffset { get; set; }
Property Value
Type | Description |
---|---|
Point |
Remarks
This value represents the number of units that the mouse moved since its last MouseMove event.
Users should reset this value when they are done with it. Otherwise, it will not be reset until the next MouseWheelMove event.
RelativeWheelDelta
Property to set or return the last reported relative wheel movement delta.
Declaration
int RelativeWheelDelta { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
This value represents the number of units that the mouse wheel moved since its last MouseWheelMove event.
Users should reset this value when they are done with it. Otherwise, it will not be reset until the next MouseWheelMove event.
WheelConstraint
Property to set or return the GorgonRange used to constrain the mouse WheelPosition.
Declaration
GorgonRange WheelConstraint { get; set; }
Property Value
Type | Description |
---|---|
GorgonRange |
Remarks
If a mouse wheel exists on the device, this will constrain the value of the WheelPosition within the specified GorgonRange. This means that a wheel with a position of 160, with a constraint of 180-190 will make the WheelPosition property return 180.
Passing Empty to this property will remove the constraint on the position.
WheelPosition
Property to set or return the pointing device wheel position.
Declaration
int WheelPosition { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
This property is affected by the WheelConstraint value.
Events
| Edit this page View SourceMouseButtonDown
Event triggered when a mouse button is held down.
Declaration
event EventHandler<GorgonMouseEventArgs> MouseButtonDown
Event Type
Type | Description |
---|---|
EventHandler<GorgonMouseEventArgs> |
MouseButtonUp
Event triggered when a mouse button is released.
Declaration
event EventHandler<GorgonMouseEventArgs> MouseButtonUp
Event Type
Type | Description |
---|---|
EventHandler<GorgonMouseEventArgs> |
MouseDoubleClicked
Event triggered when a double click is performed on a mouse button.
Declaration
event EventHandler<GorgonMouseEventArgs> MouseDoubleClicked
Event Type
Type | Description |
---|---|
EventHandler<GorgonMouseEventArgs> |
MouseMove
Event triggered when the mouse is moved.
Declaration
event EventHandler<GorgonMouseEventArgs> MouseMove
Event Type
Type | Description |
---|---|
EventHandler<GorgonMouseEventArgs> |
MouseWheelMove
Event triggered when a mouse wheel (if present) is moved.
Declaration
event EventHandler<GorgonMouseEventArgs> MouseWheelMove
Event Type
Type | Description |
---|---|
EventHandler<GorgonMouseEventArgs> |