SRGCompoundDisplay Class
class SRGCompoundDisplay: public SRGCompoundComponent
The compound display class holds four subcomponents based on the SRGAxisManager class.These axis managers in turn may optionally hold a set of tick marks, a label block, a set of grid lines, a data watcher, and a display.
The four axis managers correspond to the four sides of a chart rectangle. Therefore by adding subcomponents to the various axis managers, it is possible to define a custom chart design without writing a chart extension.
In addition, it is possible to define a relationship between the axes on opposing sides of the chart. Then if the scale on one side changes, the scale on the other side is automatically recalculated according to the preset ratio or some other calculation.
Furthermore, the chart axis components may be dynamically added or removed without removing the display from the main component list. This allows a highly flexible method of creating custom charts.
Defined in: SRGCompoundDisplay.h
Class Members
virtual void SetDisplayRect(CRect r,BOOL bDRLock=TRUE)
Sets and optionally locks the display rectangle
virtual void Serialize(CArchive& ar)
Serializes this object
virtual double CalcYRelationship(double d)
Performs X axis range conversions
virtual double CalcXRelationship(double d)
Peforms Y axis range conversions
inline virtual void SetXRelationship(BOOL b)
Initializes the X relationship flag
inline virtual void SetYRelationship(BOOL b)
Initializes the Y relationship flag
inline virtual void SetXLinkDirection(BOOL b)
Selects the X master axis
inline virtual void SetYLinkDirection(BOOL b)
Selects the Y master axis
inline virtual void SetXRatio(double d)
Sets the ratio between master and slave X axes
inline virtual void SetYRatio(double d)
Sets the ratio between master and slave Y axes
inline virtual BOOL GetXRelationship()
Returns the X axis relationship flag
inline virtual BOOL GetYRelationship()
Returns the Y axis relationship flag
inline virtual BOOL GetXLinkDirection()
Returns the X axis link direction flag
inline virtual BOOL GetYLinkDirection()
Returns the Y axis link direction flag
inline virtual double GetXRatio()
Returns the X axis master / slave ratio
inline virtual double GetYRatio()
Returns the Y axis master / slave ratio
virtual void SetptrTickPositionList(SRGAxisManager *pAM,CPtrList *pL)
Sets the tick position list for the chosen axis manager
virtual void SetptrXTickPositionListA(CPtrList *pL)
Sets the tick position list for the X-A axis manager
virtual void SetptrXTickPositionListB(CPtrList *pL)
Sets the tick position list for the X-B axis manager
virtual void SetptrYTickPositionListA(CPtrList *pL)
Sets the tick position list for the Y-A axis manager
virtual void SetptrYTickPositionListB(CPtrList *pL)
Sets the tick position list for the Y-B axis manager
virtual SRGAxisManager* GetXAxisA()
Returns a pointer to the bottom axis manager
virtual SRGAxisManager* GetXAxisB()
Returns a pointer to the top axis manager
virtual SRGAxisManager* GetYAxisA()
Returns a pointer to the left axis manager
virtual SRGAxisManager* GetYAxisB()
Returns a pointer to the right axis manager
Constructor
virtual ~SRGCompoundDisplay()
Destructor
virtual void SetXLabelA(SRGDecimalScale *pL)
Registers a label block with the bottom axis manager
virtual void SetXLabelB(SRGDecimalScale *pL)
Registers a label block with the top axis manager
virtual void SetYLabelA(SRGDecimalScale *pL)
Registers a label block with the left axis manager
virtual void SetYLabelB(SRGDecimalScale *pL)
Registers a label block with the right axis manager
void SetYGridLinesA(SRGGridLines *pG)
Registers a grid line component with the left axis manager
virtual void SetYGridLinesB(SRGGridLines *pG)
Registers a grid line component with the right axis manager
virtual void SetXGridLinesA(SRGGridLines *pG)
Registers a grid line component with the bottom axis manager
virtual void SetXGridLinesB(SRGGridLines *pG)
Registers a grid line component with the top axis manager
virtual void SetXTickMarksA(SRGTickMarks *pT)
Registers a tick mark component with the bottom axis manager
virtual void SetXTickMarksB(SRGTickMarks *pT)
Registers a tick mark component with the top axis manager
virtual void SetYTickMarksA(SRGTickMarks *pT)
Registers a tick mark component with the left axis manager
virtual void SetYTickMarksB(SRGTickMarks *pT)
Registers a tick mark component with the right axis manager
virtual void SetXGraphDisplayA(SRGDisplayBase *pD)
Registers a display with the bottom axis manager
virtual void SetXGraphDisplayB(SRGDisplayBase *pD)
Registers a display with the top axis manager
virtual void SetYGraphDisplayA(SRGDisplayBase *pD)
Registers a display with the left axis manager
virtual void SetYGraphDisplayB(SRGDisplayBase *pD)
Registers a display with the right axis manager
virtual void SetXDataWatcherA(SRGDataWatcher *pDW)
Registers a data watcher with the bottom axis manager
virtual void SetXDataWatcherB(SRGDataWatcher *pDW)
Registers a data watcher with the top axis manager
virtual void SetYDataWatcherA(SRGDataWatcher *pDW)
Registers a data watcher with the left axis manager
virtual void SetYDataWatcherB(SRGDataWatcher *pDW)
Registers a data watcher with the right axis manager
virtual void SetXAforYA(BOOL v)
Sets the flag that associates the XA axis with the YA axis
virtual BOOL GetXAforYA()
Returns the flag that associates the XA axis with the YA axis
virtual void Draw(CDC *pDC,CWnd *pCWnd)
Draws this compound component
virtual void PassTwoCleanup()
Performs clean up operations after pass two of the draw cycle
virtual void PassTwoSetup()
Performs setup before pass two of the draw cycle
virtual void PassOneCleanup()
Performs clean up after pass one of the draw cycle
virtual void PassOneSetup()
Performs setup before pass one of the draw cycle
BOOL m_bLinkDirectionY
When TRUE the Y-A axis is the master
BOOL m_bLinkDirectionX
When TRUE the X-A axis is the master
BOOL m_bXAforYA
When TRUE the X-A axis is associated with the Y-A axis
CPtrList m_xTickListA
Tick position list associated with the bottom axis
CPtrList m_xTickListB
Tick position list associated with the top axis
CPtrList m_yTickListA
Tick position list associated with the left axis
CPtrList m_yTickListB
Tick position list associated with the right axis
BOOL m_bXRelationship
When TRUE the two X axes are related (locked)
BOOL m_bYRelationship
When TRUE the two Y axes are related (locked)
double m_dXRatio
Defines the ratio between locked X axes
double m_dYRatio
Defines the ratio between locked Y axes