ftp.nice.ch/pub/next/developer/resources/classes/RuledViews.s.tar.gz#/RuledViews/BrainRulers/DragPSView.h

This is DragPSView.h in view mode; [Download] [Up]

// DragPSView.m
// A simple view class that responds to mouseDown event by 
// opening a stream and sending a message to a 'streamProvider'
// to draw postscript code into the stream.  It then writes the
// stream back to the file (DRAGGEDFILENAME) and invokes the view
// method dragFile:fromRect:slideBack:event:
// You must connect the streamProvider outlet to an object that 
// responds to writeToStream: by writing the contents of the file
// represented by the icon to the given stream.
// DragPSView.h provides an interface to a 'streamProvider'
// category (of the Object class) with this method.
// Note: This class does not remove DRAGGEDFILENAME.
// DragPSView composites an image (IMAGENAME) to draw itself.

#import <appkit/View.h>
#define DRAGGEDFILENAME "/tmp/PS_Image.ps"
#define IMAGENAME "smallPSicon"

@interface DragPSView:View
{
	// provides the PSstream of image to be dragged
	id	streamProvider;		
}

- drawSelf:(NXRect *)rects :(int)rectCount;
- mouseDown:(NXEvent *)theEvent;

@end

@interface Object(streamProvider)
- writeToStream:(NXStream *)stream;
@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.