MouseState

References
public class MouseState
Maintains relevant information associated with a single mouse event.

Constructors

MouseState

#
public MouseState(IFlexControl control, MouseEventArgs e)
Create a new state.
control (IFlexControl)Control.
e (MouseEventArgs)Mouse event arguments.

MouseState

#
public MouseState(PointF controlPoint, PointF contentPoint, MouseButtons buttons)
Create a new mouse state.
controlPoint (PointF)Mouse coordinates in control space.
contentPoint (PointF)Mouse coordinates in content space.
buttons (MouseButtons)Mouse buttons.

Properties

Alt

#
public bool Alt { get; }
Gets whether the Alt key was down when this state was recorded.

Buttons

#
public MouseButtons Buttons { get; }
Gets the mouse button state.

ContentPoint

#
public PointF ContentPoint { get; }
Gets the mouse location in content coordinates.

Control

#
public bool Control { get; }
Gets whether the Control key was down when this state was recorded.

ControlPoint

#
public PointF ControlPoint { get; }
Gets the mouse location in control coordinates.

Empty

#
public static MouseState Empty { get; }
Creates an empty mouse state.

IsEmpty

#
public bool IsEmpty { get; }
Gets whether this state contains any relevant data.

Shift

#
public bool Shift { get; }
Gets whether the Shift key was down when this state was recorded.

Tag

#
public object Tag { get; set; }
Gets or sets the tag data for this state. This field is mutable because objects themselves cannot be guaranteed to be immutable.

Time

#
public DateTime Time { get; }
Gets the time (Utc format) at which the state was recorded.

Methods

ContentSpaceDistance

#
public float ContentSpaceDistance(MouseState other)
Computes the distance between this state and another in content space.
other (MouseState)Other state.
Distance in content space.

ControlSpaceDistance

#
public float ControlSpaceDistance(MouseState other)
Computes the distance between this state and another in control space.
other (MouseState)Other state.
Distance in control space.

IsTag

#
public bool IsTag(object value)
Tests whether the tag matches a specific object.
value (object)Value to test.
True if value matches tag.