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 / StartDrag.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 222 "../blib/lib/Tk/Scrollbar.pm (autosplit into ../blib/lib/auto/Tk/Scrollbar/StartDrag.al)"
7# tkScrollStartDrag --
8# This procedure is called to initiate a drag of the slider. It just
9# remembers the starting position of the slider.
10#
11# Arguments:
12# w - The scrollbar widget.
13# x, y - The mouse position at the start of the drag operation.
14
15sub StartDrag
16{my $w = shift;
17 my $x = shift;
18 my $y = shift;
19 return unless (defined ($w->cget('-command')));
20 $initMouse = $w->fraction($x,$y);
21 @initValues = $w->get();
22 if (@initValues == 2)
23 {
24 $initPos = $initValues[0];
25 }
26 else
27 {
28 $initPos = $initValues[2] / $initValues[0];
29 }
30}
31
32# end of Tk::Scrollbar::StartDrag
331;