SRGScrollView Class

class SRGScrollView: public CScrollView

This class provides a CScrollView-based alternative to the SRGraphView class.

Defined in: SRGScrollView.h

Class Members

CHART_API SRGScrollView()

Constructor

BOOL m_bDragable

Flag which specifies whether data may be dragged

CHART_API virtual void MouseDrag(int nFlags,CPoint point)

Called when items are being dragged

CHART_API virtual void DrawSelection(CPoint point)

Draws the mouse selection rectangle

CHART_API virtual void GraphZoomout(BOOL bAlltheWay)

Helper function that implements the ZoomOut and ZoomOutAll features

CHART_API virtual void OnDraw(CDC* pDC)

The draw function -- overridden to draw this view

CHART_API virtual BOOL PreCreateWindow(CREATESTRUCT& cs)

Standard window pre-creation

CHART_API virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL)

Standard CView overridable -- sets the chart scroll sizes

CHART_API virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL)

Sets window to viewport mapping

CHART_API virtual BOOL OnPreparePrinting(CPrintInfo* pInfo)

Standard CView overridable

CHART_API virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)

Standard CView overridable -- sets up print pagination

CHART_API virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)

Standard CView overridable

CObStack m_ZoomStack

A FILO stack for the zoom levels

BOOL m_bZoomable

Flag to define the charts ability to be zoomed -- TRUE enables zooming

SRGraphTip m_GraphTip

The one and only GraphTip window

BOOL m_bSelecting

When TRUE the chart is being selected with a selecting rectangle or other shape

BOOL m_bDragging

When TRUE chart data is being dragged

BOOL m_bInFeedback

When TRUE the mouse is in a feedback area

BOOL m_bShowingTip

When TRUE the chart tip is being displayed

BOOL m_bZoomed

When TRUE the chart is zoomed in

SRGraphComponent* m_pZoomedDisplay

Points to the display item currently being zoomed

BOOL m_bMouseTimerIsRunning

When TRUE the mouse timer is running

BOOL m_bUseMaxArea

When TRUE the max area of the chart is set explicitly during printing and print preview

int m_nValign

Vertical alignment code for print pagination

int m_nHalign

Horizontal alignment code for print pagination

int m_nPageSizeCode

Code for selected page sizes

int m_nPrintUnit

Unit for dimensions in PageSetup2 dialog: 0-cm, 1-inch

double m_dXOffset

Horizontal margin for printing

double m_dYOffset

Vertical margin for printing

double m_dXSize

Horizontal chart size for printing

double m_dYSize

Vertical chart size for printing

int m_nPageCountY

Number of pages required to print chart in vertical direction - internal

int m_nDragGroup

Group in which the dragged item is stored

int m_nDragIndex

Index of the item being dragged

int m_nUnzoomMinGroup

Record of the un-zoomed scope -- min group

int m_nUnzoomMaxGroup

Record of the un-zoomed scope -- max group

int m_nUnzoomMinIndex

Record of the un-zoomed scope -- min index

int m_nUnzoomMaxIndex

Record of the un-zoomed scope -- max index

CPoint m_SelectionPointA

First selection point on screen -- used for drawing the selection area

CPoint m_SelectionPointB

Second selection point on screen -- used for drawing the selection area

CPoint m_MousePoint

Current mouse position

SEC_UINT m_TimerIdent

Timer identifier

SRGDisplayBase * m_pDragDisplay

Pointer to store the graph component

CHART_API virtual void DrawToBitmap(CDC* pDC, CBitmap& bmp)

Render the chart into the passed bitmap

CHART_API virtual void SetHasDocument(BOOL v)

Sets the semaphore that signfies that this view has a document (true) or does not (false)

CHART_API virtual BOOL GetHasDocument()

Returns TRUE if this view has a document or FALSE if it does not

CHART_API virtual void SetDragTips(BOOL v)

Turns drag-tips on (TRUE) or off (FALSE)

CHART_API virtual BOOL GetDragTips()

Returns the drag-tips flag. If this is TRUE then drag-tips are enabled. Otherwise FALSE.

CHART_API virtual void SetDragable(BOOL v)

Sets or resets the dragable flag

CHART_API virtual BOOL GetDragable()

Returns the dragable flag

CHART_API virtual void SetZoomable(BOOL v)

Sets the flag signifying whether this chart is able to zoom

CHART_API virtual BOOL GetZoomable()

Gets the zoom enable flag

CHART_API virtual void DrawCustomSelection(CPoint point)

Override to draw the custom selection shape for your own chart type

CHART_API virtual void ShowFeedback(SRGraphFeedback *pFeedback)

Displays the feedback with a chart tip -- override to add your own text formatting

inline void SetUseMaxArea(BOOL b)

Enables or disables the use of the maximum size rectangle

CHART_API virtual ~SRGScrollView()

Destructor

CHART_API virtual void AssertValid() const

Standard debug code

CHART_API virtual void Dump(CDumpContext& dc) const

Standard debug code

BOOL m_bHasDocument

Semaphore to flag the existence of document class

BOOL m_bDragTips

semaphore for the draging tips

CPalette m_Palette

Color palette

DWORD m_dwOldAlignment

Retains the old alignment codes during printing

CRect m_OldAreaRect

Retains the old alignment rectangle during printing

BOOL m_bPreserveArea

Set TRUE if the area should be restored after printing

CHART_API virtual SRGraphPosition * GetPosition(SRGraph *pGraph, CPoint point)

Creates and returns an SRGraphPosition object filled with data about the chart item under the specified point

CHART_API virtual SRGraph* GetGraph()

Returns a pointer to the graph object

CHART_API afx_msg BOOL OnEraseBkgnd(CDC* pDC)

Overridden to do nothing

CHART_API afx_msg void OnLButtonDown(UINT nFlags, CPoint point)

Begins the selection or dragging process

CHART_API afx_msg void OnLButtonUp(UINT nFlags, CPoint point)

Ends the selection or dragging process

CHART_API afx_msg void OnMouseMove(UINT nFlags, CPoint point)

Handles the selection or dragging of data items

CHART_API afx_msg void OnTimer(SEC_UINT nIDEvent)

Handles the chart-tip timing and display

CHART_API afx_msg void OnEditCopy()

Copies the screen bitmap to the clipboard for pasting into another application

CHART_API afx_msg void OnGraphZoomout()

Returns zoomed graph to previous size

CHART_API afx_msg void OnUpdateGraphZoomout(CCmdUI* pCmdUI)

Activates or deactivates the zoom out button and menu items

CHART_API afx_msg void OnGraphZoomoutAll()

Returns zoomed graph to normal, unzoomed state

CHART_API afx_msg void OnUpdateGraphZoomoutAll(CCmdUI* pCmdUI)

Activates or deactivates the Zoom Out All button and menu items

CHART_API afx_msg void OnGraphPagesetup()

Displays the print pagination setup dialog

CHART_API afx_msg void OnGraphEdit()

Handles the GraphEdit command

CHART_API afx_msg int OnCreate( LPCREATESTRUCT lpCreateStruct )

Creation initialization -- creates a color palette if required

CHART_API afx_msg BOOL OnQueryNewPalette()

Palette management

CHART_API afx_msg void OnPaletteChanged(CWnd* pFocusWnd)

Palette management

CHART_API afx_msg void OnGraphWizard()

Message handler for the Graph Wizard menu item

CHART_API afx_msg void OnSaveAsDib()

Message handler for the Save As DIB menu item

CHART_API afx_msg void OnSaveAsJpeg()

Message handler for the Save As JPEG menu item