MouseState
-
class
HPS.MouseState: HPS.Object The MouseState class represents the state of the mouse or similar pointer device for a particular event.
Public Functions
-
void
Assign(HPS.MouseState in_that) Copies the source MouseState into this MouseState.
Param in_that: The source MouseState to copy.
-
override void
Dispose()
-
bool
Equals(HPS.MouseState in_that) Check if the source MouseState is equivalent to this MouseState.
Return: true if the objects are equivalent, false otherwise.
-
override bool
Equals(Object obj)
-
HPS.MouseEvent
GetActiveEvent() Get the active event for this MouseState. This will throw an exception if there is no active action for this MouseState.
Return: The action for this MouseState.
-
HPS.MouseButtons
GetButtons() Get the current state of the mouse buttons immediately after the active event.
Return: The state of the mouse buttons.
-
HPS.Key[]
GetEventPath() Get the relevant list of keys up to the window which had focus when the mouse represented by this MouseState underwent the active action. This will throw an exception if there is no event path for this MouseState.
Return: The relevant list of keys up to the window which had focus when the mouse event represented by this MouseState underwent the active action.
-
HPS.WindowKey
GetEventSource() Get the window which had focus when the mouse represented by this MouseState underwent the active action. This will throw an exception if there is no event source for this MouseState.
Return: The window which had focus when the mouse represented by this MouseState underwent the active action.
-
override int
GetHashCode()
-
HPS.WindowPoint
GetLocation() Get the current mouse position.
Return: The location, in window space of the mouse cursor.
-
HPS.ModifierKeys
GetModifierKeys() Get an object representing the state of modifier keys for this MouseState.
Return: An object representing the state of modifier keys.
-
bool
HasAll(HPS.MouseButtons in_mouse_trigger, HPS.ModifierKeys in_modifier_trigger) Checks if this MouseState has all of the specified properties.
Param in_mouse_trigger: The mouse button properties to test for. Param in_modifier_trigger: The modifier keys properties to test for. Return: true if this MouseState has all of the specified properties, false otherwise.
-
MouseState() The default constructor creates an empty MouseState object.
-
MouseState(HPS.MouseState in_that) The copy constructor creates a new MouseState object that contains the same settings as the source MouseState.
Param in_that: The source MouseState to copy.
-
override HPS.Type
ObjectType() This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
Return: The declared type of the object in question, which may differ from the true, underlying type.
-
void
Set(HPS.Key[] in_path, HPS.MouseEvent in_event, HPS.WindowPoint in_point) Sets the properties of this MouseState.
Param in_path: The list of keys up to the window which had focus for this mouse event. Param in_event: The mouse event. Param in_point: The location, in window space of the mouse cursor for this mouse event.
-
void
Set(HPS.Key[] in_path, HPS.MouseEvent in_event, HPS.WindowPoint in_point, HPS.MouseButtons in_buttons) Sets the properties of this MouseState.
Param in_path: The list of keys up to the window which had focus for this mouse event. Param in_event: The mouse event. Param in_point: The location, in window space of the mouse cursor for this mouse event. Param in_buttons: The state of the mouse buttons immediately after this mouse event.
-
void
Set(HPS.Key[] in_path, HPS.MouseEvent in_event, HPS.WindowPoint in_point, HPS.MouseButtons in_buttons, HPS.ModifierKeys in_modifiers) Sets the properties of this MouseState.
Param in_path: The list of keys up to the window which had focus for this mouse event. Param in_event: The mouse event. Param in_point: The location, in window space of the mouse cursor for this mouse event. Param in_buttons: The state of the mouse buttons immediately after this mouse event. Param in_modifiers: The state of modifier keys for this mouse event.
-
void
SetActiveEvent(HPS.MouseEvent in_event) Sets the active event for this MouseState.
Param in_event: The action for this MouseState.
-
void
SetButtons(HPS.MouseButtons in_buttons) Sets the current state of the mouse buttons immediately after the active event.
Param in_buttons: The state of the mouse buttons.
-
void
SetEventPath(HPS.Key[] in_path) Sets the relevant list of keys up to the window which had focus for this mouse event.
Param in_path: The relevant list of keys up to the window which had focus when the mouse event represented by this MouseState underwent the active action.
-
void
SetLocation(HPS.WindowPoint in_point) Sets the current mouse position.
Param in_point: The location, in window space of the mouse cursor.
-
void
SetModifierKeys(HPS.ModifierKeys in_modifiers) Sets an object representing the state of modifier keys for this MouseState.
Param in_modifiers: An object representing the state of modifier keys.
Public Static Functions
-
bool
operator!=(HPS.MouseState a, HPS.MouseState b)
-
bool
operator==(HPS.MouseState a, HPS.MouseState b)
-
void