blib/lib/PDF/Make/Builder/Form/Field/Checkbox.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 1 totaltotal 96.5% 28 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« src/pdfmake_aes.c ↑ Summary src/pdfmake_sha2.c »
1 package PDF::Make::Builder::Form::Field::Checkbox;
2 53 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 53 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 53 ▶use Object::Proto;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 53 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
7 53 Object::Proto::define('PDF::Make::Builder::Form::Field::Checkbox',
8 extends => 'PDF::Make::Builder::Form::Field',
9 'on_value:Str:default(Yes)',
10 );
11 53 Object::Proto::import_accessors('PDF::Make::Builder::Form::Field::Checkbox');
12 }
13  
14 3 ▶sub BUILD {
Subroutine BUILD: called CC=1 SCAR=0.0
Pod undocumented
15 3 my ($self) = @_;
16 # Checkboxes: square, inline label, no background fill
17 3 $self->w(14);
18 3 $self->h(14);
19 3 $self->inline_label(1);
20 3 $self->border_colour('#666');
21 3 $self->bg_colour('#fff');
22 }
23  
24 2 ▶sub _draws_own_chrome { 1 }
Subroutine _draws_own_chrome: called CC=1 SCAR=0.0
25  
26 3 ▶sub _create_field {
Subroutine _create_field: called CC=1 SCAR=0.0
27 3 my ($self, $doc, $name, $fx, $fy, $fw, $fh) = @_;
28 3 return PDF::Make::FieldPtr::checkbox($doc, $name, $fx, $fy, $fw, $fh, $self->on_value);
29 }
30  
31 53 1;
32  
33 __END__
« src/pdfmake_aes.c ↑ Summary src/pdfmake_sha2.c »