home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / perl / lib / site / auto / Tk / Table / see.al < prev    next >
Encoding:
Text File  |  1997-08-10  |  828 b   |  43 lines

  1. # NOTE: Derived from blib\lib\Tk\Table.pm.  Changes made here will be lost.
  2. package Tk::Table;
  3.  
  4. sub see
  5. {
  6.  my $t = shift;
  7.  my ($row,$col) = (@_ == 2) ? @_ : @{$t->{Slave}{$_[0]->PathName}};
  8.  my $see = 1;
  9.  if (($row -= $t->cget('-fixedrows')) >= 0)
  10.   {
  11.    if ($row < $t->{Top})
  12.     {
  13.      $t->{Top} = $row;
  14.      $t->QueueLayout(4);
  15.      $see = 0;
  16.     }
  17.    elsif ($row >= $t->{Bottom})
  18.     {
  19.      $t->{Top} += ($row - $t->{Bottom}+1);
  20.      $t->QueueLayout(4);
  21.      $see = 0;
  22.     }
  23.   }
  24.  if (($col -= $t->cget('-fixedcolumns')) >= 0)
  25.   {
  26.    if ($col < $t->{Left})
  27.     {
  28.      $t->{Left} = $col;
  29.      $t->QueueLayout(4);
  30.      $see = 0;
  31.     }
  32.    elsif ($col >= $t->{Right})
  33.     {
  34.      $t->{Left} += ($col - $t->{Right}+1);
  35.      $t->QueueLayout(4);
  36.      $see = 0;
  37.     }
  38.   }
  39.  return $see;
  40. }
  41.  
  42. 1;
  43.