[Classes] [Prev] [Next] [Methods]

CLine

Methods Index

Heritage
Description
Usage
Environment
Public Data Members
Protected Data Members
Public Methods
Constructor, Destructor, and Initializer Methods
Hit Test Methods
Overridden CView Methods
Utility Methods
Protected Methods
Internal Methods

CLine


Heritage

Superclass: CShape

Subclasses: None


Description

CLine objects paint a line inside a view.


Usage

Create and initialize a line. Like all CShape classes, this class inherits all properties of CSubview, such as stickiness, enclosure, and so on.


Environment

The line is drawn with the pen, which has settings for color, pattern, style, and width.


Public Data Members

static const int PWR_HITRANGE Constant "hit-range" (in pixels), or distance accuracy for mouse clicks.


Protected Data Members

BOOLEAN itHasStartArrow; Whether the line has a starting arrow
BOOLEAN itHasEndArrow; Whether the line has an ending arrow
CPoint* itsStartPoint; The point where the line starts
CPoint* itsEndPoint; The point where the line ends


Public Methods

Constructor, Destructor, and Initializer Methods

CLine (CSubview* theEnclosure, 
const CPoint& theStartingPoint,
const CPoint& theEndingPoint);
CLine(const CLine& theLine);
CLine& operator=(const CLine& theLine);
virtual ~CLine(void);

BOOLEAN ILine(BOOLEAN hasBeginningArrow	= FALSE, 
BOOLEAN hasEndingArrow = FALSE,
BOOLEAN isVisible = TRUE,
long theGlue = NULLSTICKY);
virtual void Draw(const CRect& theClippingRegion);
virtual void Size(const CRect& theNewSize);

virtual void Size(const CPoint& theStartingPoint, 
const CPoint& theEndingPoint);
virtual void SetEnvironment(
const CEnvironment& theNewEnvironment,
BOOLEAN isUpdate = FALSE);

Hit Test Methods

static UNITS GetDistanceFromLine(
const CPoint &theStart,
const CPoint &theEnd,
const CPoint &thePoint);
virtual BOOLEAN HitTest(const CPoint &theHitLoc) const;

Overridden CView Methods

virtual void SetDragging(BOOLEAN isDraggable);
virtual void SetSizing(BOOLEAN isSizable);

Utility Methods

virtual void SetArrows(BOOLEAN hasBeginningArrow, 
BOOLEAN hasEndingArrow);
virtual BOOLEAN HasBeginningArrow(void);
virtual BOOLEAN HasEndingArrow(void);
CPoint GetStartPoint(void) const;
CPoint GetEndPoint(void) const;

Protected Methods

Internal Methods

CRefct GetInitialFrame(CSubview* theEnclosure,
const CPoint& theStPnt, const CPoint& theEndPnt);
void PadFrameFromPoints(void);
void PadPointsFromFrame(void);


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.