home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _5d842210d4a33b279f421cd81c1310c9 < prev    next >
Text File  |  2004-06-01  |  791b  |  29 lines

  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 297 "..\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,$x,$y) = @_;
  18.  return if (!defined $initPos);
  19.  if ($w->cget('-jump'))
  20.   {
  21.    my $delta = $w->delta($x-$pressX, $y-$pressY);
  22.    $w->ScrlToPos($initPos+$delta);
  23.   }
  24.  undef $initPos;
  25. }
  26.  
  27. # end of Tk::Scrollbar::EndDrag
  28. 1;
  29.