2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2009 Navit Team
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public License
7 * version 2 as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef NAVIT_LAYOUT_H
21 #define NAVIT_LAYOUT_H
27 enum { element_point, element_polyline, element_polygon, element_circle, element_text, element_icon, element_image, element_arrows } type;
31 struct element_point {
34 struct element_polyline {
39 unsigned char dash_table[4];
41 struct element_polygon {
44 struct element_circle {
47 struct color background_color;
56 struct color background_color;
65 struct range order,sequence_range,speed_range,angle_range;
79 struct range *sequence_range;
85 struct layout { char *name; char* dayname; char* nightname; char *font; struct color color; GList *layers; GList *cursors; int order_delta; int active; };
103 struct layout *layout_new(struct attr *parent, struct attr **attrs);
104 struct attr_iter *layout_attr_iter_new(void);
105 void layout_attr_iter_destroy(struct attr_iter *iter);
106 int layout_get_attr(struct layout *layout, enum attr_type type, struct attr *attr, struct attr_iter *iter);
107 int layout_add_attr(struct layout *layout, struct attr *attr);
108 struct cursor *layout_get_cursor(struct layout *this_, char *name);
109 struct cursor *cursor_new(struct attr *parent, struct attr **attrs);
110 void cursor_destroy(struct cursor *this_);
111 int cursor_add_attr(struct cursor *this_, struct attr *attr);
112 struct layer *layer_new(struct attr *parent, struct attr **attrs);
113 int layer_get_attr(struct layer *layer, enum attr_type type, struct attr *attr, struct attr_iter *iter);
114 int layer_add_attr(struct layer *layer, struct attr *attr);
115 int layer_set_attr(struct layer *layer, struct attr *attr);
116 struct itemgra *itemgra_new(struct attr *parent, struct attr **attrs);
117 int itemgra_add_attr(struct itemgra *itemgra, struct attr *attr);
118 struct polygon *polygon_new(struct attr *parent, struct attr **attrs);
119 struct polyline *polyline_new(struct attr *parent, struct attr **attrs);
120 struct circle *circle_new(struct attr *parent, struct attr **attrs);
121 struct text *text_new(struct attr *parent, struct attr **attrs);
122 struct icon *icon_new(struct attr *parent, struct attr **attrs);
123 struct image *image_new(struct attr *parent, struct attr **attrs);
124 struct arrows *arrows_new(struct attr *parent, struct attr **attrs);
125 int element_add_attr(struct element *e, struct attr *attr);
126 /* end of prototypes */