SRGDisplayBase Class

class SRGDisplayBase: public SRGraphTitle

Abstract base class for graph display components including SRGraphDisplay -- inherits font abilities from SRGraphTitle

Defined in: SRGDisplayBase.h

CHART_API SRGDisplayBase()

Constructor

CHART_API virtual ~SRGDisplayBase()

Destructor

Class Members

Protected data members

CScale m_ZoomScaleY

Y scale to be used when data is zoomed up -- used only on XY Scatter graphs for the moment

CScale m_ZoomScaleX

X scale to be used when data is zoomed up -- used only on XY Scatter graphs for the moment

double m_dMinRangeY

Minimum Y numeric value allowed for this graph

double m_dMaxRangeY

Maximum Y numeric value allowed for this graph

double m_dMaxScaleY

Maximum Y scale of the values in this graph display

double m_dMinRangeX

Minimum X numeric value allowed for this graph

double m_dMaxRangeX

Maximum X numeric value allowed for this graph

double m_dMaxScaleX

Maximum X scale of the values in this graph display

SRGraphLabelBlock * m_ptrXLabels

Pointer to a block of labels used to annotate the X axis

SRGraphLabelBlock * m_ptrYLabels

Pointer to a block of labels used to annotate the Y axis

SRGraphLabelBlock * m_ptrZLabels

Pointer to a block of labels used to annotate the Z axis

CPtrList m_YTickList

List of points which have been provided by the X label block -- used to position tick marks and grid lines

CPtrList m_XTickList

List of points which have been provided by the Y label block -- used to position tick marks and grid lines

CPtrList m_ZTickList

List of points which have been provided by the Z label block -- used to position tick marks and grid lines

CRect m_LabelRectX

Rectangle enclosing the X labels

CRect m_LabelRectY

Rectangle enclosing the Y labels

CRect m_DisplayRect

Display rectangle -- initially the whole component display area, resized according to room taken up by labels, etc.

CRect m_DrawnRect

Previously drawn rectangle

BOOL m_bDisplayDrawn

Semaphore - TRUE if the display has been drawn

BOOL m_bPrepared

Flag signifying that the chart has been prepared for this draw cycle

BOOL m_bUnZoomY

Flag signifying that the X axis is zoomed

BOOL m_bUnZoomX

Flag signifying that the Y axis is zoomed

double m_dXRes

Interval between axis labels (resolution) for horizontal axis

double m_dYRes

Interval between axis labels (resolution) for vertical axis

double m_dZRes

Interval between axis labels (resolution) for depth axis

CString m_sXFormat

Format string for horizontal axis

CString m_sYFormat

Format string for vertical axis

CString m_sZFormat

Format string for depth axis

Public member functions

CHART_API virtual void SetUnZoomY(BOOL v)

Initializes the Y unzoom semaphore

CHART_API virtual BOOL GetUnZoomY()

Retrieves the Y unzoom semaphore

CHART_API virtual void SetUnZoomX(BOOL v)

Initializes the X unzoom semaphore

CHART_API virtual BOOL GetUnZoomX()

Retrieves the X unzoom semaphore

CHART_API virtual int CalcFontAutoSize()

Calculates font sizes for the display class

CHART_API virtual void Prepare()

Prepares the chart

CHART_API virtual void SetptrXLabels(SRGraphLabelBlock * v)

Initializes the X labels with an externally created label class

CHART_API virtual SRGraphLabelBlock * GetptrXLabels()

Retrieves the X labels so that they may be modified

CHART_API virtual void SetptrYLabels(SRGraphLabelBlock * v)

Initializes the Y labels with an externally created label class

CHART_API virtual SRGraphLabelBlock * GetptrYLabels()

Retrieves the Y labels so that they may be modified

CHART_API virtual void SetptrZLabels(SRGraphLabelBlock * v)

Initializes the Z labels with an externally created label class

CHART_API virtual SRGraphLabelBlock * GetptrZLabels()

Retrieves the Z labels so that they may be modified

CHART_API virtual void Serialize(CArchive& ar)

Stores or retrieves this object

CHART_API virtual double GetMaxScaleY()

Returns the m_dMaxScaleY member

CHART_API virtual double GetMaxScaleX()

Returns the m_dMaxScaleX member

CHART_API virtual void Refresh()

Refreshes the display after a change is made to the graph type after its first draw cycle

CHART_API virtual int ReadTemplateLine(LPCTSTR line)

Reads a single line from the graph template

CHART_API virtual void WriteName(CStdioFile* file)

Writes the name of this component to a file

CHART_API virtual void WriteSpecificParameters(CStdioFile* file)

Writes component parameters for Display components to a file

CHART_API virtual void SetZoomScaleX(CScale scale)

Sets the X data zooming scale -- currently only used for scattergraphs

CHART_API virtual void SetZoomScaleY(CScale scale)

Sets the Y data zooming scale -- currently only used for scattergraphs

CHART_API virtual CScale GetZoomScaleX()

Gets the X data zooming scale -- currently only used for scattergraphs

CHART_API virtual CScale GetZoomScaleY()

Gets the Y data zooming scale -- currently only used for scattergraphs

CHART_API virtual void CleanZoomScaleX()

Zeroes the X data zooming scale -- currently only used for scattergraphs

CHART_API virtual void CleanZoomScaleY()

Zeroes the Y data zooming scale -- currently only used for scattergraphs

CHART_API virtual CRect GetDisplayRect()

Returns the display rectangle

CHART_API virtual double GetMinRangeY()

Returns the minimum numeric value allowed for this graph's Y axis

CHART_API virtual double GetMaxRangeY()

Retrieves the maximum numeric value allowed for this graph

CHART_API virtual void SetMinRangeY(double dValue)

Sets the minimum numeric value allowed for this graph

CHART_API virtual void SetMaxRangeY(double dValue)

Sets the maximum numeric value allowed for this graph

CHART_API virtual double GetMinRangeX()

Retrieves the minimum numeric X value allowed for this graph

CHART_API virtual double GetMaxRangeX()

Retrieves the maximum numeric X value allowed for this graph

CHART_API virtual void SetMinRangeX(double dValue)

Sets the minimum numeric Y value allowed for this graph

CHART_API virtual void SetMaxRangeX(double dValue)

Sets the maximum numeric Y value allowed for this graph

CHART_API virtual void SetDisplayRect(CRect r,BOOL lock=FALSE)

Allows initialization and locking of the display rectangle

CHART_API virtual void SetZoomStateY(CScale v)

Initializes the Y scale zoom state

CHART_API virtual CScale GetZoomStateY()

Returns the Y scale zoom state

CHART_API virtual void SetZoomStateX(CScale v)

Initializes the X scale zoom state

CHART_API virtual CScale GetZoomStateX()

Returns the X scale zoom state

CHART_API void SetResolutionX(double dRes)

Sets the interval between axis labels (resolution) of the horizontal axis

CHART_API void SetResolutionY(double dRes)

Sets the interval between axis labels (resolution) of the vertical axis

CHART_API void SetResolutionZ(double dRes)

Sets the interval between axis labels (resolution) of the depth axis

CHART_API double GetResolutionX()

Retrieves the interval between axis labels (resolution) of the horizontal axis if previously set by SetResolutionX()

CHART_API double GetResolutionY()

Retrieves the interval between axis labels (resolution) of the vertical axis if previously set by SetResolutionX()

CHART_API double GetResolutionZ()

Retrieves the interval between axis labels (resolution) of the depth axis if previously set by SetResolutionX()

CHART_API void SetFormatX(LPCTSTR sFormat)

Sets the format string for the horizontal axis

CHART_API void SetFormatY(LPCTSTR sFormat)

Sets the format string for the vertical axis

CHART_API void SetFormatZ(LPCTSTR sFormat)

Sets the format string for the depth axis

CHART_API CString& GetFormatX()

Retrieves the format string for the horizontal axis if previously set by SetFormatX()

CHART_API CString& GetFormatY()

Retrieves the format string for the vertical axis if previously set by SetFormatY()

CHART_API CString& GetFormatZ()

Retrieves the format string for the depth axis if previously set by SetFormatZ()

Protected member functions

CScale m_oZoomStateY

The Y scale zoom state.

CScale m_oZoomStateX

The Y scale zoom state.

CHART_API virtual void DrawData()

Displays the data representation -- called from DrawForeground

CHART_API virtual void DrawAxis()

Displays the axes -- called from DrawForeground

CHART_API virtual void DrawLabels()

Displays the labels -- called from DrawForeground

CHART_API virtual void DrawForeground()

Displays the graph data

CHART_API virtual void DrawEmptyGraph()

Displays a warning sign for null graphs

CHART_API virtual CPtrList * GetXTickList()

Returns the X tick list

CHART_API virtual CPtrList * GetYTickList()

Returns the Y tick list

CHART_API virtual CPtrList * GetZTickList()

Returns the Z tick list

CHART_API virtual void KillTickList(CPtrList * pTickList)

Empties a tick list and deletes its contents

CHART_API virtual double GetYScaleAdjustment()

Returns 1.1 -- override to return your own custom Y scaling adjustment

CHART_API virtual double GetXScaleAdjustment()

Returns 1.1 -- override to return your own custom X scaling adjustment

CHART_API virtual void CreateNumberList(double multiplier,CStringList *list)

Generates a list of numbers which are used to annotate the Y axis of graphs (no longer used, maintained for compatibility)

CHART_API virtual double GetIdealScale()

Returns the step required to generate numbers for a graph (superceded by SRGDecimalScale class)

CHART_API virtual void AdjustScale()

Allows custom adjustment of safety scaling

CHART_API virtual void FindLimits(CScale* pScale, double dScaleAdjust)

Adjusts data range so that labels display "nice" numbers

CHART_API virtual void FindLogLimits(CScale* pScale, BOOL bFullDecade=TRUE)

Expands data range to give "nice" limits for log axis

CHART_API virtual void FindDateLimits(CScale* pScale, double dScaleAdjust)

Adjusts the data range to find sensible limits for date scales

CHART_API virtual void SetCustomSteps()

(Empty) Override to set index and group steps for your custom graph type

CHART_API virtual void PrepareCustom()

(Empty) Virtual function to allow extension of the preparation process

CHART_API virtual void DrawCustomAxis()

(Empty) Override to draw custom axes

CHART_API virtual void DrawCustomLabels()

(Empty) Override to draw custom labels

CHART_API virtual void DrawCustomData()

(Empty) Override to draw custom data

CHART_API virtual void PrepareDisplay()

(Pure Virtual) Prepares the display component for drawing

CHART_API virtual void PrepareYScale()

(Pure Virtual) Calculates scale ranges for most simple graph types

CHART_API virtual void DrawClassicLabels()

(Pure Virtual) Called to draw standard X,Y labels

CHART_API virtual void DrawClassicAxis()

(Pure Virtual) Called to draw standard X,Y axes

CHART_API virtual void DrawIsoClassicAxis()

(Pure Virtual) Draws the pseudo 3D axis

CHART_API virtual void DrawYXLabels()

(Pure Virtual) Called to draw labels for the YX graphs

CHART_API virtual void DrawYXAxis()

(Pure Virtual) Draws the YX axis for use with horizontal bar charts

CHART_API virtual int StageCalcSize(CRect *BackPlane)

(Pure Virtual) Calculates the size of a stage or platform axis

CHART_API virtual void DrawStageLabels()

(Pure Virtual) Draws labels and annotations on the stage or platform graphs

CHART_API virtual void DrawStageAxis()

(Pure Virtual) Draws the "stage" type axis

CHART_API virtual void DrawPieLabels()

(Pure Virtual) Draws pie chart labels

CHART_API virtual void DrawPieData()

(Pure Virtual) Draws pie chart data

CHART_API virtual void DrawIsoPieData()

(Pure Virtual) Draws the 3D pie chart

CHART_API virtual void DrawVBarData()

(Pure Virtual) Draws vertical bar chart data

CHART_API virtual void DrawHBarData()

(Pure Virtual) Draws horizontal bar data

CHART_API virtual void DrawStackVBarData()

(Pure Virtual) Draws vertical stacked bars

CHART_API virtual void DrawStackHBarData()

(Pure Virtual) Draws horizontal stacked bars

CHART_API virtual void PrepareIsoBar()

(Pure Virtual) Prepares displays for the drawing of Manhattan type graphs

CHART_API virtual void DrawIsoBarData()

(Pure Virtual) Draws "Manhattan" bars

CHART_API virtual void PreparePolar()

(Pure Virtual) Prepares the display for drawing polar data

CHART_API virtual void DrawPolarLabels()

(Pure Virtual) Draws polar chart labels

CHART_API virtual void DrawPolarAxis()

(Pure Virtual) Draws polar chart axes

CHART_API virtual void DrawPolarData()

(Pure Virtual) Draws polar chart data

CHART_API virtual void PrepareStrata()

(Pure Virtual) Pre-display preparation for strata graphs

CHART_API virtual void DrawStrataData()

(Pure Virtual) Draws strata graphs

CHART_API virtual void DrawStrataHBarGLabels()

(Pure Virtual) Draw a strata hbar label with the group header as the label text of each bar

CHART_API virtual void DrawStrataVBarGLabels()

(Pure Virtual) Draw a strata vbar label with the group header as the label text of each bar

CHART_API virtual void DrawStrataHBarGData()

(Pure Virtual) Draw a strata hbar with each group on one bar

CHART_API virtual void DrawStrataVBarGData()

(Pure Virtual) Draw a strata vbar with each group on one bar

CHART_API virtual void PrepareStrataBarG()

(Pure Virtual) Do some pre-initialization for the strata bar( one group/ per bar )

CHART_API virtual void PrepareStrataBar()

(Pure Virtual) Do some pre-initialization for the strata bar( one index/per bar )

CHART_API virtual void DrawStrataHBarData()

(Pure Virtual) Draw strata hbar(data with the same index of different group on the same bar)

CHART_API virtual void DrawStrataVBarData()

(Pure Virtual) Draw strata vbar(data with the same index of different group on the same bar)

CHART_API virtual void DrawGanttLabels()

(Pure Virtual) Draws Gantt labels

CHART_API virtual void DrawGanttData()

(Pure Virtual) Draws Gantt data

CHART_API virtual void DrawWebData()

(Pure Virtual) Draws Web char data

CHART_API virtual void DrawWebLabels()

(Pure Virtual) Draws Web chart labels

CHART_API virtual void DrawWebAxis()

(Pure Virtual) Draws Web chart axes

CHART_API virtual void PrepareBubble()

(Pure Virtual) Calculates X,Y, and marker size scale information for bubble graphs

CHART_API virtual void DrawBubbleData()

(Pure Virtual) Draws bubble chart data

CHART_API virtual void PrepareVector()

(Pure Virtual) prepares scales for the display of vector charts

CHART_API virtual void DrawVectorData()

(Pure Virtual) Draws vector data

CHART_API virtual void PrepareScatter()

(Pure Virtual) Calculates X and Y scale information for scatter graphs

CHART_API virtual void DrawScatterData()

(Pure Virtual) Draws X,Y scatter data

CHART_API virtual void DrawScatterLabels()

(Pure Virtual) Draws X,Y scatter labels

CHART_API virtual void DrawScatterAxis()

(Pure Virtual) Draws X,Y scatter axes

CHART_API virtual void DrawLineData()

(Pure Virtual) Called to draw a line plot of the data

CHART_API virtual void DrawStepData()

(Pure Virtual) Draws the data for the step charts

CHART_API virtual void DrawCandleData()

(Pure Virtual) Draws candle chart labels

CHART_API virtual void DrawAreaData()

(Pure Virtual) Draws area charts

CHART_API virtual void DrawFreeStyleData()

(Pure Virtual) Draws the data components of FreeStyle graphs

CHART_API virtual void DrawStockData()

(Pure Virtual) Called to draw stock quote hi-lo-close graphs

CHART_API virtual void DrawIsoAreaData()

(Pure Virtual) Draws "Rooftop" objects