DrawObj.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  1. // CDrawObj.h: interface for the CDrawObj class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_CDRAWOBJ_H__4539C1EB_10FD_40B5_9BBC_22C008CEAF0F__INCLUDED_)
  5. #define AFX_CDRAWOBJ_H__4539C1EB_10FD_40B5_9BBC_22C008CEAF0F__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "..\ChineseRes\ChineseRes\resource.h"
  10. #include "ReportColPage.h"
  11. //#include "Picture.h"
  12. #include "ImageEx.h"
  13. #include "shockwaveflash.h"
  14. class CGraph;
  15. struct LAYOUTSTRUCT
  16. {
  17. CRect rect; // m_rect (Normalized);
  18. int nX1; // m_rect.left (Normalized);
  19. int nX2; // m_rect.right (Normalized);
  20. int nY1; // m_rect.top (Normalized);
  21. int nY2; // m_rect.bottom(Normalized);
  22. int nXX; // m_rect.Width();
  23. int nYY; // m_rect.Height();
  24. int nX0; // 中心点X坐标;
  25. int nY0; // 中心点Y坐标;
  26. BOOL bHoriz; // 方向标志;
  27. BOOL bXInvert; // X方向反转标志;
  28. BOOL bYInvert; // Y方向反转标志;
  29. int nMinSize; // 可画的最小尺寸;
  30. };
  31. // 定义操作
  32. //---------------------------------------------- CAction -----------
  33. class CAction:public CObject
  34. {
  35. public:
  36. int m_nActionType;
  37. CString m_strVariant;
  38. CString m_strActionValue;
  39. CString m_strPicPath;
  40. DECLARE_SERIAL(CAction);
  41. CAction();
  42. virtual CAction* Clone(void);
  43. virtual void Serialize(CArchive& ar);
  44. CAction& operator=(CAction& action);
  45. };
  46. //////////////////////////////////////////////////////////////////////////
  47. //---------------------------------------------- CDrawObj -----------
  48. class CDrawObj:public CObject
  49. {
  50. public:
  51. DECLARE_SERIAL(CDrawObj);
  52. CDrawObj();
  53. public:
  54. CView* m_pView;
  55. CRect m_rect;
  56. public:
  57. static CStringArray drawsName;
  58. static CPtrArray drawsRuntimeClass;
  59. static void RegisterClass(CString strName,CRuntimeClass* pRuntimeClass);
  60. public:
  61. COLORREF m_clrFore; // 前景色
  62. COLORREF m_clrLine; // 线色
  63. COLORREF m_clrBack; // 背景色
  64. COLORREF m_clrFill; // 填充色
  65. LOGFONT m_logfont; // 字体
  66. CString m_strLineType; // 线型
  67. int m_nLineWidth; // 线宽
  68. CString m_strCaption; // 静态文本
  69. BOOL m_bVariant; // 是否是变量r
  70. BOOL m_bDynShow; // 是否动态显示
  71. CString m_strDynShow; // 动态显示条件
  72. BOOL m_bLocked;
  73. BOOL m_bAligned; // 用来等距排列的标志位
  74. // 动态参数
  75. COLORREF m_clrDynFore; // 前景色
  76. CString m_strDynForeCon;
  77. COLORREF m_clrDynBack;
  78. CString m_strDynBackCon;
  79. COLORREF m_clrDynLine;
  80. CString m_strDynLineCon;
  81. BOOL m_bDynFore;
  82. BOOL m_bDynBack;
  83. BOOL m_bDynLine;
  84. int m_nFillMode;
  85. CString m_strHoriPos;
  86. CString m_strHoriSize;
  87. CString m_strVertiPos;
  88. CString m_strVertiSize;
  89. BOOL m_bVertiSize;
  90. BOOL m_bVertiPos;
  91. BOOL m_bHorizSize;//注意: 为真时 报警背景闪烁
  92. BOOL m_bHorizPos;
  93. int m_nHorAlign;
  94. int m_nVerAlign;
  95. // 动态值
  96. CRect m_rctCurrent;
  97. COLORREF m_clrCurrentFore;
  98. COLORREF m_clrCurrentBack;
  99. COLORREF m_clrCurrentLine;
  100. CString m_strCurrentCaption;
  101. BOOL m_bShow;
  102. float m_fCurrentValue;
  103. BOOL m_bShowtemp;//chn add 为了GIF,flasg,OCX的隐藏和显示
  104. // 动作属性
  105. CAction m_downAction;
  106. CAction m_upAction;
  107. CAction m_moveAction;
  108. BOOL m_bOnButtonUp;
  109. BOOL m_bOnButtonDown;
  110. BOOL m_bOnMove;//注意: 为真时 可以选择,但不能复制和移动
  111. //
  112. BOOL m_bHisFreshed;
  113. // 组合内动态缩放
  114. double m_dbLeftRate;
  115. double m_dbRightRate;
  116. double m_dbTopRate;
  117. double m_dbBottomRate;
  118. public:
  119. static BOOL bRuning; // 是否处于运行状态;
  120. BOOL m_bModifyMore; // 是否是编辑多个
  121. public:
  122. CDrawObj& operator=(CDrawObj& drawObj);
  123. virtual CDrawObj* Clone(void);
  124. virtual void Serialize(CArchive& ar);
  125. virtual BOOL OnAttrib(void);
  126. virtual BOOL OnAttrib(CPropertySheet& sheet);
  127. virtual void Draw(CDC* pDC);
  128. void DrawText(CDC* pDC);
  129. virtual bool Fresh( CRect &RECT );
  130. void DrawHKedu(CDC* pDC, CRect rect, int nKedu, COLORREF clrKedu);
  131. void DrawVKedu(CDC* pDC, CRect rect, int nKedu, COLORREF clrKedu);
  132. void DrawArcKedu(CDC* pDC, CRect rect, int nStartAngle, int nEndAngle, int nKedu, COLORREF clrKedu);
  133. public:
  134. LOGBRUSH GetBrush();
  135. void DrawFrame(CDC* pDC);
  136. void ProcessAction(int type);
  137. int GetPenStyle(CString penType);
  138. void Layout(BYTE Sharp,LAYOUTSTRUCT* pLayout);
  139. virtual int GetHandleCount(void);
  140. virtual CPoint GetHandle(int nHandle);
  141. CRect GetHandleRect(int nHandle);
  142. virtual HCURSOR GetHandleCursor();
  143. virtual void MoveTo(CRect rect);
  144. virtual void MoveHandleTo(int nHandle, CPoint point);
  145. virtual void DrawTracker(CDC* pDC);
  146. virtual int HitTest(CPoint point);
  147. virtual BOOL Intersects(CRect rect);
  148. virtual void Invalidate(void);
  149. private:
  150. bool m_bFlag1,m_bFlag2,m_bFlag3;
  151. };
  152. typedef CTypedPtrList<CObList, CDrawObj*> CDrawObjList;
  153. //---------------------------------------------- CDrawComposite ---
  154. class CDrawComposite:public CDrawObj
  155. {
  156. public:
  157. DECLARE_SERIAL(CDrawComposite);
  158. CDrawComposite();
  159. CDrawComposite(CDrawObjList &ObjList);
  160. ~CDrawComposite();
  161. public:
  162. CDrawComposite& operator=(CDrawComposite& drawObj);
  163. virtual CDrawObj* Clone(void);
  164. virtual void Serialize(CArchive& ar);
  165. virtual void Draw(CDC* pDC);
  166. virtual void MoveTo(CRect rect);
  167. public:
  168. CDrawObjList m_ObjList;
  169. };
  170. //---------------------------------------------- CDrawTLine -------
  171. class CDrawTLine:public CDrawObj
  172. {
  173. public:
  174. DECLARE_SERIAL(CDrawTLine);
  175. CDrawTLine();
  176. public:
  177. virtual CDrawObj* Clone(void);
  178. virtual void Draw(CDC* pDC);
  179. //virtual bool Fresh( CRect &RECT );
  180. };
  181. //---------------------------------------------- CDrawLine -------
  182. class CDrawLine:public CDrawObj
  183. {
  184. public:
  185. DECLARE_SERIAL(CDrawLine);
  186. CDrawLine();
  187. public:
  188. virtual CDrawObj* Clone(void);
  189. virtual void Draw(CDC* pDC);
  190. //virtual bool Fresh( CRect &RECT );
  191. };
  192. //---------------------------------------------- CDrawText --------
  193. class CDrawText:public CDrawObj
  194. {
  195. public:
  196. DECLARE_SERIAL(CDrawText);
  197. CDrawText();
  198. public:
  199. virtual CDrawObj* Clone(void);
  200. virtual void Draw(CDC* pDC);
  201. virtual void DrawText(CDC* pDC);
  202. virtual bool Fresh( CRect &RECT );
  203. };
  204. //---------------------------------------------- CDrawRect --------
  205. class CDrawRect:public CDrawObj
  206. {
  207. public:
  208. DECLARE_SERIAL(CDrawRect);
  209. CDrawRect();
  210. public:
  211. virtual CDrawObj* Clone(void);
  212. virtual void Draw(CDC* pDC);
  213. //virtual bool Fresh( CRect &RECT );
  214. };
  215. //---------------------------------------------- CDrawRoundRect --------
  216. class CDrawRoundRect:public CDrawObj
  217. {
  218. public:
  219. DECLARE_SERIAL(CDrawRoundRect);
  220. CDrawRoundRect();
  221. public:
  222. virtual CDrawObj* Clone(void);
  223. virtual void Draw(CDC* pDC);
  224. //virtual bool Fresh( CRect &RECT );
  225. };
  226. //---------------------------------------------- CDrawOval --------
  227. class CDrawOval:public CDrawObj
  228. {
  229. public:
  230. DECLARE_SERIAL(CDrawOval);
  231. CDrawOval();
  232. public:
  233. virtual CDrawObj* Clone(void);
  234. virtual void Draw(CDC* pDC);
  235. //virtual bool Fresh( CRect &RECT );
  236. };
  237. //---------------------------------------------- CDrawPie --------
  238. class CDrawPie:public CDrawObj
  239. {
  240. public:
  241. DECLARE_SERIAL(CDrawPie);
  242. CDrawPie();
  243. int m_nStartAngle;
  244. int m_nSweepAngle;
  245. public:
  246. virtual CDrawObj* Clone(void);
  247. virtual void Draw(CDC* pDC);
  248. virtual void Serialize(CArchive& ar);
  249. virtual BOOL OnAttrib(CPropertySheet& sheet);
  250. };
  251. //---------------------------------------------- CDrawFan --------
  252. class CDrawFan:public CDrawObj
  253. {
  254. public:
  255. DECLARE_SERIAL(CDrawFan);
  256. CDrawFan();
  257. public:
  258. virtual CDrawObj* Clone(void);
  259. virtual void Draw(CDC* pDC);
  260. virtual void Serialize(CArchive& ar);
  261. virtual bool Fresh( CRect &RECT );
  262. virtual BOOL OnAttrib(CPropertySheet& sheet);
  263. public:
  264. int m_nStep;
  265. bool m_bComputed;
  266. BOOL m_bRun;
  267. CPoint tagPoint[8];
  268. CString m_strLogic;
  269. };
  270. //---------------------------------------------- CDrawArc --------
  271. class CDrawArc:public CDrawObj
  272. {
  273. public:
  274. DECLARE_SERIAL(CDrawArc);
  275. CDrawArc();
  276. int m_nStartAngle;
  277. int m_nSweepAngle;
  278. public:
  279. virtual CDrawObj* Clone(void);
  280. virtual void Draw(CDC* pDC);
  281. virtual void Serialize(CArchive& ar);
  282. virtual BOOL OnAttrib(CPropertySheet& sheet);
  283. };
  284. //---------------------------------------------- CDrawPoly --------
  285. class CDrawPoly:public CDrawObj
  286. {
  287. public:
  288. DECLARE_SERIAL(CDrawPoly);
  289. CDrawPoly();
  290. ~CDrawPoly();
  291. int m_nPoints;
  292. int m_nAllocPoints;
  293. CPoint* m_points;
  294. public:
  295. void AddPoint(const CPoint& point);
  296. BOOL RecalcBounds();
  297. public:
  298. virtual CDrawObj* Clone(void);
  299. virtual void Draw(CDC* pDC);
  300. virtual void Serialize(CArchive& ar);
  301. virtual void MoveTo(CRect rect);
  302. virtual int GetHandleCount();
  303. virtual CPoint GetHandle(int nHandle);
  304. virtual void MoveHandleTo(int nHandle, CPoint point);
  305. };
  306. //---------------------------------------------- CDrawMLine --------
  307. class CDrawMLine:public CDrawPoly
  308. {
  309. public:
  310. DECLARE_SERIAL(CDrawMLine);
  311. CDrawMLine();
  312. public:
  313. virtual CDrawObj* Clone(void);
  314. virtual void Draw(CDC* pDC);
  315. };
  316. //---------------------------------------------- CDrawArrow -------
  317. class CDrawArrow:public CDrawObj
  318. {
  319. public:
  320. DECLARE_SERIAL(CDrawArrow);
  321. CDrawArrow();
  322. public:
  323. virtual CDrawObj* Clone(void);
  324. virtual void Draw(CDC* pDC);
  325. void DrawArrow(CDC* pDC, CRect rect, BYTE Direction,COLORREF clrArrow );
  326. };
  327. //---------------------------------------------- CDrawButton ------
  328. class CDrawButton:public CDrawObj
  329. {
  330. public:
  331. DECLARE_SERIAL(CDrawButton);
  332. CDrawButton();
  333. public:
  334. virtual CDrawObj* Clone(void);
  335. virtual void Draw(CDC* pDC);
  336. };
  337. //---------------------------------------------- CDraw3dCircle ------
  338. class CDraw3dCircle:public CDrawObj
  339. {
  340. public:
  341. DECLARE_SERIAL(CDraw3dCircle);
  342. CDraw3dCircle();
  343. public:
  344. virtual CDrawObj* Clone(void);
  345. virtual void Draw(CDC* pDC);
  346. };
  347. //---------------------------------------------- CDrawBreaker ------
  348. class CDrawBreaker:public CDrawObj
  349. {
  350. public:
  351. DECLARE_SERIAL(CDrawBreaker);
  352. CDrawBreaker();
  353. public:
  354. virtual CDrawObj* Clone(void);
  355. virtual void Draw(CDC* pDC);
  356. };
  357. //---------------------------------------------- CDrawSwitch ------
  358. class CDrawSwitch:public CDrawObj
  359. {
  360. public:
  361. DECLARE_SERIAL(CDrawSwitch);
  362. CDrawSwitch();
  363. public:
  364. virtual CDrawObj* Clone(void);
  365. virtual void Draw(CDC* pDC);
  366. virtual void Serialize(CArchive& ar);
  367. virtual bool Fresh( CRect &RECT );
  368. virtual BOOL OnAttrib(CPropertySheet& sheet);
  369. public:
  370. BOOL m_bRun;
  371. CString m_strLogic;
  372. };
  373. //---------------------------------------------- CDrawGrid ------
  374. class CDrawGrid:public CDrawObj
  375. {
  376. public:
  377. DECLARE_SERIAL(CDrawGrid);
  378. CDrawGrid();
  379. public:
  380. virtual CDrawObj* Clone(void);
  381. virtual void Draw(CDC* pDC);
  382. };
  383. //---------------------------------------------- CDrawTable ------
  384. class CDrawTable:public CDrawObj
  385. {
  386. public:
  387. DECLARE_SERIAL(CDrawTable);
  388. CDrawTable();
  389. BOOL m_bAddAve;
  390. BOOL m_bAddMax;
  391. BOOL m_bAddMin;
  392. int m_nType;
  393. BOOL m_bShowRowHead;
  394. CColProList m_colList;
  395. public:
  396. CString GetColFormat(int col);
  397. virtual CDrawObj* Clone(void);
  398. virtual void Draw(CDC* pDC);
  399. virtual void Serialize(CArchive& ar);
  400. virtual BOOL OnAttrib(CPropertySheet& sheet);
  401. };
  402. //---------------------------------------------- CDrawPipe ------
  403. class CDrawPipe:public CDrawObj
  404. {
  405. public:
  406. DECLARE_SERIAL(CDrawPipe);
  407. CDrawPipe();
  408. public:
  409. virtual CDrawObj* Clone(void);
  410. virtual void Draw(CDC* pDC);
  411. };
  412. //---------------------------------------------- CDrawZhePipe ------
  413. class CDrawZhePipe:public CDrawObj
  414. {
  415. public:
  416. DECLARE_SERIAL(CDrawZhePipe);
  417. CDrawZhePipe();
  418. public:
  419. virtual CDrawObj* Clone(void);
  420. virtual void Draw(CDC* pDC);
  421. };
  422. //---------------------------------------------- CDrawYPipe ------
  423. class CDrawYPipe:public CDrawObj
  424. {
  425. public:
  426. DECLARE_SERIAL(CDrawYPipe);
  427. CDrawYPipe();
  428. public:
  429. virtual CDrawObj* Clone(void);
  430. virtual void Draw(CDC* pDC);
  431. };
  432. //---------------------------------------------- CDrawBitmap ------
  433. class CDrawBitmap:public CDrawObj
  434. {
  435. public:
  436. DECLARE_SERIAL(CDrawBitmap);
  437. CDrawBitmap();
  438. ~CDrawBitmap();
  439. CString m_strDynFile;
  440. CString m_strStaticFile;
  441. BOOL m_bStretch;
  442. BOOL m_bDyn;
  443. CString m_strDynCondition;
  444. BOOL m_bUseDnyFile;
  445. // GDI+
  446. ImageEx* m_image;
  447. CString m_sOldFilePath;
  448. public:
  449. virtual CDrawObj* Clone(void);
  450. virtual void Draw(CDC* pDC);
  451. virtual bool Fresh( CRect &RECT );
  452. virtual void Serialize(CArchive& ar);
  453. virtual BOOL OnAttrib(CPropertySheet& sheet);
  454. BOOL DisplayBMP(CDC* pDC,int nX1,int nY1,int nXX,int nYY,CString strBMPFile,BOOL bStretch);
  455. BOOL DisplayJPG(CDC* pDC,int nX1,int nY1,int nXX,int nYY,CString strJPGFile,BOOL bStretch);
  456. BOOL DisplayPNG(CDC* pDC,int nX1,int nY1,int nXX,int nYY,CString strJPGFile,BOOL bStretch);
  457. BOOL DisplayGIF(CDC* pDC,int nX1,int nY1,int nXX,int nYY,CString strJPGFile,BOOL bStretch);
  458. };
  459. //---------------------------------------------- CDrawGif ------
  460. class CDrawGif:public CDrawObj
  461. {
  462. public:
  463. DECLARE_SERIAL(CDrawGif);
  464. CDrawGif();
  465. ~CDrawGif();
  466. // GDI+
  467. ImageEx* m_image;
  468. CString m_strDynFile;
  469. CString m_strStaticFile;
  470. BOOL m_bStretch;
  471. BOOL m_bDyn;
  472. CString m_strDynCondition;
  473. BOOL m_bUseDnyFile;
  474. //CPicture m_Picture;
  475. public:
  476. virtual CDrawObj* Clone(void);
  477. virtual void Draw(CDC* pDC);
  478. virtual bool Fresh( CRect &RECT );
  479. virtual void Serialize(CArchive& ar);
  480. virtual BOOL OnAttrib(CPropertySheet& sheet);
  481. };
  482. //---------------------------------------------- CDrawTransfer ------
  483. class CDrawTransfer:public CDrawObj
  484. {
  485. public:
  486. DECLARE_SERIAL(CDrawTransfer);
  487. CDrawTransfer();
  488. public:
  489. virtual CDrawObj* Clone(void);
  490. virtual void Draw(CDC* pDC);
  491. void DrawCircle(CDC *pDC, POINT origin, int radius);
  492. };
  493. //---------------------------------------------- CDrawData ------
  494. class CDrawDatabox:public CDrawObj
  495. {
  496. public:
  497. DECLARE_SERIAL(CDrawDatabox);
  498. CDrawDatabox();
  499. public:
  500. int m_nFormat;
  501. void DrawText(CDC* pDC,CString& strText);
  502. public:
  503. virtual CDrawObj* Clone(void);
  504. virtual void Draw(CDC* pDC);
  505. virtual void Serialize(CArchive& ar);
  506. virtual BOOL OnAttrib(CPropertySheet& sheet);
  507. virtual bool Fresh( CRect &RECT );
  508. };
  509. //---------------------------------------------- CDrawWatch ------
  510. class CDrawWatch:public CDrawObj
  511. {
  512. public:
  513. DECLARE_SERIAL(CDrawWatch);
  514. CDrawWatch();
  515. int m_nLowwer;
  516. int m_nUpper;
  517. CString m_strVar;
  518. LONG m_lAspectN;
  519. LONG m_lAspectD;
  520. INT HorzRes;
  521. INT VertRes;
  522. protected:
  523. void DrawText(CDC* pDC,CString& strText);
  524. public:
  525. virtual CDrawObj* Clone(void);
  526. virtual void Draw(CDC* pDC);
  527. virtual void Serialize(CArchive& ar);
  528. virtual BOOL OnAttrib(CPropertySheet& sheet);
  529. void DrawFace(CDC* pDC);
  530. };
  531. //---------------------------------------------- CDrawSingleBar ------
  532. class CDrawSingleBar:public CDrawObj
  533. {
  534. public:
  535. DECLARE_SERIAL(CDrawSingleBar);
  536. CDrawSingleBar();
  537. protected:
  538. void DrawText(CDC* pDC,CString& strText);
  539. public:
  540. int m_nLowwer;
  541. int m_nUpper;
  542. float m_fValue;
  543. virtual CDrawObj* Clone(void);
  544. virtual void Draw(CDC* pDC);
  545. virtual BOOL OnAttrib(CPropertySheet& sheet);
  546. };
  547. //---------------------------------------------- CDrawBar ---------
  548. class CDrawBar:public CDrawObj
  549. {
  550. public:
  551. DECLARE_SERIAL(CDrawBar);
  552. CDrawBar();
  553. public:
  554. COLORREF m_clrBar1;
  555. COLORREF m_clrBar2;
  556. COLORREF m_clrBar3;
  557. int m_nLowwer;
  558. int m_nUpper;
  559. CString m_strVar1;
  560. CString m_strVar2;
  561. CString m_strVar3;
  562. int m_nValue1;
  563. int m_nValue2;
  564. int m_nValue3;
  565. public:
  566. int GetBarNum();
  567. virtual bool Fresh( CRect &RECT );
  568. virtual CDrawObj* Clone(void);
  569. virtual void Draw(CDC* pDC);
  570. virtual void Serialize(CArchive& ar);
  571. void DrawBar(CDC* pDC,int data,int x1,int x2,COLORREF clrBar);
  572. virtual BOOL OnAttrib(CPropertySheet& sheet);
  573. };
  574. //---------------------------------------------- CDrawCurve ---------
  575. class CDrawCurve:public CDrawObj
  576. {
  577. public:
  578. DECLARE_SERIAL(CDrawCurve);
  579. CDrawCurve();
  580. public:
  581. COLORREF m_clrCurve1;
  582. COLORREF m_clrCurve2;
  583. COLORREF m_clrCurve3;
  584. int m_nLowwer;
  585. int m_nUpper;
  586. CString m_strVar1;
  587. CString m_strVar2;
  588. CString m_strVar3;
  589. int m_nValue1[60];
  590. int m_nValue2[60];
  591. int m_nValue3[60];
  592. int m_nSecond;
  593. float m_fValue1;
  594. float m_fValue2;
  595. float m_fValue3;
  596. CString m_strVarDes1;
  597. CString m_strVarDes2;
  598. CString m_strVarDes3;
  599. int getMin( int iLowwer );
  600. int getMax( int iUpper );
  601. public:
  602. virtual bool Fresh( CRect &RECT );
  603. virtual CDrawObj* Clone(void);
  604. virtual void Draw(CDC* pDC);
  605. void DrawCurve(CDC* pDC, CRect rect, int* data, COLORREF color);
  606. virtual void Serialize(CArchive& ar);
  607. virtual BOOL OnAttrib(CPropertySheet& sheet);
  608. };
  609. //---------------------------------------------- CDrawHisCurve ---------
  610. class CDrawHisCurve:public CDrawObj
  611. {
  612. public:
  613. DECLARE_SERIAL(CDrawHisCurve);
  614. CDrawHisCurve();
  615. public:
  616. COLORREF m_clrCurve1;
  617. COLORREF m_clrCurve2;
  618. COLORREF m_clrCurve3;
  619. int m_nLowwer;
  620. int m_nUpper;
  621. CString m_strVar1;
  622. CString m_strVar2;
  623. CString m_strVar3;
  624. int m_nValue1[60];
  625. int m_nValue2[60];
  626. int m_nValue3[60];
  627. int m_nSecond;
  628. public:
  629. virtual bool Fresh( CRect &RECT );
  630. virtual CDrawObj* Clone(void);
  631. virtual void Draw(CDC* pDC);
  632. void DrawCurve(CDC* pDC, CRect rect, int* data, COLORREF color);
  633. virtual void Serialize(CArchive& ar);
  634. virtual BOOL OnAttrib(CPropertySheet& sheet);
  635. };
  636. //---------------------------------------------- CDrawOCX --------
  637. class CDrawOCX:public CDrawObj
  638. {
  639. public:
  640. DECLARE_SERIAL(CDrawOCX);
  641. CDrawOCX();
  642. CString m_strOcxPath;
  643. int m_nOcxIndex;
  644. public:
  645. virtual CDrawObj* Clone(void);
  646. virtual void Draw(CDC* pDC);
  647. virtual void DrawText(CDC* pDC);
  648. virtual BOOL OnAttrib(CPropertySheet& sheet);
  649. virtual void Serialize(CArchive& ar);
  650. virtual bool Fresh( CRect &RECT );
  651. };
  652. //---------------------------------------------- CDrawFlash --------
  653. class CDrawFlash:public CDrawObj
  654. {
  655. public:
  656. DECLARE_SERIAL(CDrawFlash);
  657. CDrawFlash();
  658. ~CDrawFlash();
  659. CShockwaveFlash *m_pCtrlFlash;
  660. CString m_strFlashPath;
  661. bool m_bFlashCreate;
  662. public:
  663. virtual CDrawObj* Clone(void);
  664. virtual void Draw(CDC* pDC);
  665. virtual void DrawText(CDC* pDC);
  666. virtual void Serialize(CArchive& ar);
  667. virtual BOOL OnAttrib(CPropertySheet& sheet);
  668. virtual bool Fresh( CRect &RECT );
  669. };
  670. #endif // !defined(AFX_CDRAWOBJ_H__4539C1EB_10FD_40B5_9BBC_22C008CEAF0F__INCLUDED_)