208.1.4
by Dr. Tilmann Bubeck
Add route-planning functionality |
1 |
#ifndef __ROUTE_H
|
2 |
#define __ROUTE_H
|
|
3 |
||
4 |
/**
|
|
5 |
* Clear the route.
|
|
6 |
*/
|
|
7 |
void
|
|
8 |
reset_route (); |
|
9 |
||
10 |
/**
|
|
11 |
* This function draws the current route on the screen.
|
|
12 |
*/
|
|
13 |
void
|
|
14 |
paint_route (); |
|
15 |
||
305
by Paul Wise
Remove trailing whitespace |
16 |
/**
|
208.1.4
by Dr. Tilmann Bubeck
Add route-planning functionality |
17 |
* Find the bounding box of the given GSList containin waypoints.
|
18 |
*/
|
|
19 |
bbox_t
|
|
20 |
get_way_bbox (GSList *ways); |
|
21 |
||
22 |
/**
|
|
23 |
* Append a new waypoint at the end of the route.
|
|
24 |
*/
|
|
305
by Paul Wise
Remove trailing whitespace |
25 |
void
|
208.1.4
by Dr. Tilmann Bubeck
Add route-planning functionality |
26 |
append_waypoint_to_route (double lat, double lon); |
27 |
||
28 |
/**
|
|
29 |
* Delete the given waypoint from the route.
|
|
30 |
*/
|
|
305
by Paul Wise
Remove trailing whitespace |
31 |
void
|
208.1.4
by Dr. Tilmann Bubeck
Add route-planning functionality |
32 |
delete_waypoint_of_route (waypoint_t *wp); |
33 |
||
34 |
/**
|
|
35 |
* Find the route waypoint which wp_icon is at the given mouse position.
|
|
36 |
* Return that waypoint or NULL if none was found.
|
|
37 |
*/
|
|
38 |
waypoint_t * |
|
39 |
find_routepoint (int mouse_x, int mouse_y); |
|
40 |
||
41 |
/**
|
|
42 |
* Change the position of the given waypoint to the new position.
|
|
43 |
*/
|
|
44 |
void
|
|
45 |
change_waypoint_of_route (waypoint_t *wp, double lat, double lon); |
|
46 |
||
47 |
/**
|
|
48 |
* Insert a new waypoint before the given waypoint. This waypoint lies
|
|
49 |
* between the given waypoint and the waypoint before this waypoint.
|
|
50 |
*/
|
|
51 |
void
|
|
52 |
insert_waypoint_before_of_route (waypoint_t *wp); |
|
53 |
||
208.1.6
by Dr. Tilmann Bubeck
Support saving and loading of planned routes in GPX 1.1 files. |
54 |
/**
|
55 |
* Save the route in GPX format to the given URI.
|
|
56 |
*/
|
|
57 |
void
|
|
58 |
save_route_as_gpx (const char *uri); |
|
59 |
||
60 |
/**
|
|
208.1.7
by Dr. Tilmann Bubeck
Support saving planned routes as TomTom ITN files. |
61 |
* Save a route to a TomTom ITN file format.
|
62 |
*/
|
|
63 |
void
|
|
64 |
save_route_as_tomtom_itn (const char *uri); |
|
65 |
||
66 |
/**
|
|
208.1.6
by Dr. Tilmann Bubeck
Support saving and loading of planned routes in GPX 1.1 files. |
67 |
* Load a route from a given GPX file.
|
68 |
*/
|
|
69 |
void
|
|
70 |
load_route (const char *filename); |
|
71 |
||
208.1.5
by Dr. Tilmann Bubeck
Add choose_load_file() and choose_save_file() utility functions |
72 |
char * |
73 |
choose_save_file (char *currentName); |
|
74 |
||
75 |
char * |
|
76 |
choose_load_file (); |
|
77 |
||
208.1.4
by Dr. Tilmann Bubeck
Add route-planning functionality |
78 |
#endif
|