| Methods Index |
CShapeSubclasses:
CSquare
CRectangle objects paint a rectangle inside a CView or CSubview.
CRectangle object and initialize it. Like all shapes, this class inherits all properties of CSubview, such as stickiness, enclosure, and so on.To give the rectangle rounded corners, initialize it with
isCornerRounded = TRUE and provide the desired corner width and height.
|
|
|
|
BOOLEAN
|
itHasRoundedCorners
| Whether the rectangle has rounded corners |
UNITS
|
itsCornerWidth
| The width of the rounded corners, in pixels |
UNITS
|
itsCornerHeight
| Height of the rounded corners, in pixels |
CRectangle(CSubview* theEnclosure,
const CRect& theRegion);
CRect. The enclosure is the subview that contains the CRectangle 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 CRectangle object is to be placed.
CRectangle(const CRectangle& theRectangle);
CRectangle object with the same enclosure, color, glue, visibility attributes, enabled/disabled attributes, environment, and so on as the original CRectangle object. However, any shapes nested within the original CRectangle object are not copied.
CRectangle& operator=(const CRectangle& theRectangle);
CRectangle object, creating a new CRectangle object that has the same color, glue, environment, visibility state, and so on. However, any shapes nested within the original CRectangle object are not copied.
virtual ~CRectangle(void);
CRectangle object and deletes any views nested within it.
BOOLEAN IRectangle(BOOLEAN hasRoundCorners = FALSE,
UNITS theCornerWidth = 0,
UNITS theCornerHeight = 0,
BOOLEAN isVisible = TRUE,
GLUETYPE theGlue = NULLSTICKY);
BOOLEAN parameter hasRoundCorners to TRUE. If this parameter is set to TRUE, then you must also set the theCornerWidth and theCornerHeight parameters, which take numbers indicating, in pixels, how high and deep the rounding be. This initializer also allows the visibility status and the glue type of the rectangle to be set.
virtual void Draw(const CRect& theClippingRegion);
theClippingRegion is the part of the rectangle that needs to be drawn, and it is in global, window-relative coordinates.
virtual void SetRoundedCorners(
BOOLEAN isCornerRounded, UNITS theCornerWidth=SAME,
UNITS theCornerHeight=SAME);
BOOLEAN parameter hasRoundCorners to TRUE. If this parameter is set to TRUE, then you must also set the theCornerWidth and theCornerHeight parameters, which take numbers, in logical units, indicating how high and how deep the rounding should be. The default value, SAME, retains the values that are already set.