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; |