| Methods Index |
CSubviewSubclasses:
CArc, CLine, COval, CPolygon, CRectangle
CShape is an abstract parent class for such drawing tools as rectangles, circles, lines, polygons, and so on. This is a subclass of CSubview, so CShape objects can contain other nested views, and they can be moved and sized.
CShape(CSubview *theEnclosure,
const CRect& theRegion);
CView and CSubview. It takes a pointer to an enclosure and a region that is a CRect. The enclosure is the subview that contains the CShape object; all CShape objects must be placed within an enclosure. theRegion is a coordinate location that is local to the enclosure; this region indicates where the new CShape object is to be placed.
CShape(const CShape& theShape);
CShape object with the same enclosure, color, visibility attributes, enabled/disabled attributes, environment, and so on as the original CShape object. However, any shapes nested within the original CShape object are not copied.
CShape& operator=(const CShape& theShape);
CShape object, creating a new view that has the same color, glue, environment, visibility state, and so on. However, any shapes nested within the original CShape object are not copied.
virtual ~CShape(void);
BOOLEAN IShape(BOOLEAN isVisible = TRUE,
GLUETYPE theGlue = NULLSTICKY);
virtual void Draw(const CRect& theClippingRegion);
Draw so that the environment is set. theClippingRegion is the part of the shape that needs to be drawn, and it is in global, window-relative coordinates.
CShape draw function and call it before proceeding with its own drawing code. You may also have to override some methods inherited from CSubview, such as dragging and sizing.