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

Diff of /papo/neb/neb/Tree/ScreenObject.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 screen_children Line 19  sub screen_children
19  sub auto_align  sub auto_align
20  {  {
21      my $self = shift;      my $self = shift;
22      my @alignees = map $_->screen_children, grep $_->screen_children, $self->content; # Find the next level of screen objects      my @alignees = grep {ref} map {$_->screen_children} $self->content; # Find the next level of screen objects
23      $self->align(@alignees);      $self->align(@alignees);
24      $self->layout(@alignees);      $self->layout(@alignees);
25      map {$_->auto_align} @alignees;      map {$_->auto_align} @alignees;
# Line 29  sub auto_align Line 29  sub auto_align
29  sub align {}  sub align {}
30  sub layout {}  sub layout {}
31    
32    sub lam_x
33    {
34        my $self = shift;
35        my $x = shift;
36    
37        $self->attribute("lam:x", $x) if defined ($x);
38        return $self->attribute("lam:x");
39    }
40    
41    sub lam_y
42    {
43        my $self = shift;
44        my $y = shift;
45    
46        $self->attribute("lam:y", $y) if defined ($y);
47        return $self->attribute("lam:y");
48    }
49    
50  sub x  sub x
51  {  {
52      my $self = shift;      my $self = shift;
53      my $x = shift;      my $x = shift;
54    
55      $self->attribute("x", $x) if defined ($x);      $self->attribute("x", $x) if defined ($x);
56      return $self->attribute("x");      return defined($self->attribute("x")) ? $self->attribute("x") : $self->lam_x;
57  }  }
58    
59  sub y  sub y
# Line 44  sub y Line 62  sub y
62      my $y = shift;      my $y = shift;
63    
64      $self->attribute("y", $y) if defined ($y);      $self->attribute("y", $y) if defined ($y);
65      return $self->attribute("y");      return defined($self->attribute("y")) ? $self->attribute("y") : $self->lam_y;
66  }  }
67    
68  sub width  sub width
# Line 65  sub height Line 83  sub height
83      return $self->attribute("height");      return $self->attribute("height");
84  }  }
85    
86    sub cleanup
87    {
88        my $self = shift;
89    
90        map {$self->delete($_)} grep {/^lam:/} $self->attribute_names;
91        return $self->SUPER::cleanup;
92    }
93    
94  1;  1;

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