This is OOPSObjectView.m in view mode; [Download] [Up]
#import "OOPSObjectView.h"
@implementation OOPSObjectView
- initFrame:(NXRect *)frameRect
{
char buf[MAXPATHLEN + 1];
NXBundle *bundle;
self = [super initFrame:frameRect];
if(strcmp([NXApp appName] , "InterfaceBuilder") ==0){
bundle = [NXBundle bundleForClass:[self class]];
if ( [bundle getPath:buf forResource:"Timer" ofType:"tiff"] ) {
image = [[NXImage alloc] initFromFile:buf];
}
}
return self;
}
- drawSelf: (const NXRect *)rects :(int)rectCount
{
NXPoint imagePoint;
NXRect imageRect;
NXSetRect(&imageRect, rects->origin.x,
rects->origin.y, rects->size.width,
rects->size.height);
imagePoint = imageRect.origin;
imagePoint.y = 0;
imagePoint.x = 0;
if (image) {
[image composite:NX_SOVER fromRect:&imageRect toPoint:&imagePoint];
}
return self;
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.