SolidgraphDoc.h
Upload User: kairuinn
Upload Date: 2009-02-07
Package Size: 2922k
Code Size: 1k
Category:

Graph program

Development Platform:

Visual C++

  1. // SolidgraphDoc.h : interface of the CSolidgraphDoc class
  2. //
  3. #pragma once
  4. //#ifndef __PRECISION__
  5. #define PREC_COUNT   6
  6. static float precisions[PREC_COUNT] = {0.001f, 0.01f, 0.1f, 1.0f, 10.0f, 100.0f};
  7. #define __PRECISION__
  8. //#endif
  9. typedef struct 
  10. {
  11. unsigned char CurrentLayer;
  12. unsigned char CurrentColor;
  13. unsigned char CurrentLineThickness;
  14. unsigned char CurrentLineType;
  15. unsigned char       CurrentPrecision;
  16. } SCENE_SETUPS;
  17. class CSolidgraphDoc : public CDocument
  18. {
  19. protected: // create from serialization only
  20. CSolidgraphDoc();
  21. DECLARE_DYNCREATE(CSolidgraphDoc)
  22. private:
  23. SCENE_SETUPS   m_scene_setups;
  24. // Attributes
  25. public:
  26. virtual  BOOL IsModified();
  27. // Operations
  28. public:
  29. void SetSceneSetups(const SCENE_SETUPS&);
  30. void GetSceneSetups(SCENE_SETUPS&);
  31. // Overrides
  32. public:
  33. virtual BOOL OnNewDocument();
  34. virtual void Serialize(CArchive& ar);
  35. // Implementation
  36. public:
  37. virtual ~CSolidgraphDoc();
  38. #ifdef _DEBUG
  39. virtual void AssertValid() const;
  40. virtual void Dump(CDumpContext& dc) const;
  41. #endif
  42. protected:
  43. // Generated message map functions
  44. protected:
  45. DECLARE_MESSAGE_MAP()
  46. public:
  47. virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
  48. virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
  49. virtual void OnCloseDocument();
  50. afx_msg void OnDxfExport();
  51. afx_msg void OnDxfImport();
  52. afx_msg void OnSTLExport();
  53. afx_msg void OnSTLImport();
  54. };
  55. extern CSolidgraphDoc*  global_3D_document;