GraphSoftDoc.h
上传用户:lj3531212
上传日期:2007-06-18
资源大小:346k
文件大小:3k
源码类别:

绘图程序

开发平台:

Visual C++

  1. // GraphSoftDoc.h : interface of the CGraphSoftDoc class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_GRAPHSOFTDOC_H__1813F4C1_710B_479A_8CE6_22B94F023BE5__INCLUDED_)
  5. #define AFX_GRAPHSOFTDOC_H__1813F4C1_710B_479A_8CE6_22B94F023BE5__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "afxtempl.h"
  10. #include "Shape.h"
  11. #include "GraphDefines.h"
  12. #include "Core.h"
  13. class CCore;
  14. class CGraphSoftDoc : public CDocument
  15. {
  16. protected: // create from serialization only
  17. CGraphSoftDoc();
  18. DECLARE_DYNCREATE(CGraphSoftDoc)
  19. // Attributes
  20. public:
  21. GRAPH_SHAPE_TYPE m_nCurrentShapeType;
  22.     CTypedPtrList<CObList,CShape*> m_shapeList;
  23. CCore* m_pCore;
  24. CSize  m_sizeDoc;
  25. // Operations
  26. public:    
  27. CRect GetSelectGraphBoundaryRect();
  28. bool HasGraphSelected();
  29. void RefreshSelectGraph();
  30. void SelectInRect(CRect* pRect,CDC* pDC,UINT nFlag,bool bDraw=TRUE);
  31. int GetSelectNum();
  32. void SetGraphDrawPtFlag(int nFlag,CDC* pDC);
  33. void GraphLeftToRight(CDC* pDC);
  34. void GraphTopToBottom(CDC* pDC);
  35. void SetEditStateCursor(float flx,float fly,float flRate);//设置编辑时的光标
  36. void ExPort(FILE* outStream);
  37. void ImPort(FILE* inStream);
  38. void SetSelGraphColor(COLORREF color,CDC* pDC);
  39. void SetSelGraphFillClr(COLORREF color,CDC* pDC);
  40. void SetSelGraphFillSty(SHAPE_FILLSTYLE nStyle,CDC* pDC);
  41. void SetSelGraphPenWidth(int nWidth,CDC* pDC);
  42. void GetSelGraphIDArray(CArray<unsigned long,unsigned long>& arrID);
  43. void GetSelGraphArray(CArray<CShape*,CShape*>& ArrShape);
  44. void GetSelGraphPropertyArr(CArray<SUNDPropertyUnit,SUNDPropertyUnit>& ArrProperty);
  45. // Overrides
  46. // ClassWizard generated virtual function overrides
  47. //{{AFX_VIRTUAL(CGraphSoftDoc)
  48. public:
  49. virtual BOOL OnNewDocument();
  50. virtual void Serialize(CArchive& ar);
  51. virtual void DeleteContents();
  52. virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
  53. virtual void OnCloseDocument();
  54. virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
  55. //}}AFX_VIRTUAL
  56. // Implementation
  57. public:
  58. virtual ~CGraphSoftDoc();
  59. #ifdef _DEBUG
  60. virtual void AssertValid() const;
  61. virtual void Dump(CDumpContext& dc) const;
  62. #endif
  63. protected:
  64. // Generated message map functions
  65. protected:
  66. //{{AFX_MSG(CGraphSoftDoc)
  67. afx_msg void OnFileNew();
  68. afx_msg void OnFileImport();
  69. //}}AFX_MSG
  70. DECLARE_MESSAGE_MAP()
  71. };
  72. /////////////////////////////////////////////////////////////////////////////
  73. //{{AFX_INSERT_LOCATION}}
  74. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  75. #endif // !defined(AFX_GRAPHSOFTDOC_H__1813F4C1_710B_479A_8CE6_22B94F023BE5__INCLUDED_)