home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _ab119e429aee2f540fea322fa05bdffd < prev    next >
Text File  |  2004-06-01  |  905b  |  39 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 232 "..\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.  
  15. sub StartDrag
  16. {
  17.  my($w,$x,$y) = @_;
  18.  return unless (defined ($w->cget('-command')));
  19.  $pressX = $x;
  20.  $pressY = $y;
  21.  @initValues = $w->get;
  22.  my $iv0 = $initValues[0];
  23.  if (@initValues == 2)
  24.   {
  25.    $initPos = $iv0;
  26.   }
  27.  elsif ($iv0 == 0)
  28.   {
  29.    $initPos = 0;
  30.   }
  31.  else
  32.   {
  33.    $initPos = $initValues[2]/$initValues[0];
  34.   }
  35. }
  36.  
  37. # end of Tk::Scrollbar::StartDrag
  38. 1;
  39.