### IMouseEvent

  The IMouseEvent class represents a mouse-related event. IMouseHandler::dispatchHandlerEvent creates an object of this class to represent a mouse movement event. This class is also the base class for IMouseClickEvent.

  You can use this event to query the location of the mouse pointer and the window under the mouse at the time the mouse event occurred. You can also query the keyboard state of the Alt key (on some keyboards, this is called the Menu key), the Ctrl (Control) key, and the Shift key at the time the mouse event occurred.

### IMouseEvent - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class.

~IMouseEvent

      public:
      virtual ~IMouseEvent()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

IMouseEvent

      public:
      IMouseEvent(const IEvent& event)

  Constructs an IMouseEvent object from the specified event. IMouseHandler::dispatchHandlerEvent constructs objects of this class from an object of the class IEvent and passes the resulting object to the function IMouseHandler::mouseMoved.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Keyboard State

You can query the keyboard state information at the time the mouse event was generated. This allows you to detect certain combinations of the keyboard and mouse, such as when the user presses mouse button 1 with the Alt key pressed.

isAltKeyDown

      public:
      virtual bool isAltKeyDown() const

  Returns true if the Alt key is down when the mouse event was generated. On some keyboards, this Alt key is called the Menu key.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

isCtrlKeyDown

      public:
      virtual bool isCtrlKeyDown() const

  Returns true if the Ctrl key is down when the mouse event was generated.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

isShiftKeyDown

      public:
      virtual bool isShiftKeyDown() const

  Returns true if the Shift key is down when the mouse event was generated.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Position

These members query the position of the mouse pointer. The position information is useful in determining what the user is interacting with.

mousePosition

      public:
      virtual IPoint mousePosition() const

  Returns the mouse pointer position relative to the window returned by IEvent::dispatchingWindow. The returned point is in application coordinates (see ICoordinateSystem for details).

  If you need to obtain the mouse position relative to the desktop window, use the static function IWindow::mapPoint.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Window Information

Use these members to determine the window that the mouse is interacting with.

windowUnderPointer

      public:
      virtual IWindowHandle windowUnderPointer() const

  Returns the handle of the window that is under the mouse pointer.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IMouseEvent - Inherited Member Functions and Data

#### Inherited Public Functions

  IEvent

  -     virtual ~IEvent()

  -     IWindowHandle controlHandle() const

  -     virtual IWindow* controlWindow() const

  -     IEvent& decrementOwnerLevels()

  -     virtual IWindow* dispatchingWindow() const

  -     unsigned long eventId() const

  -     IWindowHandle handle() const

  -     IEvent( const IWindowHandle& handle,
                unsigned long eventId,
                const IEventParameter1& parameter1,
                const IEventParameter2& parameter2 )

  -     IEvent( IWindow* window,
                unsigned long eventId,
                const IEventParameter1& parameter1,
                const IEventParameter2& parameter2 )

  -     IEvent(const IEvent& event)

  -     IEvent& operator =(const IEvent& event)

  -     IEventParameter1 parameter1() const

  -     IEventParameter2 parameter2() const

  -     bool passToOwner() const

  -     IEventResult result() const

  -     IEvent& setControlHandle(const IWindowHandle& handle)

  -     IEvent& setDispatchingHandle(const IWindowHandle& handle)

  -     IEvent& setDispatchingWindow(IWindow* window)

  -     IEvent& setHandle(const IWindowHandle& handle)

  -     IEvent& setNumberOfLevels(int levels = - 1)

  -     IEvent& setPassToOwner(bool passOn = true)

  -     IEvent& setResult(const IEventResult& eventResult)

  -     IEvent& setResult(bool eventResult)

  -     virtual IWindow* window() const

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None