//---------------------------------------------------------------------------- // Laser Guard Ltd. // Copyright © 2000-2002. All Rights Reserved. // Version 1.0 01/01/2000 // Last modification: 08/10/2003 // PROJECT: // SUBSYSTEM: // FILE: Visual.h // AUTHOR: Sergey Chizhevskiy // OVERVIEW // ~~~~~~~~ // Header file of Visual.h //---------------------------------------------------------------------------- // Visual.h: interface for the CVisual class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_VISUAL_H__D4CFA2C5_7D9A_11D4_A1F0_0010B55CB330__INCLUDED_) #define AFX_VISUAL_H__D4CFA2C5_7D9A_11D4_A1F0_0010B55CB330__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "AuxLib.h" #include "..\..\LgLib\UIMap\LgUIMapObjectWnd.h" class CVisual : public CLgUIMapObject { public: CVisual(); virtual ~CVisual(); public: virtual CString& GetName() { return m_strName; } virtual void SetName( CString& name ) { m_strName = name; } virtual void GetStateString( CString& str ); virtual COLORREF GetStateColor( BOOL bInverse ); virtual BOOL GetBlinkState(); virtual void SetState( int nState ) { m_nState = nState; } virtual int GetState() { return m_nState; } virtual void Enable( BOOL bEnable ) { SetState( bEnable ? UNKNOWN : DISABLE ); } int GetType() { return m_nType; } void SetParam( int nIndex, LPARAM lParam ) { m_pParam[nIndex] = lParam; }; LPARAM GetParam( int nIndex ) { return m_pParam[nIndex]; }; SDPOINT& GetPosition() { return m_Position; } void SetPosition( SDPOINT position ) { m_Position = position; } public: static COLORREF GetStateColor( int nState, BOOL bInverse ); static LPCTSTR GetStateString( int nState ); public: virtual void Reset(); virtual BOOL Paint( CDC *pDC, CRect& viewRect, CSize& mapSize, SDPOINT& mapShift, double mapScale, BOOL bInverse, BOOL bBigSize, CRect *pUpdateRect = NULL ) { return FALSE; } virtual BOOL PaintBounds( CDC *pDC, CRect& viewRect, CSize& mapSize, SDPOINT& mapShift, double mapScale, BOOL bInverse, BOOL bBigSize, CRect *pUpdateRect ); enum{ UNKNOWN, NORMAL, DISABLE, TIMEOUT, POSTALARM, ALARM }; enum{ VISUAL, ZONE, LGS, DTR, DC, CLD }; protected: CBitmap *m_pBitmap; CString m_strName; INT m_nState; INT m_nType; LPARAM m_pParam[10]; SDPOINT m_Position; protected: // inherited from CLgMapObject virtual void OnUIMapDraw( CLgUIMapObjectWnd *pMap, CDC *pDC, BOOL bActive, BOOL bOddUpdate ); virtual void OnUIMapDrawBackground( CLgUIMapObjectWnd *pMap, CDC *pDC ); virtual BOOL OnUIMapHitTest( CLgUIMapObjectWnd *pMap, CLgDRect *pRect ); public: virtual void OnDrawBackground( CDC *pDC, CPoint center, double dMeterToPixelScale ); }; #endif // !defined(AFX_VISUAL_H__D4CFA2C5_7D9A_11D4_A1F0_0010B55CB330__INCLUDED_)