|
|
1.1 root 1: #import <appkit/View.h>
2:
3: #define NSTARS (200)
4: #define STARSPERIT (100)
5:
6: typedef struct STAR {
7: float theta; // angle
8: float distance;
9: float delta; // change in distance
10: float ddelta; // change in delta, a constant multiplier
11: int changemode;
12: char c;
13: float changepoint[6];
14:
15: NXPoint r1, r2;
16: NXPoint *draw;
17: NXPoint *erase;
18:
19: } STAR;
20:
21: @interface SpaceView:View
22: {
23: STAR stars[NSTARS];
24: int nstars;
25: int radius; // min radius of this view
26:
27: NXPoint b[NSTARS];
28: NXPoint bOffsets[NSTARS];
29: char bc [NSTARS+1];
30:
31: NXPoint w[NSTARS];
32: NXPoint wOffsets[NSTARS];
33: char wc [NSTARS+1];
34:
35: NXRect voidRect; //avoid the void!
36: int toggle;
37: NXSize oldSize;
38: }
39:
40: - convertToXY:(STAR *)p;
41: - oneStep;
42: - (BOOL) allowStars:(const STAR *)p;
43: - drawSelf:(const NXRect *)rects :(int)rectCount;
44: - sizeTo:(NXCoord)width :(NXCoord)height;
45: - addStar;
46: - replaceStarAt:(int)index;
47: - setRadius;
48: - (const char *)windowTitle;
49: - setVoidRect:(const NXRect *)r;
50: - didLockFocus;
51: - (BOOL)useBufferedWindow;
52:
53: - (BOOL)ignoreMouseMovement;
54: - inspector:sender;
55: - inspectorWillBeRemoved;
56: - inspectorInstalled;
57: @end
58:
59: @interface StaticSpaceView:SpaceView
60: {
61: }
62: @end
63:
64: @interface View(nonretainedFillMethod)
65: - fillBoundsWithBlack;
66: @end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.