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.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IMouseClickEvent()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
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.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
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.
![]() |
public:
virtual MouseAction mouseAction() const
Returns the action taken on the mouse.
IInvalidRequest | The event does not contain a recognized action. The sender of the event may have constructed it incorrectly. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
IMouseClickEvent identifies the mouse button that the user pressed or released. This allows you to provide different actions for different mouse buttons.
![]() |
public:
virtual MouseButton mouseButton() const
Identifies the mouse button that generated the event.
IInvalidRequest | The event does not identify a mouse button. The sender of the event may have constructed it incorrectly. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
enum MouseAction { click, doubleClick, down, up }
The mouse action enumerations are:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
enum MouseButton { button1, button2, button3, buttonChord }
The mouse button enumerations are as follows:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
virtual ~IEvent()
IWindowHandle controlHandle() const
virtual IWindow* controlWindow() const
IEvent& decrementOwnerLevels()
virtual IWindow* dispatchingWindow() const
unsigned long eventId() const
IWindowHandle handle() const
IEvent( IWindow* window, unsigned long eventId, const IEventParameter1& parameter1, const IEventParameter2& parameter2 )
IEvent( const IWindowHandle& handle, 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(bool eventResult)
IEvent& setResult(const IEventResult& eventResult)
virtual IWindow* window() const