### IMouseMoveConnectionTo

  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:

  1. Instantiate the IMouseMoveConnectionTo template with a class containing member functions whose signature and behavior are the same as IMouseHandler::mouseMoved, IMouseHandler::mouseEnter, and IMouseHandler::mouseLeave.
  2. Construct an object of the new template class by passing the object and the address of all three functions handling the corresponding mouse events.
  3. Attach the template mouse handler by using IMouseHandler::handleEventsFor to pass the appropriate window to the mouse-movement handler.

  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.

### IMouseMoveConnectionTo - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class.

~IMouseMoveConnectionTo

      public:
      virtual ~IMouseMoveConnectionTo()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

IMouseMoveConnectionTo

      public:
      IMouseMoveConnectionTo( ATarget& target,
                              MoveMemberFunction moveMemberFunction = 0,
                              EnterMemberFunction enterMemberFunction = 0,
                              LeaveMemberFunction leaveMemberFunction = 0 )

  Constructs the IMouseMoveConnectionTo object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Event Processing

These members are overridden to route mouse-movement events to the target object that you provided on construction.

mouseEnter

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

mouseLeave

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

mouseMoved

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IMouseMoveConnectionTo - Type Definitions

LeaveMemberFunction

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

EnterMemberFunction

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

MoveMemberFunction

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IMouseMoveConnectionTo - Inherited Member Functions and Data

#### Inherited Public Functions

  IHandler

  -     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)

  IMouseHandler

  -     virtual ~IMouseHandler()

  -     static Style defaultStyle()

  -     virtual IMouseHandler& handleEventsFor(IWindow* window)

  -     IMouseHandler(const Style& style = defaultStyle ( ))

  -     static void setDefaultStyle(const Style& style)

  -     virtual IMouseHandler&
          stopHandlingEventsFor( IWindow* window )

#### Inherited Public Data

  IMouseHandler

  -     static const Style allMouseMoves

  -     static const Style classDefaultStyle

  -     static const Style mouseEntersLeaves

  -     static const Style noMouseMoves

  -     static const Style someMouseMoves

#### Inherited Protected Functions

  IHandler

  -     virtual IEventResult defaultProcedure(IEvent& event)

  -     virtual bool dispatchHandlerEvent(IEvent& event) = 0

  IMouseHandler

  -     virtual bool dispatchHandlerEvent(IEvent& event)

  -     virtual bool mouseClicked(IMouseClickEvent& event)

  -     virtual bool mousePointerChange(IMousePointerEvent& event)

#### Inherited Protected Data

  - None