git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3674
ffa7fe5e-494d-0410-b361-
a75ebd5db220
navit_scale(this_, scale, p, 1);
}
navit_scale(this_, scale, p, 1);
}
-static int
-navit_cmd_zoom_in(struct navit *this_)
+void
+navit_zoom_in_cursor(struct navit *this_, int factor)
{
struct point p;
if (this_->vehicle && this_->vehicle->follow_curr == 1 && navit_get_cursor_pnt(this_, &p, 0, NULL)) {
{
struct point p;
if (this_->vehicle && this_->vehicle->follow_curr == 1 && navit_get_cursor_pnt(this_, &p, 0, NULL)) {
- navit_zoom_in(this_, 2, &p);
+ navit_zoom_in(this_, factor, &p);
this_->vehicle->follow_curr=this_->vehicle->follow;
} else
this_->vehicle->follow_curr=this_->vehicle->follow;
} else
- navit_zoom_in(this_, 2, NULL);
- return 0;
+ navit_zoom_in(this_, factor, NULL);
-static int
-navit_cmd_zoom_out(struct navit *this_)
+void
+navit_zoom_out_cursor(struct navit *this_, int factor)
{
struct point p;
if (this_->vehicle && this_->vehicle->follow_curr == 1 && navit_get_cursor_pnt(this_, &p, 0, NULL)) {
{
struct point p;
if (this_->vehicle && this_->vehicle->follow_curr == 1 && navit_get_cursor_pnt(this_, &p, 0, NULL)) {
this_->vehicle->follow_curr=this_->vehicle->follow;
} else
navit_zoom_out(this_, 2, NULL);
this_->vehicle->follow_curr=this_->vehicle->follow;
} else
navit_zoom_out(this_, 2, NULL);
+}
+
+
+static int
+navit_cmd_zoom_in(struct navit *this_)
+{
+ navit_zoom_in_cursor(this_, 2);
+ return 0;
+}
+
+static int
+navit_cmd_zoom_out(struct navit *this_)
+{
+ navit_zoom_out_cursor(this_, 2);
void navit_handle_motion(struct navit *this_, struct point *p);
void navit_zoom_in(struct navit *this_, int factor, struct point *p);
void navit_zoom_out(struct navit *this_, int factor, struct point *p);
void navit_handle_motion(struct navit *this_, struct point *p);
void navit_zoom_in(struct navit *this_, int factor, struct point *p);
void navit_zoom_out(struct navit *this_, int factor, struct point *p);
+void navit_zoom_in_cursor(struct navit *this_, int factor);
+void navit_zoom_out_cursor(struct navit *this_, int factor);
struct navit *navit_new(struct attr *parent, struct attr **attrs);
void navit_add_message(struct navit *this_, char *message);
struct message *navit_get_messages(struct navit *this_);
struct navit *navit_new(struct attr *parent, struct attr **attrs);
void navit_add_message(struct navit *this_, char *message);
struct message *navit_get_messages(struct navit *this_);