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.
 
 
 
 
 

92 lines
2.4 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: LgUIMapWnd.h
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Header file of LgUIMapWnd.h
//----------------------------------------------------------------------------
#ifndef __LG__MAP__WND__H__INCLUDED__
#define __LG__MAP__WND__H__INCLUDED__
#if _MSC_VER > 1000
#pragma once
#endif
#include "..\LgAux.h"
#include "LgUIMapBackgroundThread.h"
class CLgUIMapWnd :
public CWnd
{
public:
CLgUIMapWnd();
public:
const double GetScale() const { return m_dScale; }
const CLgDPoint& GetShift() const { return m_dpShift; }
public:
void SetScale( double dScale, CLgDPoint *pPoint = NULL );
void SetShift( CLgDPoint dpShift ) { m_dpShift = dpShift; OnChangeViewParams(); }
void SetCenter( CLgDPoint *pDPoint );
void SetMeterScale( double dScale );
public:
//{{AFX_VIRTUAL(CLgUIMapWnd)
//}}AFX_VIRTUAL
public:
void FitAreaToWindow();
BOOL Create( CWnd *pParentWnd, CLgUIMapBackground *pBackground, int x, int y, int nWidth, int nHeight );
virtual ~CLgUIMapWnd();
protected:
//{{AFX_MSG(CLgUIMapWnd)
afx_msg void OnPaint();
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
afx_msg LRESULT OnWmBackgroundDrawThread( WPARAM, LPARAM );
DECLARE_MESSAGE_MAP()
protected:
virtual void OnDraw( CDC *pDC );
virtual void OnDrawBackground( CDC *pDC );
virtual void OnChangeViewParams();
public:
CRect GetFitFrame();
CLgDPoint WindowToArea( CPoint* pPoint );
CLgDSize WindowToArea( CSize* pSize );
CLgDRect WindowToArea( CRect* pRect );
CPoint AreaToWindow( CLgDPoint* pDPoint );
CSize AreaToWindow( CLgDSize* pDSize );
CRect AreaToWindow( CLgDRect* pRect );
public:
CLgDSize MeterToArea( CLgDSize* pDSize );
CLgDSize AreaToMeter( CLgDSize* pDSize );
CLgDPoint MeterToArea( CLgDPoint* pDPoint );
CLgDPoint AreaToMeter( CLgDPoint* pDPoint );
CLgDRect MeterToArea( CLgDRect* pDRect );
CLgDRect AreaToMeter( CLgDRect* pDRect );
double GetMeterToPixelScale();
protected:
CLgUIMapBackgroundThread m_BackgroundDrawThread;
CLgMemoryDC m_BackgroundDC;
CLgDPoint m_dpShift;
double m_dScale;
double m_dMeterScale;
};
//{{AFX_INSERT_LOCATION}}
#endif