Скачиваний:
7
Добавлен:
01.05.2014
Размер:
2.93 Кб
Скачать
// part31Doc.h : interface of the CPart31Doc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_PART31DOC_H__7BB99F6C_4D85_4F81_B1AF_117EDF5BD9E0__INCLUDED_)
#define AFX_PART31DOC_H__7BB99F6C_4D85_4F81_B1AF_117EDF5BD9E0__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 CPart31SrvrItem;

class CPart31Doc : public COleServerDoc
{
protected: // create from serialization only
	CPart31Doc();
	DECLARE_DYNCREATE(CPart31Doc)

// Attributes
public:
	CPart31SrvrItem* GetEmbeddedItem()
		{ return (CPart31SrvrItem*)COleServerDoc::GetEmbeddedItem(); }

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

	WORD c_TypeName;		//current type name
	CSize m_DocSize;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPart31Doc)
	protected:
	virtual COleServerItem* OnGetEmbeddedItem();
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:

	WORD GetElementType();
	CSize GetDocSize(); 
	Shape* CreateElemByType(int type);		//для сериализации. создаем элемент по типу

	virtual ~CPart31Doc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

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

	// Generated OLE dispatch map functions
	//{{AFX_DISPATCH(CPart31Doc)
	afx_msg void showWindow();
	afx_msg short getCount();
	afx_msg void printCircle(short x, short y, short rad);
	afx_msg void printEllipse(short x, short y, short frad, short srad);
	afx_msg void printEllipseText(short x, short y, short frad, short srad, LPCTSTR text);
	afx_msg void printText(short x, short y, LPCTSTR Text);
	afx_msg void addLine(short from, short to);
	afx_msg void delElem(short index);
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()
	DECLARE_INTERFACE_MAP()
};

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

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

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