PrePAN

Sign in to PrePAN

GUIDeFATE GUI Designer From A Text Editor

Good

Synopsis

    #!/usr/bin/env perl 
    #A test script that  generates a calculator style interface
    #use GUIDeFATE (which in turn depends on Wx)
    #best viewed using monospace font

    use strict;
    use warnings;
    use GUIDeFATE qw<$frame>;

    my $window=<<END;
    +------------------------+
    |T  Calculator test      |
    +M-----------------------+
    |  [                  ]  |
    |  { V }{ % }{ C }{AC }  |
    |  { 1 }{ 2 }{ 3 }{ + }  |
    |  { 4 }{ 5 }{ 6 }{ - }  |
    |  { 7 }{ 8 }{ 9 }{ * }  |
    |  { . }{ 0 }{ =      }  |
    |  made with GUIdeFATE   |
    +------------------------+
    END

my $gui=GUIDeFATE->new($window,"web","q");
my $frame=$gui->getFrame()||$gui;
$gui->MainLoop();

Description

This simplifies GUI development using a textual representation of a interface written in a text editor (monospace font required) as a string and parsed to create an interface without needing to know much about the underlying toolkit (current focus of development is The Wesocket interface, and already includes Wx, Tk, GTk, Win32 and Qt

Comments

Please sign up to post a review.