The IMouseMoveConnectionTo class is a template class, derived from IMouseHandler, that processes mouse-movement events. This class allows you to process mouse-movement events in objects that do not derive from IMouseHandler without having to manually derive from IMouseHandler, override the mouseMoved, mouseEnter, or mouseLeave functions, and pass the events to the object.
To use the IMouseMoveConnectionTo class to process mouse-movement events, follow these steps:
You can also process one or two out of the three mouse events by specifying a null value on the constructor for the address of the members that you do not want to process.
You use an IMouseMoveConnectionTo 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 objects of this class.
![]() |
public:
virtual ~IMouseMoveConnectionTo()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IMouseMoveConnectionTo( ATarget& target, MoveMemberFunction moveMemberFunction = 0, EnterMemberFunction enterMemberFunction = 0, LeaveMemberFunction leaveMemberFunction = 0 )
Constructs the IMouseMoveConnectionTo object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members are overridden to route mouse-movement events to the target object that you provided on construction.
![]() |
protected:
virtual bool mouseEnter(IEvent& event)
Processes events that signal when the mouse pointer has entered the window. This function is overridden to route these events to the enterMemberFunction function of the target object that you specified when constructing the handler. This function returns false if you did not provide an enterMemberFunction function.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual bool mouseLeave(IEvent& event)
Processes events that signal when the mouse pointer has exited the window. This function is overridden to route these events to the the leaveMemberFunction function of the target object that you specified when constructing the handler. This function returns false if you did not provide a leaveMemberFunction function.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual bool mouseMoved(IMouseEvent& event)
Overridden to route mouse-movement events to the moveMemberFunction function of the target object that you specified when constructing the handler. This function returns false if you did not provide a moveMemberFunction function.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
typedef bool (ATarget::*LeaveMemberFunction)(IEvent&)
A pointer to a member function of class ATarget that takes a reference to an IEvent and returns a bool.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
typedef bool (ATarget::*EnterMemberFunction)(IEvent&)
A pointer to a member function of class ATarget that takes a reference to an IEvent and returns a bool.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
typedef bool (ATarget::*MoveMemberFunction)(IMouseEvent&)
A pointer to a member function of class ATarget that takes a reference to an IMouseEvent 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 mouseClicked(IMouseClickEvent& event)
virtual bool mousePointerChange(IMousePointerEvent& event)