Instance Method

draggingSourceOperationMask()

Required.

Returns the dragging operation mask of the dragging source.

Declaration

func draggingSourceOperationMask() -> NSDragOperation

Return Value

The dragging operation mask, which is declared by the dragging source through the NSDraggingSource draggingSession(_:sourceOperationMaskFor:) method (preferred) or the NSDraggingSourcedraggingSourceOperationMaskForLocal: method. If the source does not permit any dragging operations, this method should return none.

Discussion

If the source permits dragging operations, the elements in the mask are one or more of the constants described in Obtaining Information About the Dragging Session, combined using the C bitwise OR operator.

If the user is holding down a modifier key during the dragging session and the source does not prohibit modifier keys from affecting the drag operation (through its ignoreModifierKeysWhileDragging method), then the operating system combines the dragging operation value that corresponds to the modifier key (see the descriptions below) with the source’s mask using the C bitwise AND operator.

The modifier keys are associated with the dragging operation options shown below:

Modifier Key

Dragging Operation

Control

NSDragOperationLink

Option

NSDragOperationCopy

Command

NSDragOperationGeneric