Glade::PerlGenerate (GPG) Perl/Gtk-Glade UI builder and source generator -------------------------------------------------------------------- # Copyright (c) 1999 - Dermot Musgrove # # This library is released under the same conditions as Perl, that # is, either of the following: # # a) the GNU General Public License as published by the Free # Software Foundation; either version 1, or (at your option) any # later version. # # b) the Artistic License. # # If you use this library in a commercial enterprise, you are invited, # but not required, to pay what you feel is a reasonable fee to the # author Dermot Musgrove # SEE ALSO -------- Documentation/COPYING # How we encourage copying Documentation/Changelog # History of the changes made Documentation/FAQ # Frequently asked questions Documentation/INSTALL # How to install the module Documentation/Perl-Gtk-Docs.txt # Some pointers to Perl/Gtk documentation Documentation/NEWS # What is new in each version Documentation/README # This file Documentation/ROADMAP # Where will the module go? Documentation/TODO # What still must be done test.pl # Examples of user options Glade::PerlGenerate is a module that will read a Glade-Interface XML file, build the UI and/or write the perl source to create the UI later. It is made up of two main packages. Glade::PerlGenerate does the clever stuff and Glade::PerlRun has some run-time utilities that are needed by Glade::PerlGenerate and also by your generated modules. There are now several support modules for PerlGenerate that read the XML build the UI, write the source and handle the project options. There are several options 1) Simply show and run the interface. Any missing signal handlers are hijacked to show a simple message box. 2) Write a perl class file. It contains the class constructor, utilities and a sub that constructs the UI. If you specifiy &STDOUT as the output filename all the generated code will be written to STDOUT but of course you will have nothing to run later. 3) Do both of the above. 4) Generate (2 above) from Glade's 'Build' button. GLADE PROJECT ------------- Glade::PerlGenerate uses the Glade details in order to generate the code and uses certain information. These are the elements that it uses from the GTK-Interface XML file: # The Glade project structure BusForm # Project name (it is used for the file and package/module/class name) # Directory that Glade was running in when project was written ?? Generated # Directory to hold generated source modules (relative to XML file) pixmaps # Directory to search for pixmaps (relative to XML file) # If there is a pixmap in this directory called 'Logo.xpm' this # will be used as the project logo in message boxes etc. # All other project properties are ignored Some other project information is generated for inclusion in the generated source modules. User's long name with email address of username@hostname Current localtime '# Unspecified copying policy. Please contact the author' 0.01 EDITING ------- The source code is generated with tabs replacing spaces at the rate specified by the user option 'tabwidth' (default 8) so your editor should be set to the same tabwidth if the generated source is to look correct. Read the file test.pl for some examples of how to use Glade::PerlGenerate. REQUIREMENTS (what I use but older versions may well work) ------------------------- Package my version available from ------- ---------- -------------- Glade 0.5.3 http://glade.pn.org/ Glib/Gtk+ 1.2.3 ftp://ftp.gimp.org/pub/gtk/ gnome-libs 1.0.54 Gnome mirrors or Gnome.org CVS Perl-Gtk 0.6123 CPAN (but you'll need CVS >= 19991025 from Gnome.org to get the best results) Perl 5.004_04 CPAN XML::Parser 2.27 CPAN ACKNOWLEDGEMENTS ---------------- Doesn't the world seem a richer place with the beautiful contributions of these creative people? I have only mentioned the most obvious names and I apologise to those who I have missed out. Glade Damon Chaplin Main author Martijn van Beers Part of the source code output, some popup menu functions, and the widget tree view. GTK Copyright - Peter Mattis, Spencer Kimball and Josh MacDonald gnome-libs Too many to list, check the AUTHORS file in the dist Perl/Gtk Kenneth Albanowski and Paolo Molaro Perl Larry Wall , with the help of oodles of other folks XML::Parser Larry Wall wrote version 1.0. Clark Cooper picked up support, changed the API for this version (2.x), provided documentation, and added some standard package features. Information, advice and patches - Damon Chaplin, Robert Schwebel AUTHOR ------ Dermot Musgrove Any errors, omissions and general stupidity are my fault - sorry.