ftp.nice.ch/pub/next/tools/system/Informer.1.1.s.tar.gz#/Informer_1.1.source/EmptyView.m

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.