navit  0.5.1-trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups
Go to the documentation of this file.
20 #ifndef NAVIT_LAYOUT_H
21 #define NAVIT_LAYOUT_H
23 #include "item.h"
24 #include "color.h"
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
31 struct element {
33  struct color color;
34  int text_size;
35  union {
36  struct element_point {
37  char stub;
38  } point;
39  struct element_polyline {
40  int width;
41  int directed;
42  int dash_num;
43  int offset;
44  unsigned char dash_table[4];
45  } polyline;
46  struct element_polygon {
47  char stub;
48  } polygon;
49  struct element_circle {
50  int width;
51  int radius;
53  } circle;
54  struct element_icon {
55  char *src;
56  int width;
57  int height;
58  int rotation;
59  int x;
60  int y;
61  } icon;
62  struct element_text {
63  struct color background_color;
64  } text;
65  } u;
67  struct coord *coord;
68 };
71 struct itemgra {
72  struct range order,sequence_range,speed_range,angle_range;
75 };
77 struct layer {
79  struct navit *navit;
80  char *name;
81  int details;
83  int active;
84  struct layer *ref;
85 };
87 struct cursor {
88  struct attr **attrs;
90  char *name;
91  int w,h;
92  int interval;
93 };
95 struct layout {
97  struct navit *navit;
98  char *name;
99  char* dayname;
100  char* nightname;
101  char *font;
102  struct color color;
106  int active;
107 };
109 /* prototypes */
110 enum attr_type;
111 struct arrows;
112 struct attr;
113 struct attr_iter;
114 struct circle;
115 struct cursor;
116 struct element;
117 struct icon;
118 struct image;
119 struct itemgra;
120 struct layer;
121 struct layout;
122 struct polygon;
123 struct polyline;
124 struct text;
125 struct layout *layout_new(struct attr *parent, struct attr **attrs);
126 struct attr_iter *layout_attr_iter_new(void);
128 int layout_get_attr(struct layout *layout, enum attr_type type, struct attr *attr, struct attr_iter *iter);
129 int layout_add_attr(struct layout *layout, struct attr *attr);
130 struct cursor *layout_get_cursor(struct layout *this_, char *name);
131 struct cursor *cursor_new(struct attr *parent, struct attr **attrs);
132 void cursor_destroy(struct cursor *this_);
133 int cursor_add_attr(struct cursor *this_, struct attr *attr);
134 struct layer *layer_new(struct attr *parent, struct attr **attrs);
135 int layer_get_attr(struct layer *layer, enum attr_type type, struct attr *attr, struct attr_iter *iter);
136 int layer_add_attr(struct layer *layer, struct attr *attr);
137 int layer_set_attr(struct layer *layer, struct attr *attr);
138 struct itemgra *itemgra_new(struct attr *parent, struct attr **attrs);
139 int itemgra_add_attr(struct itemgra *itemgra, struct attr *attr);
140 struct polygon *polygon_new(struct attr *parent, struct attr **attrs);
141 struct polyline *polyline_new(struct attr *parent, struct attr **attrs);
142 struct circle *circle_new(struct attr *parent, struct attr **attrs);
143 struct text *text_new(struct attr *parent, struct attr **attrs);
144 struct icon *icon_new(struct attr *parent, struct attr **attrs);
145 struct image *image_new(struct attr *parent, struct attr **attrs);
146 struct arrows *arrows_new(struct attr *parent, struct attr **attrs);
147 int element_add_attr(struct element *e, struct attr *attr);
148 /* end of prototypes */
150 #ifdef __cplusplus
151 }
152 #endif
154 #endif
Definition: attr.h:34
Definition: layout.h:32
int w
Definition: layout.h:91
int layer_get_attr(struct layer *layer, enum attr_type type, struct attr *attr, struct attr_iter *iter)
Definition: layout.c:279
struct polygon * polygon_new(struct attr *parent, struct attr **attrs)
Definition: layout.c:450
int height
Definition: layout.h:57
int active
Definition: layout.h:83
char * name
Definition: layout.h:80
struct color background_color
Definition: layout.h:52
int y
Definition: layout.h:60
int layout_add_attr(struct layout *layout, struct attr *attr)
Definition: layout.c:123
Definition: gpx2navit_txt.h:51
int active
Definition: layout.h:106
NAVIT_OBJECT struct navit * navit
Definition: layout.h:97
enum element::@2 type
int cursor_add_attr(struct cursor *this_, struct attr *attr)
Definition: layout.c:207
Definition: graphics.c:1288
struct range * sequence_range
Definition: layout.h:89
Definition: color.h:23
void cursor_destroy(struct cursor *this_)
Definition: layout.c:198
GList * cursors
Definition: layout.h:104
struct cursor * cursor_new(struct attr *parent, struct attr **attrs)
Definition: layout.c:165
union element::@3 u
Definition: xmlconfig.h:119
int interval
Definition: layout.h:92
struct element::@3::element_circle circle
int coord_count
Definition: layout.h:66
char * name
Definition: layout.h:90
int width
Definition: layout.h:40
char * dayname
Definition: layout.h:99
struct element::@3::element_point point
struct itemgra * itemgra_new(struct attr *parent, struct attr **attrs)
Definition: layout.c:320
struct polyline * polyline_new(struct attr *parent, struct attr **attrs)
Definition: layout.c:460
struct attr ** attrs
Definition: layout.h:88
struct arrows * arrows_new(struct attr *parent, struct attr **attrs)
Definition: layout.c:554
int rotation
Definition: layout.h:58
struct coord * coord
Definition: layout.h:67
GList * elements
Definition: layout.h:74
Definition: layout.h:31
struct layer * layer_new(struct attr *parent, struct attr **attrs)
Definition: layout.c:259
struct element::@3::element_text text
char * src
Definition: layout.h:55
GList * layers
Definition: layout.h:103
NAVIT_OBJECT struct navit * navit
Definition: layout.h:79
struct circle * circle_new(struct attr *parent, struct attr **attrs)
Definition: layout.c:474
Definition: layout.h:32
struct icon * icon_new(struct attr *parent, struct attr **attrs)
Definition: layout.c:510
GList * type
Definition: layout.h:73
int dash_num
Definition: layout.h:42
char * font
Definition: layout.h:101
struct range order sequence_range speed_range angle_range
Definition: layout.h:72
Definition: layout.h:32
int element_add_attr(struct element *e, struct attr *attr)
Definition: layout.c:562
Definition: layout.h:32
int layer_set_attr(struct layer *layer, struct attr *attr)
Definition: layout.c:310
char stub
Definition: layout.h:37
Definition: config_.c:47
Definition: layout.h:87
int details
Definition: layout.h:81
Definition: layout.h:32
Definition: attr.h:152
void layout_attr_iter_destroy(struct attr_iter *iter)
Definition: layout.c:72
int directed
Definition: layout.h:41
Definition: attr.h:156
struct attr_iter * layout_attr_iter_new(void)
Definition: layout.c:68
int radius
Definition: layout.h:51
int text_size
Definition: layout.h:34
int layout_get_attr(struct layout *layout, enum attr_type type, struct attr *attr, struct attr_iter *iter)
Definition: layout.c:76
int itemgra_add_attr(struct itemgra *itemgra, struct attr *attr)
Definition: layout.c:359
Definition: layout.h:32
Definition: layout.h:71
struct element::@3::element_polyline polyline
int order_delta
Definition: layout.h:105
struct layout * layout_new(struct attr *parent, struct attr **attrs)
Definition: layout.c:30
Definition: layout.h:32
struct text * text_new(struct attr *parent, struct attr **attrs)
Definition: layout.c:493
struct cursor * layout_get_cursor(struct layout *this_, char *name)
Definition: layout.c:147
struct element::@3::element_polygon polygon
int layer_add_attr(struct layer *layer, struct attr *attr)
Definition: layout.c:300
char * nightname
Definition: layout.h:100
struct element::@3::element_icon icon
char type[3]
Definition: garmin_img.c:123
Definition: coord.h:34
char name[0]
Definition: street.c:496
int x
Definition: layout.h:59
Definition: navit.c:111
int offset
Definition: layout.h:43
GList * itemgras
Definition: layout.h:82
void * iter
Definition: config_.c:48
struct image * image_new(struct attr *parent, struct attr **attrs)
Definition: layout.c:544
unsigned char dash_table[4]
Definition: layout.h:44
Definition: layout.h:32
int h
Definition: layout.h:91
struct layer * ref
Definition: layout.h:84
Definition: layout.h:77
Definition: layout.h:95
char * name
Definition: layout.h:98