1999-12-08 15:04:57 +00:00
|
|
|
#ifndef GORMDOCUMENT_H
|
|
|
|
#define GORMDOCUMENT_H
|
|
|
|
|
2001-05-08 09:43:11 +00:00
|
|
|
@class GormClassManager, GormClassEditor;
|
|
|
|
|
1999-12-13 17:01:35 +00:00
|
|
|
/*
|
|
|
|
* Each document has a GormFirstResponder object that is used as a placeholder
|
|
|
|
* for the first responder at any instant.
|
|
|
|
*/
|
1999-12-20 15:21:26 +00:00
|
|
|
@interface GormFirstResponder : NSObject
|
|
|
|
{
|
|
|
|
}
|
|
|
|
@end
|
1999-12-13 17:01:35 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Each document may have a GormFontManager object that is used as a
|
|
|
|
* placeholder for the current fornt manager.
|
|
|
|
*/
|
1999-12-20 15:21:26 +00:00
|
|
|
@interface GormFontManager : NSObject
|
|
|
|
{
|
|
|
|
}
|
|
|
|
@end
|
1999-12-13 17:01:35 +00:00
|
|
|
|
1999-12-08 15:04:57 +00:00
|
|
|
@interface GormDocument : GSNibContainer <IBDocuments>
|
|
|
|
{
|
2001-05-08 09:43:11 +00:00
|
|
|
GormClassManager *classManager;
|
1999-12-13 17:01:35 +00:00
|
|
|
GormFilesOwner *filesOwner;
|
|
|
|
GormFirstResponder *firstResponder;
|
|
|
|
GormFontManager *fontManager;
|
2001-05-08 09:43:11 +00:00
|
|
|
GormClassEditor *classEditor; // perhaps should not be here...
|
1999-12-08 15:04:57 +00:00
|
|
|
NSString *documentPath;
|
|
|
|
NSMapTable *objToName;
|
1999-12-14 19:55:18 +00:00
|
|
|
NSWindow *window;
|
|
|
|
NSMatrix *selectionView;
|
2001-05-08 09:43:11 +00:00
|
|
|
NSBox *selectionBox;
|
1999-12-14 19:55:18 +00:00
|
|
|
NSScrollView *scrollView;
|
2001-05-08 09:43:11 +00:00
|
|
|
NSScrollView *classesScrollView;
|
|
|
|
id classesView;
|
1999-12-14 19:55:18 +00:00
|
|
|
id objectsView;
|
2000-01-13 21:19:03 +00:00
|
|
|
BOOL hasSetDefaults;
|
2000-01-04 16:25:39 +00:00
|
|
|
BOOL isActive;
|
1999-12-16 18:06:22 +00:00
|
|
|
NSMenu *savedMenu;
|
1999-12-15 15:29:27 +00:00
|
|
|
NSMenuItem *quitItem; /* Replaced during test */
|
2000-01-03 11:00:14 +00:00
|
|
|
NSMutableArray *savedEditors;
|
2000-02-03 17:04:37 +00:00
|
|
|
NSMutableArray *hidden;
|
1999-12-08 15:04:57 +00:00
|
|
|
}
|
|
|
|
- (void) addConnector: (id<IBConnectors>)aConnector;
|
|
|
|
- (NSArray*) allConnectors;
|
|
|
|
- (void) attachObject: (id)anObject toParent: (id)aParent;
|
|
|
|
- (void) attachObjects: (NSArray*)anArray toParent: (id)aParent;
|
2000-01-03 11:00:14 +00:00
|
|
|
- (void) beginArchiving;
|
2001-05-08 09:43:11 +00:00
|
|
|
- (GormClassManager*) classManager;
|
1999-12-08 15:04:57 +00:00
|
|
|
- (NSArray*) connectorsForDestination: (id)destination;
|
|
|
|
- (NSArray*) connectorsForDestination: (id)destination
|
|
|
|
ofClass: (Class)aConnectorClass;
|
|
|
|
- (NSArray*) connectorsForSource: (id)source;
|
|
|
|
- (NSArray*) connectorsForSource: (id)source
|
|
|
|
ofClass: (Class)aConnectorClass;
|
|
|
|
- (BOOL) containsObject: (id)anObject;
|
|
|
|
- (BOOL) containsObjectWithName: (NSString*)aName forParent: (id)parent;
|
|
|
|
- (BOOL) copyObject: (id)anObject
|
|
|
|
type: (NSString*)aType
|
|
|
|
toPasteboard: (NSPasteboard*)aPasteboard;
|
|
|
|
- (BOOL) copyObjects: (NSArray*)anArray
|
|
|
|
type: (NSString*)aType
|
|
|
|
toPasteboard: (NSPasteboard*)aPasteboard;
|
|
|
|
- (void) detachObject: (id)anObject;
|
|
|
|
- (void) detachObjects: (NSArray*)anArray;
|
|
|
|
- (NSString*) documentPath;
|
2000-01-03 11:00:14 +00:00
|
|
|
- (void) endArchiving;
|
1999-12-14 19:55:18 +00:00
|
|
|
- (void) handleNotification: (NSNotification*)aNotification;
|
2000-01-04 16:25:39 +00:00
|
|
|
- (BOOL) isActive;
|
1999-12-08 15:04:57 +00:00
|
|
|
- (NSString*) nameForObject: (id)anObject;
|
|
|
|
- (id) objectForName: (NSString*)aString;
|
2000-01-03 11:00:14 +00:00
|
|
|
- (BOOL) objectIsVisibleAtLaunch: (id)anObject;
|
1999-12-08 15:04:57 +00:00
|
|
|
- (NSArray*) objects;
|
2000-01-04 17:46:26 +00:00
|
|
|
- (id) loadDocument: (NSString*)path;
|
1999-12-08 15:04:57 +00:00
|
|
|
- (id) openDocument: (id)sender;
|
|
|
|
- (id) parentOfObject: (id)anObject;
|
|
|
|
- (NSArray*) pasteType: (NSString*)aType
|
|
|
|
fromPasteboard: (NSPasteboard*)aPasteboard
|
|
|
|
parent: (id)parent;
|
|
|
|
- (void) removeConnector: (id<IBConnectors>)aConnector;
|
2000-01-04 17:46:26 +00:00
|
|
|
- (id) revertDocument: (id)sender;
|
1999-12-08 15:04:57 +00:00
|
|
|
- (id) saveAsDocument: (id)sender;
|
|
|
|
- (id) saveDocument: (id)sender;
|
2000-01-13 21:19:03 +00:00
|
|
|
- (void) setupDefaults: (NSString*)type;
|
1999-12-08 15:04:57 +00:00
|
|
|
- (void) setDocumentActive: (BOOL)flag;
|
|
|
|
- (void) setName: (NSString*)aName forObject: (id)object;
|
2000-01-03 11:00:14 +00:00
|
|
|
- (void) setObject: (id)anObject isVisibleAtLaunch: (BOOL)flag;
|
1999-12-08 15:04:57 +00:00
|
|
|
- (void) touch; /* Mark document as having been changed. */
|
2000-01-04 16:25:39 +00:00
|
|
|
- (NSWindow*) window;
|
|
|
|
- (BOOL) windowShouldClose: (id)sender;
|
2001-05-08 09:43:11 +00:00
|
|
|
|
|
|
|
// classes support
|
|
|
|
- (id) createSubclass: (id)sender;
|
|
|
|
- (id) instantiateClass: (id)sender;
|
|
|
|
- (id) editClass: (id)sender;
|
2001-07-06 17:10:51 +00:00
|
|
|
- (id) createClassFiles: (id)sender;
|
2001-05-08 09:43:11 +00:00
|
|
|
- (void) changeCurrentClass: (id)sender;
|
1999-12-08 15:04:57 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif
|