home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-Developer.iso / NextLibrary / Frameworks / InterfaceBuilder.framework / Versions / A / Headers / IBDocuments.h < prev    next >
Encoding:
Text File  |  1996-11-25  |  2.9 KB  |  90 lines

  1. /* InterfaceBuilder - IBDocuments.h
  2.  * Copyright (c) 1995-1996 NeXT Software, Inc.
  3.  * All rights reserved.
  4.  */
  5.  
  6. #import <InterfaceBuilder/IBEditors.h>
  7. #import <InterfaceBuilder/IBConnectors.h>
  8. #import <InterfaceBuilder/IBProjects.h>
  9.  
  10. @protocol IBDocuments <NSObject>
  11.  
  12. /* Managing the document. */
  13.  
  14. - (NSString *)documentPath;
  15. - (void)touch;
  16.  
  17. /* Managing the document hierarchy. */
  18.  
  19.     /* `attachObject:toParent:' properly handles changing parents of objects;
  20.      * don't call detachObject: to change the parent of an object. */
  21. - (void)attachObject:(id)object toParent:(id)parent;
  22. - (void)attachObjects:(NSArray *)objects toParent:(id)parent;
  23.  
  24.     /* `detachObject: removes objects from the object hierarchy.  All
  25.      * references to the object in the nib file will be removed.  Doesn't
  26.      * explicitly deallocate the objects. */
  27. - (void)detachObject:(id)object;
  28. - (void)detachObjects:(NSArray *)objects;
  29.  
  30. - (NSArray *)objects;
  31. - (BOOL)containsObject:(id)object;
  32. - (id)parentOfObject:(id)object;
  33.  
  34. /* Copying and pasting objects. */
  35.  
  36. - (BOOL)copyObject:(id)object type:(NSString *)type
  37.     toPasteboard:(NSPasteboard *)pasteboard;
  38. - (BOOL)copyObjects:(NSArray *)objects type:(NSString *)type
  39.     toPasteboard:(NSPasteboard *)pasteboard;
  40. - (NSArray *)pasteType:(NSString *)type
  41.     fromPasteboard:(NSPasteboard *)pasteboard parent:(id)parent;
  42.  
  43. /* Setting object names. */
  44.  
  45. - (void)setName:(NSString *)name forObject:(id)object;
  46. - (NSString *)nameForObject:(id)object;
  47. - (BOOL)containsObjectWithName:(NSString *)name forParent:(id)parent;
  48.  
  49. /* Managing connectors. */
  50.  
  51. - (void)addConnector:(id <IBConnectors>)connector;
  52. - (void)removeConnector:(id <IBConnectors>)connector;
  53. - (NSArray *)connectorsForSource:(id)source;
  54. - (NSArray *)connectorsForSource:(id)source ofClass:(Class)connnectorClass;
  55. - (NSArray *)connectorsForDestination:(id)destination;
  56. - (NSArray *)connectorsForDestination:(id)destination
  57.                   ofClass:(Class)connnectorClass;
  58. - (NSArray *)allConnectors;
  59.  
  60. /* Managing editors. */
  61.  
  62. - (id <IBEditors>)openEditorForObject:(id)object;
  63. - (id <IBEditors>)editorForObject:(id)object
  64.     inEditor:(id <IBEditors>)parentEditor create:(BOOL)createIt;
  65.     /* `editorForObject:create:' is the same as the above with
  66.      * parentEditor == nil. */
  67. - (id <IBEditors>)editorForObject:(id)object create:(BOOL)createIt;
  68. - (id <IBEditors>)parentEditorForEditor:(id <IBEditors>)editor;
  69. - (void)setSelectionFromEditor:(id <IBEditors>)editor;
  70. - (void)resignSelectionForEditor:(id <IBEditors>)editor;
  71. - (void)editor:(id <IBEditors>)editor didCloseForObject:(id)object;
  72.  
  73. /* Updating the display. */
  74.  
  75. - (void)drawObject:(id)object;
  76.  
  77. /* Accessing the project. */
  78.  
  79. - (id <IBProjects>)project;
  80.  
  81. @end
  82.  
  83. /* Notifications. */
  84.  
  85. /* The notification object is the document. */
  86. IB_EXTERN NSString *IBDidOpenDocumentNotification;
  87. IB_EXTERN NSString *IBWillSaveDocumentNotification;
  88. IB_EXTERN NSString *IBDidSaveDocumentNotification;
  89. IB_EXTERN NSString *IBWillCloseDocumentNotification;
  90.