outlineView(_:writeItems:to:)
Returns a Boolean value that indicates whether a drag operation is allowed.
Declaration
optional func outlineView(_ outlineView: NSOutlineView, writeItems items: [Any], to pasteboard: NSPasteboard) -> BoolParameters
- outlineView:
The outline view that invoked the method.
- items:
An array of the items participating in the drag.
- pasteboard:
The pasteboard to which to write the drag data.
Return Value
Discussion
Invoked by outlineView after it has been determined that a drag should begin, but before the drag has been started.
To refuse the drag, return false. To start a drag, return true and place the drag data onto the pboard (data, owner, and so on). The drag image and other drag-related information will be set up and provided by the outline view once this call returns with true.
See Also
Instance Methods
outlineView(_:acceptDrop:item:childIndex:)outlineView(_:child:ofItem:)outlineView(_:draggingSession:endedAt:operation:)outlineView(_:draggingSession:willBeginAt:forItems:)outlineView(_:isItemExpandable:)outlineView(_:itemForPersistentObject:)outlineView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:)outlineView(_:numberOfChildrenOfItem:)outlineView(_:objectValueFor:byItem:)outlineView(_:pasteboardWriterForItem:)outlineView(_:persistentObjectForItem:)outlineView(_:setObjectValue:for:byItem:)outlineView(_:sortDescriptorsDidChange:)outlineView(_:updateDraggingItemsForDrag:)outlineView(_:validateDrop:proposedItem:proposedChildIndex:)