SRGGridLines Class

class SRGGridLines: public SRGraphComponent

This grid line manager is similar to the SRGTickMarks class in that it uses a list of CPoint objects generated by the SRGraphLabelBlock-based classes to generate and position the grid lines. These grids may show major and minor lines that may have different color and line styles. A specified number of minor lines are drawn for every major line. The major lines are positioned by the tick position list.

Defined in: SRGGridLines.h

Class Members

CHART_API virtual void SetMajorStyleCount(int v)

Sets the number of style items used in constructing a pen for major grid lines

CHART_API virtual void SetMinorStyleCount(int v)

Sets the number of style items used in constructing a pen for minor grid lines

CHART_API virtual int GetMajorStyleCount()

Returns the number of style items used in constructing a pen for major grid lines

CHART_API virtual int GetMinorStyleCount()

Returns the number of style items used in constructing a pen for minor grid lines

CHART_API virtual void SetMinorGridRatio(int v)

Specifies the number of minor grid lines for each major grid line

CHART_API virtual int GetMinorGridRatio()

Returns the number of minor grid lines for each major grid line

CHART_API virtual void SetMinorLogPen(LOGPEN *v)

Specifies an optional LOGPEN structure that defines the pen for the minor grid lines

CHART_API virtual void SetMajorLogPen(LOGPEN *v)

Specifies an optional LOGPEN structure that defines the pen for the major grid lines

CHART_API virtual void SetMajorStyleList(DWORD *v)

Specifies a style item list that defines the pen for the major grid lines

CHART_API virtual void SetMinorStyleList(DWORD *v)

Specifies a style item list that defines the pen for the minor grid lines

CHART_API virtual LOGPEN* GetMinorLogPen()

Returns the LOGPEN structure that defines the pen for the minor grid lines

CHART_API virtual LOGPEN* GetMajorLogPen()

Returns the LOGPEN structure that defines the pen for the major grid lines

CHART_API virtual DWORD* GetMajorStyleList()

Returns a pointer to the style item list that defines the pen for the major grid lines

CHART_API virtual DWORD* GetMinorStyleList()

Returns a pointer to the style item list that defines the pen for the minor grid lines

CHART_API virtual void Serialize(CArchive &ar)

Saves or restores this object to an archive

CHART_API virtual void SetDisplayRect(CRect v)

Specifies the rectangle that corresponds to the data display area

CHART_API virtual CRect GetDisplayRect()

Returns the rectangle that corresponds to the data display area

CHART_API virtual void SetVertical(BOOL v)

Sets the flag that selects vertical or horizontal orientation of grid lines

CHART_API virtual BOOL GetVertical()

Returns the flag that selects vertical or horizontal orientation of grid lines

CHART_API virtual void SetptrTickPositionList(CPtrList *pList)

Sets a pointer to the tick position list that coordinates label positions with tick and grid objects

CHART_API virtual void DrawForeground()

Draws the grid lines

CHART_API virtual void SetMajorGridColor(COLORREF r)

Specifies the RGB color for the major grid lines

CHART_API virtual void SetMinorGridColor(COLORREF r)

Specifies the RGB color for the minor grid lines

CHART_API virtual void SetMajorGridWidth(int n)

Sets the pen width for the major grid lines

CHART_API virtual void SetMinorGridWidth(int n)

Sets the pen width for the minor grid lines

CHART_API virtual void SetMajorGridStyle(int n)

Sets the pen style for the major grid lines

CHART_API virtual void SetMinorGridStyle(int n)

Sets the pen style for the minor grid lines

CHART_API virtual COLORREF GetMajorGridColor()

Returns the RGB color for the major grid lines

CHART_API virtual COLORREF GetMinorGridColor()

Returns the RGB color for the minor grid lines

CHART_API virtual int GetMajorGridWidth()

Returns the width of the major grid lines

CHART_API virtual int GetMinorGridWidth()

Returns the width of the minor grid lines

CHART_API virtual int GetMajorGridStyle()

Returns the pen style for the major grid lines

CHART_API virtual int GetMinorGridStyle()

Returns the pen style for the minor grid lines

CHART_API SRGGridLines()

Constructor

protected:

Destructor

CHART_API virtual void DrawCustomHGrid(int x,int y)

Override to draw horizontal grid lines with a custom style

CHART_API virtual void DrawCustomVGrid(int x,int y)

Override to draw vertical grid lines with a custom style

CHART_API virtual void DrawHGridLine(int x,int y, CPen *p=NULL)

Draws a single horizontal grid line in a given style

CHART_API virtual void DrawVGridLine(int x,int y,CPen *p=NULL)

Draws a single vertical grid line in a given style

int m_nMinorGridRatio

Number of minor grid lines to be drawn between major grid lines

int m_nMajorGridStyle

Pen style for major grid lines

int m_nMinorGridStyle

Pen style for minor grid lines

int m_nMajorGridWidth

Pen width for major grid lines

int m_nMinorGridWidth

Pen width for minor grid lines

CPtrList* m_pTickPositionList

Pointer to the tick position list that coordinates label positions with tick and grid objects

COLORREF m_MajorGridColor

RGB color for major grid lines

COLORREF m_MinorGridColor

RGB color for minor grid lines

BOOL m_bVertical

Vertical flag -- TRUE for vertical, FALSE for horizontal

CRect m_DisplayRect

Rectangle that corresponds to the data display area

LOGPEN* m_pMinorLogPen

Optional LOGPEN structure defining the pen style for the minor grid lines

LOGPEN* m_pMajorLogPen

Optional LOGPEN structure defining the pen style for the major grid lines

DWORD* m_pMajorStyleList

Pointer to a list of style items that define the pen for the major grid lines

DWORD* m_pMinorStyleList

Pointer to a list of style items that define the pen for the minor grid lines

int m_nMajorStyleCount

Number of items in the list of styles for the major grid lines

int m_nMinorStyleCount

Number of items in the list of styles for the minor grid lines

CHART_API virtual void DrawShadow()

Overidden to do nothing

CHART_API virtual void DrawBorder()

Overidden to do nothing

CHART_API virtual void DrawFill()

Overidden to do nothing