Protocol

NSDraggingInfo

A set of methods that supply information about a dragging session.

Declaration

@protocol NSDraggingInfo

Overview

The NSDraggingInfo protocol methods are designed to be invoked from within a class’s implementation of NSDraggingDestination protocol methods. AppKit automatically passes an object that conforms to the NSDraggingInfo protocol as the argument to each of the methods defined by NSDraggingDestination. NSDraggingInfo messages should be sent to this object; you never need to create a class that implements the NSDraggingInfo protocol.

Topics

Obtaining Information About the Dragging Session

draggingPasteboard

Returns the pasteboard object that holds the data being dragged.

Required.

draggingSequenceNumber

Returns a number that uniquely identifies the dragging session.

Required.

draggingSource

Returns the source, or owner, of the dragged data.

Required.

draggingSourceOperationMask

Returns the dragging operation mask of the dragging source.

Required.

draggingLocation

Returns the current location of the mouse pointer in the base coordinate system of the destination object’s window.

Required.

draggingDestinationWindow

Returns the destination window for the dragging operation.

Required.

- namesOfPromisedFilesDroppedAtDestination:

Sets the drop location for promised files and returns the names of the files that the receiver promises to create there.

Required.

Deprecated
numberOfValidItemsForDrop

Specifies the number of valid items for a drop operation.

Required.

Getting Image Information

draggedImage

Returns the image being dragged.

Required.

Deprecated
draggedImageLocation

Returns the current location of the dragged image’s origin.

Required.

Sliding the Image

- slideDraggedImageTo:

Slides the image to a specified location.

Required.

animatesToDestination

Returns whether the dragging formation animates while the drag is over this destination.

Required.

draggingFormation

Returns the dragging formation while the drag is over this destination.

Required.

Enumerate Dragged Items

Implementing Spring-Loading Support

springLoadingHighlight

Highlighting style to be displayed by your app’s user interface during a spring-loading operation.

Required.

- resetSpringLoading

Resets a spring-loading operation to its initial state.

Required.

Constants

NSDragOperation

These constants are used by draggingSourceOperationMask.

NSSpringLoadingHighlight

These constants indicate a highlighting style to be displayed by your app’s user interface during a spring-loading operation. One of these constant values will be provided by the springLoadingHighlight method.

NSDraggingFormation

These constants control the visual format of multiple items being dragged.

NSDraggingContext

These parameters specify whether a drag terminates within or outside the application.

NSDragOperationAll Deprecation

Specifies that all drag operations are supported.

Relationships

Inherits From

See Also

Drop Targets

NSDraggingDestination

A set of methods that the destination object (or recipient) of a dragged image must implement.

NSSpringLoadingDestination

A set of methods that the destination object (or recipient) of a dragged object can implement to support spring-loading.