IDMItemProvider

The IDMItemProvider class provides application-specific direct manipulation behavior for windows. Construct objects from a derived class or the IDMItemProviderFor template class and attach them to source and target windows that you enable for direct manipulation. Attach the objects with the member function IWindow::setItemProvider.

The responsibilities of this class include the following:

When the source handler detects that a direct manipulation is started in one of the windows it is attached to, it calls IDMItemProvider::provideSourceItems.

When drag items enter a potential target, generic IDMItem objects are created to represent them. Next, the target handler calls IDMItemProvider::provideTargetItemFor once for each drag item. This gives a derived IDMItemProvider class the opportunity to replace the generic IDMItem objects with objects of some IDMItem-derived class that provides application-specific behavior.
Note: See the direct manipulation section of the Task Information for more information on how to construct derived IDMItemProvider classes. Also, see the template class IDMItemProviderFor, which you can use to construct derived IDMItemProviderFor classes for your IDMItem derived classes.


IDMItemProvider - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IDMItemProvider
public:
IDMItemProvider()

Provides the default constructor to construct objects of this class.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Drag Item Support

Use these members to provide event-specific support during a direct manipulation.


[view class]
provideEnterSupport
public:
virtual bool provideEnterSupport( IDMTargetEnterEvent& event )

Provides support for the target enter event. This function is called when the user moves a drag item over the target for which the provider is providing direct manipulation support.

Derived classes should override this function to accomplish any of the following:

The default implementation of this function does the following:

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
provideHelpFor
public:
virtual bool provideHelpFor(IDMTargetHelpEvent& event)

Provides target-specific drop help. This function is called when the user requests help while a drag item is positioned over a potential target.

Derived classes should override this function to provide the specific help for the target of a drop. For example, you can provide help that details the processing that occurs if the drag item is dropped on the target.

The default implementation of this function does nothing.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Yes


[view class]
provideLeaveSupport
public:
virtual bool provideLeaveSupport( IDMTargetLeaveEvent& event )

Provides support for the target leave event. This function is called when the user moves a drag item off of the target for which the provider is providing direct manipulation support.

Derived classes should override this function to perform any required cleanup or to remove target emphasis from the target.

The default implementation of this function does nothing.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
provideSourceItems
public:
virtual bool provideSourceItems( const IDMSourceOperation::Handle& sourceOperation )

Adds IDMItem or IDMItem-derived class objects to the specified sourceOperation. This function is called when a direct manipulation starts on a source window.

If drag items are provided, true is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
provideTargetItemFor
public:
virtual IDMItem::Handle provideTargetItemFor( const IDMItem::Handle& dragItem )

Replaces generic IDMItem objects with an IDMItem-derived class during the processing of the initial target enter event.

The default implementation returns the item handle, dragItem, that was passed to the function.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IDMItemProvider - Inherited Member Functions and Data

Inherited Public Functions

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data