| Methods Index |
CShapeSubclasses: None
CLine objects paint a line inside a view.
CShape classes, this class inherits all properties of CSubview, such as stickiness, enclosure, and so on.
static const int
|
PWR_HITRANGE
| Constant "hit-range" (in pixels), or distance accuracy for mouse clicks. |
CLine (CSubview* theEnclosure,
const CPoint& theStartingPoint,
const CPoint& theEndingPoint);
theEnclosure is a pointer to the subview that will contain the line.In addition, this method takes two points (CPoints), the point at which the line starts and the point at which it stops.
CLine(const CLine& theLine);
CLine object with the same enclosure, color, visibility attributes, enabled/disabled attributes, environment, and so on as the original CLine object.
CLine& operator=(const CLine& theLine);
CLine object, creating a new CLine object that has the same color, glue, environment, visibility state, and so on.
BOOLEAN ILine(BOOLEAN hasBeginningArrow = FALSE,
BOOLEAN hasEndingArrow = FALSE,
BOOLEAN isVisible = TRUE,
long theGlue = NULLSTICKY);
NULLSTICKY. One or more of these defaults can be overridden.
virtual void Draw(const CRect& theClippingRegion);
theClippingRegion is the part of the line to be drawn, and it is in global, window-relative coordinates.
virtual void Size(const CRect& theNewSize);
theNewSize. The reset region could be in a different location and have completely different dimensions-a new width or a new height. The coordinates of the region, theNewSize, are relative to the enclosure.
virtual void Size(const CPoint& theStartingPoint,
const CPoint& theEndingPoint);
theStartingPoint and theEndingPoint as the line's new starting and ending coordinates.
virtual void SetEnvironment(
const CEnvironment& theNewEnvironment,
BOOLEAN isUpdate = FALSE);
CView::SetEnvironment to set the colors of this object.
static UNITS GetDistanceFromLine(
const CPoint &theStart,
const CPoint &theEnd,
const CPoint &thePoint);
virtual BOOLEAN HitTest(const CPoint &theHitLoc) const;
theHitLoc is a point in the line.
virtual void SetDragging(BOOLEAN isDraggable);
CView::SetDragging to enable or disable dragging of this object whenever the user selects via a mouse click.
virtual void SetSizing(BOOLEAN isSizable);
CView::SetSizing to enable or disable sizing of this object whenever the user selects via a mouse click.
virtual void SetArrows(BOOLEAN hasBeginningArrow,
BOOLEAN hasEndingArrow);
BOOLEAN value of TRUE or FALSE for each of its two parameters.
virtual BOOLEAN HasBeginningArrow(void);
BOOLEAN value indicating whether the line has a beginning arrow.
virtual BOOLEAN HasEndingArrow(void);
BOOLEAN value indicating whether the line has an ending arrow.
CPoint GetStartPoint(void) const;
CPoint GetEndPoint(void) const;
CRefct GetInitialFrame(CSubview* theEnclosure,
const CPoint& theStPnt, const CPoint& theEndPnt);
CRect that is relative to theEnclosure and contains both points.
void PadFrameFromPoints(void);
void PadPointsFromFrame(void);