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

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

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

revision 1.2 by jlenton, Mon Apr 14 22:31:39 2003 UTC revision 1.3 by fheinz, Tue Apr 15 14:36:05 2003 UTC
# Line 19  sub align Line 19  sub align
19    
20      foreach my $object (@alignees)      foreach my $object (@alignees)
21      {      {
22          # If object's width not set, make it as high as the box          # If object's width not set, make it as wide as the box
23          my $width = $object->width || $object->width($self->width);          my $width = $object->width || $object->width($self->width);
24    
25          # Place object in the vertical according to alignment          # Place object in the vertical according to alignment
# Line 54  sub layout Line 54  sub layout
54    
55      # Now lay out the elements      # Now lay out the elements
56      my $alignment = $self->valign;      my $alignment = $self->valign;
57      my $cursor = $self->y;      # Default alignment is left      my $cursor = $self->y;      # Default alignment is top
58      $cursor += int($free_space/2) if $alignment =~ /^center$/;      $cursor += int($free_space/2) if $alignment =~ /^center$/;
59      $cursor += $free_space if $alignment =~ /^right$/;      $cursor += $free_space if $alignment =~ /^bottom$/;
60      map {$_->y($cursor); $cursor += $_->height} @alignees;      map {$_->y($cursor); $cursor += $_->height} @alignees;
61            
62  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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