SRGDisplayBase Class

class SRGDisplayBase: public SRGraphTitle

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

Defined in: SRGDisplayBase.h

 SRGDisplayBase()

Constructor

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

virtual void  SetUnZoomY(BOOL v)

Initializes the Y unzoom semaphore

virtual BOOL  GetUnZoomY()

Retrieves the Y unzoom semaphore

virtual void  SetUnZoomX(BOOL v)

Initializes the X unzoom semaphore

virtual BOOL  GetUnZoomX()

Retrieves the X unzoom semaphore

virtual int  CalcFontAutoSize()

Calculates font sizes for the display class

virtual void  Prepare()

Prepares the chart

virtual void  SetptrXLabels(SRGraphLabelBlock * v)

Initializes the X labels with an externally created label class

virtual SRGraphLabelBlock *  GetptrXLabels()

Retrieves the X labels so that they may be modified

virtual void  SetptrYLabels(SRGraphLabelBlock * v)

Initializes the Y labels with an externally created label class

virtual SRGraphLabelBlock *  GetptrYLabels()

Retrieves the Y labels so that they may be modified

virtual void  SetptrZLabels(SRGraphLabelBlock * v)

Initializes the Z labels with an externally created label class

virtual SRGraphLabelBlock *  GetptrZLabels()

Retrieves the Z labels so that they may be modified

virtual void  Serialize(CArchive& ar)

Stores or retrieves this object

virtual double  GetMaxScaleY()

Returns the m_dMaxScaleY member

virtual double  GetMaxScaleX()

Returns the m_dMaxScaleX member

virtual void  Refresh()

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

virtual int  ReadTemplateLine(LPCTSTR line)

Reads a single line from the graph template

virtual void  WriteName(CStdioFile* file)

Writes the name of this component to a file

virtual void  WriteSpecificParameters(CStdioFile* file)

Writes component parameters for Display components to a file

virtual void  SetZoomScaleX(CScale scale)

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

virtual void  SetZoomScaleY(CScale scale)

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

virtual CScale  GetZoomScaleX()

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

virtual CScale  GetZoomScaleY()

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

virtual void  CleanZoomScaleX()

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

virtual void  CleanZoomScaleY()

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

virtual CRect  GetDisplayRect()

Returns the display rectangle

virtual double  GetMinRangeY()

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

virtual double  GetMaxRangeY()

Retrieves the maximum numeric value allowed for this graph

virtual void  SetMinRangeY(double dValue)

Sets the minimum numeric value allowed for this graph

virtual void  SetMaxRangeY(double dValue)

Sets the maximum numeric value allowed for this graph

virtual double  GetMinRangeX()

Retrieves the minimum numeric X value allowed for this graph

virtual double  GetMaxRangeX()

Retrieves the maximum numeric X value allowed for this graph

virtual void  SetMinRangeX(double dValue)

Sets the minimum numeric Y value allowed for this graph

virtual void  SetMaxRangeX(double dValue)

Sets the maximum numeric Y value allowed for this graph

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

Allows initialization and locking of the display rectangle

virtual void  SetZoomStateY(CScale v)

Initializes the Y scale zoom state

virtual CScale  GetZoomStateY()

Returns the Y scale zoom state

virtual void  SetZoomStateX(CScale v)

Initializes the X scale zoom state

virtual CScale  GetZoomStateX()

Returns the X scale zoom state

void  SetResolutionX(double dRes)

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

void  SetResolutionY(double dRes)

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

void  SetResolutionZ(double dRes)

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

double  GetResolutionX()

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

double  GetResolutionY()

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

double  GetResolutionZ()

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

void  SetFormatX(LPCTSTR sFormat)

Sets the format string for the horizontal axis

void  SetFormatY(LPCTSTR sFormat)

Sets the format string for the vertical axis

void  SetFormatZ(LPCTSTR sFormat)

Sets the format string for the depth axis

CString&  GetFormatX()

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

CString&  GetFormatY()

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

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.

virtual void  DrawData()

Displays the data representation -- called from DrawForeground

virtual void  DrawAxis()

Displays the axes -- called from DrawForeground

virtual void  DrawLabels()

Displays the labels -- called from DrawForeground

virtual void  DrawForeground()

Displays the graph data

virtual void  DrawEmptyGraph()

Displays a warning sign for null graphs

virtual CPtrList *  GetXTickList()

Returns the X tick list

virtual CPtrList *  GetYTickList()

Returns the Y tick list

virtual CPtrList *  GetZTickList()

Returns the Z tick list

virtual void  KillTickList(CPtrList * pTickList)

Empties a tick list and deletes its contents

virtual double  GetYScaleAdjustment()

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

virtual double  GetXScaleAdjustment()

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

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)

virtual double  GetIdealScale()

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

virtual void  AdjustScale()

Allows custom adjustment of safety scaling

virtual void  FindLimits(CScale* pScale, double dScaleAdjust)

Adjusts data range so that labels display "nice" numbers

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

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

virtual void  FindDateLimits(CScale* pScale, double dScaleAdjust)

Adjusts the data range to find sensible limits for date scales

virtual void  SetCustomSteps()

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

virtual void  PrepareCustom()

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

virtual void  DrawCustomAxis()

(Empty) Override to draw custom axes

virtual void  DrawCustomLabels()

(Empty) Override to draw custom labels

virtual void  DrawCustomData()

(Empty) Override to draw custom data

virtual void  PrepareDisplay()

(Pure Virtual) Prepares the display component for drawing

virtual void  PrepareYScale()

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

virtual void  DrawClassicLabels()

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

virtual void  DrawClassicAxis()

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

virtual void  DrawIsoClassicAxis()

(Pure Virtual) Draws the pseudo 3D axis

virtual void  DrawYXLabels()

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

virtual void  DrawYXAxis()

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

virtual int  StageCalcSize(CRect *BackPlane)

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

virtual void  DrawStageLabels()

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

virtual void  DrawStageAxis()

(Pure Virtual) Draws the "stage" type axis

virtual void  DrawPieLabels()

(Pure Virtual) Draws pie chart labels

virtual void  DrawPieData()

(Pure Virtual) Draws pie chart data

virtual void  DrawIsoPieData()

(Pure Virtual) Draws the 3D pie chart

virtual void  DrawVBarData()

(Pure Virtual) Draws vertical bar chart data

virtual void  DrawHBarData()

(Pure Virtual) Draws horizontal bar data

virtual void  DrawStackVBarData()

(Pure Virtual) Draws vertical stacked bars

virtual void  DrawStackHBarData()

(Pure Virtual) Draws horizontal stacked bars

virtual void  PrepareIsoBar()

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

virtual void  DrawIsoBarData()

(Pure Virtual) Draws "Manhattan" bars

virtual void  PreparePolar()

(Pure Virtual) Prepares the display for drawing polar data

virtual void  DrawPolarLabels()

(Pure Virtual) Draws polar chart labels

virtual void  DrawPolarAxis()

(Pure Virtual) Draws polar chart axes

virtual void  DrawPolarData()

(Pure Virtual) Draws polar chart data

virtual void  PrepareStrata()

(Pure Virtual) Pre-display preparation for strata graphs

virtual void  DrawStrataData()

(Pure Virtual) Draws strata graphs

virtual void  DrawStrataHBarGLabels()

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

virtual void  DrawStrataVBarGLabels()

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

virtual void  DrawStrataHBarGData()

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

virtual void  DrawStrataVBarGData()

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

virtual void  PrepareStrataBarG()

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

virtual void  PrepareStrataBar()

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

virtual void  DrawStrataHBarData()

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

virtual void  DrawStrataVBarData()

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

virtual void  DrawGanttLabels()

(Pure Virtual) Draws Gantt labels

virtual void  DrawGanttData()

(Pure Virtual) Draws Gantt data

virtual void  DrawWebData()

(Pure Virtual) Draws Web char data

virtual void  DrawWebLabels()

(Pure Virtual) Draws Web chart labels

virtual void  DrawWebAxis()

(Pure Virtual) Draws Web chart axes

virtual void  PrepareBubble()

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

virtual void  DrawBubbleData()

(Pure Virtual) Draws bubble chart data

virtual void  PrepareVector()

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

virtual void  DrawVectorData()

(Pure Virtual) Draws vector data

virtual void  PrepareScatter()

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

virtual void  DrawScatterData()

(Pure Virtual) Draws X,Y scatter data

virtual void  DrawScatterLabels()

(Pure Virtual) Draws X,Y scatter labels

virtual void  DrawScatterAxis()

(Pure Virtual) Draws X,Y scatter axes

virtual void  DrawLineData()

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

virtual void  DrawStepData()

(Pure Virtual) Draws the data for the step charts

virtual void  DrawCandleData()

(Pure Virtual) Draws candle chart labels

virtual void  DrawAreaData()

(Pure Virtual) Draws area charts

virtual void  DrawFreeStyleData()

(Pure Virtual) Draws the data components of FreeStyle graphs

virtual void  DrawStockData()

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

virtual void  DrawIsoAreaData()

(Pure Virtual) Draws "Rooftop" objects