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:
Use these members to construct and destruct clipboard handler objects.
![]() |
public:
virtual ~IClipboardHandler()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IClipboardHandler()
Creates IClipboardHandler objects. Construct objects of this class only by using the default constructor, which does not take any arguments.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members move data to the clipboard.
![]() |
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.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
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.
![]() |
protected:
virtual bool dispatchHandlerEvent(IEvent& event)
Calls the appropriate virtual function to process clipboard events.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members are pure virtual functions that derived classes must implement. There is no default behavior for these functions.
![]() |
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.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
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:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
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:
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)
virtual IEventResult defaultProcedure(IEvent& event)
virtual bool dispatchHandlerEvent(IEvent& event) = 0