O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSDraggingSource — Mac OS X 10.0

Synopsis

This informal protocol declares methods that a class must implement to serve as a source of data in dragging operations. This protocol declares a number of methods, but classes need only implement the method draggingSourceOperationMaskForLocal: to be a valid dragging operation source. Classes should implement this method to return a dragging source operation mask, which describes how data should be handled in a dragging operation. See NSDraggingInfo’s listing (previously) for more information.

@interface NSObject (NSDraggingSource)
                                  // Instance Methods
   - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag;
   - (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination;
   - (void)draggedImage:(NSImage *)image 
                                 beganAt:(NSPoint)screenPoint;
   - (void)draggedImage:(NSImage *)image 
                                 endedAt:(NSPoint)screenPoint 
                                 operation:(NSDragOperation)operation;
   - (void)draggedImage:(NSImage *)image 
                                 movedTo:(NSPoint)screenPoint;
   - (BOOL)ignoreModifierKeysWhileDragging;
   - (void)draggedImage:(NSImage *)image 
                                 endedAt:(NSPoint)screenPoint 
                                 deposited:(BOOL)flag;
@end

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required