Branch Coverage

blib/lib/Curses/UI/Notebook.pm
Criterion Covered Total %
branch 87 204 42.6


line true false branch
51 166 0 unless $Curses::UI::debug
55 0 0 $msg =~ /^(\s+)/ ? :
58 0 0 $msg ? :
87 0 5 unless (grep(($arg eq "-$_"), @valid_args))
116 25 4 defined $args{$_} ? :
120 0 2 unless $args{-'border'} or $args{-'sbborder'}
125 2 0 if ($Curses::UI::ncurses_mouse)
139 0 2 if $Curses::UI::screen_too_small
145 0 2 unless defined $$this{-'y'}
146 0 2 unless defined $$this{-'x'}
158 0 2 $$this{-'y'} < 0 ? :
159 0 2 $$this{-'x'} < 0 ? :
162 0 2 defined $$this{-'height'} ? :
163 0 2 defined $$this{-'width'} ? :
166 1 1 $$this{-'border'} ? :
1 1 $$this{-'sbborder'} ? :
170 1 1 $$this{-'border'} ? :
1 1 $$this{-'sbborder'} ? :
176 0 2 if ($h < $req_h or $h > $avail_h or $w < $req_w or $w > $avail_w)
193 2 0 $$this{-'y'} >= 0 ? :
194 2 0 $$this{-'x'} >= 0 ? :
197 2 0 if ($$this{-'border'} or $$this{-'sbborder'})
212 0 2 unless ($$this{-'borderscr'} = $$this{-'parent'}{-'canvasscr'}->derwin(@args))
222 1 1 $$this{-'border'} ? :
1 1 $$this{-'sbborder'} ? :
227 1 1 $$this{-'border'} ? :
1 1 $$this{-'sbborder'} ? :
232 1 1 $$this{-'border'} ? :
1 1 $$this{-'sbborder'} ? :
236 1 1 $$this{-'border'} ? :
1 1 $$this{-'sbborder'} ? :
248 0 2 unless (defined $$this{-'canvasscr'})
255 0 2 unless (defined $$this{-'borderscr'})
273 0 0 if $this->hidden
274 0 0 if $Curses::UI::screen_too_small
289 0 0 if ($Curses::UI::color_support)
299 0 0 $$this{-'border'} ? :
300 0 0 $$this{-'border'} ? :
301 0 0 $$this{-'border'} ? :
302 0 0 $$this{-'border'} ? :
303 0 0 $$this{-'border'} ? :
304 0 0 $$this{-'border'} ? :
305 0 0 $$this{-'border'} ? :
306 0 0 $$this{-'border'} ? :
307 0 0 $$this{-'border'} ? :
308 0 0 $$this{-'border'} ? :
312 0 0 if $$this{-'border'} or $$this{-'sbborder'}
316 0 0 if ($$this{-'border'} or $$this{-'sbborder'})
318 0 0 $page eq $first_page ? :
320 0 0 $page eq $active_page ? :
0 0 $page eq $next_page ? :
0 0 $page eq $active_page ? :
0 0 $page eq $first_page ? :
338 0 0 $$this{-'ipadright'} == 1 ? :
339 0 0 if ($$this{-'border'} or $$this{-'sbborder'}) { }
343 0 0 $page eq $active_page ? :
352 0 0 if $page eq $active_page
354 0 0 if $page eq $active_page
355 0 0 if ($$this{-'border'} or $$this{-'sbborder'}) { }
359 0 0 $page eq $active_page ? :
367 0 0 $$this{-'ipadright'} == 1 ? :
368 0 0 if ($$this{-'border'} or $$this{-'sbborder'}) { }
372 0 0 $page eq $active_page ? :
380 0 0 if ($$this{-'border'} || $$this{-'sbborder'} and $page eq $last_page)
384 0 0 $page eq $active_page ? :
388 0 0 if ($$this{-'border'} or $$this{-'sbborder'})
410 0 0 unless $no_doupdate
421 0 0 if ($$this{-'intellidraw'} and not $this->hidden)
438 0 0 @path ? :
440 0 0 if $$parent{-'has_modal_focus'} or @path and $parent eq $path[-1]
452 0 8 unless my $page = shift()
456 0 8 if defined $$this{-'id2object'}{$page}
468 1 7 if ($len > $$this{-'bw'})
480 2 12 if defined $userargs{$cbkey}
509 3 4 if (@{$$this{-'pages'};} == 1) { }
527 0 4 unless my $page = shift()
530 0 4 unless defined $$this{-'id2object'}{$page}
535 1 3 if (defined $$this{'callback'}{$page}{-'on_delete'})
542 3 1 if $page eq $active_page
552 2 23 unless @{$$this{-'pages'};}
554 23 0 defined $$this{-'active_page'} ? :
565 2 3 unless @{$$this{-'pages'};}
576 0 1 unless @{$$this{-'pages'};}
587 0 2 unless @{$$this{-'pages'};}
592 2 4 if $active_page eq ${$$this{-'pages'};}[$i]
594 0 2 if $i < 0
598 1 1 $$this{-'wraparound'} ? :
0 2 $i > 0 ? :
609 0 4 unless @{$$this{-'pages'};}
614 4 2 if $active_page eq ${$$this{-'pages'};}[$i]
616 0 4 if $i < 0
621 2 1 $$this{-'wraparound'} ? :
1 3 $i < $#{$$this{-'pages'};} ? :
631 2 5 unless my $page = shift()
634 0 5 unless defined $$this{-'id2object'}{$page}
640 1 4 if (defined $$this{'callback'}{$page}{-'on_activate'})
645 4 1 if ($active_page ne $page)
652 0 4 unless isendwin()
670 0 0 if not $$this{-'focus'} and $this->focusable
673 0 0 $$this{-'border'} + $$this{-'sbborder'} ? :
0 0 if ($ev_y <= ($$this{-'border'} + $$this{-'sbborder'} ? 3 : 1)) { }
680 0 0 if ($ev_x < $len)