blib/lib/Gtk2/Ex/FormFactory/Window.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 7 totaltotal 0.0% 0 / 37 CC 1 SCAR 6.9
CC
1
Cov
0%
get_type
2.0
get_closed_hook
2.0
get_quit_on_close
2.0
CRAP 2.0
1 package Gtk2::Ex::FormFactory::Window;
2  
3 use strict;
4  
5 use base qw( Gtk2::Ex::FormFactory::Container );
6  
7 sub get_type { "window" }
8  
9 sub get_closed_hook { shift->{closed_hook} }
10 sub get_quit_on_close { shift->{quit_on_close} }
11  
12 sub set_closed_hook { shift->{closed_hook} = $_[1] }
13 sub set_quit_on_close { shift->{quit_on_close} = $_[1] }
14  
15 sub new {
16 my $class = shift;
17 my %par = @_;
18 my ($closed_hook, $quit_on_close) =
19 @par{'closed_hook','quit_on_close'};
20  
21 my $self = $class->SUPER::new(@_);
22
23 $self->set_closed_hook($closed_hook);
24 $self->set_quit_on_close($quit_on_close);
25  
26 return $self;
27 }
28  
29 sub object_to_widget {
30 my $self = shift;
31  
32 $self->get_gtk_parent_widget->set_title($self->get_object_value);
33  
34 1;
35 }
36  
37  
38 1;
39  
40 __END__