ATTR(flags_house_number)
ATTR(use_camera)
ATTR(flags_graphics)
+ATTR(zoom_min)
+ATTR(zoom_max)
ATTR2(0x00027500,type_rel_abs_begin)
/* These attributes are int that can either hold relative *
* or absolute values. A relative value is indicated by *
int follow_cursor;
int prevTs;
int graphics_flags;
+ int zoom_min, zoom_max;
};
struct gui *main_loop_gui;
navit_scale(struct navit *this_, long scale, struct point *p, int draw)
{
struct coord c1, c2, *center;
+ if (scale < this_->zoom_min)
+ scale=this_->zoom_min;
+ if (scale > this_->zoom_max)
+ scale=this_->zoom_max;
if (p)
transform_reverse(this_->trans, p, &c1);
transform_set_scale(this_->trans, scale);
this_->autozoom_secs = 10;
this_->autozoom_min = 7;
this_->autozoom_active = 0;
+ this_->zoom_min = 1;
+ this_->zoom_max = 2097152;
this_->follow_cursor = 1;
this_->trans = transform_new();
if (attr_updated && !init)
navit_draw(this_);
break;
+ case attr_zoom_min:
+ attr_updated=(attr->u.num != this_->zoom_min);
+ this_->zoom_min=attr->u.num;
+ break;
+ case attr_zoom_max:
+ attr_updated=(attr->u.num != this_->zoom_max);
+ this_->zoom_max=attr->u.num;
+ break;
case attr_message:
navit_add_message(this_, attr->u.str);
break;