home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / IBPalettes / WW3DKit / ShapeCell.m < prev    next >
Encoding:
Text File  |  1995-03-22  |  1018 b   |  69 lines

  1. // copyright 1993 Michael B. Johnson; some portions copyright 1994, MIT
  2. // see COPYRIGHT for reuse legalities
  3. //
  4.  
  5. #import "WW3DShape.h"
  6. #import "ShapeCell.h"
  7.  
  8. @implementation ShapeCell
  9.  
  10.  
  11. + initialize { [ShapeCell setVersion:1]; return self; }
  12. ////////////////////////////////////////////////////////
  13. //
  14. - init
  15. {
  16.   [super init];
  17.   shape = nil;
  18.  
  19.   return self;
  20. }
  21. - initTextCell:(const char *)aString
  22. {
  23.   [super initTextCell:aString];
  24.   shape = nil;
  25.  
  26.   return self;
  27. }
  28. //
  29. - awake
  30. {
  31.   [super awake];
  32.   return self;
  33. }
  34.  
  35. - endEditing:textObject
  36. {
  37.   [super endEditing:textObject];
  38.   [shape setShapeName:[self stringValue]];
  39.   [self setEditable:NO];
  40.  
  41.   return self;
  42. }
  43. //
  44. - setShape:aShape { shape = aShape; return self; }
  45. //
  46. - shape { return shape; }
  47.  
  48. - write:(NXTypedStream *)stream 
  49. {
  50.    [super write:stream];
  51.    return self;
  52. }
  53. //
  54. - read:(NXTypedStream *)stream 
  55. {
  56.    int version;
  57.  
  58.    [super read:stream];
  59.  
  60.    version = NXTypedStreamClassVersion(stream, "ShapeCell");
  61.    if (version == 1)
  62.    {  
  63.    }
  64.    return self;
  65. }
  66.  
  67.  
  68. @end
  69.