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
virtual void SetMajorStyleCount(int v)
Sets the number of style items used in constructing a pen for major grid lines
virtual void SetMinorStyleCount(int v)
Sets the number of style items used in constructing a pen for minor grid lines
virtual int GetMajorStyleCount()
Returns the number of style items used in constructing a pen for major grid lines
virtual int GetMinorStyleCount()
Returns the number of style items used in constructing a pen for minor grid lines
virtual void SetMinorGridRatio(int v)
Specifies the number of minor grid lines for each major grid line
virtual int GetMinorGridRatio()
Returns the number of minor grid lines for each major grid line
virtual void SetMinorLogPen(LOGPEN *v)
Specifies an optional LOGPEN structure that defines the pen for the minor grid lines
virtual void SetMajorLogPen(LOGPEN *v)
Specifies an optional LOGPEN structure that defines the pen for the major grid lines
virtual void SetMajorStyleList(DWORD *v)
Specifies a style item list that defines the pen for the major grid lines
virtual void SetMinorStyleList(DWORD *v)
Specifies a style item list that defines the pen for the minor grid lines
virtual LOGPEN* GetMinorLogPen()
Returns the LOGPEN structure that defines the pen for the minor grid lines
virtual LOGPEN* GetMajorLogPen()
Returns the LOGPEN structure that defines the pen for the major grid lines
virtual DWORD* GetMajorStyleList()
Returns a pointer to the style item list that defines the pen for the major grid lines
virtual DWORD* GetMinorStyleList()
Returns a pointer to the style item list that defines the pen for the minor grid lines
virtual void Serialize(CArchive &ar)
Saves or restores this object to an archive
virtual void SetDisplayRect(CRect v)
Specifies the rectangle that corresponds to the data display area
virtual CRect GetDisplayRect()
Returns the rectangle that corresponds to the data display area
virtual void SetVertical(BOOL v)
Sets the flag that selects vertical or horizontal orientation of grid lines
virtual BOOL GetVertical()
Returns the flag that selects vertical or horizontal orientation of grid lines
virtual void SetptrTickPositionList(CPtrList *pList)
Sets a pointer to the tick position list that coordinates label positions with tick and grid objects
virtual void DrawForeground()
Draws the grid lines
virtual void SetMajorGridColor(COLORREF r)
Specifies the RGB color for the major grid lines
virtual void SetMinorGridColor(COLORREF r)
Specifies the RGB color for the minor grid lines
virtual void SetMajorGridWidth(int n)
Sets the pen width for the major grid lines
virtual void SetMinorGridWidth(int n)
Sets the pen width for the minor grid lines
virtual void SetMajorGridStyle(int n)
Sets the pen style for the major grid lines
virtual void SetMinorGridStyle(int n)
Sets the pen style for the minor grid lines
virtual COLORREF GetMajorGridColor()
Returns the RGB color for the major grid lines
virtual COLORREF GetMinorGridColor()
Returns the RGB color for the minor grid lines
virtual int GetMajorGridWidth()
Returns the width of the major grid lines
virtual int GetMinorGridWidth()
Returns the width of the minor grid lines
virtual int GetMajorGridStyle()
Returns the pen style for the major grid lines
virtual int GetMinorGridStyle()
Returns the pen style for the minor grid lines
Constructor
protected:
Destructor
virtual void DrawCustomHGrid(int x,int y)
Override to draw horizontal grid lines with a custom style
virtual void DrawCustomVGrid(int x,int y)
Override to draw vertical grid lines with a custom style
virtual void DrawHGridLine(int x,int y, CPen *p=NULL)
Draws a single horizontal grid line in a given style
virtual void DrawVGridLine(int x,int y,CPen *p=NULL)
Draws a single vertical grid line in a given style
Number of minor grid lines to be drawn between major grid lines
Pen style for major grid lines
Pen style for minor grid lines
Pen width for major grid lines
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
Number of items in the list of styles for the major grid lines
Number of items in the list of styles for the minor grid lines
virtual void DrawShadow()
Overidden to do nothing
virtual void DrawBorder()
Overidden to do nothing
virtual void DrawFill()
Overidden to do nothing