Re: [gtk-list] PerlGtk-0.1.17 uploaded to gimp & CPAN



On Sat, 11 Apr 1998, Kenneth Albanowski wrote:

> 
> Version 0.1.17 of my Gtk module for Perl has been uploaded to the
> ftp.gimp.org and CPAN sites, and should soon be available for download.
> 
> This version significantly cleans up memory usage, and adds tested support
> for several separate widget sets, including the Gnome UI widgets, the
> Gnome/GemVt gtktty widgets, and the GtkXmHTML widget. (Arguments must be
> supplied to Makefile.PL to enable any of these, and the paths to headers
> or libraries may need to be changed.)

Oh, I forgot to mention one other little addition: the arguments (given in
Gtk::Widget new, or Gtk::Widget set) will now figure out the default class
automatically, and will accept dashes in the PerlTk style. Thus this now
works (although its efficiency is up for debate -- I had to use a number
of tricks to make this work):

	$window = new Gtk::Widget       "GtkWindow",
                user_data               =>      undef,
                type                    =>      -toplevel,
                title           =>      "hello world",
                allow_grow              =>      0,
                allow_shrink            =>      0,
                border_width    =>      10;

	$button = new Gtk::Widget       "GtkButton",
                label           =>      "hello world",
                -clicked        =>      sub { destroy $button; destroy
					$window; },
                parent          =>      $window,
                visible         =>      1;

(The dash is fully optional, and doesn't mean anything. The '-clicked'
could just as well be 'signal::clicked', or
'-GtkObject::signal::clicked'.) 

One little nit still remains: flags/enums with dashes in them (such as
"etched-in" and "can-focus") require quoting in Perl, and the dash syntax
doesn't do much good. Perhaps these should be converted to underscores? 

-- 
Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]