home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Games / NeXTGo-3.0-MIS / ClickCell.m < prev    next >
Encoding:
Text File  |  1997-11-13  |  1015 b   |  47 lines

  1. #include "comment.header"
  2.  
  3. /* $Id: ClickCell.m,v 1.4 1997/11/04 16:49:53 ergo Exp $ */
  4.  
  5. /*
  6.  * $Log: ClickCell.m,v $
  7.  * Revision 1.4  1997/11/04 16:49:53  ergo
  8.  * ported to OpenStep
  9.  *
  10.  * Revision 1.3  1997/07/06 19:37:56  ergo
  11.  * actual version
  12.  *
  13.  * Revision 1.2  1997/05/04 18:56:51  ergo
  14.  * added time control for moves
  15.  *
  16.  */
  17.  
  18. #import "ClickCell.h"
  19. #import "GoApp.h"
  20.  
  21. #import <AppKit/NSText.h>
  22. #import <AppKit/NSFont.h>
  23. #import <AppKit/NSWindow.h>
  24. #import <AppKit/NSApplication.h>
  25.  
  26. #import <stdio.h>
  27.  
  28. @implementation ClickCell
  29.  
  30. - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)_untilMouseUp
  31. {
  32.     [NSApp cellClicked:self];
  33.  
  34.     return  YES;   
  35. }    
  36.  
  37. - initTextCell:(NSString *)aString
  38. {
  39.     self = [super initTextCell:aString];
  40.     [self setFont:[NSFont fontWithName:@"Helvetica" size:17]];
  41.     [self setBackgroundColor:[NSColor lightGrayColor]];
  42.     [self setBezeled:YES];
  43.     [self setAlignment:NSLeftTextAlignment];
  44.     return self;
  45. }    
  46. @end
  47.