SRGScrollView Class

class SRGScrollView: public CScrollView

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

Defined in: SRGScrollView.h

Class Members

 SRGScrollView()

Constructor

BOOL  m_bDragable

Flag which specifies whether data may be dragged

virtual void  MouseDrag(int nFlags,CPoint point)

Called when items are being dragged

virtual void  DrawSelection(CPoint point)

Draws the mouse selection rectangle

virtual void  GraphZoomout(BOOL bAlltheWay)

Helper function that implements the ZoomOut and ZoomOutAll features

virtual void  OnDraw(CDC* pDC)

The draw function -- overridden to draw this view

virtual BOOL  PreCreateWindow(CREATESTRUCT& cs)

Standard window pre-creation

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

Standard CView overridable -- sets the chart scroll sizes

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

Sets window to viewport mapping

virtual BOOL  OnPreparePrinting(CPrintInfo* pInfo)

Standard CView overridable

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

Standard CView overridable -- sets up print pagination

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

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

Render the chart into the passed bitmap

virtual void  SetHasDocument(BOOL v)

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

virtual BOOL  GetHasDocument()

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

virtual void  SetDragTips(BOOL v)

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

virtual BOOL  GetDragTips()

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

virtual void  SetDragable(BOOL v)

Sets or resets the dragable flag

virtual BOOL  GetDragable()

Returns the dragable flag

virtual void  SetZoomable(BOOL v)

Sets the flag signifying whether this chart is able to zoom

virtual BOOL  GetZoomable()

Gets the zoom enable flag

virtual void  DrawCustomSelection(CPoint point)

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

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

virtual  ~SRGScrollView()

Destructor

virtual void  AssertValid() const

Standard debug code

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

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

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

virtual SRGraph*  GetGraph()

Returns a pointer to the graph object

afx_msg BOOL  OnEraseBkgnd(CDC* pDC)

Overridden to do nothing

afx_msg void  OnLButtonDown(UINT nFlags, CPoint point)

Begins the selection or dragging process

afx_msg void  OnLButtonUp(UINT nFlags, CPoint point)

Ends the selection or dragging process

afx_msg void  OnMouseMove(UINT nFlags, CPoint point)

Handles the selection or dragging of data items

afx_msg void  OnTimer(SEC_UINT nIDEvent)

Handles the chart-tip timing and display

afx_msg void  OnEditCopy()

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

afx_msg void  OnGraphZoomout()

Returns zoomed graph to previous size

afx_msg void  OnUpdateGraphZoomout(CCmdUI* pCmdUI)

Activates or deactivates the zoom out button and menu items

afx_msg void  OnGraphZoomoutAll()

Returns zoomed graph to normal, unzoomed state

afx_msg void  OnUpdateGraphZoomoutAll(CCmdUI* pCmdUI)

Activates or deactivates the Zoom Out All button and menu items

afx_msg void  OnGraphPagesetup()

Displays the print pagination setup dialog

afx_msg void  OnGraphEdit()

Handles the GraphEdit command

afx_msg int  OnCreate( LPCREATESTRUCT lpCreateStruct )

Creation initialization -- creates a color palette if required

afx_msg BOOL  OnQueryNewPalette()

Palette management

afx_msg void  OnPaletteChanged(CWnd* pFocusWnd)

Palette management

afx_msg void  OnGraphWizard()

Message handler for the Graph Wizard menu item

afx_msg void  OnSaveAsDib()

Message handler for the Save As DIB menu item

afx_msg void  OnSaveAsJpeg()

Message handler for the Save As JPEG menu item