The IDMOperation class represents a drag operation in a direct manipulation. The drag operation is commonly known as a source or target operation. Objects of this class provide general-purpose information about a drag operation.
Objects of this class have the following attributes in addition to those inherited from its base class:
This class manages a drag item collection that associates drag items with this class.
This is the base class for all drag operations classes. Your programs should only deal with objects of either of the derived classes: IDMSourceOperation and IDMTargetOperation.
The IDMOperation class is a wrapper for the DRAGINFO structure.
You can construct and destruct objects of this class. These members are used by derived classes.
![]() |
protected:
virtual ~IDMOperation()
This destructor deletes the drag item collection that manages associated drag items for this class.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
IDMOperation(IDMSourceBeginEvent& event)
Use this function to construct an IDMOperation object by providing a reference to the source begin event.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
protected:
IDMOperation(IDMTargetEnterEvent& event)
Use this function to construct an IDMOperation object by providing a reference to a target enter event.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to support a container control in a direct manipulation.
![]() |
public:
IContainerObject* containerObject() const
Returns a pointer to the container object that the hot spot of the pointing device is over during target enter event processing or the container object where the drop occurred. It returns 0 if one of the following conditions occur:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMOperation& setContainerObject(IContainerObject* object)
Sets a pointer to the container object that the hot spot of the pointing device is over during target enter event processing or to the container object where the drop occurred.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMOperation& setContainerRefreshOff( IContainerControl* container )
Sets the container refresh off for the given container by calling IContainerControl::setRefreshOff.
When direct manipulation processing is finished or if it is
canceled, container refresh is turned on again via
IDMOperation::setRefreshOn.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMOperation& setContainerRefreshOn()
Sets the container refresh on by calling IContainerControl::setRefreshOn. for the container that was identified in the previous call to IDMOperation::setContainerRefreshOff. The container is also refreshed via the member function, IContainerControl::refresh.
The container is also refreshed.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to indicate the level of debug support for a direct manipulation.
![]() |
public:
static bool debugSupport()
Returns a value indicating if full debug support is enabled. When true, screen locking during a direct manipulation is disabled. The default setting for this flag is false.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static void setDebugSupport(bool debugSupport = true)
Set this flag to true to enable full debug support. When set to true, this flag disables screen locking during a direct manipulation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to add, remove, and query the IDMItem objects involved in a direct manipulation.
![]() |
public:
IDMOperation& addItem(const IDMItem::Handle& newItem)
Associates another drag item with the operation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMItem::Handle item(unsigned position)
Returns the drag item with a given position.
If the position is not valid, 0 is returned.
Note:
IInvalidRequest | The drag item handle was not returned. The specified index is not within the valid range. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
unsigned numberOfItems()
Returns the number of items involved in a direct manipulation. This number is the same as the number of drag items added to the operation's collection.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Removes a drag item from the operation.
public:
IDMOperation& removeItem(unsigned position)
Use this version of the function to remove a drag item using
a position.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IDMOperation& removeItem( const IDMItem::Handle& itemToRemove )
Use this version of the function to remove a drag item using a reference to the drag item's handle.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMOperation& replaceItem( unsigned position, const IDMItem::Handle& replacement )
Replaces a given drag item with another specified drag item.
Note:
IInvalidRequest | The drag item was not replaced. The specified index is not within the valid range. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the default drag operation of the direct manipulation.
![]() |
public:
virtual unsigned long operation() const
Returns the default drag operation for the direct manipulation. The possible default drag operations include the following:
Application-defined drag operations are assigned a value greater than IDMOperation::unknown.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMOperation& setOperation(unsigned long op)
Sets the default drag operation for the direct manipulation. Use one of the following operations to identify the default drag operation:
Assign a value greater than IDMOperation::unknown when assigning
an application-defined drag operation. Also, you must derive a new
target renderer from
IDMTargetRenderer
and override
IDMTargetRenderer::supportsOperation
to support the new operation.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long copy
Copy operation (the copy augmentation key is pressed).
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long drag
Drag operation (no augmentation keys are pressed). This is the default operation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long link
Link operation (the link augmentation keys are pressed).
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long move
Move operation (the move augmentation key is pressed).
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const unsigned long unknown
Unknown operation (application-defined operation codes should be assigned values greater than this value).
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the type of device that is used to initiate a direct manipulation.
![]() |
public:
virtual IDMOperation& setSource(Source source)
Sets the type of the device that is
the source of the direct manipulation.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The source of a direct manipulation is always the pointing device, IDM::pointingDevice.
![]() |
public:
virtual Source source() const
Returns the type of the device that is the source of the direct manipulation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The source of a direct manipulation is always the pointing device, IDM::pointingDevice.
Use these members for various utility services.
![]() |
protected:
_DRAGINFO* dragInfo() const
Returns the pointer to the drag information structure.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The return value is a pointer to the DRAGINFO structure.
![]() |
protected:
bool dragWasInterrupted() const
Returns true if the direct manipulation is interrupted. Interrupts can occur when you do one of the following:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
IDMOperation& setDragInfo(_DRAGINFO* dragInfo)
Sets the pointer to the drag information structure.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The parameter, dragInfo, is a pointer to the DRAGINFO structure.
![]() |
protected:
IDMOperation& setDragResult(bool result)
Sets the overall result of a direct manipulation. A result of true indicates a successful direct manipulation and false indicates one of the following conditions:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set or query the pointing device's position.
![]() |
public:
virtual IPoint position() const
Returns the hot spot of the pointing device within the source or target window.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMOperation& setPosition(IPoint position)
Sets the hot spot of the pointing device within the source or target window.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the source and target windows.
![]() |
public:
virtual IDMOperation& setSourceWindowHandle( IWindowHandle window )
Sets the source window handle for a direct manipulation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDMOperation& setTargetWindowHandle( IWindowHandle window )
Sets the target window handle for a direct manipulation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IWindow* sourceWindow() const
Returns a pointer to the source window for a direct manipulation. Returns 0 if the window is not valid.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IWindowHandle sourceWindowHandle() const
Returns the handle of the source window for a direct manipulation. Returns IWindowHandle(0) if the window is not valid.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IWindow* targetWindow() const
Returns a pointer to the target window for a direct manipulation. Returns 0 if the window is not valid. For example, if the source window attempts to access the target window before the target window is known, the window is not valid.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IWindowHandle targetWindowHandle() const
Returns the handle of the target window for a direct manipulation. Returns IWindowHandle(0) if the window is not valid. For example, if the source window attempts to access the target window before the target window is known, the window is not valid.
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&)