home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / EODEV.Z / EOModelerApp.h < prev    next >
Encoding:
Text File  |  1996-09-09  |  2.2 KB  |  65 lines

  1. // EOModelerApp.h
  2. // Copyright (c) 1995, NeXT Software, Inc. All rights reserved. 
  3.  
  4. #import <EOInterface/EOInterface.h>
  5. #import <EOAccess/EOAccess.h>
  6. #import <InterfaceBuilder/InterfaceBuilder.h>
  7. #import <EOModeler/EODefines.h>
  8.  
  9. @class EOModelerDocument;
  10. @class EOModelerEditor;
  11.  
  12. @protocol EOMColumnProvider
  13. - (void)initColumn:(NSTableColumn *)col class:(Class)class name:(NSString *)name displayGroup:(EODisplayGroup *)displayGroup document:(EOModelerDocument *)doc;
  14. @end
  15.  
  16.  
  17. @interface EOModelerApp : NSApplication
  18. {
  19.     NSMutableArray *_documents;
  20.     EOModelerEditor *_currentEditor;
  21.     NSMutableDictionary *_columnsByClass;
  22. }
  23.  
  24. - (EOModelerEditor *)currentEditor;
  25. - (void)setCurrentEditor:(EOModelerEditor *)newOwner;
  26.  
  27. // manage list of open documents
  28. - (void)addDocument:(EOModelerDocument *)document;
  29. - (void)removeDocument:(EOModelerDocument *)document;
  30. - (NSArray *)documents;
  31. - (EOModelerDocument *)activeDocument;
  32.  
  33. - (EOModelerDocument *)loadDocumentAtPath:(NSString *)path;
  34.     // Loads new doc at given path
  35.  
  36. - (EOModelerDocument *)documentWithPath:(NSString *)path;
  37.     // returns already loaded document with given path, or nil.
  38.  
  39. - (void)registerColumnName:(NSString *)name forClass:(Class)class provider:(id <EOMColumnProvider>)provider;
  40. - (void)registerColumnNames:(NSArray *)names forClass:(Class)class provider:(id <EOMColumnProvider>)provider;
  41. - (NSArray *)columnNamesForClass:(Class)class;
  42. - (id <EOMColumnProvider>)providerForName:(NSString *)name class:(Class)class;
  43.  
  44. + (EOModel *)modelWithPath:(NSString *)path;
  45.     // load model with given path (creates appropriate model group)
  46.  
  47. @end
  48.  
  49. // Typed NSApp pointer
  50. EOMODELER_EXTERN EOModelerApp *EOMApp;
  51.  
  52. // Pasteboard type
  53. EOMODELER_EXTERN NSString *EOMPropertyPboardType;
  54.  
  55.  
  56. // Notifications
  57. EOMODELER_EXTERN NSString *EOMSelectionChangedNotification;
  58.     // This notification is sent whenever the selection has changed and the
  59.     // inspector needs to update its contents
  60.  
  61. EOMODELER_EXTERN NSString *EOMDataSourceChanged;
  62.     // Temporary solution to having ModelDocument pretend to be an EditingContext:
  63.     // ModelDocuments send this notification with the data source as object when
  64.     // objects from that datasource got changed
  65.