// DiagramEngView.h : interface of the CDiagramEngView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_DIAGRAMENGVIEW_H__F56802D6_1338_49D5_8641_978B85C99CF4__INCLUDED_)
#define AFX_DIAGRAMENGVIEW_H__F56802D6_1338_49D5_8641_978B85C99CF4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


//class CDiagramEngView : public CView
class CDiagramEngView : public CScrollView		// DiagramEng: CView changed to CScrollView
{
protected: // create from serialization only
	CDiagramEngView();
	DECLARE_DYNCREATE(CDiagramEngView)

// Attributes
public:
	CDiagramEngDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDiagramEngView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
	virtual void OnUpdate(CScrollView* pSender, LPARAM lHint, CObject* pHint);	// DiagramEng: CView changed to CScrollView
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CDiagramEngView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CDiagramEngView)
	afx_msg void OnViewZoomIn();
	afx_msg void OnViewZoomOut();
	afx_msg void OnViewAutoFitDiagram();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnUpdateViewAutoFitDiagram(CCmdUI* pCmdUI);
	afx_msg void OnViewResetDiagram();
	afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
	afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI);
	afx_msg void OnUpdateFormatShowAnnotations(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	int m_iAutoFitFlag;
	int m_iNpagesHigh;
	int m_iNpagesWide;
	CPoint m_ptOrigin;
	CPoint m_ptPrevPos;
};

#ifndef _DEBUG  // debug version in DiagramEngView.cpp
inline CDiagramEngDoc* CDiagramEngView::GetDocument()
   { return (CDiagramEngDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DIAGRAMENGVIEW_H__F56802D6_1338_49D5_8641_978B85C99CF4__INCLUDED_)
