### 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.

~IDMTargetEnterEvent

      public:
      virtual ~IDMTargetEnterEvent()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

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.

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

containerId

      public:
      virtual unsigned long containerId() const

  Returns the target container's identifier (ID).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

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

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

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.

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

dropIndicator

      public:
      virtual DropIndicator dropIndicator() const

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

  - IDM::notOk
  - IDM::ok
  - IDM::operationNotOk
  - IDM::neverOk

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

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

setDefaultOperation

      public:
      IDMTargetEnterEvent&
        setDefaultOperation( unsigned long operation )

  Sets the default drag operation for the target.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setDropIndicator

      public:
      IDMTargetEnterEvent&
        setDropIndicator( DropIndicator indicator )

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

  - IDM::notOk
  - IDM::ok
  - IDM::operationNotOk
  - IDM::neverOk

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IDMTargetEnterEvent - Inherited Member Functions and Data

#### Inherited Public Functions

  IDMEvent

  -     virtual ~IDMEvent()

  -     IDMEvent(const IEvent& event)

  IDMTargetEvent

  -     virtual ~IDMTargetEvent()

  -     IDMTargetEvent(const IEvent& event)

  -     virtual IPresSpaceHandle presSpace()

  -     virtual void releasePresSpace()

  IEvent

  -     virtual ~IEvent()

  -     IWindowHandle controlHandle() const

  -     virtual IWindow* controlWindow() const

  -     IEvent& decrementOwnerLevels()

  -     virtual IWindow* dispatchingWindow() const

  -     unsigned long eventId() const

  -     IWindowHandle handle() const

  -     IEvent( const IWindowHandle& handle,
                unsigned long eventId,
                const IEventParameter1& parameter1,
                const IEventParameter2& parameter2 )

  -     IEvent(const IEvent& event)

  -     IEvent( IWindow* window,
                unsigned long eventId,
                const IEventParameter1& parameter1,
                const IEventParameter2& parameter2 )

  -     IEvent& operator =(const IEvent& event)

  -     IEventParameter1 parameter1() const

  -     IEventParameter2 parameter2() const

  -     bool passToOwner() const

  -     IEventResult result() const

  -     IEvent& setControlHandle(const IWindowHandle& handle)

  -     IEvent& setDispatchingHandle(const IWindowHandle& handle)

  -     IEvent& setDispatchingWindow(IWindow* window)

  -     IEvent& setHandle(const IWindowHandle& handle)

  -     IEvent& setNumberOfLevels(int levels = - 1)

  -     IEvent& setPassToOwner(bool passOn = true)

  -     IEvent& setResult(bool eventResult)

  -     IEvent& setResult(const IEventResult& eventResult)

  -     virtual IWindow* window() const

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None