IDMMLEItem

The IDMMLEItem class represents multiline edit (MLE)-specific items in a direct manipulation. MLEs create objects of the IDMMLEItem 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 MLE item represents.

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


IDMMLEItem - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IDMMLEItem


Overload 1
public:
IDMMLEItem(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 IDMMLEItem objects for the target of a direct manipulation. It is called by the member function, IDMItemProviderFor::provideTargetItemFor, of the MLE's item provider for the MLE item class.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
IDMMLEItem(IDMSourceOperation* sourceOperation)

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

Use this constructor to construct IDMMLEItem objects for the source of a direct manipulation. It is called by the member function, IDMMLEItem::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 MLE item. This function removes the selected text from the source MLE during a move operation.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


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

Implements MLE item-specific rendering when the MLE item that represents a text object is dropped on a target MLE. This function sets the text into the target MLE. Derived classes should override this function to set the associated text object into the target MLE 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 MLE drag items that represent text objects. The text object can be the entire contents of the source MLE or a selected portion.

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

The default implementation of this function in this class creates IDMMLEItem 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 IDMMLEItem::generateSourceItems in your derived MLE item class. In your implementation, create an object of your derived MLE 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 MLE'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


IDMMLEItem - Inherited Member Functions and Data

Inherited Public Functions

IDMItem
IMRefCounted

Inherited Public Data

IDMItem

Inherited Protected Functions

IMRefCounted
IDMItem

Inherited Protected Data

IDMItem