MouseEvent

class HPS.MouseEvent : public HPS.InputEvent

The MouseEvent class is the event generated for each mouse action.

Public Types

enum Action

Enumeration of various actions a mouse can undergo for a MouseEvent.

Values:

ButtonUp
ButtonDown

A mouse button has been released.

Move

A mouse button has been pressed.

Scroll

The mouse location has changed.

Enter

The scroll wheel has been moved.

Leave

The mouse cursor has moved into the active window.

Public Functions

override HPS.Event Clone ()

Allocates and returns a copy of this MouseEvent.

Return

A copy of this MouseEvent.

override void Dispose ()
override bool Drop (HPS.Event in_that_event)

Determines if this MouseEvent can be dropped in favor of the following mouse event.

Param in_that_event

Event to compare with this MouseEvent.

Return

true if this event can be dropped, false otherwise.

override bool Equals (HPS.InputEvent in_that)

Check if the source object is equivalent to this object.

Param in_that

The source object to compare to this object.

Return

true if the objects are equivalent, false otherwise.

bool Equals (HPS.MouseEvent in_that)

Check if the source object is equivalent to this object.

Param in_that

The source object to compare to this object.

Return

true if the objects are equivalent, false otherwise.

override bool Equals (Object obj)
override IntPtr Freshen ()

This optional function is used to determine if the current event can be dropped in favor of newer event of the same type if one is available.

Return

A cookie representing the freshen category. Zero indicates a non-freshening event.

override int GetHashCode ()
MouseEvent ()

The default constructor creates an uninitialized MouseEvent object.

MouseEvent (HPS.Event in_event)

This constructor converts an EventObject to a MouseEvent object.

Param in_event

The EventObject to be converted.

MouseEvent (HPS.MouseEvent in_that)
MouseEvent (HPS.MouseEvent.Action in_action, float in_wheel_delta)

This constructor creates a MouseEvent object, most useful for a wheel action.

Param in_action

Action of the mouse for this MouseEvent.

Param in_wheel_delta

If the action involves the mouse wheel, this is the amount the wheel moved. It is positive if the mouse wheel is moved forward (away from the user) or negative if the mouse wheel is moved downward (toward the user).

MouseEvent (HPS.MouseEvent.Action in_action, float in_wheel_delta, HPS.WindowPoint in_location)

This constructor creates a MouseEvent object, most useful for a wheel action.

Param in_action

Action of the mouse for this MouseEvent.

Param in_wheel_delta

If the action involves the mouse wheel, this is the amount the wheel moved. It is positive if the mouse wheel is moved forward (away from the user) or negative if the mouse wheel is moved downward (toward the user).

Param in_location

The location in window space of the mouse cursor.

MouseEvent (HPS.MouseEvent.Action in_action, float in_wheel_delta, HPS.WindowPoint in_location, HPS.ModifierKeys in_modifier)

This constructor creates a MouseEvent object, most useful for a wheel action.

Param in_action

Action of the mouse for this MouseEvent.

Param in_wheel_delta

If the action involves the mouse wheel, this is the amount the wheel moved. It is positive if the mouse wheel is moved forward (away from the user) or negative if the mouse wheel is moved downward (toward the user).

Param in_location

The location in window space of the mouse cursor.

Param in_modifier

The modifier keys for this MouseEvent.

MouseEvent (HPS.MouseEvent.Action in_action, float in_wheel_delta, HPS.WindowPoint in_location, HPS.ModifierKeys in_modifier, ulong in_click_count)

This constructor creates a MouseEvent object, most useful for a wheel action.

Param in_action

Action of the mouse for this MouseEvent.

Param in_wheel_delta

If the action involves the mouse wheel, this is the amount the wheel moved. It is positive if the mouse wheel is moved forward (away from the user) or negative if the mouse wheel is moved downward (toward the user).

Param in_location

The location in window space of the mouse cursor.

Param in_modifier

The modifier keys for this MouseEvent.

Param in_click_count

The number of clicks received.

MouseEvent (HPS.MouseEvent.Action in_action, HPS.WindowPoint in_location)

This constructor creates a MouseEvent object for a given action.

Param in_action

Action of this MouseEvent.

Param in_location

The location in window space of the mouse cursor.

MouseEvent (HPS.MouseEvent.Action in_action, HPS.WindowPoint in_location, HPS.MouseButtons in_button)

This constructor creates a MouseEvent object for a given action.

Param in_action

Action of this MouseEvent.

Param in_location

The location in window space of the mouse cursor.

Param in_button

If the action is a button event, this is the button.

MouseEvent (HPS.MouseEvent.Action in_action, HPS.WindowPoint in_location, HPS.MouseButtons in_button, HPS.ModifierKeys in_modifier)

This constructor creates a MouseEvent object for a given action.

Param in_action

Action of this MouseEvent.

Param in_location

The location in window space of the mouse cursor.

Param in_button

If the action is a button event, this is the button.

Param in_modifier

The modifier keys for this MouseEvent.

MouseEvent (HPS.MouseEvent.Action in_action, HPS.WindowPoint in_location, HPS.MouseButtons in_button, HPS.ModifierKeys in_modifier, ulong in_click_count)

This constructor creates a MouseEvent object for a given action.

Param in_action

Action of this MouseEvent.

Param in_location

The location in window space of the mouse cursor.

Param in_button

If the action is a button event, this is the button.

Param in_modifier

The modifier keys for this MouseEvent.

Param in_click_count

The number of clicks received.

Properties

ulong ClickCount { get; set; }
HPS.MouseEvent.Action CurrentAction { get; set; }
HPS.MouseButtons CurrentButton { get; set; }
HPS.WindowPoint Location { get; set; }
float WheelDelta { get; set; }

Public Static Functions

bool operator!= (HPS.MouseEvent a, HPS.MouseEvent b)
bool operator== (HPS.MouseEvent a, HPS.MouseEvent b)