home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _c6b4f007c4b37f4f7f460306cd45c375 < prev    next >
Text File  |  2004-06-01  |  989b  |  41 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 138 "..\blib\lib\Tk\Scale.pm (autosplit into ..\blib\lib\auto\Tk\Scale\ButtonDown.al)"
  7. # ButtonDown --
  8. # This procedure is invoked when a button is pressed in a scale. It
  9. # takes different actions depending on where the button was pressed.
  10. #
  11. # Arguments:
  12. # w - The scale widget.
  13. # x, y - Mouse coordinates of button press.
  14. sub ButtonDown
  15. {
  16.  my $w = shift;
  17.  my $x = shift;
  18.  my $y = shift;
  19.  $Tk::dragging = 0;
  20.  $el = $w->identify($x,$y);
  21.  return unless ($el);
  22.  if ($el eq 'trough1')
  23.   {
  24.    $w->Increment('up','little','initial')
  25.   }
  26.  elsif ($el eq 'trough2')
  27.   {
  28.    $w->Increment('down','little','initial')
  29.   }
  30.  elsif ($el eq 'slider')
  31.   {
  32.    $Tk::dragging = 1;
  33.    my @coords = $w->coords();
  34.    $Tk::deltaX = $x-$coords[0];
  35.    $Tk::deltaY = $y-$coords[1];
  36.   }
  37. }
  38.  
  39. # end of Tk::Scale::ButtonDown
  40. 1;
  41.