// TestView.h : interface of the CTestView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_TESTVIEW_H__2F84FB6D_22EA_11D3_B06F_006008413DCA__INCLUDED_)
#define AFX_TESTVIEW_H__2F84FB6D_22EA_11D3_B06F_006008413DCA__INCLUDED_

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

#include "Dialog1.h"
#include "Results.h"	// Added by ClassView
#include "After.h"	// Added by ClassView
#include "Before.h"	// Added by ClassView
#include "Options.h"
#include "Graf.h"	// Added by ClassView

class CTestView : public CScrollView
{
protected: // create from serialization only
	CTestView();
	DECLARE_DYNCREATE(CTestView)

// Attributes
public:
	CTestDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTestView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
	//}}AFX_VIRTUAL

// Implementation
public:
	CTestDoc* pDoc;
	CGraf GrafWin;
	int TimeInSeconds;

	COptions OptionWin;

	CBefore BeforeWin;
	CAfter AfterWin;
	CResults ResultDialog;
	void Trace (void);
	int SortMethod;
	int Un;
	int points_num;
	int ListSize;
	int List[500][2];
	int points[500][2];
	int Distance(int,int);
	int TraceByList(void);
	void SortList2(void);
	void SortList1(void);
	void MakeList(void);
	int MakeTrassa(int begin, int end);
	int EditMode;
	void DrawElement(CDC*,int,int,int,int);
	virtual ~CTestView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CTestView)
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnPoint();
	afx_msg void OnFb();
	afx_msg void OnClear();
	afx_msg void OnUpdatePoint(CCmdUI* pCmdUI);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnNorm();
	afx_msg void OnUpdateViewToolbar(CCmdUI* pCmdUI);
	afx_msg void OnUpdateNorm(CCmdUI* pCmdUI);
	afx_msg void OnAdd();
	afx_msg void OnStart();
	afx_msg void OnStartFirstsortmethod();
	afx_msg void OnStartSecondsortmethod();
	afx_msg void OnStartThirdsortmethod();
	afx_msg void OnStatistic();
	afx_msg void OnOptionsFieldoptions();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in TestView.cpp
inline CTestDoc* CTestView::GetDocument()
   { return (CTestDoc*)m_pDocument; }
#endif

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TESTVIEW_H__2F84FB6D_22EA_11D3_B06F_006008413DCA__INCLUDED_)
