NAME

Gapp::Meta::Widget::Native::Role::HasAction - action attribute for widgets

SYNOPSIS

use Gapp::Actions::Basic qw( Quit );

Gapp::Button->new( action => Quit );

Gapp::ImageMenuItem->new( action => Quit );

Gapp::ToolButton->new( action => Quit );

PROVIDED ATTRIBUTES

action
is rw
isa Gapp::Action|[Gapp::Action, @args]|Undef

Specifies an action for the widget is activated. The action defines a callback to be executed and properties of the widget, such as icon, label, and tooltip. You spcify arguments to pass to the call-back by using an ArrayRef containing the action and the arguments:

Gapp::Button->new( action => [Quit, @args ] );

AUTHORS

Jeffrey Ray Hallock <jeffrey.hallock at gmail dot com>

COPYRIGHT & LICENSE

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.