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

CHART_API int GetnIndex()

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

CHART_API virtual int GetnGroup()

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

CHART_API SRGraphFeedback()

Constructor

CHART_API virtual ~SRGraphFeedback()

Destructor

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

Constructor with initialization

CHART_API BOOL ptInFeedback(int x,int y)

Performs hit testing for the coordinates supplied in X and Y

CHART_API 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

CHART_API 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

CHART_API virtual CPoint GetFeedbackPoint()

Returns the feedback point

CHART_API virtual int GetRadius()

Returns the radius of the circle around the feedback point

CHART_API virtual CRect GetFeedbackRect()

Returns a pointer the feedback rectangle

CHART_API 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)