-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathozex.h
64 lines (53 loc) · 1.11 KB
/
ozex.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
#ifndef __OZEX_H
#define OZEX_H
/*----------------------------------------------------------------------------*/
enum
{
IDF_FRAME = wxID_HIGHEST + 1,
IDP_PANEL,
IDP_ZOOMIN,
IDP_ZOOMOUT,
IDP_NEXTMAP,
IDP_PREVMAP,
IDP_TOOLS,
IDP_ADDPOINT,
IDP_LOADPOINTS,
IDP_POINTSLIST,
IDP_INFO,
IDP_NIGHT,
IDP_TARGET,
IDP_MAPONOFF,
IDP_PAGEUP,
IDP_PAGEDOWN
};
struct coords_t
{
double lat, lon;
int onPosition;
};
//FIXME: potential race condition
#define GET_ENV_INT(a,b) (getenv(a)?atoi(getenv(a)):(b))
#define GET_ENV_STR(a,b) (getenv(a)?getenv(a):(b))
#define GET_ENV_FLOAT(a,b) (getenv(a)?atof(getenv(a)):(b))
class MapWindow;
wxString format_dist(double distInM);
/*----------------------------------------------------------------------------*/
class SDLApp : public wxApp
{
DECLARE_CLASS(SDLApp)
private:
MapWindow *frame;
int gpsOn;
wpt_container* waypoints;
void setGpsOn(int);
public:
bool OnInit();
int OnRun();
int OnExit();
int isGpsOn();
wpt_container* getWaypoints();
void gpsOnOff();
coords_t readGps();
};
DECLARE_APP(SDLApp);
#endif