|
NB If you want to generate code from the new glade-2 (versions >= 1.1.0) you need to download the new package Glade-Perl-Two This is a collection of modules that will read a <GTK-Interface> XML file produced by Gtk+/Gnome UI builder Glade (versions <= 0.6.4), construct and optionally show the UI using the Gtk-Perl bindings. It is possible, using Glade, for you to specify a language of 'Perl' and generate source code from Glade's 'Build' button. Glade-Perl can write the perl modules to construct/run the UI together with a skeleton "App" and a working subclass for you to edit. The modules generated are pretty much OO code and can be combined and split in any way that you wish. Glade-Perl will generate code to construct all the widgets that Glade knows about apart from the GnomeDb ones. However, the gnome-libs are not necessary and you can work quite happily without them - but of course you cannot then use the Gnome widgets in your UI. You can read the online documentation or download Glade-Perl and find software that we depend on. |
It use()s and respects any existing signal handler subs that you specify at Build time The point of this is that you can write the signal handlers one by one and supply them to the Build phase so that they are used instead of autoloaded stubs that would otherwise be called.
There are several support modules.
Glade::PerlUI Handles the Gtk construction
Glade::PerlUIGtk Handles the Gtk widget calls
Glade::PerlUIExtra Handles the Gnome and extended widget calls
Glade::PerlSource Writes the perl source code
Glade::PerlProject Handles the project options and sets the
defaults
Glade::PerlXML Reads Glade files
| README | What the module does and how it works |
| INSTALL | How to install the modules |
| FAQ | Frequently asked questions |
| FAQ.i18n | Frequently asked questions about internationalisation |
| FAQ.old | Frequently asked questions about old or flawed versions of software |
| NEWS | What is new in each version |
| TODO | The (many) things that are still to be done |
| Changelog | What I have changed in each (recent) version |
| Old Changelog | What I changed in old versions (<= 0.49) |
| ROADMAP | Where the project is going |
| Gtk-Perl-Docs.html | Some sources of Gtk-Documentation |
| PerlGenerate.html | What all the user options mean - pod2html conversion of Glade::PerlGenerate internal documentation |
| PerlRun.html | How to use Glade::PerlRun - pod2html conversion of Glade::PerlRun internal documentation |
| glade2perl.html | How to call glade2perl - pod2html conversion of glade2perl internal documentation |
You can download the latest versions of Glade from the Glade homepage .
All development versions depend to a greater or lesser extent on improvements in Gtk-Perl and, from 02 January 2000, there is a fairly up-to-date version of Gtk-Perl (0.7008 on 1 July 2001) available on CPAN .
The latest versions of Gtk-Perl bindings are available for download at http://www.gtkperl.org/download.html (version 0.7008 available 30 April 2002)
The Gnome CVS repository. module is called 'gnome-perl' and will be developed from the latest CPAN version of Gtk-Perl.
You can download the latest versions of perl modules from CPAN or better still from your local mirror.
The tarballs (and now RPMs) below contain all Glade-Perl modules needed to generate perl source code from a Glade file and then run it.
Glade-Perl is also available on CPAN although it is probably best to download it from your local CPAN mirror
The Glade-Perl.spec file supplied in the tarball will build a noarch RPM package and here are some links to other packages and ports of Glade-Perl that some good people have built.
If you download and try Glade-Perl, PLEASE email me and let me know how you got on. I would really like some criticism, especially if you have problems or ideas for the FAQ. Also, please send me any real-world Glade files (or widgets snipped from them) that fail or don't work as you expect.
You can email me at dermot at glade.perl.connectfree.co.uk or dermot.musgrove at virgin.net
This tarball can be unpacked by calling tar xzvf Glade-Perl-LATEST.tar.gz
and will produce a directory with the name Glade-Perl-M.mm (M is Major and mm is minor version number).
cd Glade-Perl-M.mm/; perl Makefile.PL; make test; su; make install
will install the package in the usual way.
The tarball will not build RPMs until it is renamed to Glade-Perl-M.mm.tar.gz
my $id = $forms->{'__CONNECT_ID'}{'entry1'}{'after_key_press_event'}
# and can be used like
$form->{'entry1'}->signal_handler_block($id);
$form->{'entry1'}->signal_handler_unblock($id);
$form->{'entry1'}->signal_disconnect($id);
$form->{'entry1'}->signal_emit($id);
my $clist = $window->lookup_widget('clist1');
perl Makefile.PL; make manifest; make dist;
and then either
rpm -ta Project-0.01.tar.gz to build a RPM
or the normal perl methods of
make test; make install.