This is TrafficLightView.h in view mode; [Download] [Up]
/* Generated by Interface Builder */ #import "CardView.h" #import <appkit/graphics.h> // This is a base class for the Roll // and Stop traffic light cards. // There are three balls to be drawn in the stop/roll // cards. These data structures specify the information // needed to locate and draw those balls. // Rather than using nice structures to show the structure's // contents, I have to use arrays of floats. This is // because I pass the arrays to pswrapped code. // Arrays are: [0]=center_x, [1]=center_y, [2]=radius. extern float redLight[], greenLight[], ulBall[], lrBall[]; @interface TrafficLightView:CardView { // These instance variables are used by the drawSelf:: method // implemented in this class but must be initialized by the // sub classes. // These two variables declare what color the red and // grean lamps of the traffic light will be drawn with. float redLightColor, greenLightColor; // This variable holds the color that the smaller balls // and label text will be drawn with. float ballAndLabelColor; // This is the card label (e.g. "Stop" or "Roll"). char *label; } // The traffic light view is a base class, of sorts. // It locates and initializes the bottom face bitmap // for the traffic light. - init; - drawSelf:( const NXRect * )rects :( int )rectCount; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.