IMouseClickEvent

The IMouseClickEvent class represents mouse click events. Objects of this class are constructed by a mouse handler when the user presses, releases, clicks, or double-clicks a mouse button.

Mouse click events are first dispatched to the window that the mouse pointer is positioned on. If that window does not process the mouse event, the event is dispatched to its owner window. The event continues to be dispatched to the next owner window until a handler stops the processing or a window processes the mouse event itself.


IMouseClickEvent - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


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

Constructs an IMouseClickEvent 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::mouseClicked.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Mouse Action

A mouse button is either in an up state or down state. This class allows you to determine the action used to change the state of a mouse button, whether the user pressed a mouse button, released a mouse button, clicked a mouse button (pressed and released within a predefined time), or double-clicked a mouse button.


[view class]
mouseAction
public:
virtual MouseAction mouseAction() const

Returns the action taken on the mouse.

Exception

IInvalidRequest The event does not contain a recognized action. The sender of the event may have constructed it incorrectly.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Mouse Button

IMouseClickEvent identifies the mouse button that the user pressed or released. This allows you to provide different actions for different mouse buttons.


[view class]
mouseButton
public:
virtual MouseButton mouseButton() const

Identifies the mouse button that generated the event.

Exception

IInvalidRequest The event does not identify a mouse button. The sender of the event may have constructed it incorrectly.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IMouseClickEvent - Enumerations


[view class]
MouseAction
enum MouseAction { click, 
                   doubleClick, 
                   down, 
                   up }

The mouse action enumerations are:

click
A mouse button was pressed and released.
doubleClick
A mouse button was pressed and released twice in succession.
down
A mouse button was pressed.
up
A mouse button was released.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
MouseButton
enum MouseButton { button1, 
                   button2, 
                   button3, 
                   buttonChord }

The mouse button enumerations are as follows:

button1
Mouse button 1.
button2
Mouse button 2.
button3
Mouse button 3.
buttonChord
Mouse buttons 1 and 2 are pressed together.
Note: For AIX, any two mouse buttons have been pressed together.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IMouseClickEvent - Inherited Member Functions and Data

Inherited Public Functions

IEvent
IMouseEvent

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data