home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3.4.17 [SPARC, PA-RISC] / nextstep33_risc.iso / NextLibrary / TeX / tex / src / texview / CText.m < prev    next >
Encoding:
Text File  |  1992-05-04  |  744 b   |  34 lines

  1. #import "CText.h"
  2. #import "ComScroll.h"
  3. #import <appkit/Application.h>
  4.  
  5. @implementation CText
  6.  
  7. - setController:sender;
  8. {
  9.    controller = sender ;
  10.    [self setDelegate:controller] ;
  11.    return self ;
  12. }
  13.  
  14. /*
  15.  *   We override keydown totally.  We just send the character to the
  16.  *   terminal.  If we've set things up in echo mode properly, then we
  17.  *   should get it back.  This provides better (but slower) feedback
  18.  *   and gets around the modal loop that otherwise would be started
  19.  *   here.
  20.  */
  21. - keyDown:(NXEvent *)theEvent;
  22. {
  23.    char buf[2] ;
  24.  
  25.    buf[0] = theEvent->data.key.charCode ;
  26. /* [super keyDown:theEvent] ;  */
  27.    buf[1] = 0 ; 
  28.    if (buf[0] && controller)
  29.       [(ComScroll *)controller sendToMaster:buf] ;
  30.    return self ;
  31. }
  32.  
  33. @end
  34.