[gtkada] Scaling and wheeling

ThAnJuZo thanjuzo at free.fr
Mon Dec 13 00:54:07 CET 2004


Hi,

probably 100% GTK questions, but as I am using th GtkAda interface :

1) How one can catch mouse wheel events ?
I managed to use button press, motion, etc, but can't use the wheel.
gdk-events.ads contains a Scroll_Event, related to mouse wheel, but it 
does not work here (GTK+2.4, GtkAda 2.2).
It is possible : my eyes have seen a scrolled window (of my own, from 
GtkAda) adjusting its V-scrollbar when moving the wheel.

2) What is the standard way of displaying a large image in a small 
zoomable window ?
I currently use a scrolled window containing a drawing area, and an 
internal pixbuf to hold the image. The scroll works, but how may I zoom 
(in and out) ?
Is there a widget ready made for that ?
I plan to use pixbuf scaling to do that, I was wondering about 
efficiency of scaling inside expose event, but it seems to be fast.

--
Thierry Bernier





More information about the gtkada mailing list