]> git.street.me.uk Git - andy/viking.git/blame - src/viktrwlayer.h
Restore Google Directions feature
[andy/viking.git] / src / viktrwlayer.h
CommitLineData
50a14534
EB
1/*
2 * viking -- GPS Data and Topo Analyzer, Explorer, and Manager
3 *
4 * Copyright (C) 2003-2005, Evan Battaglia <gtoevan@gmx.net>
a7cd93ac 5 * Copyright (c) 2011, Rob Norris <rw_norris@hotmail.com>
50a14534
EB
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22
23#ifndef _VIKING_TRWLAYER_H
24#define _VIKING_TRWLAYER_H
25
a25c4c50
GB
26#include "viklayer.h"
27#include "vikviewport.h"
28#include "vikwaypoint.h"
29#include "viktrack.h"
073ede8c 30#include "viklayerspanel.h"
a25c4c50 31
722b5481
RN
32G_BEGIN_DECLS
33
50a14534
EB
34#define VIK_TRW_LAYER_TYPE (vik_trw_layer_get_type ())
35#define VIK_TRW_LAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIK_TRW_LAYER_TYPE, VikTrwLayer))
36#define VIK_TRW_LAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIK_TRW_LAYER_TYPE, VikTrwLayerClass))
37#define IS_VIK_TRW_LAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIK_TRW_LAYER_TYPE))
38#define IS_VIK_TRW_LAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIK_TRW_LAYER_TYPE))
39
9748531a
RN
40enum {
41 VIK_TRW_LAYER_SUBLAYER_TRACKS,
42 VIK_TRW_LAYER_SUBLAYER_WAYPOINTS,
43 VIK_TRW_LAYER_SUBLAYER_TRACK,
44 VIK_TRW_LAYER_SUBLAYER_WAYPOINT
45};
46
50a14534
EB
47typedef struct _VikTrwLayerClass VikTrwLayerClass;
48struct _VikTrwLayerClass
49{
50 VikLayerClass object_class;
51};
52
53
54GType vik_trw_layer_get_type ();
55
56typedef struct _VikTrwLayer VikTrwLayer;
57
805d282e
EB
58/* These are meant for use in file loaders (gpspoint.c, gpx.c, etc).
59 * These copy the name, so you should free it if necessary. */
60void vik_trw_layer_filein_add_waypoint ( VikTrwLayer *vtl, gchar *name, VikWaypoint *wp );
61void vik_trw_layer_filein_add_track ( VikTrwLayer *vtl, gchar *name, VikTrack *tr );
62
04f36d92
RN
63gint vik_trw_layer_get_property_tracks_line_thickness ( VikTrwLayer *vtl );
64
50a14534
EB
65void vik_trw_layer_add_waypoint ( VikTrwLayer *vtl, gchar *name, VikWaypoint *wp );
66void vik_trw_layer_add_track ( VikTrwLayer *vtl, gchar *name, VikTrack *t );
c9570f86 67
5c3dea7a
RN
68// Waypoint returned is the first one
69VikWaypoint *vik_trw_layer_get_waypoint ( VikTrwLayer *vtl, const gchar *name );
70
ce4bd1cf 71// Track returned is the first one
f7f8a0a6 72VikTrack *vik_trw_layer_get_track ( VikTrwLayer *vtl, const gchar *name );
ce4bd1cf 73gboolean vik_trw_layer_delete_track ( VikTrwLayer *vtl, VikTrack *trk );
50a14534 74
c5638216 75gboolean vik_trw_layer_auto_set_view ( VikTrwLayer *vtl, VikViewport *vvp );
50a14534
EB
76gboolean vik_trw_layer_find_center ( VikTrwLayer *vtl, VikCoord *dest );
77GHashTable *vik_trw_layer_get_tracks ( VikTrwLayer *l );
78GHashTable *vik_trw_layer_get_waypoints ( VikTrwLayer *l );
50a14534
EB
79gboolean vik_trw_layer_new_waypoint ( VikTrwLayer *vtl, GtkWindow *w, const VikCoord *def_coord );
80
81VikCoordMode vik_trw_layer_get_coord_mode ( VikTrwLayer *vtl );
82
073ede8c
RN
83gboolean vik_trw_layer_uniquify ( VikTrwLayer *vtl, VikLayersPanel *vlp );
84
700b0908 85void vik_trw_layer_delete_all_waypoints ( VikTrwLayer *vtl );
7bb60307 86void vik_trw_layer_delete_all_tracks ( VikTrwLayer *vtl );
ce4bd1cf 87void trw_layer_cancel_tps_of_track ( VikTrwLayer *vtl, VikTrack *trk );
50a14534 88
b3eb3b98
RN
89/* Exposed Layer Interface function definitions */
90// Intended only for use by other trw_layer subwindows
91void trw_layer_verify_thumbnails ( VikTrwLayer *vtl, GtkWidget *vp );
9748531a
RN
92// Other functions only for use by other trw_layer subwindows
93gchar *trw_layer_new_unique_sublayer_name ( VikTrwLayer *vtl, gint sublayer_type, const gchar *name );
b3eb3b98 94
722b5481
RN
95G_END_DECLS
96
50a14534 97#endif