This is DrawCell.m in view mode; [Download] [Up]
#import "DrawCell.h" #import "DrawView.h" @implementation DrawCell - init { id returnval=[super init]; selected=0; // no need to initialize coord return returnval; } - setPoint:(NXPoint*) the_point { coord=*the_point; return self; } - setView:the_view { view=the_view; return self; } - drawSelf:(const NXRect*) rects:(int) rectCount { return self; } - (BOOL) hit:(NXEvent*) theEvent { return NO; // just a default } - mouseDown:(NXEvent*) theEvent { return self; } - mouseDragged:(NXEvent*) theEvent { return self; } - mouseUp:(NXEvent*) theEvent { return self; } - select { selected=YES; return self; } - deselect { selected=NO; return self; } - (BOOL) isSelected { return selected; } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.