File:  [NeXTSTEP 3.3 examples] / Examples / AppKit / Backspace / SpaceView.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:31 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

#import <appkit/View.h>

#define NSTARS (200)
#define STARSPERIT (100)

typedef struct STAR {
	float theta;	// angle
	float distance;
	float delta;	// change in distance
	float ddelta;	// change in delta, a constant multiplier
	int changemode;
	char c;
	float changepoint[6];
	
	NXPoint r1, r2;
	NXPoint *draw;
	NXPoint *erase;
	
	} STAR;

@interface SpaceView:View
{
	STAR stars[NSTARS];
	int nstars;
	int radius;			// min radius of this view

	NXPoint b[NSTARS];
	NXPoint bOffsets[NSTARS];
	char bc [NSTARS+1];
	
	NXPoint w[NSTARS];
	NXPoint wOffsets[NSTARS];
	char wc [NSTARS+1];
	
	NXRect voidRect;	//avoid the void!
	int toggle;
	NXSize oldSize;
}

- convertToXY:(STAR *)p;
- oneStep;
- (BOOL) allowStars:(const STAR *)p;
- drawSelf:(const NXRect *)rects :(int)rectCount;
- sizeTo:(NXCoord)width :(NXCoord)height;
- addStar;
- replaceStarAt:(int)index;
- setRadius;
- (const char *)windowTitle;
- setVoidRect:(const NXRect *)r;
- didLockFocus;
- (BOOL)useBufferedWindow;

- (BOOL)ignoreMouseMovement;
- inspector:sender;
- inspectorWillBeRemoved;
- inspectorInstalled;
@end

@interface StaticSpaceView:SpaceView
{
}
@end

@interface View(nonretainedFillMethod)
- fillBoundsWithBlack;
@end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.