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

// LinesView.h, a small sample view for showing timed entries & userpaths.
// Author: Ali T. Ozer, NeXT Computer, Inc.
// Written March 19, 1989.
// Updated for 2.0 and integrated with UserPath.[hm] by Jayson Adams,
// NeXT Developer Support Team, October 16, 1990
//
// You may freely copy, distribute and reuse the code in this example.
// NeXT disclaims any warranty of any kind, expressed or implied, as to its
// fitness for any particular use.
//

#import <appkit/View.h>
#import "UserPath.h"

#define MINNUMCORNERS 2
#define MAXNUMCORNERS 20

@interface LinesView : View
{
    BOOL running;                 // Whether we are animating or not.
    DPSTimedEntry linesTimedEntry;
    struct cornerStruct {
	int xLoc, yLoc;
	int xVel, yVel;
    } corners[MAXNUMCORNERS];     // Corners and velocities for our polygon
    int numCorners;               // Number of corners we actually have
    UserPath	*userPath;
}

/* instance methods */
- initFrame:(NXRect *)rect;
- free;
- toggleRun:sender;
- setNumberOfCorners:sender;
- animate;

@end

unix.superglobalmegacorp.com

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