// INKSView.h : interface of the CINKSView class
//

#pragma once
#include "ZoomView.h"
#include "INKSDoc.h"
#include "MouseSnap.h"
#include "MouseTracker.h"
//#include "GLinkedList.h"
class CCommonObject;
class CINKSView : public CZoomView
{
protected:
	CINKSView();
	DECLARE_DYNCREATE(CINKSView)

public:
	bool SelectObjectsFromRegion(CRect rect);
	CList<CCommonObject*, CCommonObject*>* GetSOList();
	CList<CCommonObject*, CCommonObject*>* GetCOList();

private:

public:

private:
	//GLinkedListIterator<CCommonObject*> *m_COListIterator;

// overrides:
public:
	CINKSDoc* GetDocument() const;

	virtual void OnDraw(CDC* pDC);
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();

	afx_msg void OnSaveDocument(CStringA lpszPathName);
	afx_msg void OnOpenDocument(CStringA lpszPathName);

	afx_msg int OnCreate(LPCREATESTRUCT lpcs);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);

	afx_msg void OnSelectZoomIn();
	afx_msg void OnSelectZoomOut();
	afx_msg void OnSelectZoomToFit();
	afx_msg void OnSelectZoomHand();

	afx_msg BOOL OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message);
	//afx_msg BOOL OnEraseBkgnd(CDC* pDC);

	void TrackTag();
	//void SelectDependentObjects(CCommonObject *pObj);
	//void DeSelectDependentObjects(CCommonObject *pObj);

protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);

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

protected:

// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnExportEmf();
public:
	afx_msg void OnExportPdf();
public:
	afx_msg void OnExportPs();
};

#ifndef _DEBUG  // debug version in INKSView.cpp
inline CINKSDoc* CINKSView::GetDocument() const
   { return reinterpret_cast<CINKSDoc*>(m_pDocument); }
#endif

