This is MiscDragView-Delegate.m in view mode; [Download] [Up]
{\rtf0\ansi{\fonttbl\f4\fmodern Courier;\f5\fnil Messenger;\f3\fmodern Ohlfs;} \paperw11760 \paperh7800 \margl120 \margr120 \pard\tx540\tx1140\tx1680\tx2300\tx3340\tx3920\tx4500\tx5040\tx9200\tx11520\f4\b0\i0\ulnone\fs24\fc0\cf0 /***************************************************************\ CATEGORY: MiscDragView (Delegate)\ \ See the header for more information on this category.\ ***************************************************************/\ \ #import <appkit/appkit.h>\ #import "MiscDragView-BackwardCompat.h"\ #import "MiscDragView-Delegate.h"\ \ \ \f5\b @implementation MiscDragView (Delegate) \f4\b0 \ \ \f5\b - delegate \f4\b0 \ \{\ return delegate;\ \}\ \ \ \ // The delegate will only be sent messages that it can respond to.\ \ \f5\b - setDelegate: (id)theDelegate \f4\b0 \ \{\ delegate = theDelegate;\ return self;\ \}\ \ \ \ // Sent from "mouseDown" just before the dragging starts to take place\ \ \f5\b - _sourceDragInitiated: sender \f4\b0 \ \{\ // here for backward compatibility, please use new delegate\ // methods\ if ([delegate respondsTo: @selector(sourceDragInitiated:)])\ [delegate sourceDragInitiated: sender];\ \ // newly renamed delegate methods\ if ([delegate respondsTo: @selector(didInitiateSourceDrag:)])\ [delegate didInitiateSourceDrag: sender];\ \ return self;\ \}\ \ \ \ // Sent when "draggedImage: endedAt: screenPoint: deposited:" is given \ // control and success is whether the image was deposited in another\ // view somewhere.\ \ \f5\b - _sourceDragFinished: (BOOL)successful \f4\b0 \ \{\ // here for backward compatibility, please use new delegate\ // methods\ if ([delegate respondsTo: @selector(sourceDragFinished:)])\ [delegate sourceDragFinished: successful];\ \ // new delegate method\ if ([delegate respondsTo: @selector(didFinishSourceDrag:)])\ [delegate didFinishSourceDrag: successful];\ \ return self;\ \}\ \ \ \ // Sent when "draggingEntered:" is given control.\ \ \f5\b - _destinationDragInitiated: sender \f4\b0 \ \{\ // here for backward compatibility, please use new delegate\ // methods\ if ([delegate respondsTo: @selector(destinationDragInitiated:)])\ [delegate destinationDragInitiated: sender];\ \ // new delegate method\ if ([delegate respondsTo: @selector(didInitiateDestinationDrag:)])\ [delegate didInitiateDestinationDrag: sender];\ \ return self;\ \}\ \ \ \ // Sent when "concludeDragOperation:" is given control\ \ \f5\b - _destinationDragFinished: (BOOL)successful \f4\b0 \ \{\ // here for backward compatibility, please use new delegate\ // methods\ if ([delegate respondsTo: @selector(destinationDragFinished:)])\ [delegate destinationDragFinished: successful];\ \ // new delegate method\ if ([delegate respondsTo: @selector(didFinishDestinationDrag:)])\ [delegate didFinishDestinationDrag: successful];\ \ return self;\ \}\ \ \f5\b @end \f4\b0 \ \ }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.