blib/lib/Gapp/Meta/Widget/Native/Trait/NotebookPage.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 41 CC 1 SCAR 6.9
CC
1
Cov
0%
register_implementation
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Gapp::Meta::Widget::Native::Trait::NotebookPage;
2 {
3 $Gapp::Meta::Widget::Native::Trait::NotebookPage::VERSION = '0.60';
4 }
5  
6 use Moose::Role;
7 use MooseX::SemiAffordanceAccessor;
8  
9  
10 has 'detachable' => (
11 is => 'rw',
12 isa => 'Maybe[Bool]',
13 );
14  
15 has 'menu_label' => (
16 is => 'rw',
17 isa => 'Maybe[Gapp::Widget]',
18 );
19  
20 has 'position' => (
21 is => 'rw',
22 isa => 'Maybe[Int]',
23 );
24  
25 has 'reorderable' => (
26 is => 'rw',
27 isa => 'Maybe[Bool]',
28 );
29  
30 has 'tab_expand' => (
31 is => 'rw',
32 isa => 'Maybe[Bool]',
33 );
34  
35 has 'tab_fill' => (
36 is => 'rw',
37 isa => 'Maybe[Bool]',
38 );
39  
40 has 'tab_label' => (
41 is => 'rw',
42 isa => 'Maybe[Gapp::Widget]',
43 );
44  
45 has 'tab_pack' => (
46 is => 'rw',
47 isa => 'Maybe[Str]'
48 );
49  
50 has 'page_name' => (
51 is => 'rw',
52 isa => 'Str',
53 default => '',
54 trigger => sub {
55 my ( $self, $new, $old ) = @_;
56 return if ! $self->has_gobject;
57 return if ! $self->parent;
58
59 if ( ! defined $self->tab_label ) {
60 $self->parent->gobject->set_tab_label_text( $self->gobject, $new );
61 }
62 else {
63 $self->tab_label->content->[0]->gobject->set_text( $new);
64 }
65
66 if ( ! defined $self->menu_label ) {
67 $self->parent->gobject->set_menu_label_text( $self->gobject, $new );
68 }
69 else {
70 $self->menu_label->content->[0]->gobject->set_text( $new);
71 }
72
73 }
74 );
75  
76  
77 package Gapp::Meta::Widget::Custom::Trait::NotebookPage;
78 {
79 $Gapp::Meta::Widget::Custom::Trait::NotebookPage::VERSION = '0.60';
80 }
81 sub register_implementation { 'Gapp::Meta::Widget::Native::Trait::NotebookPage' };
82  
83  
84 1;