[Gllug] Toolkit to write graphical app in Perl?

Mark Fowler mark at twoshortplanks.com
Fri Jan 10 11:50:14 UTC 2003


On Thu, 9 Jan 2003, Rev Simon Rumble wrote:

> Does anyone have any ideas as to what toolkit would be ideal for this
> kind of application?  I want to write it in Perl.

As I understand it you're trying to write an application under X which
you're then going to display on your iPAQ.  If you want to write it in
Perl, on Linux, then your choice of toolkits are really Tk, Gtk (version
1, with experimental bindings for gtk2 just released), WxPerl and PerlQT.

You say you don't want to make it look like a GUI.  Well, then you can
either use one of the existing themeable guis (gtk for example) and select
a theme that doesn't look like a GUI, or to draw your components yourself.

A Tk::Canvas is pretty simple to use and will let you create simple vector
components that you can bind events to, so if you click on them they can
react.  You mention in another post that you don't want to do the remote
control from the iPAQ - but this might still be useful to flip the display
to show different info (similar to the way xmms switches between time into
a track and time remaining in a track)

This is suck a broad ranging topic I don't really know where to start.
I'd say that Tk is the simplest to use toolkit, and Gtk is what I'd use
for designing more complicated application as it is very tweakable.  One
advantage with Gtk is that you can use the Glade editor to slap
components together and then spit out simple Perl code or an XML file
Perl's Gtk module can read in order to build components for you.  WxPerl
is more suited to producing application that look native on the platform
its running on (not what you wanted at all.)  I've never used PerlQT.

I suggest you read the literature on the matter and have a think about
what is best suited both to your task and your programming style.

Perl & Tk has an O'Reilly book, and is also part of the Perl CD bookshelf

  http://www.oreilly.com/catalog/mastperltk/
  http://www.oreilly.com/catalog/perlcdbs3/

You can also simply read the module documentation pages

  http://search.cpan.org/author/NI-S/Tk-800.024/
  http://search.cpan.org/author/NI-S/Tk-800.024/pod/Canvas.pod

The best place to start with Perl and GTK is the excellent online tutorial

  http://personal.riverusers.com/~swilhelm/gtkperl-tutorial/

Hope that helps.  If you want more help, there's apparently mailing lists
for both of these

  http://lists.perl.org/showlist.cgi?name=ptk
  http://lists.perl.org/showlist.cgi?name=gtk-perl-list

Or of course you can always ask on London.pm for advice

  http://london.pm.org/
  http://london.pm.org/mailman/listinfo/london.pm

Good luck, let us know how it turns out.

Mark.

-- 
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, mark at twoshortplanks.com, http://twoshortplanks.com/};

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list