IPaintConnectionTo

The IPaintConnectionTo class is a template class, derived from IPaintHandler, that processes paint events. This class allows you to process paint events in objects that do not derive from IPaintHandler without having to manually derive from IPaintHandler, override the paintWindow function, and pass the event to the object.

To use the IPaintConnectionTo class to process paint events, follow these steps:

  1. instantiate the IPaintConnectionTo template with a class containing a member function whose signature and behavior are the same as IPaintHandler::paintWindow.
  2. Construct an object of the new template class by passing the object and the address of the function handling the paint events.
  3. Attach the template paint handler by using IHandler::handleEventsFor to pass the appropriate window to the paint handler.

You use an IPaintConnectionTo object anywhere you use an IPaintHandler object. See the class description of IPaintHandler for a description of the uses and limitations of these classes.


IPaintConnectionTo - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class. You cannot copy or assign objects of this class.


[view class]
~IPaintConnectionTo
public:
virtual ~IPaintConnectionTo()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IPaintConnectionTo
public:
IPaintConnectionTo( ATarget& target, MemberFunction memberFunction )

Constructs the IMouseConnectionTo object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Event Processing

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


[view class]
paintWindow
protected:
virtual bool paintWindow(IPaintEvent& event)

Overridden to route paint events to the member function of the Target object provided on construction.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IPaintConnectionTo - Type Definitions


[view class]
MemberFunction
typedef bool (ATarget::*MemberFunction)(IPaintEvent&)

A pointer to a member function of Class ATarget that takes a reference to an IPaintEvent and returns a boolean.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IPaintConnectionTo - Inherited Member Functions and Data

Inherited Public Functions

IHandler
IPaintHandler

Inherited Public Data

Inherited Protected Functions

IHandler
IPaintHandler

Inherited Protected Data