This is CircleView.h in view mode; [Download] [Up]
/*-------------------------------------------------------------------------------
A simple View subclass that draws a series of circles. The list of
circles to be drawn is kept in a Storage object; we just run down
the list, drawing them.
HISTORY:
10Oct93 DM New
-------------------------------------------------------------------------------*/
#import <appkit/appkit.h>
// Defines the data for a simple circle. No need for objects here.
typedef struct tCircle
{
NXPoint center;
double radius;
} circle;
@interface CircleView:View
{
Storage *circleList; // Storage of all the circles to be drawn
}
- initFrame // Designated initializer for View
:(const NXRect*)frameRect;
- addCircleAt // Add a circle to the display list
:(NXPoint)pPoint // INPUT: the center of the circle
withRadius:(double)pRadius; // INPUT: the radius of the circle
- emptyCircles; // Remove all the circles from the display list
- 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.