]> git.street.me.uk Git - andy/viking.git/blame - src/viktrwlayer.h
Fix spelling of visible.
[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,
0d2b891f
RN
44 VIK_TRW_LAYER_SUBLAYER_WAYPOINT,
45 VIK_TRW_LAYER_SUBLAYER_ROUTES,
46 VIK_TRW_LAYER_SUBLAYER_ROUTE
9748531a
RN
47};
48
50a14534
EB
49typedef struct _VikTrwLayerClass VikTrwLayerClass;
50struct _VikTrwLayerClass
51{
52 VikLayerClass object_class;
53};
54
55
56GType vik_trw_layer_get_type ();
57
58typedef struct _VikTrwLayer VikTrwLayer;
59
805d282e
EB
60/* These are meant for use in file loaders (gpspoint.c, gpx.c, etc).
61 * These copy the name, so you should free it if necessary. */
62void vik_trw_layer_filein_add_waypoint ( VikTrwLayer *vtl, gchar *name, VikWaypoint *wp );
63void vik_trw_layer_filein_add_track ( VikTrwLayer *vtl, gchar *name, VikTrack *tr );
64
04f36d92
RN
65gint vik_trw_layer_get_property_tracks_line_thickness ( VikTrwLayer *vtl );
66
50a14534
EB
67void vik_trw_layer_add_waypoint ( VikTrwLayer *vtl, gchar *name, VikWaypoint *wp );
68void vik_trw_layer_add_track ( VikTrwLayer *vtl, gchar *name, VikTrack *t );
0d2b891f 69void vik_trw_layer_add_route ( VikTrwLayer *vtl, gchar *name, VikTrack *t );
c9570f86 70
5c3dea7a
RN
71// Waypoint returned is the first one
72VikWaypoint *vik_trw_layer_get_waypoint ( VikTrwLayer *vtl, const gchar *name );
73
ce4bd1cf 74// Track returned is the first one
f7f8a0a6 75VikTrack *vik_trw_layer_get_track ( VikTrwLayer *vtl, const gchar *name );
ce4bd1cf 76gboolean vik_trw_layer_delete_track ( VikTrwLayer *vtl, VikTrack *trk );
0d2b891f 77gboolean vik_trw_layer_delete_route ( VikTrwLayer *vtl, VikTrack *trk );
50a14534 78
c5638216 79gboolean vik_trw_layer_auto_set_view ( VikTrwLayer *vtl, VikViewport *vvp );
50a14534
EB
80gboolean vik_trw_layer_find_center ( VikTrwLayer *vtl, VikCoord *dest );
81GHashTable *vik_trw_layer_get_tracks ( VikTrwLayer *l );
0d2b891f 82GHashTable *vik_trw_layer_get_routes ( VikTrwLayer *l );
50a14534 83GHashTable *vik_trw_layer_get_waypoints ( VikTrwLayer *l );
bec82ff5
RN
84gboolean vik_trw_layer_is_empty ( VikTrwLayer *vtl );
85
50a14534
EB
86gboolean vik_trw_layer_new_waypoint ( VikTrwLayer *vtl, GtkWindow *w, const VikCoord *def_coord );
87
88VikCoordMode vik_trw_layer_get_coord_mode ( VikTrwLayer *vtl );
89
073ede8c
RN
90gboolean vik_trw_layer_uniquify ( VikTrwLayer *vtl, VikLayersPanel *vlp );
91
700b0908 92void vik_trw_layer_delete_all_waypoints ( VikTrwLayer *vtl );
7bb60307 93void vik_trw_layer_delete_all_tracks ( VikTrwLayer *vtl );
0d2b891f 94void vik_trw_layer_delete_all_routes ( VikTrwLayer *vtl );
ce4bd1cf 95void trw_layer_cancel_tps_of_track ( VikTrwLayer *vtl, VikTrack *trk );
50a14534 96
98acb9a1
RN
97void vik_trw_layer_reset_waypoints ( VikTrwLayer *vtl );
98
ebebb610
RN
99// For creating a list of tracks with the corresponding layer it is in
100// (thus a selection of tracks may be from differing layers)
101typedef struct {
102 VikTrack *trk;
103 VikTrwLayer *vtl;
104} vik_trw_track_list_t;
105
b3eb3b98
RN
106/* Exposed Layer Interface function definitions */
107// Intended only for use by other trw_layer subwindows
108void trw_layer_verify_thumbnails ( VikTrwLayer *vtl, GtkWidget *vp );
9748531a
RN
109// Other functions only for use by other trw_layer subwindows
110gchar *trw_layer_new_unique_sublayer_name ( VikTrwLayer *vtl, gint sublayer_type, const gchar *name );
b3eb3b98 111
0082c2f6
RN
112gboolean vik_trw_layer_get_tracks_visibility ( VikTrwLayer *vtl );
113gboolean vik_trw_layer_get_routes_visibility ( VikTrwLayer *vtl );
114gboolean vik_trw_layer_get_waypoints_visibility ( VikTrwLayer *vtl );
115
b1453c16
RN
116void trw_layer_update_treeview ( VikTrwLayer *vtl, VikTrack *trk, gpointer *trk_id );
117
d6175f49
RN
118void trw_layer_dialog_shift ( VikTrwLayer *vtl, GtkWindow *dialog, VikCoord *coord, gboolean vertical );
119
722b5481
RN
120G_END_DECLS
121
50a14534 122#endif