Re: scratch that last one



On Thu, Jul 08, 1999 at 12:45:15PM -0400, Christopher T. Lansdown wrote:
> Hi,
> 	Ok, scratch my last question, it appears that the only signal
> relevant to what I'm looking for is a GdkEvent signal.  How, the API guide
> claims, "Each GnomeCanvasItem can receive mouse events, keyboard events,
> mouse-enter and mouse leave events. In addition a canvas item can grab the
> mouse (for example to implement reliable dragging of objects)."  Now, I
> looked through the GdkEvents that were in <gdk/gdktypes.h>, and I couldn't
> find any mouse-enter or mouse-leave events.  Is GdkEventCrossing the event
> that I'm looking for?  You get that, check the bounds of the canvasItem
> against the location of the mouse (converting coordinates, of course),
> then determine if it's an enter or leave event?  I'll assume so unless
> someone tells me something to the contrary.

What you do is that you gtk_signal_connect to the "event" signal, and
in your event handler, do a switch on event->type.  GDK_ENTER_NOTIFY
and GDK_LEAVE_NOTIFY are the cases you're looking for, and this is all
very much better explained in the Gnome Canvas chapter of "Gnome
Developer's Information", I wish I could give an URL but something's
wrong right now between me and www.gnome.org.

-- 
Simon Kågedal <simon@sdf.se> - Homepage: http://www.sdf.se/~simon/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]