Parent Directory | Revision Log
Initial import
1 | harbaum | 1 | /* |
2 | * Copyright (C) 2008 Till Harbaum <till@harbaum.org>. | ||
3 | * | ||
4 | * This file is part of OSM2Go. | ||
5 | * | ||
6 | * OSM2Go is free software: you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation, either version 3 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * OSM2Go is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with OSM2Go. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | #ifndef STYLE_H | ||
21 | #define STYLE_H | ||
22 | |||
23 | typedef struct style_s { | ||
24 | icon_t **iconP; // pointer to global list of icons | ||
25 | char *name; | ||
26 | |||
27 | struct { | ||
28 | gboolean enable; | ||
29 | float scale; // how big the icon is drawn | ||
30 | char *path_prefix; | ||
31 | } icon; | ||
32 | |||
33 | struct { | ||
34 | elemstyle_color_t color; | ||
35 | elemstyle_color_t gps_color; | ||
36 | float width; | ||
37 | } track; | ||
38 | |||
39 | struct { | ||
40 | elemstyle_color_t color; | ||
41 | float width; | ||
42 | float zoom_max; | ||
43 | } way; | ||
44 | |||
45 | struct { | ||
46 | gboolean has_border_color; | ||
47 | elemstyle_color_t border_color; | ||
48 | float border_width; | ||
49 | gint opaque; | ||
50 | float zoom_max; | ||
51 | } area; | ||
52 | |||
53 | struct { | ||
54 | float mult; | ||
55 | gint opaque; | ||
56 | |||
57 | struct { | ||
58 | gboolean present; | ||
59 | float width; | ||
60 | elemstyle_color_t color; | ||
61 | } border; | ||
62 | } frisket; | ||
63 | |||
64 | struct { | ||
65 | gboolean has_fill_color; // not filled if no color is set | ||
66 | float radius, border_radius; | ||
67 | elemstyle_color_t fill_color, color; | ||
68 | gboolean show_untagged; | ||
69 | float zoom_max; | ||
70 | } node; | ||
71 | |||
72 | struct { | ||
73 | elemstyle_color_t color, node_color, touch_color, arrow_color; | ||
74 | float width, arrow_limit; | ||
75 | } highlight; | ||
76 | |||
77 | struct { | ||
78 | elemstyle_color_t color; | ||
79 | } background; | ||
80 | |||
81 | union { | ||
82 | char *elemstyles_filename; | ||
83 | elemstyle_t *elemstyles; | ||
84 | }; | ||
85 | } style_t; | ||
86 | |||
87 | style_t *style_load(appdata_t *appdata, char *name); | ||
88 | void style_free(style_t *style); | ||
89 | void style_select(GtkWidget *parent, appdata_t *appdata); | ||
90 | |||
91 | #endif // STYLE_H |