//---------------------------------------------------------------------------- // Laser Guard Ltd. // Copyright © 2000-2002. All Rights Reserved. // Version 1.0 01/01/2000 // Last modification: 08/10/2003 // PROJECT: // SUBSYSTEM: // FILE: SetupLGSView.h // AUTHOR: Sergey Chizhevskiy // OVERVIEW // ~~~~~~~~ // Header file of SetupLGSView.h //---------------------------------------------------------------------------- // SetupLGSView.h : interface of the CSetupLGSView class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_SETUPLGSVIEW_H__063204DD_4E81_4FB0_B07A_D25989CADDED__INCLUDED_) #define AFX_SETUPLGSVIEW_H__063204DD_4E81_4FB0_B07A_D25989CADDED__INCLUDED_ #include "..\..\LgLib\MFC\MemoryDC.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class CSetupLGSView : public CScrollView { protected: // create from serialization only CSetupLGSView(); DECLARE_DYNCREATE(CSetupLGSView) // Attributes public: CSetupLGSDoc* GetDocument(); // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CSetupLGSView) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view protected: virtual void OnInitialUpdate(); // called first time after construct virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); //}}AFX_VIRTUAL // Implementation public: virtual ~CSetupLGSView(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: //{{AFX_MSG(CSetupLGSView) afx_msg void OnRButtonDown(UINT nFlags, CPoint point); afx_msg void OnObjectDelete(); afx_msg void OnObjectProperty(); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnLButtonUp(UINT nFlags, CPoint point); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg void OnLayerModeDevice() { m_nMode = VM_CAMERA; } afx_msg void OnUpdateLayerModeDevice(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_CAMERA ); } afx_msg void OnLayerModeVm8x4() { m_nMode = VM_VM8X4; } afx_msg void OnUpdateLayerModeVm8x4(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_VM8X4 ); } afx_msg void OnLayerModeCameraPtz() { m_nMode = VM_CAMERA_PTZ; } afx_msg void OnUpdateLayerModeCameraPtz(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_CAMERA_PTZ ); } afx_msg void OnLayerModeRabbit() { m_nMode = VM_RABBIT; } afx_msg void OnUpdateLayerModeRabbit(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_RABBIT ); } afx_msg void OnLayerModePci1762() { m_nMode = VM_PCI1762; } afx_msg void OnUpdateLayerModePci1762(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_PCI1762 ); } afx_msg void OnLayerModeSocket() { m_nMode = VM_SOCKET; } afx_msg void OnUpdateLayerModeSocket(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_SOCKET ); } afx_msg void OnLayerModeVideoIn() { m_nMode = VM_VIDEO_IN; } afx_msg void OnUpdateLayerModeVideoIn(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_VIDEO_IN ); } afx_msg void OnLayerModeDeviceMove() { m_nMode = VM_DEVICE_MOVE; } afx_msg void OnUpdateLayerModeDeviceMove(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_DEVICE_MOVE ); } afx_msg void OnLayerModeCameraRabbit() { m_nMode = VM_CAMERA_RABBIT; } afx_msg void OnUpdateLayerModeCameraRabbit(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_CAMERA_RABBIT ); } afx_msg void OnLayerModeLgs() { m_nMode = VM_LGS_MD; } afx_msg void OnUpdateLayerModeLgs(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_LGS_MD ); } afx_msg void OnLayerModeConnection() { m_nMode = VM_CONNECTION; } afx_msg void OnUpdateLayerModeConnection(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_CONNECTION ); } afx_msg void OnLayerModeDryContacts() { m_nMode = VM_DRY_CONTACTS; } afx_msg void OnUpdateLayerModeDryContacts(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_DRY_CONTACTS ); } afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnScaleIncrease(); afx_msg void OnScaleDecrease(); afx_msg void OnMapBackground(); afx_msg void OnEditTemplates(); afx_msg void OnLayerModeCld() { m_nMode = VM_CLD_MD; } afx_msg void OnUpdateLayerModeCld(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_CLD_MD ); } afx_msg void OnLayerModeSetScale() { m_nMode = VM_SET_SCALE; } afx_msg void OnUpdateLayerModeSetScale(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_SET_SCALE ); } afx_msg void OnLayerModeCameraLGS() { m_nMode = VM_CAMERA_LGS; } afx_msg void OnUpdateLayerModeCameraLGS(CCmdUI* pCmdUI) { pCmdUI->SetCheck( m_nMode==VM_CAMERA_LGS ); } afx_msg void OnToolsSettings(); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: void DevicePlace( int x, int y ); BOOL ConnectionEnd( int x, int y ); BOOL ConnectionBegin( int x, int y ); BOOL DeviceMoveEnd( int x, int y ); BOOL DeviceMoveBegin( int x, int y ); CLgMemoryDC m_MemDC; enum { VM_VM8X4, VM_CAMERA, VM_DRY_CONTACTS, VM_CAMERA_PTZ, VM_LGS_MD, VM_RABBIT, VM_CONNECTION, VM_SOCKET_LINE, VM_CAMERA_RABBIT, VM_SOCKET, VM_VIDEO_IN, VM_DEVICE_MOVE, VM_CLD_MD, VM_SET_SCALE, VM_CAMERA_LGS, VM_PCI1762 }; int m_nMode; // COFDevice *m_pDevice; BOOL m_bVideoLine; BOOL m_bSocketLine; BOOL m_bDeviceMove; enum { AO_NONE, AO_DEVICE, AO_CONNECTION }; struct ACTIVE { int nActive; COFDevice *pDevice; struct { COFPin *pPin1; COFPin *pPin2; }; }m_Active; double m_Scale; private: // real map scale setting BOOL m_bScaleLine; CLgDPoint m_ScalePoint; }; #ifndef _DEBUG inline CSetupLGSDoc* CSetupLGSView::GetDocument() { return (CSetupLGSDoc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_SETUPLGSVIEW_H__063204DD_4E81_4FB0_B07A_D25989CADDED__INCLUDED_)