Table of Contents

Struct MouseEventArgsSnapshot

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Represents an immutable snapshot of mouse event data at a specific point in time.

public struct MouseEventArgsSnapshot

Remarks

This structure captures key properties of a mouse event, such as the button pressed, cursor location, click count, and the unique identifier of the current target control, if available. It is intended for scenarios where mouse event information needs to be stored or processed independently of the original event lifecycle.

Constructors

MouseEventArgsSnapshot(MouseEventArgs)

Initializes a new instance of the MouseEventArgsSnapshot class using the specified mouse event arguments.

Fields

Button

Specifies the mouse button associated with the event or action.

ClickCount

Represents the number of times the associated element has been clicked.

CurrentTargetUniqueId

Gets or sets the unique identifier of the current target object, if available.

Location

Specifies the location of the object in two-dimensional space.

Timestamp

Represents the timestamp associated with the event or data, typically expressed as the number of ticks or milliseconds since a defined epoch.

Methods

CurrentTargetEquals(AbstractControl?)

Determines whether the current target is equal to the specified control.

IsDoubleClickContinuationOf(in MouseEventArgsSnapshot, AbstractControl)

Determines whether the current mouse event is a continuation of a double-click sequence that began with the specified previous mouse event on the given control.

LocationWithinDoubleClickSize(PointD, AbstractControl)

Determines whether the specified location is within the system-defined double-click area relative to the current location.

SetLastUsedMouseEventSnapshot(MouseEventArgs, ref MouseEventArgsSnapshot)

Updates the provided mouse event snapshot to reflect the state of the specified mouse event, including click count tracking for double-click detection.

TimestampWithinDoubleClickTime(long)

Determines whether the specified timestamp occurs within the system-defined double-click time interval of the current timestamp.