The IDMTargetOperation class represents a target operation in a direct manipulation. Objects of this class provide information about target operations. You can access the target operation from a drag item using IDMItem::targetOperation or the static function IDMTargetOperation::targetOperation.
Objects of this class are not intended to be created by application programmers. The target event handler class, IDMTargetHandler creates them.
You can access an object of this class using IDMTargetOperation::Handle, which reference-counts the object.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IDMTargetOperation()
Destructs objects of this class.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMTargetOperation(IDMTargetEnterEvent& event)
Construct objects of this class.
IAccessError | The object for the target operation was not created. The drag information is not accessible. |
IInvalidRequest | The object for the target operation was not created. The target item provider failed to provide any items. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query container-specific attributes.
![]() |
public:
ISize dropOffset() const
Queries the current drop offset. The drop offset is the location where the next container object dropped would be positioned as long as the target operation's drop style is not IDM::dropPosition. The location is the offset relative to the position of the last object dropped.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IPoint dropPosition( const IDMItem::Handle& dragItem, IDMTargetDropEvent& event )
Returns the drop position for dragItem in container workspace coordinates and sets the offset for the next drag item according to the target operation's drop style.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isStyle(DropStyle dropStyle)
Returns true if the specified drop-style flag is set.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IPoint positionRelativeTo( const IDMItem::Handle& item, IDMTargetDropEvent& event )
Returns a drag item's position relative to the target container. If the drag item handle is 0, a drop point relative to the target container's origin is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMTargetOperation& setDropOffset( const ISize& newPointerOffset )
Sets the current drop offset in window coordinates. The drop offset is the location where the next container object dropped would be positioned as long as the target operation's drop style is not IDM::dropPosition. The location is the offset relative to the position of the last object dropped.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMTargetOperation& setStyle(DropStyle dropStyle)
Sets the drop style for the target operation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
DropStyle style() const
Returns the target operation's drop style.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool wasDragAfter() const
Returns true if the target enter event was generated above the first list item, between list items, or after the last list item in one of the list views of a container. An example of a container list view is the details view.
False is returned if the event was generated over a list item.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members provide utilities used to implement this class. They are used by the Open Class Library.
![]() |
public:
static IDMTargetOperation::Handle instanceFor( IDMTargetEnterEvent& event )
Returns an IDMTargetOperation object.
Note:
IAccessError | The handle for the target operation object was not returned. The drag information is not accessible. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These are utility functions for drag operation objects.
![]() |
public:
virtual bool firstTimeEntered() const
Returns a flag indicating that a drag operation is entering the target window for
the first time.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMTargetOperation& setFirstTimeEntered(bool flag)
Sets a flag indicating that a drag operation is entering the target window for the first time.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static void setTargetOperation( IDMTargetOperation::Handle tgtOperation )
Sets an IDMTargetOperation handle during the processing of the initial target enter event.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static IDMTargetOperation::Handle targetOperation()
Returns the IDMTargetOperation handle created during the processing of the initial target enter event.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
typedef ICountedPointerTo < IDMTargetOperation > Handle
IDMTargetOperation::Handle provides access to the IDMTargetOperation objects associated with a direct manipulation. This handle manages the references to the IDMTargetOperation object and ensures that this object is not destructed until the direct manipulation is completed.
Use Handle to reference a target operation handle within this class and IDMTargetOperation::Handle externally.
To convert from a Handle to an IDMTargetOperation pointer, use the ICountedPointerTo::getAlias() function.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
IDMOperation& addItem(const IDMItem::Handle& newItem)
IContainerObject* containerObject() const
static bool debugSupport()
IDMItem::Handle item(unsigned position)
unsigned numberOfItems()
virtual unsigned long operation() const
virtual IPoint position() const
IDMOperation& removeItem( const IDMItem::Handle& itemToRemove )
IDMOperation& removeItem(unsigned position)
IDMOperation& replaceItem( unsigned position, const IDMItem::Handle& replacement )
IDMOperation& setContainerObject(IContainerObject* object)
IDMOperation& setContainerRefreshOff( IContainerControl* container )
IDMOperation& setContainerRefreshOn()
static void setDebugSupport(bool debugSupport = true)
virtual IDMOperation& setOperation(unsigned long op)
virtual IDMOperation& setPosition(IPoint position)
virtual IDMOperation& setSource(Source source)
virtual IDMOperation& setSourceWindowHandle( IWindowHandle window )
virtual IDMOperation& setTargetWindowHandle( IWindowHandle window )
virtual Source source() const
virtual IWindow* sourceWindow() const
virtual IWindowHandle sourceWindowHandle() const
virtual IWindow* targetWindow() const
virtual IWindowHandle targetWindowHandle() const
void addRef()
unsigned long count() const
void removeRef()
static const unsigned long copy
static const unsigned long drag
static const unsigned long link
static const unsigned long move
static const unsigned long unknown
virtual ~IDMOperation()
_DRAGINFO* dragInfo() const
bool dragWasInterrupted() const
IDMOperation(IDMTargetEnterEvent& event)
IDMOperation(IDMSourceBeginEvent& event)
IDMOperation& setDragInfo(_DRAGINFO* dragInfo)
IDMOperation& setDragResult(bool result)
virtual ~IMRefCounted()
IMRefCounted()
IMRefCounted(const IMRefCounted&)
IMRefCounted& operator =(const IMRefCounted&)