/[papo]/papo/neb/neb/Tree/Form.pm
ViewVC logotype

Diff of /papo/neb/neb/Tree/Form.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by fheinz, Wed Apr 30 12:43:26 2003 UTC revision 1.5 by fheinz, Wed Apr 30 12:54:08 2003 UTC
# Line 28  sub align Line 28  sub align
28    
29  sub layout {}  sub layout {}
30    
31    sub computed_height
32    {
33        my $self = shift;
34        my $height = 0;
35        my $horizontal = $self->boxtype =~ /^h/i;
36    
37        foreach my $child (grep {ref} map {$_->screen_children} $self->content)
38        {
39            my $child_height = $child->height;
40            ($height = undef), last unless defined $child_height;
41            $height = $child_height if $child_height > $height;
42        }
43        return $height;
44    }
45    
46    
47    sub computed_width
48    {
49        my $self = shift;
50        my $width = 0;
51        my $vertical = $self->boxtype =~ /^v/i;
52    
53        foreach my $child (grep {ref} map {$_->screen_children} $self->content)
54        {
55            my $child_width = $child->width;
56            ($width = undef), last unless defined $child_width;
57            ($width = $child_width) if $width < $child_width;
58        }
59        return $width;
60    }
61    
62    
63  1;  1;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26