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:
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IDMItemProvider()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMItemProvider()
Provides the default constructor to construct objects of this class.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to provide event-specific support during a direct manipulation.
![]() |
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:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
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.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
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.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
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.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
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.
Windows | OS/2 | AIX |
Yes | Yes | Yes |