.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited


###############
MouseInputEvent
###############

.. js:class:: Event.MouseInputEvent

   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~Event.MouseInputEvent.constructor`
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~Event.MouseInputEvent.viewKey`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~Event.MouseInputEvent.altDown`
   * :js:meth:`~Event.MouseInputEvent.commandDown`
   * :js:meth:`~Event.MouseInputEvent.controlDown`
   * :js:meth:`~Event.MouseInputEvent.getButton`
   * :js:meth:`~Event.MouseInputEvent.getButtons`
   * :js:meth:`~Event.MouseInputEvent.getDate`
   * :js:meth:`~Event.MouseInputEvent.getEventType`
   * :js:meth:`~Event.MouseInputEvent.getHandled`
   * :js:meth:`~Event.MouseInputEvent.getModifiers`
   * :js:meth:`~Event.MouseInputEvent.getPosition`
   * :js:meth:`~Event.MouseInputEvent.setHandled`
   * :js:meth:`~Event.MouseInputEvent.shiftDown`
   
   




Constructors
============

.. js:method:: Event.MouseInputEvent.constructor

   .. rst-class:: sig-pretty-signature
   
      | MouseInputEvent(**positionX**\ : *number*\ , **positionY**\ : *number*\ , **button**\ : :js:data:`~Button`\ , **buttons**\ : :js:data:`~Buttons`\ , **modifiers**\ : :js:data:`~KeyModifiers`\ , **inputType**\ : :js:data:`~MouseInputType`\ , **viewKey**\ : :js:data:`ViewKey <Sc.ViewKey>`\ ): :js:class:`MouseInputEvent <Event.MouseInputEvent>`
   
   Mouse Event class
   
   **Parameters**
   
      **positionX**\ : *number*
   
         X window position of the mouse
   
   
      **positionY**\ : *number*
   
         Y window position of the mouse
   
   
      **button**\ : :js:data:`~Button`
   
         mouse button associated with this event
   
   
      **buttons**\ : :js:data:`~Buttons`
   
         mouse buttons currently pressed with this event
   
   
      **modifiers**\ : :js:data:`~KeyModifiers`
   
         bitwise collection of values from KeyModifiers enum
   
   
      **inputType**\ : :js:data:`~MouseInputType`
   
         the type of the event
   
   
      **viewKey**\ : :js:data:`ViewKey <Sc.ViewKey>`
   
   
   **Returns**\ : :js:class:`MouseInputEvent <Event.MouseInputEvent>`
   





Accessors
=========

.. js:method:: Event.MouseInputEvent.viewKey

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | *get* viewKey(): :js:data:`ViewKey <Sc.ViewKey>`
   
   Get the ViewKey this event is associated with.
   
   **Returns**\ : :js:data:`ViewKey <Sc.ViewKey>`
   





Methods
=======

.. js:method:: Event.MouseInputEvent.altDown

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | altDown(): *boolean*
   
   gets the state of the alt key
   
   **Returns**\ : *boolean*
   
      whether the alt key was down when this event was generated
   
   



.. js:method:: Event.MouseInputEvent.commandDown

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | commandDown(): *boolean*
   
   gets the state of the command key
   
   **Returns**\ : *boolean*
   
      whether the command key was down when this event was generated
   
   



.. js:method:: Event.MouseInputEvent.controlDown

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | controlDown(): *boolean*
   
   gets the state of the control key
   
   **Returns**\ : *boolean*
   
      whether the control key was down when this event was generated
   
   



.. js:method:: Event.MouseInputEvent.getButton

   .. rst-class:: sig-pretty-signature
   
      | getButton(): :js:data:`~Button`
   
   gets the mouse button associated with this event
   
   **Returns**\ : :js:data:`~Button`
   
      the mouse button for this event
   
   



.. js:method:: Event.MouseInputEvent.getButtons

   .. rst-class:: sig-pretty-signature
   
      | getButtons(): :js:data:`~Buttons`
   
   gets the mouse buttons currently pressed with this event
   
   **Returns**\ : :js:data:`~Buttons`
   
      the mouse buttons currently pressed for this event
   
   



.. js:method:: Event.MouseInputEvent.getDate

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | getDate(): *Date*
   
   Gets the Date this event occurred
   
   **Returns**\ : *Date*
   
      the event Date
   
   



.. js:method:: Event.MouseInputEvent.getEventType

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | getEventType(): :js:data:`~MouseInputType`
   
   gets the event type
   
   **Returns**\ : :js:data:`~MouseInputType`
   
      the type of mouse event
   
   



.. js:method:: Event.MouseInputEvent.getHandled

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | getHandled(): *boolean*
   
   Gets the handled state of the event
   
   **Returns**\ : *boolean*
   
      whether the event has been handled
   
   



.. js:method:: Event.MouseInputEvent.getModifiers

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | getModifiers(): :js:data:`~KeyModifiers`
   
   gets the event modifiers
   
   **Returns**\ : :js:data:`~KeyModifiers`
   
      bitwise combination of KeyModifiers
   
   



.. js:method:: Event.MouseInputEvent.getPosition

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | getPosition(): :js:class:`~Point2`
   
   gets the window position of the mouse pointer for this event
   
   **Returns**\ : :js:class:`~Point2`
   
      the mouse position for this event
   
   



.. js:method:: Event.MouseInputEvent.setHandled

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | setHandled(**handled**\ : *boolean*\ ): *void*
   
   Sets the handled state of the event. When an event has been handled it will not propagate any further
   
   **Parameters**
   
      **handled**\ : *boolean*
   
         Indicates whether this event has been handled.
   
   
   
   **Returns**\ : *void*
   



.. js:method:: Event.MouseInputEvent.shiftDown

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | shiftDown(): *boolean*
   
   gets the state of the shift key
   
   **Returns**\ : *boolean*
   
      whether the shift key was down when this event was generated
   
   





