Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSDraggingInfoMBS class.

NSDraggingInfoMBS.animatesToDestination as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the dragging formation animates while the drag is over this destination.

During the conclusion of an accepted drag, if this property is set to true, the drag manager will animate each dragging image to their NSDraggingFormationNone locations. Otherwise, the drag images are removed without any animation.

This property is inspected between prepareForDragOperation and performDragOperation. You should enumerate through the dragging items during performDragOperation to set the item's draggingFrame to the correct destinations.

Available in OS X v10.7 and later.
(Read and Write property)

NSDraggingInfoMBS.draggedImage as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the image being dragged.

Value is a NSImageMBS object. Returned as Variant to reduce plugin dependencies.

This image object visually represents the data put on the pasteboard during the drag operation; however, it is the pasteboard data and not this image that is ultimately utilized in the dragging operation.

This method returns non-nil for a local drag, but nil for a cross-process drag. With the new multi-image dragging capabilities, a cross-process destination may participate and change the drag image. But it still cannot get the current drag image.
(Read only property)

NSDraggingInfoMBS.draggedImageLocation as NSPointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the current location of the dragged image's origin.

Returns the dragged image's origin, in the base coordinate system of the destination object's window.
The image moves along with the mouse pointer (the position of which is given by draggingLocation) but may be positioned at some offset.
(Read only property)

NSDraggingInfoMBS.draggingDestinationWindow as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the destination window for the dragging operation.

Value is a NSWindowMBS object. Returned as Variant to reduce plugin dependencies.

Either this window is the destination itself, or it contains the view object that is the destination.
(Read only property)

NSDraggingInfoMBS.draggingFormation as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the dragging formation while the drag is over this destination.

Set this property to change the formation of the drag items. This is generally done during the updateDraggingItemsForDrag method or whenever you enumerate the dragging items.

The default value is the current drag formation.

Note: Set this property before or after the NSDraggingInfo or NSDraggingSession class's method enumerateDraggingItemsWithOptions not inside the enumeration Block.

Available in OS X v10.7 and later.
(Read and Write property)

NSDraggingInfoMBS.draggingLocation as NSPointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the current location of the mouse pointer in the base coordinate system of the destination object's window.

(Read only property)

NSDraggingInfoMBS.draggingPasteboard as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the pasteboard object that holds the data being dragged.

Value is a NSPasteboardMBS object. Returned as Variant to reduce plugin dependencies.

The dragging operation that is ultimately performed utilizes this pasteboard data and not the image returned by the draggedImage method.
(Read only property)

NSDraggingInfoMBS.draggingSequenceNumber as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a number that uniquely identifies the dragging session.

(Read only property)

NSDraggingInfoMBS.draggingSource as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the source, or owner, of the dragged data.

This method returns nil if the source is not in the same application as the destination. The dragging source implements methods from the NSDraggingSource protocol.
(Read only property)

Some examples using this property:

NSDraggingInfoMBS.draggingSourceOperationMask as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the dragging operation mask of the dragging source.

The dragging operation mask, which is declared by the dragging source through the NSDraggingSource sourceOperationMaskForDraggingContext method (preferred) or the NSDraggingSource draggingSourceOperationMaskForLocal method. If the source does not permit any dragging operations, this method should return NSDragOperationNone.

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 KeyDragging Operation
ControlNSDragOperationLink
OptionNSDragOperationCopy
CommandNSDragOperationGeneric
(Read only property)

Some examples using this property:

NSDraggingInfoMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The internal object reference.

(Read and Write property)

NSDraggingInfoMBS.numberOfValidItemsForDrop as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Drag & Drop MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Specifies the number of valid items for a drop operation.

During draggingEntered or draggingUpdated, you are responsible for returning the drag operation. In some cases, you may accept some, but not all items on the dragging pasteboard. (For example, your application may only accept image files.)

If you only accept some of the items, set this property to the number of items accepted so the drag manager can update the drag count badge.

When updateDraggingItemsForDrag is called, you should set the image of non-valid dragging items to nil. If none of the drag items are valid then you should not updateItems, simply return NSDragOperationNone from your implementation of draggingEntered and, or draggingUpdated and do not modify any drag item properties.

Available in OS X v10.7 and later.
(Read and Write property)

The items on this page are in the following plugins: MBS MacCocoa Plugin.


The biggest plugin in space...