Re: Drawing Area and Mouse Events
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: JOSE PEDRO SERGIO ROMAO MACHADO <a15993 alunos det ua pt>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Drawing Area and Mouse Events
- Date: Thu, 10 Jun 2004 16:29:18 +0200
On Thu, Jun 10, 2004 at 03:15:59PM +0100, JOSE PEDRO SERGIO ROMAO MACHADO wrote:
I'm using gtk_window_new() and gtk_drawing_area_new()
functions to draw some pixbufs over a background.
Now I need to "click" with the mouse over this drawing
area, and I need to obtain the coordinates of the mouse
pointer at that spot to decide wich callback should I
call.
I think this kind of feature is not suported by GTK
itself. I'm I correct???
Just add mouse click event with
gtk_widget_add_event(widget, GDK_BUTTON_PRESS_MASK);
and you can then connect to "button_press_event" signal of
the widget.
Yeti
--
Do not use tab characters. Their effect is not predictable.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]