tags:

views:

108

answers:

2

I'm working on a couple of personal project to improve my Perl skills. Among other things they need to provide a GUI interface on different OSes. In the past what little GUI work I did on Perl used TK (and that was just working through some sample projects). I know that beyond TK, Qt and GTK are also options.

Are there others?

Among the available options, what do you recommend for this purpose. Right now I'm leaning towards GTK as an Ubuntu user but I'm wondering if Qt might not be a better choice for cross platform work with Windows.

+7  A: 

I would suggest Wx. It is a meta-toolkit designed for cross platform usage and will use whatever underlying toolkit is available on your target platform.

Chas. Owens
Very interesting...I seem to remember having read about 'Wx' and filing it away. I will definitely look at it for these projects.
HerbN
It would be nice it Wx worked everywhere though. I've never had luck compiling it on Mac OS X, and resorting to various ports leads to yucky library conflicts.
brian d foy
+4  A: 

I've been writing the module XUL::Gui which uses Firefox or XULRunner to render its gui. Both of those are cross platform (and use native styling). Gui's are constructed using a functional form of the XUL and HTML markup languages with CSS styling. The module is still in development, but may be complete enough for your needs. Here is a short example:

use XUL::Gui;

display Window title => 'my window',
    H2('event handling example:'),
    Button(
        label => 'click me',
        oncommand => sub {
            my ($self, $event) = @_;

            $self->label = 'ouch!';
        }
    );

The module itself is pure Perl, and has only core module dependencies, making it easy to install (unlike nearly all the other gui toolkits for Perl which require C code compilation).

For maximum cross platform support, you can also use XUL::Gui's alter ego Web::Gui which removes the Mozilla specific XUL support, but opens the door to rendering an HTML + CSS gui with most modern web browsers.

Eric Strom
Thanks for bringing this up. I briefly looked at for a different project and may come back to it later. That said, I'm looking "traditional" GUI kits for these projects...that's part of their purpose.
HerbN