home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 December / PCpro_2006_12.ISO / ossdvd / server / Perl2 / site / lib / Tk / ROText.pm < prev    next >
Encoding:
Perl POD Document  |  2000-05-16  |  818 b   |  37 lines

  1. # Copyright (c) 1995-1999 Nick Ing-Simmons. All rights reserved.
  2. # This program is free software; you can redistribute it and/or
  3. # modify it under the same terms as Perl itself.
  4. package Tk::ROText;
  5.  
  6. use vars qw($VERSION);
  7. $VERSION = '3.024'; # $Id: //depot/Tk8/Tk/ROText.pm#24 $
  8.  
  9. use Tk::Text;
  10. use base  qw(Tk::Text);
  11.  
  12. Construct Tk::Widget 'ROText';
  13.  
  14. sub clipEvents
  15. {
  16.  return qw[Copy];
  17. }
  18.  
  19. sub ClassInit
  20. {
  21.  my ($class,$mw) = @_;
  22.  my $val = $class->bindRdOnly($mw);
  23.  my $cb  = $mw->bind($class,'<Next>');
  24.  $mw->bind($class,'<space>',$cb) if (defined $cb);
  25.  $cb  = $mw->bind($class,'<Prior>');
  26.  $mw->bind($class,'<BackSpace>',$cb) if (defined $cb);
  27.  $class->clipboardOperations($mw,'Copy');
  28.  return $val;
  29. }
  30.  
  31. sub Tk::Widget::ScrlROText { shift->Scrolled('ROText' => @_) }
  32.  
  33. 1;
  34.  
  35. __END__
  36.  
  37.