IDMTargetEnterEvent

The IDMTargetEnterEvent class encapsulates direct manipulation target enter events when a user drags drag items over a target. Objects of this class are constructed by the target handler, IDMTargetHandler. Objects of this class are constructed for each target enter event.

Objects of this class provide information about the drag items from the static IDMTargetOperation object. The target operation object is created during the processing of the initial target enter event for a target.

The event result field is of particular importance for these event objects. The result indicates whether the drag item objects can be dropped on the target, and, if so, what the default drag operation is. This class provides specialized functions to set the components of the event result.


IDMTargetEnterEvent - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IDMTargetEnterEvent
public:
IDMTargetEnterEvent(const IEvent& event)

Constructs objects of this class from a generic IEvent object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Container Support

Use these members to query information for the container target enter event.


[view class]
container
public:
virtual IContainerControl* container() const

Returns a pointer to the container within which the target enter event occurred.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
containerId
public:
virtual unsigned long containerId() const

Returns the target container's identifier (ID).

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isAboveFirst
public:
virtual bool isAboveFirst() const

Returns true if the target enter event was generated above the first list item in one of the list views of a container. An example of a container list view is details view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isDragAfter
public:
virtual bool isDragAfter() 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 details view.

False is returned if the event was generated over a list item.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


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

Returns a pointer to the object over which the target enter event occurred. If the event occurred over the container's white space or the window is not a container, 0 is returned.
Note: The white space of a container is an area that no container objects occupy.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Event Information

Use these members to set and query event information for this class.


[view class]
defaultOperation
public:
virtual unsigned long defaultOperation() const

Returns the default drag operation for the target. IDMOperation::operation provides a list of the drag operations.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
dropIndicator
public:
virtual DropIndicator dropIndicator() const

Returns the drop indicator, which is one of the following:

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
position
public:
virtual IPoint position() const

Returns the position of the hot spot of the pointing device.

Exception

IAccessError The pointing device's position was not returned. The drag information is not accessible.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setDefaultOperation
public:
IDMTargetEnterEvent& setDefaultOperation( unsigned long operation )

Sets the default drag operation for the target.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setDropIndicator
public:
IDMTargetEnterEvent& setDropIndicator( DropIndicator indicator )

Sets the drop indicator, which is one of the following:

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IDMTargetEnterEvent - Inherited Member Functions and Data

Inherited Public Functions

IDMEvent
IDMTargetEvent
IEvent

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data