IClipboardHandler

The IClipboardHandler class processes the events that the clipboard sends to its owner window. This includes requests to render clipboard data for formats that were put on the clipboard with delayed rendering.

The handler processes these events by creating an IEvent object and routing it to the appropriate virtual function. The virtual function allows you to supply your own specialized processing of the event. The return values from the virtual function specify whether the clipboard event is passed on to another handler object to be processed. Return true if the IEvent has been handled and requires no additional processing. Return false if the IEvent is passed to the next handler, as follows:


IClipboardHandler - Member Functions and Data by Group

Constructors & Destructor

Use these members to construct and destruct clipboard handler objects.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IClipboardHandler
public:
IClipboardHandler()

Creates IClipboardHandler objects. Construct objects of this class only by using the default constructor, which does not take any arguments.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Clipboard Data Transfer

These members move data to the clipboard.


[view class]
setDelayedData
protected:
void setDelayedData( IEvent& event, const char* format, const void* data, unsigned long dataLength )

Copies the passed data buffer and places it on the clipboard with the format specified. You should use this function instead of IClipboard::setData to place data on the clipboard while processing a delayed rendering callback in IClipboardHandler::renderFormat or IClipboardHandler::renderAllFormats.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Event Dispatching

Event-dispatching members evaluate the event to determine if it is appropriate for this handler object to process. If it is, the member calls the virtual function used to process the event.


[view class]
dispatchHandlerEvent
protected:
virtual bool dispatchHandlerEvent(IEvent& event)

Calls the appropriate virtual function to process clipboard events.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Event Processing

These members are pure virtual functions that derived classes must implement. There is no default behavior for these functions.


[view class]
clipboardEmptied
protected:
virtual bool clipboardEmptied(IEvent& event) = 0

Implemented by derived classes to free resources associated with delayed rendering data in the clipboard. IClipboardHandler::dispatchHandlerEvent calls this function when another application window has requested ownership of the clipboard by clearing its data.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
renderAllFormats
protected:
virtual bool renderAllFormats(IEvent& event) = 0

Implemented by derived classes to render the data for all formats with delayed rendering. Place the data for all delayed formats into the clipboard with calls to IClipboard::setText, IClipboard::setBitmap, and IClipboard::setData.
Note: Do not open the clipboard during the processing of this function as you can hang the system. You can put data on the clipboard during the processing of this function without explicitly opening the clipboard.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
renderFormat
protected:
virtual bool renderFormat( IEvent& event, const IString& format ) = 0

Implemented by derived classes to render the data for the specified format with delayed rendering. Place data into the clipboard with IClipboard::setText, IClipboard::setBitmap, and IClipboard::setData.
Note: Do not open the clipboard during the processing of this function as you can hang the system. You can put data on the clipboard during the processing of this function without explicitly opening the clipboard.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IClipboardHandler - Inherited Member Functions and Data

Inherited Public Functions

IHandler

Inherited Public Data

Inherited Protected Functions

IHandler

Inherited Protected Data