1999-12-08 15:04:57 +00:00
|
|
|
#ifndef GORMPRIVATE_H
|
|
|
|
#define GORMPRIVATE_H
|
|
|
|
|
|
|
|
@class GormDocument;
|
|
|
|
@class GormInspectorsManager;
|
|
|
|
@class GormPalettesManager;
|
|
|
|
|
|
|
|
#include "Gorm.h"
|
|
|
|
|
1999-12-21 08:13:35 +00:00
|
|
|
#include "GormFilesOwner.h"
|
1999-12-08 15:04:57 +00:00
|
|
|
#include "GormDocument.h"
|
|
|
|
#include "GormInspectorsManager.h"
|
1999-12-20 14:20:06 +00:00
|
|
|
#include "GormClassManager.h"
|
1999-12-08 15:04:57 +00:00
|
|
|
#include "GormPalettesManager.h"
|
|
|
|
|
1999-12-17 17:22:18 +00:00
|
|
|
extern NSString *GormLinkPboardType;
|
|
|
|
|
2001-05-08 09:43:11 +00:00
|
|
|
|
|
|
|
@interface GSNibItem (GormAdditions)
|
|
|
|
- initWithClassName: (NSString*)className frame: (NSRect)frame;
|
|
|
|
- (NSString*) className;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface GormObjectProxy : GSNibItem
|
|
|
|
/*
|
|
|
|
* Use a GormObjectProxy in Gorm, but encode a GSNibItem in the archive.
|
|
|
|
* This is done so that we can provide our own decoding method
|
|
|
|
* (GSNibItem tries to morph into the actual class)
|
|
|
|
*/
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface GormClassProxy : NSObject
|
|
|
|
{
|
|
|
|
NSString *name;
|
|
|
|
int t;
|
|
|
|
}
|
|
|
|
|
|
|
|
- initWithClassName: (NSString*)n;
|
|
|
|
- (NSString*) className;
|
|
|
|
|
|
|
|
- (NSString*) inspectorClassName;
|
|
|
|
- (NSString*) connectInspectorClassName;
|
|
|
|
- (NSString*) sizeInspectorClassName;
|
|
|
|
@end
|
|
|
|
|
1999-12-17 21:53:06 +00:00
|
|
|
@interface NSApplication (Gorm)
|
1999-12-20 14:20:06 +00:00
|
|
|
- (GormClassManager*) classManager;
|
1999-12-17 21:53:06 +00:00
|
|
|
- (NSImage*) linkImage;
|
|
|
|
- (void) startConnecting;
|
|
|
|
@end
|
|
|
|
|
1999-12-08 15:04:57 +00:00
|
|
|
@interface Gorm : NSApplication <IB>
|
|
|
|
{
|
|
|
|
id infoPanel;
|
1999-12-20 14:20:06 +00:00
|
|
|
GormClassManager *classManager;
|
1999-12-08 15:04:57 +00:00
|
|
|
GormInspectorsManager *inspectorsManager;
|
|
|
|
GormPalettesManager *palettesManager;
|
1999-12-16 18:06:22 +00:00
|
|
|
id selectionOwner;
|
1999-12-08 15:04:57 +00:00
|
|
|
NSMutableArray *documents;
|
1999-12-17 21:53:06 +00:00
|
|
|
BOOL isConnecting;
|
1999-12-15 15:29:27 +00:00
|
|
|
BOOL isTesting;
|
2000-01-03 11:00:14 +00:00
|
|
|
id testContainer;
|
2000-02-03 17:04:37 +00:00
|
|
|
NSMenu *mainMenu;
|
2001-05-08 09:43:11 +00:00
|
|
|
NSMenu *classMenu; // so we can set it for the class view
|
2000-02-03 17:04:37 +00:00
|
|
|
NSDictionary *menuLocations;
|
1999-12-17 21:53:06 +00:00
|
|
|
NSImage *linkImage;
|
1999-12-17 12:44:06 +00:00
|
|
|
NSImage *sourceImage;
|
|
|
|
NSImage *targetImage;
|
1999-12-17 17:22:18 +00:00
|
|
|
id connectSource;
|
1999-12-17 21:53:06 +00:00
|
|
|
NSWindow *connectSWindow;
|
|
|
|
NSRect connectSRect;
|
1999-12-17 17:22:18 +00:00
|
|
|
id connectDestination;
|
1999-12-17 21:53:06 +00:00
|
|
|
NSWindow *connectDWindow;
|
|
|
|
NSRect connectDRect;
|
1999-12-08 15:04:57 +00:00
|
|
|
}
|
|
|
|
- (id<IBDocuments>) activeDocument;
|
1999-12-17 17:22:18 +00:00
|
|
|
- (id) connectSource;
|
|
|
|
- (id) connectDestination;
|
|
|
|
- (void) displayConnectionBetween: (id)source and: (id)destination;
|
1999-12-08 15:19:11 +00:00
|
|
|
- (void) handleNotification: (NSNotification*)aNotification;
|
1999-12-08 15:04:57 +00:00
|
|
|
- (GormInspectorsManager*) inspectorsManager;
|
1999-12-17 17:22:18 +00:00
|
|
|
- (BOOL) isConnecting;
|
1999-12-08 15:04:57 +00:00
|
|
|
- (GormPalettesManager*) palettesManager;
|
1999-12-17 17:22:18 +00:00
|
|
|
- (void) stopConnecting;
|
1999-12-16 18:06:22 +00:00
|
|
|
|
|
|
|
- (id) copy: (id)sender;
|
|
|
|
- (id) cut: (id)sender;
|
|
|
|
- (id) delete: (id)sender;
|
|
|
|
- (id) endTesting: (id)sender;
|
|
|
|
- (id) infoPanel: (id) sender;
|
|
|
|
- (id) inspector: (id) sender;
|
|
|
|
- (id) newApplication: (id) sender;
|
|
|
|
- (id) loadPalette: (id) sender;
|
|
|
|
- (id) open: (id)sender;
|
|
|
|
- (id) palettes: (id) sender;
|
|
|
|
- (id) paste: (id)sender;
|
|
|
|
- (id) revertToSaved: (id)sender;
|
|
|
|
- (id) save: (id)sender;
|
|
|
|
- (id) saveAll: (id)sender;
|
|
|
|
- (id) saveAs: (id)sender;
|
2001-05-08 09:43:11 +00:00
|
|
|
- (id) selectAllItems: (id)sender;
|
1999-12-16 18:06:22 +00:00
|
|
|
- (id) setName: (id)sender;
|
|
|
|
- (id) testInterface: (id)sender;
|
2001-05-08 09:43:11 +00:00
|
|
|
|
|
|
|
// added for classes support
|
|
|
|
- (id) createSubclass: (id)sender;
|
|
|
|
- (id) instantiateClass: (id)sender;
|
|
|
|
- (id) editClass: (id)sender;
|
|
|
|
- (NSMenu*) classMenu;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface GormClassEditor : NSObject <IBSelectionOwners>
|
|
|
|
{
|
|
|
|
GormDocument *document;
|
|
|
|
NSString *selectedClassName;
|
|
|
|
}
|
|
|
|
- (GormClassEditor*) initWithDocument: (GormDocument*)doc;
|
|
|
|
+ (GormClassEditor*) classEditorForDocument: (GormDocument*)doc;
|
|
|
|
- (void) setSelectedClassName: (NSString*)cn;
|
1999-12-08 15:04:57 +00:00
|
|
|
@end
|
|
|
|
|
1999-12-18 08:55:31 +00:00
|
|
|
@interface GormObjectEditor : NSMatrix <IBEditors>
|
|
|
|
{
|
|
|
|
NSMutableArray *objects;
|
|
|
|
id<IBDocuments> document;
|
|
|
|
id selected;
|
|
|
|
NSPasteboard *dragPb;
|
1999-12-18 11:08:18 +00:00
|
|
|
NSString *dragType;
|
1999-12-18 08:55:31 +00:00
|
|
|
}
|
2000-01-04 12:21:17 +00:00
|
|
|
+ (GormObjectEditor*) editorForDocument: (id<IBDocuments>)aDocument;
|
1999-12-18 08:55:31 +00:00
|
|
|
- (void) addObject: (id)anObject;
|
|
|
|
- (void) draggedImage: (NSImage*)i endedAt: (NSPoint)p deposited: (BOOL)f;
|
|
|
|
- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)flag;
|
|
|
|
- (void) refreshCells;
|
|
|
|
- (void) removeObject: (id)anObject;
|
|
|
|
- (BOOL) acceptsTypeFromArray: (NSArray*)types;
|
|
|
|
- (BOOL) activate;
|
|
|
|
- (id) initWithObject: (id)anObject inDocument: (id<IBDocuments>)aDocument;
|
|
|
|
- (void) close;
|
|
|
|
- (void) closeSubeditors;
|
|
|
|
- (BOOL) containsObject: (id)anObject;
|
|
|
|
- (void) copySelection;
|
|
|
|
- (void) deleteSelection;
|
|
|
|
- (id<IBDocuments>) document;
|
|
|
|
- (id) editedObject;
|
|
|
|
- (void) makeSelectionVisible: (BOOL)flag;
|
|
|
|
- (id<IBEditors>) openSubeditorForObject: (id)anObject;
|
|
|
|
- (void) orderFront;
|
|
|
|
- (void) pasteInSelection;
|
|
|
|
- (NSRect) rectForObject: (id)anObject;
|
|
|
|
- (void) resetObject: (id)anObject;
|
|
|
|
- (void) selectObjects: (NSArray*)objects;
|
|
|
|
- (void) validateEditing;
|
|
|
|
- (BOOL) wantsSelection;
|
|
|
|
- (NSWindow*) window;
|
|
|
|
@end
|
|
|
|
|
2001-09-16 18:53:33 +00:00
|
|
|
@interface GormMatrixEditor : NSObject <IBEditors>
|
|
|
|
{
|
|
|
|
id<IBDocuments> document;
|
|
|
|
id selected;
|
|
|
|
NSMatrix *matrix;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) changeObject: anObject;
|
|
|
|
@end
|
|
|
|
|
2001-10-03 17:38:46 +00:00
|
|
|
@interface GormFilesOwnerInspector : IBInspector
|
|
|
|
{
|
|
|
|
NSBrowser *browser;
|
|
|
|
NSArray *classes;
|
|
|
|
BOOL hasConnections;
|
|
|
|
}
|
|
|
|
- (void) takeClassFrom: (id)sender;
|
|
|
|
@end
|
|
|
|
|
1999-12-13 20:04:31 +00:00
|
|
|
/*
|
|
|
|
* Functions for drawing knobs etc.
|
|
|
|
*/
|
|
|
|
void GormDrawKnobsForRect(NSRect aFrame);
|
2001-06-07 03:57:51 +00:00
|
|
|
void GormDrawOpenKnobsForRect(NSRect aFrame);
|
1999-12-13 20:04:31 +00:00
|
|
|
NSRect GormExtBoundsForRect(NSRect aFrame);
|
|
|
|
IBKnobPosition GormKnobHitInRect(NSRect aFrame, NSPoint p);
|
|
|
|
void GormShowFastKnobFills(void);
|
1999-12-16 18:06:22 +00:00
|
|
|
void GormShowFrameWithKnob(NSRect aRect, IBKnobPosition aKnob);
|
1999-12-13 20:04:31 +00:00
|
|
|
|
1999-12-08 15:04:57 +00:00
|
|
|
#endif
|