This is EmptyView.m in view mode; [Download] [Up]
// EmptyView.m
//
#import "EmptyView.h"
@implementation EmptyView
///////////////////////////////////////////////////////////////////
//
- initFrame:(const NXRect *)frameRect
{
[super initFrame:frameRect];
myFont = [Font newFont:"Helvetica-BoldOblique" size:24.0
style:0 matrix:NX_IDENTITYMATRIX];
return self;
}
///////////////////////////////////////////////////////////////////
//
- drawSelf:(const NXRect *)rects :(int)rectCount
{
float textWidth;
char *tmpCharPtr;
PSsetgray(NX_DKGRAY);
PSrectfill(rects[0].origin.x, rects[0].origin.y,
rects[0].size.width, rects[0].size.height);
PSsetgray(NX_BLACK);
[myFont set];
tmpCharPtr = "Empty";
textWidth = [myFont getWidthOf:tmpCharPtr];
PSmoveto((bounds.size.width / 2) - (textWidth / 2), bounds.size.height / 2);
PSshow(tmpCharPtr);
return self;
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.