Re: imagmap

* 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

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.

Aristotle Pagaltzis // <>

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