Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Windows GUI programs in Perl

by John M. Dlugosz (Monsignor)
on Jul 03, 2001 at 03:35 UTC ( #93362=perlquestion: print w/ replies, xml ) Need Help??
John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:

I really like Perl Tk. But for some things it just doesn't get close enough to the OS. What serious alternatives are out there for Win32 GUI programming in Perl?

—John

Comment on Windows GUI programs in Perl
Re: Windows GUI programs in Perl
by myocom (Deacon) on Jul 03, 2001 at 03:38 UTC

    Win32::GUI was written for this very reason. It's fairly cryptic if you haven't worked with Win32 APIs, but there are examples floating around (Super Search turned up a couple-three).

      I found two threads on it via SuperSearch, and just posted another top-level node on that. I'm familiar with the Win32 API, and that module is still cryptic. For example, the inline POD's tell of options for creating a window, but no documentation of the base class options that work for all widgets and are mentioned in the Q&A section here, like -size => [$x,$y] which is rather important, and no clue about the message loop thing also seen in the example.

      When I ran that example, or anything else it seems, I get a null pointer error.

      —John

Re: Windows GUI programs in Perl
by Jouke (Curate) on Jul 03, 2001 at 11:23 UTC
    There seems to be another alternative, called WxWindows which aims to be a platform independent GUI for at least Windows, X and Mac. They have Perl bindings available at WxPerl at Sourceforge.

    I haven't tried any of these yet though, but it looks like a very stable, well documented API.

    Jouke Visser, Perl 'Adept'
    Using Perl to help the disabled: pVoice and pStory
Re: Windows GUI programs in Perl
by jplindstrom (Monsignor) on Jul 03, 2001 at 15:47 UTC
      Just wanted to give an updated link to Perl Oasis. I'm not sure this is an authoritative link, but the original author's link seems to be dead.
(ichimunki) Re: Windows GUI programs in Perl
by ichimunki (Priest) on Jul 03, 2001 at 19:11 UTC
    How close do you want to get to the OS? And if you want to get that close are you sure Perl is the best tool for the job?

    I don't mean to flame, I mean to ask: what specifically do you want to do that you can't under vanilla Tk?
      Specifically: my immediate project is a funny-key-palatte like used in Mathematica. Based on a configuration text file, it shows a grid of buttons and clicking one sticks something on the system clipboard.

      The button face text and the clipboard text require Unicode support, since the whole point is to make easy access to things I can't type directly! That is, mathematical symbols, greek letters, funny arrows...

      Tk with geometry manager would be ideal to make the grid, and easy to program the application. But it failed the Unicode test—putting a (TM) symbol on a button showed 3 ASCII characters instead, taking the UTF encoding as individual 8-bit characters.

      —John

        I just saw your other post and realized this may be a large part of what you're dealing with.

        But aren't most of those characters (like math, arrows, and TM) available in regular fonts?

        For reference:
        #!/usr/bin/perl -w use strict; use Tk; my $mw = MainWindow->new(); my $text = $mw->Text()-> pack( -expand => 1, -fill => 'both' ); for my $x (0..255) { $text->insert( 'end', chr($x) ); } MainLoop;
        Obviously the Unicode stuff will need to mature somewhat. But if you are using this all from within Perl, maybe there is a way to cope for now?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://93362]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2014-09-22 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (207 votes), past polls