home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / IBDocuments.h < prev    next >
Encoding:
Text File  |  1996-09-09  |  2.9 KB  |  89 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)class;
  55. - (NSArray *)connectorsForDestination:(id)destination;
  56. - (NSArray *)connectorsForDestination:(id)destination ofClass:(Class)class;
  57. - (NSArray *)allConnectors;
  58.  
  59. /* Managing editors. */
  60.  
  61. - (id <IBEditors>)openEditorForObject:(id)object;
  62. - (id <IBEditors>)editorForObject:(id)object
  63.     inEditor:(id <IBEditors>)parentEditor create:(BOOL)createIt;
  64.     /* `editorForObject:create:' is the same as the above with
  65.      * parentEditor == nil. */
  66. - (id <IBEditors>)editorForObject:(id)object create:(BOOL)createIt;
  67. - (id <IBEditors>)parentEditorForEditor:(id <IBEditors>)editor;
  68. - (void)setSelectionFromEditor:(id <IBEditors>)editor;
  69. - (void)resignSelectionForEditor:(id <IBEditors>)editor;
  70. - (void)editor:(id <IBEditors>)editor didCloseForObject:(id)object;
  71.  
  72. /* Updating the display. */
  73.  
  74. - (void)drawObject:(id)object;
  75.  
  76. /* Accessing the project. */
  77.  
  78. - (id <IBProjects>)project;
  79.  
  80. @end
  81.  
  82. /* Notifications. */
  83.  
  84. /* The notification object is the document. */
  85. IB_EXTERN NSString *IBDidOpenDocumentNotification;
  86. IB_EXTERN NSString *IBWillSaveDocumentNotification;
  87. IB_EXTERN NSString *IBDidSaveDocumentNotification;
  88. IB_EXTERN NSString *IBWillCloseDocumentNotification;
  89.