The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


GUIDeFATE - Graphical User Interface Design From A Text Editor


    use GUIDeFATE;

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


    my $gui=GUIDeFATE->new($window,[$backend],[$assist]); # API changed at version 0.06
    # $backend is one of Wx(Default), Tk, Qt, Web, HTML, Win32 or Gtk
    # $assist is one or  "q" (quiet, default), "v" (verbose),
    # "d" for debug (websocket) or "a" for Autogenerate


Perl5.8.8, Exporter, Wx, Wx::Perl::Imagick (for Wx interface) Perl5.8.8, Exporter, Tk, Image::Magick, Tk::JPEG, MIME::Base64 (for Tk interface) Perl5.8.8, Exporter, Glib, Gtk (for Gtk interface) Perl5.8.8, Exporter, QtCore4, QtGui4 (for Qt interface) Perl5.8.8, Exporter, Win32, Imager (for Win32 interface) Perl5.8.8, Exporter (for HTML interface) Perl5.8.8, Exporter, Net::WebSocket::Server, IO::Socket::PortState (for WebSocket interface)


getFrame() returns an object containing Widgets (referencesd by id) and GUI interaction functions. This is actually provided by the middle-man ((GFwx, GFtk etc) but not availlable for GFhtml of GFweb


GUIDeFATE enables the user to convert a textual representation into a Graphical User Interface. It attempts to abstract out the underlying framework. A visually recognisable pattern is passed as a string to GUIDeFATE and this is transformed into an Interactive Interface.



my $gui=GUIDeFATE->new($window, $backend, $options);

Extracts dimensions and widgets in a window from the textual representation. If $backend not provided, defaults to "Wx"; options are Wx and Tk, Gtk, Qt, Win32 and Web If $options contains "v", then a verbose output is sent to console, if it contains "a", and autogenerated file is produced with all the called functions

Web Socket applications can made. In such cases generating the client and server parts can be directed to use a particular port/host

    my $gui=GUIDeFATE->new($window,[$backend],[$assist],[$port]);

$port can be a port number (default 8085), or "<host>:<port>" e.g. "" (default host is localhost) or possibly (untested) an SSL socket. The port requested is not always the port used: if the port for listening is not available, then the port number is incremented until a free port is found.


my $frame=$gui->getFrame || $gui;

Returns reference to the frame for both abstracted and backend specific functions.

For more details visit The GUIDeFATE wiki at its Github pages


Saif Ahmed, SAIFTYNET { at }


Wx, Tk, Image::Magick, Wx::Perl::Imagick, Imager,Win32, GLib, Gtk3, Win32, QtCore4, Net::WebSocket::Server