mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
GormBoxEditor.m GormButtonEditor.h GormButtonEditor.m GormControlEditor.h GormControlEditor.m GormInternalViewEditor.h GormInternalViewEditor.m GormMatrixEditor.h GormPlacementInfo.h GormPosingView.h GormPosingView.m GormSplitViewEditor.h GormSplitViewEditor.m GormTabViewEditor.h GormTabViewEditor.m GormViewEditor.h GormViewEditor.m GormViewWithContentViewEditor.h GormViewWithContentViewEditor.m GormViewWithSubviewsEditor.h GormViewWithSubviewsEditor.m Palettes/3Containers/GormTableViewEditor.h Palettes/3Containers/GormTableViewEditor.m ChangeLog GNUmakefile Gorm.h Gorm.m GormClassEditor.m GormClassManager.m GormCustomClassInspector.m GormCustomView.m GormDocument.m GormMatrixEditor.m GormObjectEditor.m GormOutlineView.m GormPrivate.h GormWindowEditor.m Palettes/0Menus/GormMenuEditor.m Palettes/1Windows/main.m Palettes/2Controls/GormBoxInspector.gorm Palettes/2Controls/GormButtonInspector.gorm Palettes/2Controls/GormTextFieldInspector.gorm Palettes/2Controls/main.m Palettes/3Containers/GNUmakefile Palettes/3Containers/GormNSBrowser.m Palettes/3Containers/GormNSOutlineView.m Palettes/3Containers/GormNSTableView.h Palettes/3Containers/GormTableColumnInspector.classes Palettes/3Containers/GormTableColumnInspector.gorm Palettes/3Containers/GormTableViewInspector.gorm Palettes/3Containers/inspectors.m Palettes/3Containers/main.m Palettes/4Data/inspectors.m Palettes/4Data/main.m git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@14267 72102866-910b-0410-8b05-ffd578937521
210 lines
5.5 KiB
Objective-C
210 lines
5.5 KiB
Objective-C
#ifndef GORMPRIVATE_H
|
|
#define GORMPRIVATE_H
|
|
|
|
@class GormDocument;
|
|
@class GormInspectorsManager;
|
|
@class GormPalettesManager;
|
|
|
|
#include "Gorm.h"
|
|
|
|
#include "GormFilesOwner.h"
|
|
#include "GormDocument.h"
|
|
#include "GormInspectorsManager.h"
|
|
#include "GormClassManager.h"
|
|
#include "GormPalettesManager.h"
|
|
|
|
extern NSString *GormLinkPboardType;
|
|
|
|
|
|
@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
|
|
|
|
@interface NSApplication (Gorm)
|
|
- (GormClassManager*) classManager;
|
|
- (NSImage*) linkImage;
|
|
- (void) startConnecting;
|
|
@end
|
|
|
|
@interface Gorm : NSApplication <IB>
|
|
{
|
|
id infoPanel;
|
|
GormClassManager *classManager;
|
|
GormInspectorsManager *inspectorsManager;
|
|
GormPalettesManager *palettesManager;
|
|
id selectionOwner;
|
|
NSMutableArray *documents;
|
|
BOOL isConnecting;
|
|
BOOL isTesting;
|
|
id testContainer;
|
|
NSMenu *mainMenu;
|
|
NSMenu *classMenu; // so we can set it for the class view
|
|
NSDictionary *menuLocations;
|
|
NSImage *linkImage;
|
|
NSImage *sourceImage;
|
|
NSImage *targetImage;
|
|
id connectSource;
|
|
NSWindow *connectSWindow;
|
|
NSRect connectSRect;
|
|
id connectDestination;
|
|
NSWindow *connectDWindow;
|
|
NSRect connectDRect;
|
|
}
|
|
- (id<IBDocuments>) activeDocument;
|
|
- (id) connectSource;
|
|
- (id) connectDestination;
|
|
- (void) displayConnectionBetween: (id)source and: (id)destination;
|
|
- (void) handleNotification: (NSNotification*)aNotification;
|
|
- (GormInspectorsManager*) inspectorsManager;
|
|
- (BOOL) isConnecting;
|
|
- (GormPalettesManager*) palettesManager;
|
|
- (void) stopConnecting;
|
|
|
|
- (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;
|
|
- (id) selectAllItems: (id)sender;
|
|
- (id) setName: (id)sender;
|
|
- (id) testInterface: (id)sender;
|
|
|
|
// 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;
|
|
@end
|
|
|
|
@interface GormObjectEditor : NSMatrix <IBEditors, IBSelectionOwners>
|
|
{
|
|
NSMutableArray *objects;
|
|
id<IBDocuments> document;
|
|
id selected;
|
|
NSPasteboard *dragPb;
|
|
NSString *dragType;
|
|
}
|
|
+ (GormObjectEditor*) editorForDocument: (id<IBDocuments>)aDocument;
|
|
- (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;
|
|
- (BOOL) wantsSelection;
|
|
- (NSWindow*) window;
|
|
@end
|
|
|
|
|
|
@interface GormFilesOwnerInspector : IBInspector
|
|
{
|
|
NSBrowser *browser;
|
|
NSArray *classes;
|
|
BOOL hasConnections;
|
|
}
|
|
- (void) takeClassFrom: (id)sender;
|
|
@end
|
|
|
|
/*
|
|
* NSDateFormatter and NSNumberFormatter extensions
|
|
* for Gorm Formatters used in the Data Palette
|
|
*/
|
|
|
|
@interface NSDateFormatter (GormAdditions)
|
|
|
|
+ (void) initialize;
|
|
+ (int) formatCount;
|
|
+ (NSString *) formatAtIndex: (int)index;
|
|
+ (int) indexOfFormat: (NSString *) format;
|
|
+ (NSString *) defaultFormat;
|
|
+ (id) defaultFormatValue;
|
|
|
|
@end
|
|
|
|
@interface NSNumberFormatter (GormAdditions)
|
|
|
|
+ (void) initialize;
|
|
+ (int) formatCount;
|
|
+ (NSString *) formatAtIndex: (int)index;
|
|
+ (NSString *) positiveFormatAtIndex: (int)index;
|
|
+ (NSString *) zeroFormatAtIndex: (int)index;
|
|
+ (NSString *) negativeFormatAtIndex: (int)index;
|
|
+ (NSDecimalNumber *) positiveValueAtIndex: (int)index;
|
|
+ (NSDecimalNumber *) negativeValueAtIndex: (int)index;
|
|
+ (int) indexOfFormat: format;
|
|
+ (NSString *) defaultFormat;
|
|
+ (id) defaultFormatValue;
|
|
- (NSString *) zeroFormat;
|
|
|
|
@end
|
|
|
|
/*
|
|
* Functions for drawing knobs etc.
|
|
*/
|
|
void GormDrawKnobsForRect(NSRect aFrame);
|
|
void GormDrawOpenKnobsForRect(NSRect aFrame);
|
|
NSRect GormExtBoundsForRect(NSRect aFrame);
|
|
IBKnobPosition GormKnobHitInRect(NSRect aFrame, NSPoint p);
|
|
void GormShowFastKnobFills(void);
|
|
void GormShowFrameWithKnob(NSRect aRect, IBKnobPosition aKnob);
|
|
|
|
#endif
|