This is LinesView.h in view mode; [Download] [Up]
#import <appkit/View.h>
#import <sys/loader.h>
#define MINNUMCORNERS 2
#define MAXNUMCORNERS 20
@interface LinesView : View
{
BOOL running; // Whether we are animating or not.
BOOL playing;
DPSTimedEntry linesTimedEntry;
struct cornerStruct {
int xLoc, yLoc;
int xVel, yVel;
} corners[MAXNUMCORNERS]; // Corners and velocities for our polygon
NXRect drawRect;
int numCorners; // Number of corners we actually have
char ops[MAXNUMCORNERS+1]; // Array of PS operators for user path
short data[MAXNUMCORNERS*2]; // Array of data points for user path
short boundingBox[4]; // Bounding box of user path
id viewSound;
}
// Initialization stuff...
+ setCustomComponentData:(struct mach_header *)hd customMenu:(id)subMenu;
- initCustomComponent;
- (BOOL)acceptsFirstMouse;
- mouseDown:(NXEvent *)e;
/*
- adjustScroll:(NXRect *)newVisible;
*/
- toggleRun;
- togglePlay;
// Internal methods
- (void) animate;
- drawCurrentPath:(float)color;
- (void) eraseCurrentPath;
- initCorners;
- (void) initPath;
- resetBoundingBox;
- (void) createOpsArray;
// Sound Delegates
- didPlay:sender;
// Archiving methods
- write:(NXTypedStream *)stream;
- read:(NXTypedStream *)stream;
// Inspector Methods.
- inspectCustomComponent;
- setBounceWidth:sender;
- setBounceHeight:sender;
- setBounceNumVertex:sender;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.