The IMouseClickConnectionTo class is a template class, derived from IMouseHandler, that processes mouse-click events. This class allows you to process mouse-click events in objects that do not derive from IMouseHandler without having to manually derive from IMouseHandler, override the mouseClicked function, and pass the events to the object.
To use the IMouseClickConnectionTo class to process mouse-click events, follow these steps:
You use an IMouseClickConnectionTo object anywhere you use an IMouseHandler object. See the description of IMouseHandler for the uses and limitations of this class.
You can construct and destruct IMouseClickConnectionTo objects.
![]() |
public:
virtual ~IMouseClickConnectionTo()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IMouseClickConnectionTo( ATarget& target, ClickMemberFunction clickMemberFunction )
Constructs the IMouseClickConnectionTo object.
This constructor passes the IMouseHandler::noMouseMoves style to the IMouseHandler constructor.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members are overridden to route mouse-click events to the target object that you provided on construction.
![]() |
protected:
virtual bool mouseClicked(IMouseClickEvent& event)
Overridden to route mouse-click events to the clickMemberFunction function of the target object that you specified when constructing the handler. This function returns false if you did not provide a clickMemberFunction function.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
typedef bool (ATarget::*ClickMemberFunction)(IMouseClickEvent&)
A pointer to a member function of class ATarget that takes a reference to an IMouseClickEvent and returns a bool.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
virtual ~IHandler()
virtual IString asDebugInfo() const
virtual IString asString() const
virtual IHandler& disable()
virtual IHandler& enable(bool enable = true)
virtual IHandler& handleEventsFor(IWindow* window)
IHandler()
bool isEnabled() const
virtual IHandler& stopHandlingEventsFor(IWindow* window)
static const Style allMouseMoves
static const Style classDefaultStyle
static const Style mouseEntersLeaves
static const Style noMouseMoves
static const Style someMouseMoves
virtual IEventResult defaultProcedure(IEvent& event)
virtual bool dispatchHandlerEvent(IEvent& event) = 0
virtual bool dispatchHandlerEvent(IEvent& event)
virtual bool mouseEnter(IEvent& event)
virtual bool mouseLeave(IEvent& event)
virtual bool mouseMoved(IMouseEvent& event)
virtual bool mousePointerChange(IMousePointerEvent& event)