Скачиваний:
18
Добавлен:
01.05.2014
Размер:
4.36 Кб
Скачать
// ConvexHullView.h : interface of the CConvexHullView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CONVEXHULLVIEW_H__7A7BF48A_2EFE_45D0_BC44_18F61178101E__INCLUDED_)
#define AFX_CONVEXHULLVIEW_H__7A7BF48A_2EFE_45D0_BC44_18F61178101E__INCLUDED_

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

#include "ConvexHullDoc.h"
#include "TEdge.h"


class CConvexHullView : public CView
{
protected: // create from serialization only
	CConvexHullView();
	DECLARE_DYNCREATE(CConvexHullView)

// Attributes
public:
	CConvexHullDoc* GetDocument();
	
protected:
	void CConvexHullView::DrawView1(CDC* pDC);
	void CConvexHullView::DrawView2(CDC* pDC);
	CPen*  cPen[9];
	int VIEW_X;
	int VIEW_Y;
	int SIZE;
	int CUTTER;
	int RESIZE;
	int num_top; 
	int num_left;
	int typePane;
	CPoint start, end;
	BOOL blFlagMove;

// Operations
public:
	//void OnSliderChange(LONG Param);
	TRunMode RunMode;
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CConvexHullView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	virtual BOOL DestroyWindow();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void statusInfo();
	UINT OnThreadFinished(UINT wParam, LONG lParam);
	void DrawScnEdge(CDC *pDC,TEdge edge);
	void DrawScnPoly(CDC *pDC,TPolygon* poly);
	TScnPoint ConvPicToScn(CPoint point);
	TPicPoint ConvScnToPic(CPoint point);
	void DrawScnPoint(CDC*  pDC, TPoint scn_pnt);
	int GetActivePane();
	virtual ~CConvexHullView();
	bool isClear;
	CEvent threadFinished;
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CConvexHullView)
	afx_msg void OnButtonmovedown();
	afx_msg void OnButtonmoveleft();
	afx_msg void OnButtonmoveright();
	afx_msg void OnButtonmoveup();
	afx_msg void OnButtonzoomminus();
	afx_msg void OnButtonzoomplus();
	afx_msg void OnUpdateButtonzoomplus(CCmdUI* pCmdUI);
	afx_msg void OnButtonmovecenter();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnUpdateButtonmovecenter(CCmdUI* pCmdUI);
	afx_msg void OnButtonzoomnone();
	afx_msg void OnUpdateButtonzoomnone(CCmdUI* pCmdUI);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnGenerate();
	afx_msg void OnButtonplay();
	afx_msg void OnButtonstep();
	afx_msg void OnButtonstop();
	afx_msg void OnPlay();
	afx_msg void OnRestart();
	afx_msg void OnStep();
	afx_msg void OnScreenshots();
	afx_msg void OnUpdateGenerate(CCmdUI* pCmdUI);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnUpdateButtonstep(CCmdUI* pCmdUI);
	afx_msg void OnUpdateStep(CCmdUI* pCmdUI);
	afx_msg void OnUpdateButtonplay(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePlay(CCmdUI* pCmdUI);
	afx_msg void OnButtonbreak();
	afx_msg void OnUpdateButtonbreak(CCmdUI* pCmdUI);
	afx_msg void OnBreak();
	afx_msg void OnUpdateBreak(CCmdUI* pCmdUI);
	afx_msg void OnDestroy();
	//}}AFX_MSG
	afx_msg void OnCustomdrawSlider1(NMHDR* pNMHDR, LRESULT* pResult);
	DECLARE_MESSAGE_MAP()
private:
	CToolTipCtrl toolTip;
	bool Auto;
	int oldDelay;
	int GetDelay();
	int ConvertY(int y);
	int ConvertX(int x);
};

#ifndef _DEBUG  // debug version in ConvexHullView.cpp
inline CConvexHullDoc* CConvexHullView::GetDocument()
   { return (CConvexHullDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_CONVEXHULLVIEW_H__7A7BF48A_2EFE_45D0_BC44_18F61178101E__INCLUDED_)
Соседние файлы в папке ConvexHull_1