home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / EODEV.Z / EOControlAssociation.h < prev    next >
Encoding:
Text File  |  1996-09-09  |  1.7 KB  |  48 lines

  1. // EOControlAssociation
  2. // Enterprise Objects Framework
  3. // Copyright (c) 1995, NeXT Software, Inc.  All rights reserved. 
  4. //
  5. // The EOControlAssociation & EOActionCellAssociation bind a control
  6. // or cell to properties of the currently selected EO in a DisplayGroup.
  7. // Supported Bindings:
  8. //     value:     property of the EO to be displayed in the column.
  9. //     enabled:   BOOL property of EO indicating whether control should be enabled
  10. // Because setObjectValue:, and objectValue are used to communicate with
  11. // the control, these associations work with NSImageView and NSImageCell.
  12.  
  13. #import <EOInterface/EOAssociation.h>
  14.  
  15. // Generic superclass handling Cells and Controls
  16. @interface EOGenericControlAssociation : EOAssociation
  17. {
  18.     // our object can be either a NSControl subclass or an NSActionCell
  19.     BOOL _didChange;  // has the text changed since the last AssocDidEdit?
  20.     id _lastValue;
  21. }
  22. // must be overriden by subclasses
  23. - (NSControl *)control;
  24.     // get the control (we can be its delegate)
  25. - (EOGenericControlAssociation *)editingAssociation;
  26.     // What association is responsible for textDelegate messages.
  27.     // In the case of matrixes and TableViews, this is the association
  28.     // for the editing cell
  29. @end
  30.  
  31. // For views
  32. @interface EOControlAssociation : EOGenericControlAssociation
  33. {}
  34. @end
  35.  
  36. // For cells
  37. @interface EOActionCellAssociation : EOGenericControlAssociation
  38. {}
  39. @end
  40.  
  41. @interface NSImage (EOImageFactory)
  42. + imageWithData:(NSData *)imageData;
  43.     // Equivalent to [[[NSImage alloc] initWithData:imageData] autorelease].
  44.     // Creates an NSImage from tiff, bmp, ico, dib, and eps data.
  45.     // Useful in EOAttribute custom datatype converion.
  46.     // Use TIFFRepresentation to extract a TIFF from the NSImage.
  47. @end
  48.