7
Padre::Action - Padre Action Object
11
my $action = Padre::Action->new(
16
menu_event => sub { } );
20
This is the base class for the Padre Action API.
34
our $VERSION = '0.42';
36
# Generate faster accessors
37
use Class::XSAccessor accessors => {
42
shortcut => 'shortcut',
43
menu_event => 'menu_event',
44
toolbar_event => 'toolbar_event',
47
#####################################################################
54
A default contructor for action objects.
59
my ( $class, %opts ) = @_;
61
#XXX - validate options
63
my $self = bless {}, $class;
65
$self->name( $opts{name} );
66
$self->id( $opts{id} || -1 );
67
$self->label( $opts{label} );
68
$self->icon( $opts{icon} );
69
$self->shortcut( $opts{shortcut} );
70
$self->menu_event( $opts{menu_event} );
71
$self->toolbar_event( $opts{toolbar_event} );
77
# A label textual data without any strange menu characters
81
my $label = $self->label;
86
#####################################################################
91
=head1 COPYRIGHT & LICENSE
93
Copyright 2008-2009 The Padre development team as listed in Padre.pm.
95
This program is free software; you can redistribute
96
it and/or modify it under the same terms as Perl itself.
98
The full text of the license can be found in the
99
LICENSE file included with this module.
105
# Copyright 2008-2009 The Padre development team as listed in Padre.pm.
107
# This program is free software; you can redistribute it and/or
108
# modify it under the same terms as Perl 5 itself.