/[gnustep]/gnustep/dev-apps/Gorm/GormDocument.h
ViewVC logotype

Contents of /gnustep/dev-apps/Gorm/GormDocument.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.37 - (show annotations) (download)
Sat Aug 23 06:31:53 2003 UTC (20 years, 8 months ago) by gcasa
Branch: MAIN
CVS Tags: Gorm-0_3_1
Changes since 1.36: +1 -0 lines
File MIME type: text/plain
Further bugfixes and improvements.

1 /* GormDocument.h
2 *
3 * Copyright (C) 1999, 2003 Free Software Foundation, Inc.
4 *
5 * Author: Richard Frith-Macdonald <richard@brainstrom.co.uk>
6 * Author: Gregory John Casamento <greg_casamento@yahoo.com>
7 * Date: 1999, 2003
8 *
9 * This file is part of GNUstep.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26 #ifndef INCLUDED_GormDocument_h
27 #define INCLUDED_GormDocument_h
28
29 #include <AppKit/AppKit.h>
30 #include <Foundation/Foundation.h>
31 #include <GNUstepGUI/GSNibTemplates.h>
32
33 @class GormClassManager, GormClassEditor;
34
35 /*
36 * Each document has a GormFirstResponder object that is used as a placeholder
37 * for the first responder at any instant.
38 */
39 @interface GormFirstResponder : NSObject
40 {
41 }
42 @end
43
44 /*
45 * Each document may have a GormFontManager object that is used as a
46 * placeholder for the current font manager.
47 */
48 @interface GormFontManager : NSObject
49 {
50 }
51 @end
52
53 @interface GormDocument : GSNibContainer <IBDocuments>
54 {
55 GormClassManager *classManager;
56 GormFilesOwner *filesOwner;
57 GormFirstResponder *firstResponder;
58 GormFontManager *fontManager;
59 GormClassEditor *classEditor; // perhaps should not be here...
60 NSString *documentPath;
61 NSMapTable *objToName;
62 NSWindow *window;
63 NSMatrix *selectionView;
64 NSBox *selectionBox;
65 NSScrollView *scrollView;
66 NSScrollView *classesScrollView;
67 NSScrollView *soundsScrollView;
68 NSScrollView *imagesScrollView;
69 id classesView;
70 id objectsView;
71 id soundsView;
72 id imagesView;
73 BOOL hasSetDefaults;
74 BOOL isActive;
75 NSMenu *savedMenu;
76 NSMenuItem *quitItem; /* Replaced during test */
77 NSMutableArray *savedEditors;
78 NSMutableArray *hidden;
79 NSMutableSet *sounds;
80 NSMutableSet *images;
81 // NSFileWrapper *wrapper;
82
83 // working copies of objects in the container...
84 NSMutableArray *workingConnections;
85 NSMutableDictionary *workingNameTable;
86 }
87 - (void) addConnector: (id<IBConnectors>)aConnector;
88 - (NSArray*) allConnectors;
89 - (void) attachObject: (id)anObject toParent: (id)aParent;
90 - (void) attachObjects: (NSArray*)anArray toParent: (id)aParent;
91 - (void) beginArchiving;
92 - (GormClassManager*) classManager;
93 - (NSArray*) connectorsForDestination: (id)destination;
94 - (NSArray*) connectorsForDestination: (id)destination
95 ofClass: (Class)aConnectorClass;
96 - (NSArray*) connectorsForSource: (id)source;
97 - (NSArray*) connectorsForSource: (id)source
98 ofClass: (Class)aConnectorClass;
99 - (BOOL) containsObject: (id)anObject;
100 - (BOOL) containsObjectWithName: (NSString*)aName forParent: (id)parent;
101 - (BOOL) copyObject: (id)anObject
102 type: (NSString*)aType
103 toPasteboard: (NSPasteboard*)aPasteboard;
104 - (BOOL) copyObjects: (NSArray*)anArray
105 type: (NSString*)aType
106 toPasteboard: (NSPasteboard*)aPasteboard;
107 - (void) detachObject: (id)anObject;
108 - (void) detachObjects: (NSArray*)anArray;
109 - (NSString*) documentPath;
110 - (void) endArchiving;
111 - (void) handleNotification: (NSNotification*)aNotification;
112 - (BOOL) isActive;
113 - (NSString*) nameForObject: (id)anObject;
114 - (id) objectForName: (NSString*)aString;
115 - (BOOL) objectIsVisibleAtLaunch: (id)anObject;
116 - (BOOL) objectIsDeferred: (id)anObject;
117 - (NSArray*) objects;
118 - (id) loadDocument: (NSString*)path;
119 - (id) openDocument: (id)sender;
120 - (id) parentOfObject: (id)anObject;
121 - (NSArray*) pasteType: (NSString*)aType
122 fromPasteboard: (NSPasteboard*)aPasteboard
123 parent: (id)parent;
124 - (void) removeConnector: (id<IBConnectors>)aConnector;
125 - (id) revertDocument: (id)sender;
126 - (BOOL) saveAsDocument: (id)sender;
127 - (BOOL) saveGormDocument: (id)sender;
128 - (void) setupDefaults: (NSString*)type;
129 - (void) setDocumentActive: (BOOL)flag;
130 - (void) setName: (NSString*)aName forObject: (id)object;
131 - (void) setObject: (id)anObject isVisibleAtLaunch: (BOOL)flag;
132 - (void) setObject: (id)anObject isDeferred: (BOOL)flag;
133 - (void) touch; /* Mark document as having been changed. */
134 - (NSWindow*) window;
135 - (BOOL) couldCloseDocument;
136 - (BOOL) windowShouldClose: (id)sender;
137
138 // classes support..
139 - (id) createSubclass: (id)sender;
140 - (id) instantiateClass: (id)sender;
141 - (id) editClass: (id)sender;
142 - (id) createClassFiles: (id)sender;
143 - (void) changeCurrentClass: (id)sender;
144 - (id) addAttributeToClass: (id)sender;
145 - (id) remove: (id)sender;
146 - (id) createClassFiles: (id)sender;
147 - (id) instantiateClass: (id)sender;
148 - (void) selectClassWithObject: (id)obj;
149
150 // sound & image support
151 - (id) openSound: (id)sender;
152 - (id) openImage: (id)sender;
153
154 // Internals support
155 - (void) rebuildObjToNameMapping;
156 - (id) parseHeader: (NSString *)headerPath;
157 - (BOOL) removeConnectionsWithLabel: (NSString *)name
158 forClassNamed: (NSString *)className
159 isAction: (BOOL)action;
160 - (BOOL) removeConnectionsForClassNamed: (NSString *)name;
161 - (BOOL) renameConnectionsForClassNamed: (NSString *)name
162 toName: (NSString *)newName;
163 // class loading
164 - (id) loadClass: (id)sender;
165
166 @end
167
168 @interface GormDocument (MenuValidation)
169 - (BOOL) isEditingObjects;
170 - (BOOL) isEditingImages;
171 - (BOOL) isEditingSounds;
172 - (BOOL) isEditingClasses;
173 @end
174
175 #endif

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26