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.
146 lines
3.7 KiB
146 lines
3.7 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: LgsRadar.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of LgsRadar.h
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __LGS__RADAR__H__INCLUDED__
|
|
#define __LGS__RADAR__H__INCLUDED__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
#include "GenericWnd.h"
|
|
#include "EventQueue.h"
|
|
#include "Profile.h"
|
|
#include "..\LgLib\LgImageDIB.h"
|
|
#include "..\LgLib\Device\LgDeviceLGS.h"
|
|
#include "LgMemoryDC.h"
|
|
#include "LgsStateWnd.h"
|
|
|
|
class CApplication;
|
|
|
|
class CLgsRadarWnd :
|
|
public CGenericWnd
|
|
{
|
|
public:
|
|
CLgsRadarWnd();
|
|
virtual ~CLgsRadarWnd();
|
|
|
|
public:
|
|
virtual BOOL Create( HWND, RECT rect, CApplication *pApplication, BOOL bDebugMode );
|
|
|
|
public:
|
|
void AddTarget( const TARGET_DESCRIPTION& td );
|
|
void LoadBitmaps( CProfile *pProfile );
|
|
BOOL StoreImage( LPCTSTR pPathName );
|
|
void DrawFixedVideo( HDC hDC, RECT& rect, double scale );
|
|
void DrawProgress( LPCTSTR pText, INT nSize, BOOL bHZ );
|
|
void Reset();
|
|
|
|
BOOL Show( BOOL bShow ) { return ShowWindow( bShow ? SW_SHOW : SW_HIDE ); }
|
|
BOOL GetBitmap( CLgImageDIB *pDIB );
|
|
|
|
void SetScale( INT n );
|
|
void SetHzEditorMode( bool fEditor );
|
|
void SetHzEnable( INT nType, BOOL bEnable );
|
|
void SetHzEditType( INT nType ) { m_Type = nType; }
|
|
|
|
CLgsStateWnd& GetIndicator() { return m_LgsStateWnd; }
|
|
|
|
CLgDeviceLGS::LGS_HZ_ARRAY& GetHiddenZones( BOOL bTemp = FALSE ) { return bTemp ? m_TempHzArray : m_HzArray; }
|
|
|
|
BOOL SetDoplerMask( CLgDeviceDopler::PDOPLER_MASK_ARRAY );
|
|
|
|
protected:
|
|
virtual LRESULT OnSize( WPARAM, LPARAM );
|
|
virtual LRESULT OnPaint( WPARAM, LPARAM );
|
|
virtual LRESULT OnMouseMove( WPARAM, LPARAM );
|
|
virtual LRESULT OnLButtonDown( WPARAM, LPARAM );
|
|
virtual LRESULT OnRButtonDown( WPARAM, LPARAM );
|
|
virtual LRESULT OnDestroy( WPARAM, LPARAM );
|
|
|
|
virtual LRESULT OnLgsSetHzData( WPARAM, LPARAM );
|
|
virtual LRESULT OnLgsGetHzData( WPARAM, LPARAM );
|
|
virtual LRESULT OnLgsHzDataProgress( WPARAM, LPARAM );
|
|
|
|
virtual LRESULT OnLgsNotifyReset( WPARAM, LPARAM );
|
|
virtual LRESULT OnLgsNotifyConnect( WPARAM, LPARAM );
|
|
virtual LRESULT OnLgsNotifyCommandError( WPARAM, LPARAM );
|
|
|
|
virtual LRESULT WindowProc( UINT, WPARAM, LPARAM );
|
|
|
|
private:
|
|
enum { PLANE_COUNT = 4, PLANE_WORK = 3 };
|
|
CLgMemoryDC m_pDC[PLANE_COUNT];
|
|
|
|
private:
|
|
double m_Range;
|
|
BOOL m_bDebugMode;
|
|
BOOL m_bEditorMode;
|
|
INT m_Scale;
|
|
INT m_Type;
|
|
HCURSOR m_hCursorNormal;
|
|
HCURSOR m_hCursorEdit;
|
|
HFONT m_hFont;
|
|
|
|
private:
|
|
void UpdatePlaneWork();
|
|
|
|
private:
|
|
void DrawDoplerMask( HDC hDC, RECT &rect );
|
|
|
|
private:
|
|
void UpdateLgsHz();
|
|
void DrawPolygons( HDC hDC, RECT &rect );
|
|
void OnHzEnable( INT nType, BOOL bOn );
|
|
|
|
private:
|
|
CLgsStateWnd m_LgsStateWnd;
|
|
|
|
private:
|
|
CLgMemoryDC m_pBaseDC[PLANE_COUNT];
|
|
CLgCriticalSection m_LockWorkDC;
|
|
|
|
private:
|
|
static const double c_pScale[];
|
|
|
|
private:
|
|
CLgDeviceDopler::DOPLER_MASK_ARRAY m_DoplerMask;
|
|
CLgDeviceDopler::DOPLER_MASK_ARRAY m_TempDoplerMask;
|
|
|
|
private:
|
|
BOOL m_bDoplerStartPoint;
|
|
BOOL m_bDoplerInProgress;
|
|
BOOL m_bChangedDopler;
|
|
POINT m_DoplerStartPoint;
|
|
double m_dDoplerStartAngle;
|
|
|
|
private:
|
|
CLgDeviceLGS::LGS_HZ_POLYGON m_TempHzPolygon;
|
|
CLgDeviceLGS::LGS_HZ_ARRAY m_TempHzArray;
|
|
CLgDeviceLGS::LGS_HZ_ARRAY m_HzArray;
|
|
|
|
private:
|
|
enum { MAX_HZ_TYPES = 5 };
|
|
BOOL m_pPendingHzState[MAX_HZ_TYPES];
|
|
BOOL m_bPendingHz;
|
|
BOOL m_bPendingHzInProgress;
|
|
BOOL m_bChangedHz;
|
|
|
|
private:
|
|
BOOL m_bSwitchSkip;
|
|
|
|
private:
|
|
CApplication *m_pApplication;
|
|
};
|
|
|
|
#endif
|