home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / Rhapsody / Graphics / Morph-2.0a / Editor.h < prev    next >
Encoding:
Text File  |  1997-12-27  |  1.3 KB  |  53 lines

  1. // Editor.h 
  2. //
  3. // created by Martin Wennerberg on Sun 12-Nov-1995
  4. //
  5. // An Editor handles displaying of an image and it's morph lines.
  6. // One can have any number of Editors for displaying the morph lines.
  7. // The morph lines are displayed at a certain delta. A delta of zero
  8. // is the first frame of the morph and a delta of one is the last.
  9. //
  10. // when        who    modification
  11.  
  12. #import <AppKit/AppKit.h>
  13.  
  14. @interface Editor : NSView
  15. {
  16.     NSImage    *image;
  17.     float     delta;
  18.     BOOL     editingIsEnabled;
  19.     id         delegate;
  20. }
  21. - (id)initWithFrame:(NSRect)frameRect;
  22.  
  23. - (NSImage *) image;
  24. - (void) setImage:(NSImage *)im;
  25.   // Sets the image displayed as background.
  26.   // Also calls [delegate setImage:atDelta:]
  27.  
  28. - (void) setDelta:(float)d;
  29. - (float) delta;
  30.  
  31. - (void) setEditingIsEnabled:(BOOL)yn;
  32. - (BOOL) editingIsEnabled;
  33.  
  34. // Overrides from NSView
  35.  
  36. - (void)resizeWithOldSuperviewSize:(NSSize)oldSize;
  37.   // Scales the image.
  38. - (void)mouseDown:(NSEvent *)event;
  39.   // Manipulates morph lines.
  40. - (void)drawRect:(NSRect)rect;
  41.   // Draws the image and the morphlines.
  42.  
  43. @end
  44.  
  45. /* Drag and drop of images into the Editor */
  46.  
  47. @interface Editor(Drag)
  48.  
  49. - (unsigned int)draggingEntered:(id <NSDraggingInfo>)sender;
  50. - (unsigned int)draggingUpdated:(id <NSDraggingInfo>)sender;
  51. - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
  52.     // Calls [self setImage:]
  53. @end