home *** CD-ROM | disk | FTP | other *** search
- /*-------------------------------------------------------------------------------
- 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
-