blib/lib/Gapp/Window.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 51 CC 6 SCAR 33.6
CC
6
Cov
0%
BUILDARGS
42.0
BEGIN
2.0
BEGIN
2.0
CRAP 28.7
1 package Gapp::Window;
2 {
3 $Gapp::Window::VERSION = '0.60';
4 }
5  
6 use Moose;
7 use MooseX::SemiAffordanceAccessor;
8 use MooseX::Types::Moose qw( HashRef );
9  
10 extends 'Gapp::Container';
11 with 'Gapp::Meta::Widget::Native::Role::HasIcon';
12  
13 has '+gclass' => (
14 default => 'Gtk2::Window',
15 );
16  
17 has 'transient_for' => (
18 is => 'rw',
19 isa => 'Maybe[Gapp::Window]',
20 );
21  
22 #has 'default_widget' => (
23 # is => 'rw',
24 # isa => 'Maybe[Gapp::Widget]',
25 #);
26  
27  
28 sub BUILDARGS {
29 my $class = shift;
30 my %args = @_ == 1 && is_HashRef( $_[0] ) ? %{$_[0]} : @_;
31
32
33 if ( exists $args{default_size} ) {
34 $args{properties}{'default-width'} = $args{default_size}[0];
35 $args{properties}{'default-height'} = $args{default_size}[1];
36 delete $args{default_size};
37 }
38 if ( exists $args{type} ) {
39 $args{args} = [ delete $args{type} ];
40 }
41 if ( exists $args{position} ) {
42 $args{properties}{window_position} = delete $args{position};
43 }
44 for my $att ( qw(default_height default_width modal opacity resizable window_position title ) ) {
45 $args{properties}{$att} = delete $args{$att} if exists $args{$att};
46 }
47
48 __PACKAGE__->SUPER::BUILDARGS( %args );
49 }
50  
51 #
52 #after _build_gobject => sub {
53 # my ( $self ) = @_;
54 # if ( $self->default_widget ) {
55 # $self->default_widget->gobject->set_can_default( 1 );
56 # $self->default_widget->gobject->grab_default;
57 # }
58 #};
59  
60  
61  
62 1;
63  
64  
65  
66 __END__