[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: imagmap
- From: "A. Pagaltzis" <pagaltzis gmx de>
- To: GTK2-Perl List <gtk-perl-list gnome org>
- Subject: Re: imagmap
- Date: Sat, 27 Aug 2005 20:58:34 +0200
* Gábor Szabó <szabgab gmail com> [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/>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]