EastDrawView.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. // EastDrawView.h : interface of the CEastDrawView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_EASTDRAWVIEW_H__3327611D_6660_4C0B_B9C2_6AE46861E30C__INCLUDED_)
  5. #define AFX_EASTDRAWVIEW_H__3327611D_6660_4C0B_B9C2_6AE46861E30C__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CUnit;
  10. class CDLineProperty;
  11. class CEastDrawDoc;
  12. class CEditPane;
  13. //class CTextEdit;
  14. #include "stdafx.h"
  15. #include <direct.h>
  16. #include <math.h>
  17. #include <io.h>
  18. #include <errno.h>
  19. class CEastDrawView : public CScrollView
  20. {
  21. protected: // create from serialization only
  22. CEastDrawView();
  23. DECLARE_DYNCREATE(CEastDrawView)
  24. // Attributes
  25. public:
  26. CEastDrawDoc* GetDocument();
  27. // Operations
  28. public:
  29. int m_CurrentDrawTool;
  30. int m_CurrentDrawStatus;
  31. CClientDC *m_DrawDC;
  32. CPoint m_FirstPoint;
  33. CPoint m_SecondPoint;
  34. CUnit *m_pCurrentUnit;
  35. BOOL m_IsDrawing;
  36. CDLineProperty* m_DLineProperty;
  37. BOOL m_IsPolygonFirst;
  38. CBitmap *m_Bitmap;
  39. int m_LBDownTimes;
  40. BOOL m_bHaveFindFirst;
  41. BOOL m_bHaveFindSecond;
  42. int L_iPointCount;
  43. CPoint m_LastDownPoint;
  44. CPoint m_MinPoint;
  45. CPoint m_MaxPoint;
  46. CRect m_InvalidRect;
  47. CPoint m_ChangeingPoint;
  48. CString string;
  49. CPoint m_CenterPoint;
  50. BOOL m_HaveAxis;
  51. BOOL m_IsLocked;
  52. int m_Rtimes;
  53. int m_Index;
  54. BOOL m_IsMouseCap;
  55. BOOL m_IsLastMove;
  56. // CTextEdit* m_pTextEdit;
  57. // Overrides
  58. // ClassWizard generated virtual function overrides
  59. //{{AFX_VIRTUAL(CEastDrawView)
  60. public:
  61. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  62. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  63. protected:
  64. virtual void OnInitialUpdate(); // called first time after construct
  65. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  66. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  67. virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
  68. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  69. //}}AFX_VIRTUAL
  70. // Implementation
  71. public:
  72. virtual ~CEastDrawView();
  73. #ifdef _DEBUG
  74. virtual void AssertValid() const;
  75. virtual void Dump(CDumpContext& dc) const;
  76. #endif
  77. protected:
  78. public:
  79. void SetBoxFont();
  80. void ReMoveTemp();
  81. void ExchangeSave();
  82. void AutoSave();
  83. void AddTempFile();
  84. void DrawAll(CDC*pDrawDC);
  85. void DeleteSelect();
  86. BOOL SaveDIB(CBitmap*pbitmap, CFile&file);
  87. void DrawAxis(CDC*pDC);
  88. void SetMousePosText(CPoint Logpoint,CPoint Devpoint);
  89. void ShowFontBar(BOOL isShow);
  90. void GetFontInfo(LPTSTR pszFaceName, int& nSize);
  91. void InvalidateMovingRect(CUnit*pMovingUnit);
  92. void ComputeMinandMaxPoint(CPoint point);
  93. void ResetSelectStatus();
  94. // Generated message map functions
  95. protected:
  96. //{{AFX_MSG(CEastDrawView)
  97. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  98. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  99. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  100. afx_msg void OnBUTTONDLine();
  101. afx_msg void OnBUTTON32774Move();
  102. afx_msg void OnBUTTON32775CircumRotate();
  103. afx_msg void OnBUTTON32777Curve();
  104. afx_msg void OnBUTTON32776Rectangle();
  105. afx_msg void OnBUTTON32778RoundRectangle();
  106. afx_msg void OnBUTTON32779Ellipse();
  107. afx_msg void OnBUTTON32780Round();
  108. afx_msg void OnBUTTON32791Polygon();
  109. afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  110. afx_msg void OnSetFocus(CWnd* pOldWnd);
  111. afx_msg void OnMENUITEM32794SetRegin();
  112. afx_msg void OnBUTTONLiEllipse();
  113. afx_msg void OnBUTTON32800RoundArc();
  114. afx_msg void OnBUTTON32805EllipseArc();
  115. afx_msg void OnBUTTON32807PolyBezier();
  116. afx_msg void OnBUTTON32809Text();
  117. afx_msg void OnCharBold();
  118. afx_msg void OnCharItalic();
  119. afx_msg void OnCharUnderline();
  120. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  121. afx_msg void OnMenuitemOk();
  122. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  123. afx_msg void OnCirCu();
  124. afx_msg void OnUpdateCirCu(CCmdUI* pCmdUI);
  125. afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
  126. afx_msg void OnDelete();
  127. afx_msg void OnBUTTON32830Lock();
  128. afx_msg void OnUpdateBUTTON32830Lock(CCmdUI* pCmdUI);
  129. afx_msg void OnUpdateBUTTONDLine(CCmdUI* pCmdUI);
  130. afx_msg void OnUpdateBUTTON32776Rectangle(CCmdUI* pCmdUI);
  131. afx_msg void OnUpdateBUTTON32778RoundRectangle(CCmdUI* pCmdUI);
  132. afx_msg void OnUpdateBUTTON32791Polygon(CCmdUI* pCmdUI);
  133. afx_msg void OnUpdateBUTTON32779Ellipse(CCmdUI* pCmdUI);
  134. afx_msg void OnUpdateBUTTON32780Round(CCmdUI* pCmdUI);
  135. afx_msg void OnUpdateBUTTON32777Curve(CCmdUI* pCmdUI);
  136. afx_msg void OnUpdateBUTTONLiEllipse(CCmdUI* pCmdUI);
  137. afx_msg void OnUpdateBUTTON32800RoundArc(CCmdUI* pCmdUI);
  138. afx_msg void OnUpdateBUTTON32805EllipseArc(CCmdUI* pCmdUI);
  139. afx_msg void OnUpdateBUTTON32807PolyBezier(CCmdUI* pCmdUI);
  140. afx_msg void OnUpdateBUTTON32809Text(CCmdUI* pCmdUI);
  141. afx_msg void OnUpdateBUTTON32774Move(CCmdUI* pCmdUI);
  142. afx_msg void OnBUTTON32845Axis();
  143. afx_msg void OnUpdateBUTTON32845Axis(CCmdUI* pCmdUI);
  144. afx_msg void OnBUTTON32850ReDraw();
  145. afx_msg void OnBUTTON32856DONothing();
  146. afx_msg void OnBUTTON32858OnDo();
  147. afx_msg void OnBUTTON32859ReDo();
  148. afx_msg void OnUpdateBUTTON32858OnDo(CCmdUI* pCmdUI);
  149. afx_msg void OnUpdateBUTTON32859ReDo(CCmdUI* pCmdUI);
  150. afx_msg void OnMouseCapOn();
  151. afx_msg void OnUpdateMouseCapOn(CCmdUI* pCmdUI);
  152. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  153. //}}AFX_MSG
  154. DECLARE_MESSAGE_MAP()
  155. };
  156. #ifndef _DEBUG // debug version in EastDrawView.cpp
  157. inline CEastDrawDoc* CEastDrawView::GetDocument()
  158. { return (CEastDrawDoc*)m_pDocument; }
  159. #endif
  160. /////////////////////////////////////////////////////////////////////////////
  161. //{{AFX_INSERT_LOCATION}}
  162. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  163. #endif // !defined(AFX_EASTDRAWVIEW_H__3327611D_6660_4C0B_B9C2_6AE46861E30C__INCLUDED_)