Re: "changed" signal




On Mar 6, 2005, at 3:51 AM, Ari Jolma wrote:

The custom widget inherits from ScrolledWindow and contains an EventBox, which contains the Image. A strange thing is that I can hook up to button_press-event and motion_notify_event of the EventBox, but I need to connect the key_press_event to $self (ScrolledWindow) to catch it.

This is usually because either the widget is not set up to accept key press events or focus, or is not the currently focused widget in the window.


Anyway the widget seems to work now. The code is public (it is already now in cvs.sourceforge.net:/cvsroot/libral as Gtk2-Geo-Raster) it could be of interest also outside my use with Geo-Raster (which is also in sourceforge and in CPAN), with normal image files.

Excellent.

Maybe such widget already exists, I did not check, I have to admit.

Dov Grobgeld has perl bindings for a C image viewer widget that does most of what it sounds like you want:

    http://imagic.weizmann.ac.il/~dov/freesw/gtk/gtk-image-viewer/

It's natively scrollable (e.g., just add it to a Gtk2::ScrolledWindow) and handles zooming and panning.

--
"Quit hittin' yourself!  Quit hittin' yourself!"
   -- Elysse, playing with a newborn baby.




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