Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Advice on writing GUI's in Perl

by zentara (Archbishop)
on Oct 27, 2003 at 01:17 UTC ( #302304=note: print w/replies, xml ) Need Help??


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;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://302304]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2023-03-23 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?