2003-07-15 04:20:09 +00:00
|
|
|
/* GormDocument.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 1999, 2003 Free Software Foundation, Inc.
|
|
|
|
*
|
|
|
|
* Author: Richard Frith-Macdonald <richard@brainstrom.co.uk>
|
|
|
|
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
|
|
|
|
* Date: 1999, 2003
|
|
|
|
*
|
|
|
|
* This file is part of GNUstep.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2007-11-05 23:44:36 +00:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2003-07-15 04:20:09 +00:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-05-26 03:37:38 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
2003-07-15 04:20:09 +00:00
|
|
|
*/
|
2003-05-23 02:25:34 +00:00
|
|
|
|
2003-03-03 09:15:48 +00:00
|
|
|
#ifndef INCLUDED_GormDocument_h
|
|
|
|
#define INCLUDED_GormDocument_h
|
1999-12-08 15:04:57 +00:00
|
|
|
|
2003-05-23 02:25:34 +00:00
|
|
|
#include <Foundation/Foundation.h>
|
2019-11-03 01:57:39 +00:00
|
|
|
#include <AppKit/AppKit.h>
|
|
|
|
|
2005-03-08 05:11:41 +00:00
|
|
|
#include <InterfaceBuilder/InterfaceBuilder.h>
|
2003-05-23 02:25:34 +00:00
|
|
|
|
2019-11-03 01:57:39 +00:00
|
|
|
#include <GNUstepGUI/GSNibContainer.h>
|
|
|
|
|
2006-12-04 01:06:28 +00:00
|
|
|
@class GormClassManager, GormClassEditor, GormObjectProxy, GormFilesOwner,
|
|
|
|
GormFilePrefsManager, GormDocumentWindow;
|
2001-05-08 09:43:11 +00:00
|
|
|
|
2006-06-15 02:47:27 +00:00
|
|
|
/*
|
|
|
|
* Trivial classes for connections from objects to their editors, and from
|
|
|
|
* child editors to their parents. This does nothing special, but we can
|
|
|
|
* use the fact that it's a different class to search for it in the connections
|
|
|
|
* array.
|
|
|
|
*/
|
|
|
|
@interface GormObjectToEditor : NSNibConnector
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface GormEditorToParent : NSNibConnector
|
|
|
|
@end
|
|
|
|
|
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.
|
|
|
|
*/
|
2004-03-22 04:20:17 +00:00
|
|
|
@interface GormFirstResponder : NSObject
|
1999-12-20 15:21:26 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
@end
|
1999-12-13 17:01:35 +00:00
|
|
|
|
2023-07-17 08:03:43 +00:00
|
|
|
@interface GormDocument : NSDocument <IBDocuments, GSNibContainer, NSCoding, NSXMLParserDelegate>
|
1999-12-08 15:04:57 +00:00
|
|
|
{
|
2001-05-08 09:43:11 +00:00
|
|
|
GormClassManager *classManager;
|
1999-12-13 17:01:35 +00:00
|
|
|
GormFilesOwner *filesOwner;
|
|
|
|
GormFirstResponder *firstResponder;
|
2004-03-24 20:44:23 +00:00
|
|
|
GormObjectProxy *fontManager;
|
1999-12-08 15:04:57 +00:00
|
|
|
NSMapTable *objToName;
|
2006-12-04 01:06:28 +00:00
|
|
|
GormDocumentWindow *window;
|
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-04 16:25:39 +00:00
|
|
|
BOOL isActive;
|
2004-08-08 17:23:17 +00:00
|
|
|
BOOL isDocumentOpen;
|
1999-12-16 18:06:22 +00:00
|
|
|
NSMenu *savedMenu;
|
2005-04-10 22:21:59 +00:00
|
|
|
NSMenuItem *quitItem; /* Replaced during test-mode */
|
2000-01-03 11:00:14 +00:00
|
|
|
NSMutableArray *savedEditors;
|
2000-02-03 17:04:37 +00:00
|
|
|
NSMutableArray *hidden;
|
2004-05-13 22:48:14 +00:00
|
|
|
NSMutableArray *openEditors;
|
2004-05-20 02:34:03 +00:00
|
|
|
NSToolbar *toolbar;
|
2004-06-03 22:37:14 +00:00
|
|
|
id lastEditor;
|
2004-07-12 04:16:09 +00:00
|
|
|
BOOL isOlderArchive;
|
|
|
|
id filePrefsView;
|
2006-06-10 13:34:44 +00:00
|
|
|
GormFilePrefsManager *filePrefsManager;
|
2004-07-21 02:03:59 +00:00
|
|
|
NSWindow *filePrefsWindow;
|
2005-04-10 22:21:59 +00:00
|
|
|
NSMutableArray *resourceManagers;
|
2006-06-05 02:12:00 +00:00
|
|
|
NSData *infoData; /* data.info contents */
|
|
|
|
NSMutableArray *images; /* temporary storage for images. */
|
|
|
|
NSMutableArray *sounds; /* temporary storage for sounds. */
|
2006-06-10 13:34:44 +00:00
|
|
|
NSFileWrapper *scmWrapper;
|
|
|
|
|
|
|
|
// container data structures
|
|
|
|
NSMutableDictionary *nameTable;
|
|
|
|
NSMutableArray *connections;
|
|
|
|
NSMutableSet *topLevelObjects;
|
|
|
|
NSMutableSet *visibleWindows;
|
|
|
|
NSMutableSet *deferredWindows;
|
1999-12-08 15:04:57 +00:00
|
|
|
}
|
2005-04-10 22:21:59 +00:00
|
|
|
|
|
|
|
/* Handle notifications */
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle all notifications. Checks the value of [aNotification name]
|
|
|
|
* against the set of notifications this class responds to and takes
|
|
|
|
* appropriate action.
|
|
|
|
*/
|
1999-12-14 19:55:18 +00:00
|
|
|
- (void) handleNotification: (NSNotification*)aNotification;
|
2005-04-10 22:21:59 +00:00
|
|
|
|
|
|
|
/* Document management */
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns YES, if document is active.
|
|
|
|
*/
|
2000-01-04 16:25:39 +00:00
|
|
|
- (BOOL) isActive;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return YES, if anObject is visible at launch time.
|
|
|
|
*/
|
2000-01-03 11:00:14 +00:00
|
|
|
- (BOOL) objectIsVisibleAtLaunch: (id)anObject;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return YES, if anObject is deferred.
|
|
|
|
*/
|
2003-01-16 04:09:07 +00:00
|
|
|
- (BOOL) objectIsDeferred: (id)anObject;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
2005-08-10 06:28:55 +00:00
|
|
|
/**
|
|
|
|
* Retrieve all objects which have parent as thier parent. If flag is YES,
|
|
|
|
* then retrieve the entire graph of objects starting with the parent.
|
|
|
|
*/
|
|
|
|
- (NSArray *) retrieveObjectsForParent: (id)parent recursively: (BOOL)flag;
|
|
|
|
|
2005-07-27 05:42:04 +00:00
|
|
|
/**
|
|
|
|
* Marks this document as the currently active document. The active document is
|
|
|
|
* the one being edited by the user.
|
|
|
|
*/
|
1999-12-08 15:04:57 +00:00
|
|
|
- (void) setDocumentActive: (BOOL)flag;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add object to the visible at launch list.
|
|
|
|
*/
|
2000-01-03 11:00:14 +00:00
|
|
|
- (void) setObject: (id)anObject isVisibleAtLaunch: (BOOL)flag;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add object to the defferred list.
|
|
|
|
*/
|
2003-01-16 04:09:07 +00:00
|
|
|
- (void) setObject: (id)anObject isDeferred: (BOOL)flag;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The document window.
|
|
|
|
*/
|
2000-01-04 16:25:39 +00:00
|
|
|
- (NSWindow*) window;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns YES, if obj is a top level object.
|
|
|
|
*/
|
2005-04-10 22:21:59 +00:00
|
|
|
- (BOOL) isTopLevelObject: (id)obj;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Forces the closing of all editors in the document.
|
|
|
|
*/
|
2005-04-10 22:21:59 +00:00
|
|
|
- (void) closeAllEditors;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create resource manager instances for all registered classes.
|
|
|
|
*/
|
2005-04-10 22:21:59 +00:00
|
|
|
- (void) createResourceManagers;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The list of all resource managers.
|
|
|
|
*/
|
2005-04-10 22:21:59 +00:00
|
|
|
- (NSArray *) resourceManagers;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the resource manager which handles the content on pboard.
|
|
|
|
*/
|
2005-04-11 00:16:01 +00:00
|
|
|
- (IBResourceManager *) resourceManagerForPasteboard: (NSPasteboard *)pboard;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Switch to the top level editor responsible for a given type. This allows the
|
|
|
|
* document in the view to switch to the view which is appropriate for the resource
|
|
|
|
* being dragged in.
|
|
|
|
*/
|
2005-04-22 21:27:14 +00:00
|
|
|
- (void) changeToTopLevelEditorAcceptingTypes: (NSArray *)types
|
|
|
|
andFileType: (NSString *)fileType;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Switches to the view using the specified tag.
|
|
|
|
* They are 0=objects, 1=images, 2=sounds, 3=classes, 4=file prefs.
|
|
|
|
*/
|
2005-04-24 00:15:57 +00:00
|
|
|
- (void) changeToViewWithTag: (int)tag;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
2006-11-19 00:48:34 +00:00
|
|
|
/**
|
|
|
|
* returns the view using the specified tag.
|
|
|
|
* They are 0=objects, 1=images, 2=sounds, 3=classes, 4=file prefs.
|
|
|
|
*/
|
|
|
|
- (NSView *)viewWithTag:(int)tag;
|
|
|
|
|
2005-07-27 05:42:04 +00:00
|
|
|
/**
|
|
|
|
* Returns all pasteboard types registered for with the IBResourceManager.
|
|
|
|
*/
|
2005-04-24 00:15:57 +00:00
|
|
|
- (NSArray *) allManagedPboardTypes;
|
2005-06-11 18:06:43 +00:00
|
|
|
|
2022-11-10 06:46:09 +00:00
|
|
|
/**
|
|
|
|
* Open the editor for anObject, with parent object.
|
|
|
|
*/
|
|
|
|
- (id<IBEditors>) openEditorForObject: (id)anObject
|
|
|
|
withParentObject: (id)parentObj;
|
|
|
|
|
2005-06-11 18:06:43 +00:00
|
|
|
/* Language translation */
|
2023-07-02 03:39:22 +00:00
|
|
|
/**
|
2023-07-17 07:15:39 +00:00
|
|
|
* Load a given file into the reciever using `filename'.
|
2023-07-02 03:39:22 +00:00
|
|
|
*/
|
|
|
|
- (void) importStringsFromFile: (NSString *)filename;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Export the strings from receiver to the file indicated by 'filename'.
|
|
|
|
*/
|
|
|
|
- (void) exportStringsToFile: (NSString *)filename;
|
|
|
|
|
2005-04-10 22:21:59 +00:00
|
|
|
/* Managing classes */
|
2023-07-02 03:39:22 +00:00
|
|
|
/**
|
|
|
|
* Shared class manager
|
|
|
|
*/
|
2005-04-10 22:21:59 +00:00
|
|
|
- (GormClassManager*) classManager;
|
2023-07-02 03:39:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a subclass of the selected class
|
|
|
|
*/
|
2001-05-08 09:43:11 +00:00
|
|
|
- (id) createSubclass: (id)sender;
|
2023-07-02 03:39:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Instantiate the selected class
|
|
|
|
*/
|
2001-05-08 09:43:11 +00:00
|
|
|
- (id) instantiateClass: (id)sender;
|
2023-07-02 03:39:22 +00:00
|
|
|
|
2023-12-16 16:18:41 +00:00
|
|
|
/**
|
|
|
|
* Instantiate the class specified by the parameter className and
|
|
|
|
* returns the reference name within the document
|
|
|
|
*/
|
|
|
|
- (NSString *) instantiateClassNamed: (NSString *)className;
|
|
|
|
|
2023-07-02 03:39:22 +00:00
|
|
|
/**
|
|
|
|
* Generate the class files for the selected class
|
|
|
|
*/
|
2001-07-06 17:10:51 +00:00
|
|
|
- (id) createClassFiles: (id)sender;
|
2023-07-02 03:39:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add attribute to class
|
|
|
|
*/
|
2003-05-10 21:19:25 +00:00
|
|
|
- (id) addAttributeToClass: (id)sender;
|
2023-07-02 03:39:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove the selected class
|
|
|
|
*/
|
2003-05-10 21:19:25 +00:00
|
|
|
- (id) remove: (id)sender;
|
2023-07-02 03:39:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Select class named className
|
|
|
|
*/
|
2004-04-26 05:03:53 +00:00
|
|
|
- (void) selectClass: (NSString *)className;
|
2023-07-02 03:39:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Select class named className and edit it if flag is YES
|
|
|
|
*/
|
2005-06-10 11:43:51 +00:00
|
|
|
- (void) selectClass: (NSString *)className editClass: (BOOL)flag;
|
2023-07-02 03:39:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns YES if a class is selected in the view
|
|
|
|
*/
|
2004-05-19 01:36:37 +00:00
|
|
|
- (BOOL) classIsSelected;
|
2023-07-02 03:39:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Removes all instances of class named classNamed
|
|
|
|
*/
|
2004-12-16 10:38:14 +00:00
|
|
|
- (void) removeAllInstancesOfClass: (NSString *)classNamed;
|
2002-11-04 13:52:31 +00:00
|
|
|
|
2005-04-10 22:21:59 +00:00
|
|
|
/* Sound & Image support */
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Open a sound and load it into the document.
|
|
|
|
*/
|
2002-11-04 13:52:31 +00:00
|
|
|
- (id) openSound: (id)sender;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Open an image and copy it into the document.
|
|
|
|
*/
|
2003-01-04 00:17:43 +00:00
|
|
|
- (id) openImage: (id)sender;
|
2002-11-05 05:42:45 +00:00
|
|
|
|
2005-04-10 22:21:59 +00:00
|
|
|
/* Connections */
|
2005-07-27 05:42:04 +00:00
|
|
|
|
2023-07-08 16:53:09 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
- (NSMutableArray *) connections;
|
|
|
|
|
2005-07-27 05:42:04 +00:00
|
|
|
/**
|
|
|
|
* Build our reverse mapping information and other initialisation
|
|
|
|
*/
|
2002-11-13 16:10:22 +00:00
|
|
|
- (void) rebuildObjToNameMapping;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Removes all connections given action or outlet with the specified label
|
|
|
|
* (paramter name) class name (parameter className).
|
|
|
|
*/
|
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;
|
2005-07-27 05:42:04 +00:00
|
|
|
/**
|
|
|
|
* Remove all connections to any and all instances of className.
|
|
|
|
*/
|
2002-11-30 00:49:55 +00:00
|
|
|
- (BOOL) removeConnectionsForClassNamed: (NSString *)name;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Rename connections connected to an instance of on class to another.
|
|
|
|
*/
|
2002-12-05 05:23:08 +00:00
|
|
|
- (BOOL) renameConnectionsForClassNamed: (NSString *)name
|
|
|
|
toName: (NSString *)newName;
|
2003-12-24 02:50:34 +00:00
|
|
|
|
2006-10-20 02:59:11 +00:00
|
|
|
/**
|
|
|
|
* Refresh all connections to any and all instances of className. Checks if
|
|
|
|
* the class has the action/outlet present and deletes it, if it doesn't.
|
|
|
|
*/
|
|
|
|
- (void) refreshConnectionsForClassNamed: (NSString *)className;
|
|
|
|
|
2005-04-10 22:21:59 +00:00
|
|
|
/* class loading */
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Load a class into the document.
|
|
|
|
*/
|
2003-05-10 21:19:25 +00:00
|
|
|
- (id) loadClass: (id)sender;
|
|
|
|
|
2005-07-27 05:42:04 +00:00
|
|
|
/*** services/windows menus... ***/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the services menu.
|
|
|
|
*/
|
2003-09-28 23:31:35 +00:00
|
|
|
- (void) setServicesMenu: (NSMenu *)menu;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the services menu for the document.
|
|
|
|
*/
|
2003-09-28 23:31:35 +00:00
|
|
|
- (NSMenu *) servicesMenu;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
2021-05-15 22:43:21 +00:00
|
|
|
/**
|
|
|
|
* Set the font menu.
|
|
|
|
*/
|
|
|
|
- (void) setFontMenu: (NSMenu *)menu;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the font menu for the document.
|
|
|
|
*/
|
|
|
|
- (NSMenu *) fontMenu;
|
|
|
|
|
2005-07-27 05:42:04 +00:00
|
|
|
/**
|
|
|
|
* Sets the windows menu.
|
|
|
|
*/
|
2003-09-28 23:31:35 +00:00
|
|
|
- (void) setWindowsMenu: (NSMenu *)menu;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the menu which will be the windows menu for the document.
|
|
|
|
*/
|
2003-09-28 23:31:35 +00:00
|
|
|
- (NSMenu *) windowsMenu;
|
2004-01-05 03:36:24 +00:00
|
|
|
|
2010-05-28 21:41:25 +00:00
|
|
|
/**
|
|
|
|
* Sets the recent documents menu.
|
|
|
|
*/
|
|
|
|
- (void) setRecentDocumentsMenu: (NSMenu *)menu;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the menu which will be the recent documents menu for the document.
|
|
|
|
*/
|
|
|
|
- (NSMenu *) recentDocumentsMenu;
|
|
|
|
|
2005-07-27 05:42:04 +00:00
|
|
|
/*** first responder/font manager ***/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns stand-in object for fontManager.
|
|
|
|
*/
|
2004-03-21 15:33:28 +00:00
|
|
|
- (id) fontManager;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns stand-in object for firstResponder
|
|
|
|
*/
|
2004-03-21 15:33:28 +00:00
|
|
|
- (id) firstResponder;
|
2004-12-13 01:58:43 +00:00
|
|
|
|
2005-07-04 21:53:33 +00:00
|
|
|
/* Layout */
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Arrages selected objects based on the either in front of or in
|
|
|
|
* back of the view stack.
|
|
|
|
*/
|
2005-07-04 21:53:33 +00:00
|
|
|
- (void) arrangeSelectedObjects: (id)sender;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Aligns selected objects on a given axis.
|
|
|
|
*/
|
2005-07-04 21:53:33 +00:00
|
|
|
- (void) alignSelectedObjects: (id)sender;
|
|
|
|
|
2006-06-05 02:12:00 +00:00
|
|
|
/**
|
|
|
|
* WindowAndRect:forObject: is called by Gorm to determine where it should
|
2005-04-10 22:21:59 +00:00
|
|
|
* draw selection markup
|
|
|
|
*/
|
2004-12-13 01:58:43 +00:00
|
|
|
- (NSWindow*) windowAndRect: (NSRect*)r forObject: (id)object;
|
2006-06-05 02:12:00 +00:00
|
|
|
|
|
|
|
/**
|
2006-06-10 13:34:44 +00:00
|
|
|
* Save the SCM directory.
|
|
|
|
*/
|
|
|
|
- (void) setSCMWrapper: (NSFileWrapper *) wrapper;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Save the SCM directory.
|
|
|
|
*/
|
|
|
|
- (NSFileWrapper *) scmWrapper;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Images
|
|
|
|
*/
|
|
|
|
- (NSArray *) images;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sounds
|
|
|
|
*/
|
|
|
|
- (NSArray *) sounds;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Images
|
|
|
|
*/
|
|
|
|
- (void) setImages: (NSArray *) imgs;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sounds
|
2006-06-05 02:12:00 +00:00
|
|
|
*/
|
2006-06-10 13:34:44 +00:00
|
|
|
- (void) setSounds: (NSArray *) snds;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* File's Owner
|
|
|
|
*/
|
|
|
|
- (GormFilesOwner *) filesOwner;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* File preferences.
|
|
|
|
*/
|
|
|
|
- (GormFilePrefsManager *) filePrefsManager;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Windows visible at launch...
|
|
|
|
*/
|
|
|
|
- (NSSet *) visibleWindows;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Windows deferred.
|
|
|
|
*/
|
|
|
|
- (NSSet *) deferredWindows;
|
|
|
|
|
2006-06-15 02:47:27 +00:00
|
|
|
/**
|
|
|
|
* Set the document open flag.
|
|
|
|
*/
|
2006-06-10 13:34:44 +00:00
|
|
|
- (void) setDocumentOpen: (BOOL) flag;
|
|
|
|
|
2006-06-15 02:47:27 +00:00
|
|
|
/**
|
|
|
|
* Return the document open flag.
|
|
|
|
*/
|
2006-06-10 13:34:44 +00:00
|
|
|
- (BOOL) isDocumentOpen;
|
|
|
|
|
2006-06-15 02:47:27 +00:00
|
|
|
/**
|
|
|
|
* Set the file info for this document.
|
|
|
|
*/
|
2006-06-10 13:34:44 +00:00
|
|
|
- (void) setInfoData: (NSData *)data;
|
|
|
|
|
2006-06-15 02:47:27 +00:00
|
|
|
/**
|
|
|
|
* return the file info.
|
|
|
|
*/
|
2006-06-10 13:34:44 +00:00
|
|
|
- (NSData *) infoData;
|
|
|
|
|
2006-06-15 02:47:27 +00:00
|
|
|
/**
|
|
|
|
* Set the "older archive" flag.
|
|
|
|
*/
|
2006-06-10 13:34:44 +00:00
|
|
|
- (void) setOlderArchive: (BOOL)flag;
|
|
|
|
|
2006-06-15 02:47:27 +00:00
|
|
|
/**
|
|
|
|
* Return YES if this is an older archive.
|
|
|
|
*/
|
2006-06-10 13:34:44 +00:00
|
|
|
- (BOOL) isOlderArchive;
|
2006-06-15 02:47:27 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Deactivate the editors for archiving..
|
|
|
|
*/
|
|
|
|
- (void) deactivateEditors;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reactivate all of the editors...
|
|
|
|
*/
|
|
|
|
- (void) reactivateEditors;
|
2021-01-29 00:14:02 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the name for the object...
|
|
|
|
*/
|
|
|
|
- (NSString*) nameForObject: (id)anObject;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the object for name.
|
|
|
|
*/
|
|
|
|
- (id) objectForName: (NSString*)name;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns all names for all objects known to Gorm.
|
|
|
|
*/
|
|
|
|
- (NSArray *) objects;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add aConnector to the set of connectors in this document.
|
|
|
|
*/
|
|
|
|
- (void) addConnector: (id<IBConnectors>)aConnector;
|
2023-07-08 18:14:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a set containing the top level objects for this document.
|
|
|
|
*/
|
|
|
|
- (NSMutableSet *) topLevelObjects;
|
|
|
|
|
2023-09-09 23:19:45 +00:00
|
|
|
/**
|
|
|
|
* Returns an array of issues. If document is valid the array should be empty.
|
|
|
|
*/
|
|
|
|
- (NSArray *) validate;
|
|
|
|
|
1999-12-08 15:04:57 +00:00
|
|
|
@end
|
|
|
|
|
2003-01-01 17:50:17 +00:00
|
|
|
@interface GormDocument (MenuValidation)
|
2005-07-27 05:42:04 +00:00
|
|
|
/**
|
2006-06-05 02:12:00 +00:00
|
|
|
* Returns YES if the document is editing instance/objects.
|
2005-07-27 05:42:04 +00:00
|
|
|
*/
|
2003-01-01 17:50:17 +00:00
|
|
|
- (BOOL) isEditingObjects;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
2006-06-05 02:12:00 +00:00
|
|
|
* Returns YES if the document is editing images.
|
2005-07-27 05:42:04 +00:00
|
|
|
*/
|
2003-01-01 17:50:17 +00:00
|
|
|
- (BOOL) isEditingImages;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
2006-06-05 02:12:00 +00:00
|
|
|
* Returns YES if the document is editing sounds.
|
2005-07-27 05:42:04 +00:00
|
|
|
*/
|
2003-01-01 17:50:17 +00:00
|
|
|
- (BOOL) isEditingSounds;
|
2005-07-27 05:42:04 +00:00
|
|
|
|
|
|
|
/**
|
2006-06-05 02:12:00 +00:00
|
|
|
* Returns YES if the document is editing classes.
|
2005-07-27 05:42:04 +00:00
|
|
|
*/
|
2003-01-01 17:50:17 +00:00
|
|
|
- (BOOL) isEditingClasses;
|
2023-07-08 18:14:46 +00:00
|
|
|
|
2003-01-01 17:50:17 +00:00
|
|
|
@end
|
|
|
|
|
2024-12-06 04:36:10 +00:00
|
|
|
@interface GormDocument (Metadata) <NSOutlineViewDataSource>
|
|
|
|
@end
|
|
|
|
|
1999-12-08 15:04:57 +00:00
|
|
|
#endif
|