-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmapview.h
51 lines (45 loc) · 1.28 KB
/
mapview.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
#include "SDL.h"
#include "map_index.h"
#include "map_render.h"
/*----------------------------------------------------------------------------*/
class MapView : public wxPanel
{
DECLARE_CLASS(MapView)
DECLARE_EVENT_TABLE()
private:
SDL_Surface *screen;
SDL_Surface *bg;
SDL_Surface* tile;
wxBitmap* position;
wxBitmap* radioOn;
wxBitmap* radioOff;
wxBitmap* point;
wxBitmap* pointnew;
long pen_x, pen_y, delta_x, delta_y, pressed;
int mapOn;
int ozexMapDX, ozexMapDY;
map_index* collection;
map_render* render;
void onPaint(wxPaintEvent &);
void onEraseBackground(wxEraseEvent &);
void onIdle(wxIdleEvent &);
void OnMouseDown( wxMouseEvent &event );
void OnMouseUp( wxMouseEvent &event );
void OnMouseMove( wxMouseEvent &event );
void Clear(void);
void DrawPosition(wxPaintDC &dc);
void DrawWaypoints(wxPaintDC &dc);
void DrawWpt(wxPaintDC &dc, int i, double center_lat, double center_lon);
void UpdateNearestWpt(wxPaintDC &dc, int k, int n, double nearest);
int FindWptByXyOnMap(long x, long y);
void EditWpt(int i);
public:
int isPressed();
void createScreen();
MapView(wxFrame *parent);
int isMapOn();
void mapOnOff();
wxSize getMapSize();
map_render* getMapRender();
~MapView();
};