home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / PostScript / EnhancedYap / Source / YapDocument.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-12  |  1.1 KB  |  50 lines

  1. #import <objc/Object.h>
  2. #import <streams/streams.h>
  3.  
  4. @interface YapDocument:Object {
  5.   id document;
  6.   char *name;
  7. }
  8.  
  9. + newFromStream:(NXStream *)stream name:(const char *)fileName;
  10. + new;
  11. + newFromFile:(const char *)fileName;
  12. - initializePrintInfo;
  13.  
  14. // Connect to target/action methods
  15.  
  16. - save:sender;
  17. - saveAs:sender;
  18. - execute:sender;
  19. - print:sender;
  20.  
  21. // Other methods
  22.  
  23. - setName:(const char *)title;
  24. - (const char *)name;
  25. - (BOOL)saveDocument:(const char *)fileName;
  26. - (BOOL)closeDocument:(const char *)message andWindow:(BOOL)flag;
  27. - (BOOL)needsSaving;
  28.  
  29. // Return the document in the specified window; nil if the
  30. // window contains no Yap document.
  31.  
  32. + documentForWindow:window;
  33.  
  34. // The following delegate method is used for detecting when the user 
  35. // edits the text.
  36.  
  37. - text:text isEmpty:(BOOL)empty;
  38.  
  39. // ...and the following when he/she changes the font.
  40.  
  41. - textWillConvert:textObject fromFont:oldFont toFont:newFont;
  42.  
  43. // YapDocuments have their own zones; the following two methods allow
  44. // reuse of zones.
  45.  
  46. + (NXZone *)newZone;
  47. + (void)reuseZone:(NXZone *)aZone;
  48.  
  49. @end
  50.