blib/lib/Gapp/Notebook.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 47 CC 4 SCAR 19.1
CC
4
Cov
0%
BUILDARGS
12.0
current_page
6.0
BEGIN
2.0
CRAP 6.8
1 package Gapp::Notebook;
2 {
3 $Gapp::Notebook::VERSION = '0.60';
4 }
5  
6 use Moose;
7 use MooseX::SemiAffordanceAccessor;
8 use Gapp::Meta::Widget::Native::Trait::NotebookPage;
9  
10 extends 'Gapp::Container';
11  
12 has '+gclass' => (
13 default => 'Gtk2::Notebook',
14 );
15  
16 has 'action_widget' => (
17 is => 'rw',
18 isa => 'Maybe[Gapp::Widget]',
19 trigger => sub {
20 $_[1]->set_parent( $_[0] ) if $_[1];
21 }
22 );
23  
24 sub BUILDARGS {
25 my $class = shift;
26 my %args = @_ == 1 && is_HashRef( $_[0] ) ? %{$_[0]} : @_;
27
28 for my $att ( qw(scrollable) ) {
29 $args{properties}{$att} = delete $args{$att} if exists $args{$att};
30 }
31
32 __PACKAGE__->SUPER::BUILDARGS( %args );
33 }
34  
35  
36  
37 sub current_page {
38 my ( $self ) = @_;
39 my $n = $self->gobject->get_current_page;
40 return if ! defined $n;
41
42 my $gtkw = $self->gobject->get_nth_page( $n );
43 $gtkw->{_gapp};
44 }
45  
46  
47  
48 1;
49  
50  
51 __END__