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
|
2002-11-21 01:00:08 +00:00
|
|
|
* placeholder for the current font manager.
|
1999-12-13 17:01:35 +00:00
|
|
|
*/
|
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;
|
2002-10-13 06:04:05 +00:00
|
|
|
NSMutableDictionary *tempNameTable;
|
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;
|
2002-11-04 13:52:31 +00:00
|
|
|
NSScrollView *soundsScrollView;
|
2002-11-18 20:54:26 +00:00
|
|
|
NSScrollView *imagesScrollView;
|
2001-05-08 09:43:11 +00:00
|
|
|
id classesView;
|
1999-12-14 19:55:18 +00:00
|
|
|
id objectsView;
|
2002-11-04 13:52:31 +00:00
|
|
|
id soundsView;
|
2002-11-18 20:54:26 +00:00
|
|
|
id imagesView;
|
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;
|
2002-10-13 06:04:05 +00:00
|
|
|
NSMutableArray *deferredWindows;
|
2002-11-04 13:52:31 +00:00
|
|
|
NSMutableSet *sounds;
|
2002-11-18 20:54:26 +00:00
|
|
|
NSMutableSet *images;
|
2002-11-18 06:15:06 +00:00
|
|
|
// NSFileWrapper *wrapper;
|
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
|
|
|
|
2002-10-13 06:04:05 +00:00
|
|
|
// classes support..
|
2001-05-08 09:43:11 +00:00
|
|
|
- (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;
|
2002-11-04 13:52:31 +00:00
|
|
|
|
|
|
|
// sound support
|
|
|
|
- (id) openSound: (id)sender;
|
2002-11-05 05:42:45 +00:00
|
|
|
|
2002-11-13 16:10:22 +00:00
|
|
|
// Internals support
|
|
|
|
- (void) rebuildObjToNameMapping;
|
2002-11-21 01:00:08 +00:00
|
|
|
- (id) parseHeader: (NSString *)headerPath;
|
2002-11-23 23:33:17 +00:00
|
|
|
- (BOOL) removeConnectionsWithLabel: (NSString *)name
|
2002-11-23 04:45:04 +00:00
|
|
|
forClassNamed: (NSString *)className
|
|
|
|
isAction: (BOOL)action;
|
1999-12-08 15:04:57 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif
|