<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">=pod

=head1 NAME

Pedigree::ChildlessNode - an abortion in a pedigree

=head1 SYNOPSIS

use Pedigree::ChildlessNode;

$node = new Pedigree::ChildlessNode(I&lt;%params&gt;);

$node-&gt;DrawNode(I&lt;$xidst&gt;, I&lt;$ydist&gt;, I&lt;$belowtextfont&gt;, I&lt;$abovetextfont&gt;,
I&lt;@fieldsfornode&gt;);

$node-&gt;PrintLegend(I&lt;$land&gt;, I&lt;@fields&gt;);


=head1 DESCRIPTION

This package contains data about a "childlessness" node.  This node
is not numbered in pedigree.

=cut



####################################################################
# Define the package                                               #
####################################################################

package Pedigree::ChildlessNode;
use Pedigree;
use strict;
our @ISA=('Pedigree::PersonNode');

####################################################################
#    new                                                           #
####################################################################

=pod

=over 4


=item B&lt;new&gt;(I&lt;%params&gt;);

Construct a new node from the given parameters.  

=cut

sub new {
    my ($class,%params)=@_;
    my $self=$class-&gt;SUPER::new(%params);
    if (!ref($self)) {
	return 0;
    }

    #
    # These nodes are NOT numbered in pedigrees
    #

    $self-&gt;{'Numbered'}=0;

    return $self;

}


####################################################################
#    DrawNode                                                      #
####################################################################

=pod

=item B&lt;DrawNode&gt;(I&lt;$xdist&gt;, I&lt;$ydist&gt;, I&lt;$belowtextfont&gt;, I&lt;$abovetextfont&gt;,
I&lt;@fieldsfornode&gt;);

Output the command to draw this node.  The parameters are
distances between the nodes (in cm) and fields for abovetext (not used
here).  We only print the Comment field below the node, and draw this
node higher than other nodes.

=cut

sub DrawNode {
    my $self=shift;
    my ($xdist, $ydist, $belowtextfont, $abovetextfont, @fieldsfornode) = @_;
    my $result = '\rput('.($xdist*$self-&gt;GetAbsX()).", ".
	($ydist*($self-&gt;GetAbsY()+0.6)).'){\pstChildless[';
    my @opts=('belowtextrp=t');
    if ($self-&gt;{'Comment'}) {
	push @opts,
	'belowtext={'."$belowtextfont ".$self-&gt;{'Comment'}.'}';
    }
    if ($self-&gt;Type() eq 'infertile') {
	push @opts, 'infertile';
    }
    if (scalar @opts) {
	$result .= join(', ',@opts);
    }
    $result .= ']{'.$self-&gt;Id()."}}\n";
    return $result;
}

####################################################################
#    PrintLegend                                                   #
####################################################################

=pod

=item B&lt;PrintLegend&gt;(I&lt;$lang&gt;, I&lt;@fields&gt;);

This subroutine does nothing since childlessness has no legend.

=cut

sub PrintLegend {

    return;
}



####################################################################
#    THE END                                                       #
####################################################################

=pod

=back

=head1 ENVIRONMENT

The calling program should define B&lt;$main::DEBUG&gt; and set it to 0
or 1.

=head1 SEE ALSO

pedigree(1),  Pedigree(3)


=head1  AUTHOR

Boris Veytsman, Leila Akhmadeeva, 2007



=cut

1;
</pre></body></html>