home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Examples / AppKit / Draw / DrawDocument.h < prev    next >
Text File  |  1996-04-25  |  3KB  |  106 lines

  1. @interface DrawDocument : ChangeManager
  2. {
  3.     GraphicView *view;        /* the document's GraphicView */
  4.     NSWindow *window;        /* the window the GraphicView is in */
  5.     NSPrintInfo *printInfo;    /* the print information for the GraphicView */
  6.     NSString *name;        /* the name of the document */
  7.     NSString *directory;    /* the directory it is in */
  8.     NSArray * iconPathList;    /* list of files last dragged over document */
  9.     BOOL haveSavedDocument;    /* whether document has associated disk file */
  10.     DrawSpellText *drawFieldEditor;
  11.     NSDataLinkManager *linkManager;    /* manager of data links */
  12. }
  13.  
  14. /* Factory methods */
  15.  
  16. + (NSWindow *)createWindowForView:(NSView *)view windowRect:(NSRect *)windowContentRect frameString:(NSString *)frameString;
  17. + (NSZone *)newZone;
  18.  
  19. + new;
  20.  
  21. + newFromFile:(NSString *)file andDisplay:(BOOL)display;
  22. + newFromFile:(NSString *)file;
  23.  
  24. /* Public methods */
  25.  
  26. - (id)init;
  27. - (void)dealloc;
  28. - (void)close;    /* Frees (delayed). */
  29.  
  30. /* Data link methods */
  31.  
  32. - (void)setLinkManager:(NSDataLinkManager *)aLinkManager;
  33. - (BOOL)showSelection:(NSSelection *)selection;
  34. - copyToPasteboard:(NSPasteboard *)pasteboard at:(NSSelection *)selection cheapCopyAllowed:(BOOL)flag;
  35. - (BOOL)pasteFromPasteboard:(NSPasteboard *)pasteboard at:(NSSelection *)selection;
  36. - (BOOL)importFile:(NSString *)filename at:(NSSelection *)selection;
  37. - (NSWindow *)windowForSelection:(NSSelection *)selection;
  38.  
  39. /* Overridden from ChangeManager */
  40.  
  41. - (void)changeWasDone;
  42. - (void)changeWasUndone;
  43. - (void)changeWasRedone;
  44. - (void)clean:sender;
  45. - (void)dirty:sender;
  46.  
  47. /* Public Methods */
  48.  
  49. - (void)resetScrollers;
  50. - (GraphicView *)view;
  51. - (NSPrintInfo *)printInfo;
  52.  
  53. /* Target/Action methods */
  54.  
  55. - (void)changeLayout:sender;
  56. - (void)printDocumentWithPanels:(BOOL)panelsFlag;
  57. - (void)printDocument:sender;
  58. - (void)changeGrid:sender;
  59. - (BOOL)save:sender;
  60. - (BOOL)saveAs:sender;
  61. - (void)saveTo:sender;
  62. - (void)revertToSaved:sender;
  63. - (void)showTextRuler:sender;
  64. - (void)hideRuler:sender;
  65.  
  66. /* Document name and file handling methods */
  67.  
  68. - (NSString *)filename;
  69. - (NSString *)directory;
  70. - (NSString *)name;
  71. - (void)setName:(NSString *)name andDirectory:(NSString *)directory;
  72. - (BOOL)setName:(NSString *)name;
  73. - (void)setTemporaryTitle:(NSString *)title;
  74. - (BOOL)saveTo:(NSString *)type using:(SEL)streamWriter;
  75. - (BOOL)saveToTIFFFile:(NSString *)file;
  76. - (BOOL)saveToEPSFile:(NSString *)file;
  77. - (BOOL)saveDocument;
  78. - (BOOL)isSameAs:(NSString *)filename;
  79.  
  80. /* Services menu methods */
  81.  
  82. - (void)registerForServicesMenu;
  83. - (id)validRequestorForSendType:(NSString *)sendType returnType:(NSString *)returnType;
  84. - (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pboard types:(NSArray *)types;
  85.  
  86. /* Window delegate methods */
  87.  
  88. - (BOOL)windowShouldClose:sender cancellable:(BOOL)flag;
  89.  
  90. - (BOOL)windowShouldClose:(NSWindow *)sender;
  91. - windowDidBecomeMain:(NSWindow *)sender;
  92. - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize;
  93. - windowWillMiniaturize:(NSWindow *)sender toMiniwindow:counterpart;
  94. - windowWillReturnFieldEditor:(NSWindow *)sender toObject:client;
  95.  
  96. /* Cursor setting */
  97.  
  98. - (void)resetCursor;
  99.  
  100. /* Getting the graphicView */
  101.  
  102. - (GraphicView *)graphicView;
  103.  
  104. @end
  105.  
  106.