SRGraphFeedback Class

class SRGraphFeedback: public CObject

A list of SRGraphFeedback objects stores "hot" areas which can be used to associate a screen area with the data displayed in it.
When a graphic object like a bar or graph data point is drawn, the outline of that object is stored in an SRGraphFeedback object as a CRgn (GDI region object), CRect, or CPoint with radius along with the group and index of the associated data item.
An hit-test routine can then use this list to determine which data item, if any, is associated with the screen location of the mouse cursor.

Defined in: SRGFbck.h

Class Members

int GetnIndex()

Returns the index of the data item attached to this feedback object

virtual int GetnGroup()

Returns the group of the data item attached to this feedback object

 SRGraphFeedback()

Constructor

virtual ~SRGraphFeedback()

Destructor

 SRGraphFeedback(LPPOINT points,int PointCount,int group,int index,SRGraph *Parent)

Constructor with initialization

BOOL ptInFeedback(int x,int y)

Performs hit testing for the coordinates supplied in X and Y

 SRGraphFeedback(CPoint p,int nRadius, int group, int index, SRGraph *pParent)

Creates a feedback item that uses a point and radius combination instead of the normal region

 SRGraphFeedback(CRect r,int group,int index, SRGraph *pParent)

Creates a feedback item that uses a rectangle instead of the normal region

int m_nIndex

Index associated with this hot area

int m_nGroup

Group associated with this hot area

SRGraph * m_pParentGraph

Pointer to the SRGraph object which owns this object

inline virtual CRgn* GetPolygonRegion()

Returns a pointer the feedback region

virtual CPoint GetFeedbackPoint()

Returns the feedback point

virtual int GetRadius()

Returns the radius of the circle around the feedback point

virtual CRect GetFeedbackRect()

Returns a pointer the feedback rectangle

virtual int GetFeedbackType()

Returns a flag indicating the type of feedback area used -- point(2), rectangle(1), or region(0)

CRgn* m_polygonRegion

Region which defines the on-screen feedback area

int m_nRadius

NEW 6.0 Feedback radius from a point

CPoint m_FeedbackPoint

NEW 6.0 feedback may use points as well as regions

CRect m_rFeedbackRect

NEW 6.0 Feedback may use rectangles as well as regions

int m_nFeedbackType

The type of feedback used -- point(2), rectangle(1), or region(0)