Protocol

NSDraggingInfo

The NSDraggingInfo protocol declares methods that supply information about a dragging session.

Overview

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.

Symbols

Obtaining Information About the Dragging Session

func draggingPasteboard()
Required.

Returns the pasteboard object that holds the data being dragged.

func draggingSequenceNumber()
Required.

Returns a number that uniquely identifies the dragging session.

func draggingSource()
Required.

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

func draggingSourceOperationMask()
Required.

Returns the dragging operation mask of the dragging source.

func draggingLocation()
Required.

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

func draggingDestinationWindow()
Required.

Returns the destination window for the dragging operation.

func namesOfPromisedFilesDropped(atDestination: URL)
Required.

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

var numberOfValidItemsForDrop: Int
Required.

Specifies the number of valid items for a drop operation.

Getting Image Information

func draggedImage()
Required.

Returns the image being dragged.

func draggedImageLocation()
Required.

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

Sliding the Image

func slideDraggedImage(to: NSPoint)
Required.

Slides the image to a specified location.

var animatesToDestination: Bool
Required.

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

var draggingFormation: NSDraggingFormation
Required.

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

Implementing Spring-Loading Support

var springLoadingHighlight: NSSpringLoadingHighlight
Required.

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

func resetSpringLoading()
Required.

Resets a spring-loading operation to its initial state.

Constants

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.

Relationships

Inherits From