Gapp::Actions - Create Actions for Gapp Applications
package My::Actions; use Gapp::Actions -declare =>[qw( PrintStuff )]; action PrintStuff => ( label => 'Print', tooltip => 'Print', icon => 'gtk-print', code => sub { my ( $action, $widget, $gobject, $args, $gtk_args ) = @_; my ( $stuff ) = @$args; } ); ... later ... package main; use My::Actions qw( PrintStuff ); # assign to button Gapp::Button->new( action => [PrintStuff, 'stuff'] ); # use as callback Gapp::Button->new->signal_connect( clicked => PrintStuff, 'stuff' ); # call directly do_PrintStuff( undef, undef, ['stuff'], undef );
Actions are chunks of code that know how to display themselves on buttons, menus and other objects. They can be called directly, or used as callbacks.
MooseX::Types
Many thanks to the #moose cabal on irc.perl.org, and all those who contributed to the MooseX::Types module, making Gapp::Actions possible.
#moose
irc.perl.org
Robert "phaylon" Sedlacek <rs@474.at>
Jeffrey Ray Hallock <jeffrey.hallock at gmail dot com>
jnapiorkowski: John Napiorkowski <jjnapiork@cpan.org>
caelum: Rafael Kitover <rkitover@cpan.org>
rafl: Florian Ragwitz <rafl@debian.org>
hdp: Hans Dieter Pearcey <hdp@cpan.org>
autarch: Dave Rolsky <autarch@urth.org>
Copyright (c) 2007-2009 Robert Sedlacek <rs@474.at> Copyright (c) 2011-2012 Jeffrey Ray Hallock. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Gapp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gapp
CPAN shell
perl -MCPAN -e shell install Gapp
For more information on module installation, please visit the detailed CPAN module installation guide.