Return to the Main Index
Return to the Alphabetic Index

Copyright (c) 1994 by NeXT Computer, Inc. All Rights Reserved.


(informal protocol)

Category Of: NSObject

Declared In: AppKit/NSDragging.h

Protocol Description

NSDraggingSource declares methods that can (or must) be implemented by the source object in a dragging session. (See the NSDraggingDestination protocol for definitions of dragging terms.) This dragging source is specified as an argument to the dragImage:... message, sent to a NSWindow or NSView, that instigated the dragging session.

Of the methods declared below, only the draggingSourceOperationMaskForLocal: method must be implemented. The other methods are invoked only if the dragging source implements them. All four methods are invoked automatically during a dragging sessionyou never send an NSDraggingSource message directly to an object.

Querying the Source

- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocalp> Returns a mask giving the operations that can be performed on the dragged image's data.

- (BOOL)ignoreModifierKeysWhileDragging Returns YES if modifier keys should have no effect on the type of operation performed.

Informing the Source

- (void)draggedImage:(NSImage *)image Invoked when the dragged image is displayed but before it

beganAt:(NSPoint)screenPoint starts following the mouse.

- (void)draggedImage:(NSImage *)image Invoked after the dragged image has been released and the

endedAt:(NSPoint)screenPoint dragging destination has been given a chance to operate.