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

  1. # NOTE: Derived from ..\blib\lib\Tk\Scale.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package Tk::Scale;
  5.  
  6. #line 169 "..\blib\lib\Tk\Scale.pm (autosplit into ..\blib\lib\auto\Tk\Scale\Drag.al)"
  7. # Drag --
  8. # This procedure is called when the mouse is dragged with
  9. # mouse button 1 down. If the drag started inside the slider
  10. # (i.e. the scale is active) then the scale's value is adjusted
  11. # to reflect the mouse's position.
  12. #
  13. # Arguments:
  14. # w - The scale widget.
  15. # x, y - Mouse coordinates.
  16. sub Drag
  17. {
  18.  my $w = shift;
  19.  my $x = shift;
  20.  my $y = shift;
  21.  if (!$Tk::dragging)
  22.   {
  23.    return;
  24.   }
  25.  $w->set($w->get($x-$Tk::deltaX,$y-$Tk::deltaY))
  26. }
  27.  
  28. # end of Tk::Scale::Drag
  29. 1;
  30.