home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / perl / lib / site / auto / Tk / Scrollbar / ClassInit.al < prev    next >
Encoding:
Text File  |  1997-08-10  |  1.7 KB  |  46 lines

  1. # NOTE: Derived from ..\blib\lib\Tk\Scrollbar.pm.  Changes made here will be lost.
  2. package Tk::Scrollbar;
  3.  
  4. sub ClassInit
  5. {
  6.  my ($class,$mw) = @_;
  7.  $mw->bind($class, "<Enter>", "Enter");
  8.  $mw->bind($class, "<Motion>", "Motion");
  9.  $mw->bind($class, "<Leave>", "Leave");
  10.  
  11.  $mw->bind($class, "<1>", "ButtonDown");
  12.  $mw->bind($class, "<B1-Motion>", "Drag");
  13.  $mw->bind($class, "<ButtonRelease-1>", "ButtonUp");
  14.  $mw->bind($class, "<B1-Leave>", 'NoOp'); # prevent generic <Leave>
  15.  $mw->bind($class, "<B1-Enter>", 'NoOp'); # prevent generic <Enter>
  16.  $mw->bind($class, "<Control-1>", "ScrlTopBottom"); 
  17.  
  18.  $mw->bind($class, "<2>", "ButtonDown");
  19.  $mw->bind($class, "<B2-Motion>", "Drag");
  20.  $mw->bind($class, "<ButtonRelease-2>", "ButtonUp");
  21.  $mw->bind($class, "<B2-Leave>", 'NoOp'); # prevent generic <Leave>
  22.  $mw->bind($class, "<B2-Enter>", 'NoOp'); # prevent generic <Enter>
  23.  $mw->bind($class, "<Control-2>", "ScrlTopBottom"); 
  24.  
  25.  $mw->bind($class, "<Up>",            ["ScrlByUnits","v",-1]);
  26.  $mw->bind($class, "<Down>",          ["ScrlByUnits","v", 1]);
  27.  $mw->bind($class, "<Control-Up>",    ["ScrlByPages","v",-1]);
  28.  $mw->bind($class, "<Control-Down>",  ["ScrlByPages","v", 1]);
  29.  
  30.  $mw->bind($class, "<Left>",          ["ScrlByUnits","h",-1]);
  31.  $mw->bind($class, "<Right>",         ["ScrlByUnits","h", 1]);
  32.  $mw->bind($class, "<Control-Left>",  ["ScrlByPages","h",-1]);
  33.  $mw->bind($class, "<Control-Right>", ["ScrlByPages","h", 1]);
  34.  
  35.  $mw->bind($class, "<Prior>",         ["ScrlByPages","hv",-1]);
  36.  $mw->bind($class, "<Next>",          ["ScrlByPages","hv", 1]);
  37.  
  38.  $mw->bind($class, "<Home>",          ["ScrlToPos", 0]);
  39.  $mw->bind($class, "<End>",           ["ScrlToPos", 1]);
  40.  
  41.  return $class;
  42.  
  43. }
  44.  
  45. 1;
  46.