Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.9 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: Visual.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of Visual.h
  13. //----------------------------------------------------------------------------
  14. // Visual.h: interface for the CVisual class.
  15. //
  16. //////////////////////////////////////////////////////////////////////
  17. #if !defined(AFX_VISUAL_H__D4CFA2C5_7D9A_11D4_A1F0_0010B55CB330__INCLUDED_)
  18. #define AFX_VISUAL_H__D4CFA2C5_7D9A_11D4_A1F0_0010B55CB330__INCLUDED_
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. #include "AuxLib.h"
  23. #include "..\..\LgLib\UIMap\LgUIMapObjectWnd.h"
  24. class CVisual :
  25. public CLgUIMapObject
  26. {
  27. public:
  28. CVisual();
  29. virtual ~CVisual();
  30. public:
  31. virtual CString& GetName() { return m_strName; }
  32. virtual void SetName( CString& name ) { m_strName = name; }
  33. virtual void GetStateString( CString& str );
  34. virtual COLORREF GetStateColor( BOOL bInverse );
  35. virtual BOOL GetBlinkState();
  36. virtual void SetState( int nState ) { m_nState = nState; }
  37. virtual int GetState() { return m_nState; }
  38. virtual void Enable( BOOL bEnable ) { SetState( bEnable ? UNKNOWN : DISABLE ); }
  39. int GetType() { return m_nType; }
  40. void SetParam( int nIndex, LPARAM lParam ) { m_pParam[nIndex] = lParam; };
  41. LPARAM GetParam( int nIndex ) { return m_pParam[nIndex]; };
  42. SDPOINT& GetPosition() { return m_Position; }
  43. void SetPosition( SDPOINT position ) { m_Position = position; }
  44. public:
  45. static COLORREF GetStateColor( int nState, BOOL bInverse );
  46. static LPCTSTR GetStateString( int nState );
  47. public:
  48. virtual void Reset();
  49. virtual BOOL Paint( CDC *pDC, CRect& viewRect, CSize& mapSize, SDPOINT& mapShift, double mapScale, BOOL bInverse, BOOL bBigSize, CRect *pUpdateRect = NULL ) { return FALSE; }
  50. virtual BOOL PaintBounds( CDC *pDC, CRect& viewRect, CSize& mapSize, SDPOINT& mapShift, double mapScale, BOOL bInverse, BOOL bBigSize, CRect *pUpdateRect );
  51. enum{ UNKNOWN,
  52. NORMAL,
  53. DISABLE,
  54. TIMEOUT,
  55. POSTALARM,
  56. ALARM };
  57. enum{ VISUAL, ZONE, LGS, DTR, DC, CLD };
  58. protected:
  59. CBitmap *m_pBitmap;
  60. CString m_strName;
  61. INT m_nState;
  62. INT m_nType;
  63. LPARAM m_pParam[10];
  64. SDPOINT m_Position;
  65. protected:
  66. // inherited from CLgMapObject
  67. virtual void OnUIMapDraw( CLgUIMapObjectWnd *pMap, CDC *pDC, BOOL bActive, BOOL bOddUpdate );
  68. virtual void OnUIMapDrawBackground( CLgUIMapObjectWnd *pMap, CDC *pDC );
  69. virtual BOOL OnUIMapHitTest( CLgUIMapObjectWnd *pMap, CLgDRect *pRect );
  70. public:
  71. virtual void OnDrawBackground( CDC *pDC, CPoint center, double dMeterToPixelScale );
  72. };
  73. #endif // !defined(AFX_VISUAL_H__D4CFA2C5_7D9A_11D4_A1F0_0010B55CB330__INCLUDED_)