* Gábor Szabó <[EMAIL PROTECTED]> [2005-08-27 18:25]: > Is there a way to create a clickable imagemap in GTK+ > (preferably without Gnome so it can run on Windows as well)
Intercepting clicks on an image requires wrapping a GtkImage in GtkEventBox and handling the `clicked` signal of the EventBox. If you don’t have hundreds of different clickable spots and they’re all rectangular, you could simply use a suitable bunch of GtkEventBoxes. If you have many or non-rectangular clickable areas, you will use only a single EventBox covering the entire image, and then you must bust out the math and manually check whether the X/Y coordinates of the click fell into a clickable area. There is no easier solution than this. There should be, really, since it’s useful enough and requested frequently enough that having a stock tool for this in the box would be nice. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> _______________________________________________ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list