projDoc.h
上传用户:ywlong9188
上传日期:2022-05-31
资源大小:2656k
文件大小:2k
- // ProjDoc.h : interface of the CProjDoc class
- //
- /////////////////////////////////////////////////////////////////////////////
- #include "drawobj.h"
- class CProjView;
- class CProjDoc : public CDocument
- {
- protected: // create from serialization only
- CProjDoc();
- DECLARE_DYNCREATE(CProjDoc)
- // 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; }
- // Operations
- public:
- CDrawObj* ObjectAt(const CPoint& point);
- void Draw(CDC* pDC, CProjView* pView);
- void Add(CDrawObj* pObj);
- void Remove(CDrawObj* pObj);
- // Custom library operation
- BOOL LoadFromLib();
- void StoreToLib();
- BOOL IsExist();
- BOOL CreateLib();
- void AddToList(CDrawObj* pObj);
- void RemoveFromList(CDrawObj* pObj);
- CString m_filename;
- CString m_directory;
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CProjDoc)
- public:
- virtual BOOL OnNewDocument();
- virtual void Serialize(CArchive& ar);
- virtual void DeleteContents();
- //}}AFX_VIRTUAL
- CDrawObjList m_objects;
- CDrawObjList m_customList;
- CSize m_size;
- int m_nMapMode;
- COLORREF m_paperColor;
- // Implementation
- public:
- virtual ~CProjDoc();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- //{{AFX_MSG(CProjDoc)
- afx_msg void OnViewPaperColor();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////