http://www.perlmonks.org?node_id=302304


in reply to Advice on writing GUI's in Perl

To answer Batkin's request for proof of speed comparion: I have no "proof" that gtk is faster other than my subjective impression of it. It seems to have "crisper" widget updates, if that makes any sense. The gtk libraries are more powerful than what you get from Tk.

As far as the gnome extension problem, you need to have the gnome libs installed if you use the gnome widgets. You don't need to run Gnome as your desktop, but it helps for full functionality of the gnome widgets. Otherwise just don't use the gnome widgets.

My favorite gtk library is the gtk-image-viewer at gtk-image-viewer

It allows mouse zooming and panning of images, try that with Tk (and the speed is smooth). Here is a little perl script to use it:

#!/usr/bin/perl ###################################################################### + # Simple image viewing application with mouse zoom and pan. ###################################################################### + use Gtk; use Gtk::ImageViewer; init Gtk; init Gtk::Gdk::Rgb; init Gtk::Gdk::Pixbuf; init Gtk::ImageViewer; if(@ARGV<1){print "Usage: imageview file\n";exit} $window = Gtk::Widget->new("GtkWindow", -type => "-toplevel", -title => "Image viewer", -delete_event => sub { print exit Gtk; } ); $image = Gtk::Widget->new("GtkImageViewer", -parent => $window, ); $file = shift; $pb = new_from_file Gtk::Gdk::Pixbuf($file); $image->set_image($pb); $window->show_all(); main Gtk;