Logo Search packages:      
Sourcecode: ygraph version File versions  Download package

gboolean plot_area_motion_notify_event ( GtkWidget *  plot_area,
GdkEventMotion *  event,
Plot plot 

Determine the location of the pointer.

This routine determines the location of the pointer whenever it has been moved. In the case that the right-button has been clicked (in which case plot->zoom_x_start will have been set) then it calls a routine to zoom the axes according to the pointer location.

plot_area The plot area widget.
event The calling event.
plot The Plot in question.
TRUE if successful, crash if not.

Definition at line 150 of file callbacks.c.

References plot_area_zoom_rectangle_draw(), and _Plot::zoom_x_start.

  GdkModifierType state;
  gint x;
  gint y;
  if (event->is_hint)
    gdk_window_get_pointer(event->window, &x, &y, &state);
      x = event->x;
      y = event->y;
      state = event->state;

  if ((state & GDK_BUTTON1_MASK)  && (plot->zoom_x_start != NO_ZOOM))
    plot_area_zoom_rectangle_draw(plot, x, y);

  return TRUE;

Generated by  Doxygen 1.6.0   Back to index