package Gapp::Button; { $Gapp::Button::VERSION = '0.481'; } use Moose; use MooseX::SemiAffordanceAccessor; extends 'Gapp::Widget'; with 'Gapp::Meta::Widget::Native::Role::HasAction'; with 'Gapp::Meta::Widget::Native::Role::HasLabel'; with 'Gapp::Meta::Widget::Native::Role::HasIcon'; with 'Gapp::Meta::Widget::Native::Role::HasIconSize'; with 'Gapp::Meta::Widget::Native::Role::HasImage'; with 'Gapp::Meta::Widget::Native::Role::HasMnemonic'; with 'Gapp::Meta::Widget::Native::Role::HasStockId'; with 'Gapp::Meta::Widget::Native::Role::FormElement'; with 'Gapp::Meta::Widget::Native::Role::CanDefault'; has '+gclass' => ( default => 'Gtk2::Button', ); has 'response' => ( is => 'rw', isa => 'Str', ); sub BUILDARGS { my $class = shift; my %args = @_ == 1 && is_HashRef( $_[0] ) ? %{$_[0]} : @_; if ( exists $args{label} && ! $args{args} ) { $args{args} = [ $args{label} ]; $args{constructor} = 'new_with_label'; } __PACKAGE__->SUPER::BUILDARGS( %args ); } 1; __END__ =pod =head1 NAME Gapp::Button - Button Widget =head1 OBJECT HIERARCHY =over 4 =item L =item +-- L =item ....+-- L =back =head2 Roles =over 4 =item L =item L =item L =item L =head1 PROVIDED ATTRIBUTES =over 4 =item B