The IDMItem class represents items in a direct manipulation. The items are commonly known as source and target items. Use this class to create source items when starting a direct manipulation on a source window, and target items when dragging over a potential target window.
This class provides virtual functions implementing base support for direct manipulation item objects in the Open Class Library. You can create derived classes to support specific items, such as text item objects and container item objects.
Objects of this class have the following attributes in addition to those inherited from its base class:
IDMSourceRenderer and IDMTargetRenderer objects typically transfer the contents between the source and target windows. The four objects involved in the transfer of the contents (source item, source renderer, target item, and target renderer) must agree on and select a supported RMF.
For example, IDMEFItem, IDMSourceRenderer, and IDMTargetRenderer use the item's contents to hold the source entry field text. Derived item classes can use this attribute optionally, provided the renderers they work with use the attribute in a compatible fashion.
When you use the library-defined rendering mechanism and the
process rendering format,
As with the item's contents, the source items, target items, source renderers,
and target renderers must agree on the nature of the value of this field, and
derived item classes (and renderer classes) can use this
attribute optionally.
The IDMItem class is a wrapper for the DRAGITEM structure.
Use these members to construct, copy, assign, and destruct objects of this class.
![]() |
public:
virtual ~IDMItem()
This destructor decrements the drag item's reference count. The drag item will not be actually destroyed until its reference count is 0. The drag item's reference count is incremented everytime an IDMItem::Handle object is created.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMItem(const Handle& item)
Use this constructor to construct drag items for the target of a direct manipulation. It is called by the member function, IDMItemProviderFor::provideTargetItemFor, of the drag item provider for the derived item class.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IDMItem( IDMTargetOperation* targetOperation, _DRAGITEM* dragItem )
The Open Class Library uses this constructor to construct generic drag items for the target of a direct manipulation. You do not need to call it directly.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IDMItem( IDMSourceOperation* sourceOperation, const IString& types, const unsigned long supportedOperations = unknown, const unsigned long attributes = none )
Use this constructor to construct items for the source of a direct manipulation. It is called by the member function, IDMItem::generateSourceItems.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IDMItem(const IDMItem& dragItem)
Use this constructor, a copy constructor, to make a copy of an existing IDMItem object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Overloaded definition of the assignment operation to handle assignments of drag items to other drag items.
This operator increments the drag operation's reference count. The drag operation's reference count is used to manage the destruction of the respective source and target operation objects.
public:
IDMItem& operator =(const IDMItem& item)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
Handle operator =(const Handle& item)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these static members to define the drag item's attribute flags.
Note:
![]() |
public:
static const unsigned long container
The source object is a container of other objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long group
The source object is a group of objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long none
No attributes are defined for the source object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long open
The source object is open.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long prepare
The source object requires preparation before it establishes a data transfer conversation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long reference
The source object is a reference to another object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long removableMedia
The source object is on removable media, or the source object cannot be recovered after a move operation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the image for the drag item.
![]() |
public:
bool hasImage() const
Returns true if the drag item has an associated image.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMImage& image()
Returns a reference to the drag image associated with the drag item. If a drag image is not associated with the drag item, a default drag image is created, associated with the drag item, and returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& setImage(IDMImage& image)
Sets the item's drag image.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the item's drop status. The drop status determines if this item can be dropped on its current target.
![]() |
public:
DropIndicator dropStatus() const
Returns the drop status for the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMItem& setDropStatus(DropIndicator status)
Sets the drop status for the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query attributes of an item. The attributes include the source and target name, source and target window, and general container information.
![]() |
public:
virtual unsigned long attributes() const
Returns the attributes for the drag item. These attributes indicate the nature of the drag item object. Attributes supported by the Open Class Library are IDMItem::none, IDMItem::open, IDMItem::reference, IDMItem::group, IDMItem::container, IDMItem::prepare, and IDMItem::removableMedia.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString containerName() const
Returns the source container's name. If the selected RMF is
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual ISize imageOffset() const
Returns the offset from the pointing device's hot spot to the origin of the image for the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool isContainer() const
Returns true if the drag item is a container of other objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool isGroup() const
Returns true if the drag item is a group of objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool isOnRemovableMedia() const
Returns true if the drag item is on removable media or may not be easily recovered after a move operation. Examples of removable media are the following:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool isOpen() const
Returns true if the drag item is open. A drag item could be considered open if it represents the following:
You can interpret these attributes in various ways depending upon your specialized requirements.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool isReference() const
Returns true if the drag item is a reference to another object. A drag item could be considered a reference if it is an alias for another object or the original object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool requiresPreparation() const
Returns true if the source requires preparation before rendering. For example, the Open Class Library uses this attribute to implement a part of its shared memory RMF support.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& setContainer(bool container = true)
Sets or resets the container attribute.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMItem& setContainerName(const char* containerName)
Sets the source container name of the item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& setGroup(bool group = true)
Sets or resets the group attribute.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& setOnRemovableMedia( bool onRemovableMedia = true )
Sets or resets the removable media attribute. For example, you can set this attribute to true if the object represents a file on a diskette or CD-ROM.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& setOpen(bool open = true)
Sets or resets the open attribute. For example, you can set this attribute to true if the object represents a file that is currently open.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& setReference(bool reference = true)
Sets or resets the reference attribute. A drag item could be considered a reference if it is an alias for another object or the original object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& setRequiresPreparation( bool requiresPrep = true )
Sets or resets the render prepare attribute. For example, the Open Class Library uses this attribute to implement a part of its shared memory RMF support.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMItem& setSourceName(const char* sourceName)
Sets the source object's name.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMItem& setSourceWindowHandle(IWindowHandle window)
Sets the source window handle for the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMItem& setTargetName(const char* targetName)
Sets the suggested target object's name.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString sourceName() const
Returns the source object's name. If the selected RMF is
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IWindow* sourceWindow() const
Returns a pointer to the source window for the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IWindowHandle sourceWindowHandle() const
Returns the handle of the source window for the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual unsigned long supportedOperations() const
Returns the operations supported by the drag item. Operations supported by the Open Class Library are IDMItem::copyable, IDMItem::linkable, and IDMItem::moveable.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString targetName() const
Returns the suggested name that the drag item object should have at the target. The target might use a different name, for example, if the suggested name is already in use at the target.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the contents of the item involved in a direct manipulation.
![]() |
public:
virtual IString contents() const
Returns the data for a direct manipulation. Typically, the data is not available at the target prior to the drop. However, if your source and target are within the same process, you can use IDMItem::sourceItemFor to obtain the data within your IDMItemProvider::provideEnterSupport override, prior to the drop.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual unsigned long contentsSize() const
Returns the length of the data for a direct manipulation. Typically, the data is not available at the target prior to the drop. However, if your source and target are within the same process, you can use IDMItem::sourceItemFor to obtain the data within your IDMItemProvider::provideEnterSupport override, prior to the drop.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual void* object() const
Returns the pointer to the object of a direct manipulation, such as a container object. Typically, the object is not addressable at the target prior to the drop. However, if your source and target are within the same process, you can use IDMItem::sourceItemFor to obtain addressability to the object within your IDMItemProvider::provideEnterSupport override, prior to the drop.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool setContents(const IString& data)
Sets the data within the drag item for a direct manipulation. Use this function to set the data that is associated with the drag item. Typically, the data is not available at the target prior to the drop. However, if your source and target are within the same process, you can use IDMItem::sourceItemFor to obtain the data within your IDMItemProvider::provideEnterSupport override, prior to the drop.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& setObject(void* pointerToObject)
Sets the pointer to the object of a direct manipulation, such as a container object. Typically, the object is not addressable at the target prior to the drop. However, if your source and target are within the same process, you can use IDMItem::sourceItemFor to obtain addressability to the object within your IDMItemProvider::provideEnterSupport override, prior to the drop.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members store data for the drag item.
![]() |
protected:
IString strContents
Holds data (contents) of the drag item. This data member is protected to allow derived classes to either return the contents of it via IDMItem::contents or to allow IDMItem::object to return a pointer to it per a derived item implementation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the operations supported for a drag item object.
![]() |
public:
virtual bool canBeCopied() const
Returns true if the drag item can be copied.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool canBeLinked() const
Returns true if the drag item can be linked.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool canBeMoved() const
Returns true if the drag item can be moved.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& enableCopy(bool copyable = true)
Enables or disables the copy operation for the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& enableLink(bool linkable = true)
Enables or disables the link operation for the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& enableMove(bool moveable = true)
Enables or disables the move operation for the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual unsigned long supportedOperationsFor( const IString& selectedRMFs ) const
Returns the operations that this item supports using the specified rendering mechanisms and formats (RMFs). This function determines what operation is performed on this item using the selected RMFs. For example, you can designate a printer object as the target and make its default operation a copy rather than a move based upon the RMF of <IDM::rmPrint,IDM::rfUnknown>.
The default implementation of this function calls the member function IDMItem::supportedOperations and returns its result.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members for item-specific rendering of the data.
![]() |
public:
virtual bool sourceDiscard(IDMSourceDiscardEvent& event)
Implements item-specific rendering when the operating system issues a discard request. Derived classes must override this function if the item adds the IDM::rmDiscard rendering mechanism to its RMFs. This function needs to delete the object that the item represents.
The default implementation of this function does nothing.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
The discard request is issued by the Workplace Shell when the item is dropped on a shredder object.
![]() |
public:
virtual bool sourceEnd(IDMSourceEndEvent& event)
Implements item-specific rendering when source or target rendering of the item has finished. This function is called when the target notifies the source that it has finished rendering the item.
Derived classes should override this function to accomplish any of the following:
The default implementation of this function does nothing.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool sourcePrepare(IDMSourcePrepareEvent& event)
Implements item-specific rendering when source rendering is used to render the item. Override this function in your derived item class if you use a nondefault renderer that supports source rendering and the renderer requires item-specific processing, and if source preparation is a required part of the rendering.
Derived classes should override this function to accomplish any of the following:
The default implementation of this function does nothing.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
![]() |
public:
virtual bool sourcePrint(IDMSourcePrintEvent& event)
Implements item-specific rendering when the operating system issues a print request. Derived classes must override this function if the item adds the IDM::rmPrint rendering mechanism to its RMFs. This function needs to print the object that the item represents.
The default implementation of this function does nothing.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
The print request is issued by the Workplace Shell when the item is dropped on a printer object.
![]() |
public:
virtual bool sourceRender(IDMSourceRenderEvent& event)
Implements item-specific rendering when source rendering is used to render the item. Override this function in your derived item class if you use a nondefault renderer that supports source rendering and the renderer requires item specific processing.
The default implementation of this function does nothing.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
![]() |
public:
virtual bool targetDrop(IDMTargetDropEvent& event)
Implements item-specific rendering when the item is dropped on a target. Derived classes must override this function to process the data that is transferred to the target window as a result of target rendering.
If source rendering is not used, or if source rendering is performed but not in a secondary thread, target cleanup should occur in this function.
The default implementation of this function does nothing.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool targetEnd(IDMTargetEndEvent& event)
Implements item-specific rendering when the item is dropped on a target. Derived classes must override this function when a nondefault source renderer renders the data on a secondary thread. The override function must process the data that is transferred to the target window as a result of the source rendering. Target cleanup should also occur in the override function.
The source renderer informs the target that it has finished by calling IDMSourceRenderer::informTargetOfCompletion. The call to this function is unique because the source actually posts an event to inform the target that it is finished; thus, this function is called asynchronously.
Ensure that there is no overlap between this function or IDMItem::targetDrop, since this could mean that two processes are processing the same object. Results may be unpredictable.
The default implementation of this function does nothing.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the drag item's types. Use a type or types to uniquely identify drag items that represent objects, such as container objects and bitmaps.
![]() |
public:
virtual IDMItem& addType(const char* aType)
Adds one or more additional types to the drag item. Use this function in a derived class' constructor to add the type or types supported by the derived class.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool hasType(const char* aType) const
Returns true if the drag item supports the specified type.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& removeType(const char* aType)
Removes the specified type from the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& setTrueType(const char* aType)
Sets the drag item's true type.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& setTypes(const char* types)
Sets the drag item's types. The following line of code removes all of the types for the drag item:
setTypes("");
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString trueType() const
Returns the true type of the drag item. For example, if the object is a text file, the type is IDM::plainText. If the file is an icon, the type is IDM::icon.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString types() const
Returns all of the drag item's supported types. Individual types are separated by a comma. IDM::Type contains a list of the Open Class Library's defined types.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to provide miscellaneous utility services for a drag item.
![]() |
public:
bool isTargetTheSource() const
Returns true if source and target are the same window.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static Handle sourceItemFor(const Handle& targetItem)
Retrieves the source item's handle based upon the handle of the target item. The source and target must be in the same process. Otherwise, 0 is returned.
Use this function to access the source item. You can obtain the source item's data via IDMItem::contents, and you can obtain addressability to the associated object via IDMItem::object.
IAccessError | The source item handle could not be retrieved. The query of the process and thread identifier failed. The window handle may have been invalid. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
unsigned long tokenForWPSObject() const
Returns the token for the Workplace Shell object. Use the
OBJECT_FOR_PREC macro to convert the token into a WPObject pointer.
Note:
Windows | OS/2 | AIX |
No | Yes | No |
Use these members to create, delete, manipulate, set, and query the rendering mechanisms and formats (RMFs) for a drag item.
![]() |
Adds one or more RMFs to the drag item.
public:
virtual IDMItem& addRMF( const IString& rm, const IString& rf )
The RMFs string that is added is created from separate rendering mechanism and rendering format strings. Both strings can have multiple values that must be separated with commas.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual IDMItem& addRMF(const IString& rmf)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static void appendRMF(IString& rmfs, const IString& rmf)
Appends the RMF string, rmf, to the RMFs string,
rmfs, and separates the two strings by a comma.
Both strings must be in either the ordered-pair format, "
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static IString compressedRMFs(const IString& rmfs)
Returns a compressed version of the RMFs string with all possible cross products converted to cross-product form. The cross-product form is "(rm)x(rf1,rf2)", where rm represents the rendering mechanism and rf1 and rf2 represent the rendering formats.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static void deleteRMF(IString& rmfs, const IString& rmf)
Deletes the RMF string, rmf, from the RMFs string,
rmfs. Both strings must be in either the
ordered-pair format, "
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static IString matchingRMFs( const IString& rmfs1, const IString& rmfs2, bool firstOnly = false )
Returns the intersection of the two RMF strings.
Both strings must be in either the
ordered-pair format, "
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString nativeRF() const
Returns the native rendering format of the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString nativeRM() const
Returns the native rendering mechanism of the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString nativeRMF() const
Returns the native RMF of the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Removes an RMF from the drag item.
public:
virtual IDMItem& removeRMF(const IString& rmf)
The RMF string must be in either the ordered-pair format, "
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual IDMItem& removeRMF( const IString& rm, const IString& rf )
rm and rf must represent a single rendering mechanism and a single rendering format, respectively. Multiple rendering mechanisms or rendering formats are not supported.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static IString rfForThisProcess()
Returns the string, DRF_PROCESS=pid, where pid is the ASCII representation of the process identifier (ID). Use this function to create the process rendering format.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static IString rfFrom(const IString& rmf)
Returns the rendering format from the specified RMF string.
The RMF string must be in either the
ordered-pair format, "
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static IString rmfFrom( const IString& rm, const IString& rf )
Creates a rendering mechanism and format (RMF)-ordered
pair: "
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static IString rmFrom(const IString& rmf)
Returns the rendering mechanism from the specified RMF string.
The RMF string must be in either the
ordered-pair format, "
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString rmfs() const
Returns all RMFs for the drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Returns an RMFs string.
public:
static IString rmfsFrom( const IString& rm, const IString& rf )
The RMFs string is created from separate rendering mechanism and rendering format strings. Both strings can have multiple values that must be separated with commas. The RMFs string is returned in the ordered-pair format.
The following line of code illustrates passing multiple values:
IDMItem::rmfsFrom( "rm1,rm2", "rf1,rf2" );The RMFs string returned from the sample line of code in the ordered-pair format is "
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
static IString rmfsFrom(const IString& rmfs)
The RMFs string is created from the specified RMFs string. Use this version of the function to expand a cross-product form into ordered pairs.
The following line of code illustrates a cross-product form:
IDMItem::rmfsFrom( "(rm1)x(rf1,rf2)" );The RMFs string returned from the sample line of code is "
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Sets the native RMF to the specified value.
public:
virtual IDMItem& setNativeRMF( const IString& rm, const IString& rf )
rm and rf must represent a single rendering mechanism and a single rendering format, respectively. Multiple rendering mechanisms or rendering formats are not supported.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual IDMItem& setNativeRMF(const IString& rmf)
rmf must represent a single RMF in the ordered-pair format,
"
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMItem& setRMFs(const IString& rmfs)
Sets the new RMFs for the drag item. Use the following line of code to remove all of the RMFs for the item:
setRMFs( "" );
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Returns true if the item supports the specified RMFs.
public:
virtual bool supportsRMF( const IString& rm, const IString& rf )
Both strings can have multiple values that must be separated with commas.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual bool supportsRMF(const IString& rmf)
The RMFs string can be either in the cross-product format,
"(rm)x(rf1,rf2)" or the ordered-pair format, "
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the renderer that is selected for the drag item.
![]() |
public:
unsigned renderer() const
Returns the position of the selected renderer for this drag item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IString selectedRMF() const
Returns the selected rendering mechanism and format (RMF) for this item in an ordered-pair format, such as: "<IDM::rmLibrary,IDM::rfText>".
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMItem& setRenderer(unsigned position)
Sets the selected renderer for the drag item.
The function's argument is the relative position of the specified
renderer within the source or target handler's collection of renderers.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMItem& setSelectedRMF(const IString& rmf)
Sets the selected rendering mechanism and format (RMF) for this drag item. The function's argument must be an ordered-pair format, such as: "<IDM::rmLibrary,IDM::rfText>".
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to access the source and target operation objects.
![]() |
public:
virtual IDMSourceOperation* sourceOperation()
Returns a pointer to the source operation for the drag item. If the item represents a target item, 0 is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMTargetOperation* targetOperation()
Returns a pointer to the target operation for the drag item. If the item represents a source item, 0 is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to access and manipulate source items involved in a direct manipulation.
![]() |
public:
static bool generateSourceItems( IDMSourceOperation* sourceOperation )
Generates generic drag items. This function is called by the implementation of IDMItemProvider::provideSourceItems in the template class IDMItemProviderFor. This arrangement is designed to permit you to implement all of your application-specific behavior in a single class derived from IDMItem or one of its derivatives. The corresponding drag item provider object is constructed using the IDMItemProviderFor template with your derived item class.
The default implementation of this function in this class creates
generic IDMItem 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 IDMItem::generateSourceItems
in your derived item class. In your implementation, create one or more
objects of your derived item class and call
IDMOperation::addItem
to add the objects to the source operation.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members generate the source name when the IDM::rfText-rendering format is used.
![]() |
protected:
IString generateSourceName()
Use this function to generate the source name for the implementation of the IDM::rfText-rendering format.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these static members to define the supported operations
of the drag item.
Note:
![]() |
public:
static const unsigned long copyable
The source object can be copied to the specified target.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long linkable
The source object can be linked to the specified target.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long moveable
The source object can be moved to the specified target.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long unknown
No supported drag operations are available.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
typedef ICountedPointerTo < IDMItem > Handle
IDMItem::Handle provides access to the IDMItem objects associated with a direct manipulation. The handle manages the references to the IDMItem object and ensures that the object is not destructed until the direct manipulation is completed.
Use Handle to reference an item handle within this class and IDMItem::Handle externally.
To convert an IDMItem::Handle to an IDMItem pointer, use the ICountedPointerTo::getAlias() function.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
void addRef()
unsigned long count() const
void removeRef()
virtual ~IMRefCounted()
IMRefCounted()
IMRefCounted(const IMRefCounted&)
IMRefCounted& operator =(const IMRefCounted&)