home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / MiniExamples / AppKit / Winfo / WView.m < prev    next >
Encoding:
Text File  |  1991-04-22  |  763 b   |  42 lines

  1. /*
  2.  * Winfo
  3.  * by Paul S. Kleppner
  4.  *
  5.  * This program may be freely distributed, but not sold.
  6.  * It is provided without warranty of any kind, expressed or
  7.  * implied, as to its fitness for any particular use.
  8.  */
  9.  
  10. /*
  11.  * WView.  This is the content view for the display window
  12.  * on which everything is drawn.  Its only purpose is
  13.  * to take mouse-down events and pass them to hte proxy.
  14.  */
  15.  
  16. #import "WView.h"
  17.  
  18. @implementation WView
  19.  
  20. // Construct, specifying a given client.
  21. + newForClient:client
  22. {
  23.   self = [super new];
  24.   myClient = client;
  25.  
  26.   return self;
  27. }
  28.  
  29. // Pass mouse-down events to the client.
  30. - mouseDown:(NXEvent *)event
  31. {
  32.   [myClient mouseDownProxy:event];
  33.   return self;
  34. }
  35.  
  36. // Take first mouse hits.
  37. - (BOOL) acceptsFirstMouse
  38. {
  39.   return YES;
  40. }
  41. @end
  42.