drawdoc.h
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:2k
- // drawdoc.h : interface of the CDrawDoc class
- //
- // This file is a part of the XTREME TOOLKIT PRO MFC class library.
- // (c)1998-2008 Codejock Software, All Rights Reserved.
- //
- // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
- // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
- // CONSENT OF CODEJOCK SOFTWARE.
- //
- // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
- // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
- // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
- // SINGLE COMPUTER.
- //
- // CONTACT INFORMATION:
- // support@codejock.com
- // http://www.codejock.com
- //
- /////////////////////////////////////////////////////////////////////////////
- #include "drawobj.h"
- #include "summinfo.h"
- class CDrawView;
- class CDrawDoc : public COleDocument
- {
- protected: // create from serialization only
- CDrawDoc();
- DECLARE_DYNCREATE(CDrawDoc)
- // Attributes
- public:
- CDrawObjList* GetObjects() { return &m_objects; }
- const CSize& GetSize() const { return m_size; }
- void ComputePageSize();
- int GetMapMode() const { return m_nMapMode; }
- COLORREF GetPaperColor() const { return m_paperColor; }
- CSummInfo *m_pSummInfo;
- // Operations
- public:
- CDrawObj* ObjectAt(const CPoint& point);
- void Draw(CDC* pDC, CDrawView* pView);
- void Add(CDrawObj* pObj);
- void Remove(CDrawObj* pObj);
- // Implementation
- public:
- virtual ~CDrawDoc();
- virtual void Serialize(CArchive& ar); // overridden for document i/o
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- virtual BOOL OnNewDocument();
- virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
- virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
- CDrawObjList m_objects;
- CSize m_size;
- int m_nMapMode;
- COLORREF m_paperColor;
- // Generated message map functions
- protected:
- //{{AFX_MSG(CDrawDoc)
- afx_msg void OnViewPaperColor();
- afx_msg void OnFileSummaryInfo();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////