Protocol

NSDraggingSource

A set of methods that are implemented by the source object in a dragging session.

Declaration

@protocol NSDraggingSource

Overview

In macOS 10.7 and later NSDraggingSource is now a formal protocol and has an updated interface. The OS X v10.6 behavior has been retained, but will be dropped in a future version of the operating system. The methods that are to be deprecated are marked as such.

Topics

Dragging Session Operation

- draggingSession:sourceOperationMaskForDraggingContext:

Declares the types of operations the source allows to be performed.

Required.

Dragging Session Locations

- draggingSession:endedAtPoint:operation:

Invoked when the dragging session has completed.

- draggingSession:movedToPoint:

Invoked when the drag moves on the screen.

- draggingSession:willBeginAtPoint:

Invoked when the drag will begin.

Dragging Session Modifier Keys

- ignoreModifierKeysForDraggingSession:

Returns whether the modifier keys will be ignored for this dragging session.

Dragging Options

- draggingSourceOperationMaskForLocal:

Returns an integer bit mask indicating the types of dragging operations the source object will allow to be performed on the dragged image's data.

- namesOfPromisedFilesDroppedAtDestination:

Returns the names of the files that the receiver promises to create at a specified location.

Deprecated
- ignoreModifierKeysWhileDragging

Sets whether the use of modifier keys should have an effect on the type of operation performed.

Responding to Messages During a Dragging Session

- draggedImage:beganAt:

Gives the source object an opportunity to respond to the initiation of a dragging session.

- draggedImage:movedTo:

Informs the dragging source when a dragged image moves to a new screen coordinate.

- draggedImage:endedAt:deposited:

Invoked after the dragging destination has been given a chance to operate on the data represented by the image.

- draggedImage:endedAt:operation:

Invoked after the dragging destination has been given a chance to operate on the data represented by the image.

Relationships

Inherits From

See Also

Drag Sources

NSDraggingItem

A single dragged item within a dragging session.

NSDraggingSession

The encapsulation of a drag-and-drop action that supports modification of the drag while in progress.

NSDraggingImageComponent

A single object in a dragging item.