| 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. |
| 4 | package Tk::Scrollbar; |
| 5 | |
| 6 | #line 283 "../blib/lib/Tk/Scrollbar.pm (autosplit into ../blib/lib/auto/Tk/Scrollbar/EndDrag.al)" |
| 7 | # tkScrollEndDrag -- |
| 8 | # This procedure is called to end an interactive drag of the slider. |
| 9 | # It scrolls the window if we're in jump mode, otherwise it does nothing. |
| 10 | # |
| 11 | # Arguments: |
| 12 | # w - The scrollbar widget. |
| 13 | # x, y - The mouse position at the end of the drag operation. |
| 14 | |
| 15 | sub EndDrag |
| 16 | { |
| 17 | my $w = shift; |
| 18 | my $x = shift; |
| 19 | my $y = shift; |
| 20 | return unless defined($initMouse); |
| 21 | if ($w->cget('-jump')) |
| 22 | { |
| 23 | $w->ScrlToPos($initPos + $w->fraction($x,$y) - $initMouse); |
| 24 | } |
| 25 | undef $initMouse; |
| 26 | } |
| 27 | |
| 28 | # end of Tk::Scrollbar::EndDrag |
| 29 | 1; |