www.pudn.com > 44757463.rar > GraphSoftDoc.h
// GraphSoftDoc.h : interface of the CGraphSoftDoc class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_GRAPHSOFTDOC_H__1813F4C1_710B_479A_8CE6_22B94F023BE5__INCLUDED_)
#define AFX_GRAPHSOFTDOC_H__1813F4C1_710B_479A_8CE6_22B94F023BE5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "afxtempl.h"
#include "Shape.h"
#include "GraphDefines.h"
#include "Core.h"
class CCore;
class CGraphSoftDoc : public CDocument
{
protected: // create from serialization only
CGraphSoftDoc();
DECLARE_DYNCREATE(CGraphSoftDoc)
// Attributes
public:
GRAPH_SHAPE_TYPE m_nCurrentShapeType;
CTypedPtrList m_shapeList;
CCore* m_pCore;
CSize m_sizeDoc;
// Operations
public:
CRect GetSelectGraphBoundaryRect();
bool HasGraphSelected();
void RefreshSelectGraph();
void SelectInRect(CRect* pRect,CDC* pDC,UINT nFlag,bool bDraw=TRUE);
int GetSelectNum();
void SetGraphDrawPtFlag(int nFlag,CDC* pDC);
void GraphLeftToRight(CDC* pDC);
void GraphTopToBottom(CDC* pDC);
void SetEditStateCursor(float flx,float fly,float flRate);//设置编辑时的光标
void ExPort(FILE* outStream);
void ImPort(FILE* inStream);
void SetSelGraphColor(COLORREF color,CDC* pDC);
void SetSelGraphFillClr(COLORREF color,CDC* pDC);
void SetSelGraphFillSty(SHAPE_FILLSTYLE nStyle,CDC* pDC);
void SetSelGraphPenWidth(int nWidth,CDC* pDC);
void GetSelGraphIDArray(CArray& arrID);
void GetSelGraphArray(CArray& ArrShape);
void GetSelGraphPropertyArr(CArray& ArrProperty);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGraphSoftDoc)
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
virtual void DeleteContents();
virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
virtual void OnCloseDocument();
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CGraphSoftDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CGraphSoftDoc)
afx_msg void OnFileNew();
afx_msg void OnFileImport();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GRAPHSOFTDOC_H__1813F4C1_710B_479A_8CE6_22B94F023BE5__INCLUDED_)