IMousePointerEvent

The IMousePointerEvent class represents the event used to set the appearance of the mouse pointer as it is moves over a window. This event allows you to query the pointer that the system will show when it is over a window, and allows you to change the pointer to show when it is over a window.

Mouse pointer events are first dispatched to the window that the mouse pointer is positioned on. On OS/2 and Windows, if that window does not process the mouse event, the event is dispatched to its owner window, and continues to be dispatched up the owner window chain until a handler stops the processing or a window processes the mouse pointer event itself.

IMousePointerHandler uses this event class.

AIX Considerations

An IMousePointerEvent is created from a mouse movement event.

OS/2 Considerations

An IMousePointerEvent is created from a WM_CONTROLPOINTER message.

Windows Considerations

An IMousePointerEvent is created from a WM_SETCURSOR message.


IMousePointerEvent - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


[view class]
~IMousePointerEvent
public:
virtual ~IMousePointerEvent()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IMousePointerEvent
public:
IMousePointerEvent(const IEvent& event)

Constructs an IMousePointerEvent object from the specified event.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Mouse Pointer

The mouse pointer can have different appearances, such as an arrow, a hand, or a clock, to indicate the kind of user interaction a window allows. Use these members to set and query the appearance of the mouse pointer when it is positioned over a window.


[view class]
defaultMousePointer
public:
IPointerHandle defaultMousePointer() const

Returns the mouse pointer that the system would show for the window that is under the mouse if you did not call setMousePointer.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
mousePointer
public:
IPointerHandle mousePointer() const

Returns the value passed to setMousePointer.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setMousePointer
public:
IMousePointerEvent& setMousePointer( const IPointerHandle& mousePointer )

Sets the appearance of the mouse pointer.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Position

These members query the position of the mouse pointer. This information allows you to determine what the user is interacting with.


[view class]
mousePosition
public:
IPoint mousePosition() const

Returns the position of the pointer within 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 is under the mouse.


[view class]
windowId
public:
unsigned long windowId() const

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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IMousePointerEvent - Inherited Member Functions and Data

Inherited Public Functions

IEvent

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data