forked from alexgoussev/TrackProcessor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OSMTrackView.h
81 lines (73 loc) · 2.82 KB
/
OSMTrackView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//---------------------------------------------------------------------------
#ifndef OSMTrackViewH
#define OSMTrackViewH
#include "GPXData.h"
#include "OSMMap.h"
#include "Cells.h"
//---------------------------------------------------------------------------
struct TrackViewItem {
PGPXTrack pTrack;
Graphics::TBitmap *pBitmap;
TColor Color;
TCells *pCells;
};
typedef TrackViewItem* PTrackViewItem;
class TOSMTrackView : public TOSMMap
{
public:
__fastcall TOSMTrackView(double dMaxLat, double dMaxLong, double dMinLat, double dMinLong, TCanvas * pCanvas, eMapType eType, int nZoom, bool bNoMap);
__fastcall ~TOSMTrackView();
int __fastcall Add(PGPXTrack pTrack, TColor Color);
void __fastcall Delete(int i);
void __fastcall ShowTracks();
void __fastcall Paint(int nWidth, int nHeight);
void __fastcall Drag(int X, int Y);
void __fastcall DragEnd(int X, int Y);
void __fastcall Refresh();
void __fastcall SetCenter(double dCenterLat, double dCenterLong);
void __fastcall Reset(double dMaxLat, double dMaxLong, double dMinLat, double dMinLong);
void __fastcall ZoomIn();
void __fastcall ZoomOut();
void __fastcall Delete(PGPXTrack pTrack);
void __fastcall Redraw();
void __fastcall ClearTracks();
void __fastcall ZoomToFit();
void __fastcall DrawPoint(int i);
void __fastcall ClearPoint();
void __fastcall UpdateCanvas();
__property int Count = { read=GetCount };
__property int Topmost = { read=GetTopmost, write=SetTopmost };
__property PGPXTrack Tracks[int i] = { read=GetTrack };
__property Graphics::TBitmap * Bitmaps[int i] = { read=GetBitmaps };
__property TColor Color[int i] = { read=GetColor };
__property int PenWidth = { read=GetPenWidth, write=SetPenWidth };
__property PGPXTrack TopmostTrack = { read=GetTopmostTrack, write=SetTopmostTrack };
__property int CurrentPoint = { read=GetCurrentPoint, write=SetCurrentPoint };
__property int NearestPoint[int x][int y] = { read=GetNearestPoint };
protected:
TList * m_pTracks;
int m_nTopmost;
int m_nPenWidth;
int m_nCurrentPoint;
Graphics::TBitmap * m_pTrackPoint;
Graphics::TBitmap * m_pBkBitmap;
Graphics::TBitmap * __fastcall CreateBitmap(int nWidth, int nHeigth);
void __fastcall DrawTrack(PTrackViewItem pItem);
void __fastcall PaintTracks();
void __fastcall DrawBackground();
private:
int __fastcall GetCount();
void __fastcall SetTopmost(int value);
int __fastcall GetTopmost();
PGPXTrack __fastcall GetTrack(int i);
Graphics::TBitmap * __fastcall GetBitmaps(int i);
TColor __fastcall GetColor(int i);
void __fastcall SetPenWidth(int value);
int __fastcall GetPenWidth();
void __fastcall SetTopmostTrack(PGPXTrack value);
PGPXTrack __fastcall GetTopmostTrack();
void __fastcall SetCurrentPoint(int value);
int __fastcall GetCurrentPoint();
int __fastcall GetNearestPoint(int x, int y);
};
#endif