IDMEFItem

The IDMEFItem class represents entry-field-specific items in a direct manipulation. Entry fields create objects of the IDMEFItem class when either of the following occurs:

In addition to attributes inherited from IDMItem, objects of this class have a pointer to the text object that the entry field item represents.

This class provides virtual functions that implement direct manipulation support for the entry field. You can derive item classes to support the direct manipulation of entry field items if the default Open Class Library support does not meet your requirements.


IDMEFItem - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IDMEFItem


Overload 1
public:
IDMEFItem(const IDMItem::Handle& dragItem)

dragItem
A reference to a handle of a generic drag item that is created by the Open Class Library.

Use this constructor to construct IDMEFItem objects for the target of a direct manipulation. It is called by the member function, IDMItemProviderFor::provideTargetItemFor, of the entry field's item provider for the entry field item class.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
IDMEFItem(IDMSourceOperation* sourceOperation)

sourceOperation
A pointer to the drag source operation object to which this entry field item object is to be added.

Use this constructor to construct IDMEFItem objects for the source of a direct manipulation. It is called by the member function, IDMEFItem::generateSourceItems.
Note: This constructor sets the IDM::rmLibrary rendering mechanism and the IDM::rfProcess rendering format. If the text size is less than or equal to 255 bytes and the IDM::rmFile rendering mechanism has not been added in a derived class, the IDM::rfText rendering format is added. Otherwise, the IDM::rfSharedMem rendering format is added.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Drop Processing

Use these members during the drop operation of a direct manipulation.


[view class]
sourceEnd
public:
virtual bool sourceEnd(IDMSourceEndEvent& event)

Processes a source end event for the entry field item. This function removes the selected text from the source entry field during a move operation.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
targetDrop
public:
virtual bool targetDrop(IDMTargetDropEvent& event)

Implements entry-field-item-specific rendering when the entry field item that represents a text object is dropped on a target entry field. This function sets the text into the target entry field. Derived classes should override this function to set the associated text object into the target entry field if the default support does not meet your requirements.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Source Items

Use these members to access and manipulate source items involved in a direct manipulation.


[view class]
generateSourceItems
public:
static bool generateSourceItems( IDMSourceOperation* sourceOperation )

Generates entry field drag items that represent text objects. The text object can be the entire contents of the source entry field or a selected portion.

This function is called by the entry field's implementation of IDMItemProvider::provideSourceItems in the template class IDMItemProviderFor.

The default implementation of this function in this class creates IDMEFItem objects and adds them to the source operation. If you use the IDMItemProviderFor template class and you have defined a derived item class, you must implement IDMEFItem::generateSourceItems in your derived entry field item class. In your implementation, create an object of your derived entry field item class and call IDMOperation::addItem to add the objects to the source operation.
Note: Use the sourceOperation parameter to access IDMOperation::addItem.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
object
public:
virtual void* object() const

Returns a pointer to the contents of the IString that contains either all of or the selected portion of the source entry field's text. The pointer can be cast to the type char * to directly access the text.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IDMEFItem - Inherited Member Functions and Data

Inherited Public Functions

IDMItem
IMRefCounted

Inherited Public Data

IDMItem

Inherited Protected Functions

IMRefCounted
IDMItem

Inherited Protected Data

IDMItem