Скачиваний:
11
Добавлен:
01.05.2014
Размер:
2.18 Кб
Скачать
// lab22Doc.h : interface of the CLab22Doc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_LAB22DOC_H__F384BBFC_F976_4EA3_90A5_B2EEF38C2DA2__INCLUDED_)
#define AFX_LAB22DOC_H__F384BBFC_F976_4EA3_90A5_B2EEF38C2DA2__INCLUDED_

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

#include "Shape.h"
#include "CGraph.h"
#include "iterator.h"

#include "CCircle.h"
#include "CEllipse.h"
#include "CEllipseTxT.h"
#include "CText.h"

class CLab22Doc : public CDocument
{
protected: // create from serialization only
	CLab22Doc();
	DECLARE_DYNCREATE(CLab22Doc)

// Attributes
public:

// Operations
public:
	bool is_TextEnter;		//флаг ввода текста
	CGraph<Shape*> graph;	//контейнер
	int index;				//счетчик элементов.
protected:
	WORD c_TypeName;		//current type name

public:
	CSize m_DocSize;

	WORD GetElementType();
	CSize GetDocSize(); 
	Shape* CreateElemByType(int type);		//для сериализации. создаем элемент по типу
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CLab22Doc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

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

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CLab22Doc)
	afx_msg void OnElementsCircle();
	afx_msg void OnElementsEllipse();
	afx_msg void OnElementsEllipsewithtext();
	afx_msg void OnElementsText();
	afx_msg void OnUpdateElementsCircle(CCmdUI* pCmdUI);
	afx_msg void OnUpdateElementsEllipse(CCmdUI* pCmdUI);
	afx_msg void OnUpdateElementsEllipsewithtext(CCmdUI* pCmdUI);
	afx_msg void OnUpdateElementsText(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

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