summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/auto/Tk/Table/see.al
blob: 38841a76552f3e9352df2281ad02f9efa56c4c50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# NOTE: Derived from blib\lib\Tk\Table.pm.
# Changes made here will be lost when autosplit is run again.
# See AutoSplit.pm.
package Tk::Table;

#line 559 "blib\lib\Tk\Table.pm (autosplit into blib\lib\auto\Tk\Table\see.al)"
sub see
{
 my $t = shift;
 my ($row,$col) = (@_ == 2) ? @_ : @{$t->{Slave}{$_[0]->PathName}};
 my $see = 1;
 if (($row -= $t->cget('-fixedrows')) >= 0)
  {
   if ($row < $t->{Top})
    {
     $t->{Top} = $row;
     $t->QueueLayout(_ViewChange);
     $see = 0;
    }
   elsif ($row >= $t->{Bottom})
    {
     $t->{Top} += ($row - $t->{Bottom}+1);
     $t->QueueLayout(_ViewChange);
     $see = 0;
    }
  }
 if (($col -= $t->cget('-fixedcolumns')) >= 0)
  {
   if ($col < $t->{Left})
    {
     $t->{Left} = $col;
     $t->QueueLayout(_ViewChange);
     $see = 0;
    }
   elsif ($col >= $t->{Right})
    {
     $t->{Left} += ($col - $t->{Right}+1);
     $t->QueueLayout(_ViewChange);
     $see = 0;
    }
  }
 return $see;
}

1;
# end of Tk::Table::see