Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / auto / Tk / Scrollbar / ScrlTopBottom.al
CommitLineData
86530b38
AT
1# NOTE: Derived from ../blib/lib/Tk/Scrollbar.pm.
2# Changes made here will be lost when autosplit is run again.
3# See AutoSplit.pm.
4package Tk::Scrollbar;
5
6#line 390 "../blib/lib/Tk/Scrollbar.pm (autosplit into ../blib/lib/auto/Tk/Scrollbar/ScrlTopBottom.al)"
7# tkScrlTopBottom
8# Scroll to the top or bottom of the document, depending on the mouse
9# position.
10#
11# Arguments:
12# w - The scrollbar widget.
13# x, y - Mouse coordinates within the widget.
14
15sub ScrlTopBottom
16{
17 my $w = shift;
18 my $e = $w->XEvent;
19 my $element = $w->identify($e->x,$e->y);
20 return unless ($element);
21 if ($element =~ /1$/)
22 {
23 $w->ScrlToPos(0);
24 }
25 elsif ($element =~ /2$/)
26 {
27 $w->ScrlToPos(1);
28 }
29}
30
311;
32# end of Tk::Scrollbar::ScrlTopBottom