### IMouseClickConnectionTo

  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:

  1. Instantiate the IMouseClickConnectionTo template with a class containing a member function whose signature and behavior are the same as IMouseHandler::mouseClicked.
  2. Construct an object of the new template class by passing the object and the address of the function handling the mouse-click events.
  3. Attach the template mouse-click handler by using IMouseHandler::handleEventsFor to pass the appropriate window to the mouse-click handler.

  You use an IMouseClickConnectionTo object anywhere you use an IMouseHandler object. See the description of IMouseHandler for the uses and limitations of this class.

### IMouseClickConnectionTo - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct IMouseClickConnectionTo objects.

~IMouseClickConnectionTo

      public:
      virtual ~IMouseClickConnectionTo()

Supported Platforms

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

IMouseClickConnectionTo

      public:
      IMouseClickConnectionTo( ATarget& target,
                               ClickMemberFunction clickMemberFunction )

  Constructs the IMouseClickConnectionTo object.

  This constructor passes the IMouseHandler::noMouseMoves style to the IMouseHandler constructor.

Supported Platforms

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

### Event Processing

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

mouseClicked

      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.

Supported Platforms

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

### IMouseClickConnectionTo - Type Definitions

ClickMemberFunction

      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.

Supported Platforms

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

### IMouseClickConnectionTo - 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 mouseEnter(IEvent& event)

  -     virtual bool mouseLeave(IEvent& event)

  -     virtual bool mouseMoved(IMouseEvent& event)

  -     virtual bool mousePointerChange(IMousePointerEvent& event)

#### Inherited Protected Data

  - None