1999-12-08 15:19:11 +00:00
|
|
|
|
/* GormObjectEditor.m
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 1999 Free Software Foundation, Inc.
|
|
|
|
|
*
|
|
|
|
|
* Author: Richard Frith-Macdonald <richard@brainstrom.co.uk>
|
|
|
|
|
* Date: 1999
|
|
|
|
|
*
|
|
|
|
|
* 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
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (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
|
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "GormPrivate.h"
|
|
|
|
|
|
1999-12-13 17:01:35 +00:00
|
|
|
|
/*
|
|
|
|
|
* Method to return the image that should be used to display objects within
|
|
|
|
|
* the matrix containing the objects in a document.
|
|
|
|
|
*/
|
1999-12-14 17:38:17 +00:00
|
|
|
|
@implementation NSObject (GormObjectAdditions)
|
1999-12-18 07:42:09 +00:00
|
|
|
|
- (NSString*) inspectorClassName
|
|
|
|
|
{
|
|
|
|
|
return @"GormObjectInspector";
|
|
|
|
|
}
|
|
|
|
|
- (NSString*) connectInspectorClassName
|
|
|
|
|
{
|
1999-12-20 14:20:06 +00:00
|
|
|
|
return @"GormConnectionInspector";
|
1999-12-18 07:42:09 +00:00
|
|
|
|
}
|
|
|
|
|
- (NSString*) sizeInspectorClassName
|
|
|
|
|
{
|
2000-02-04 12:08:15 +00:00
|
|
|
|
return @"GormNotApplicableInspector";
|
1999-12-18 07:42:09 +00:00
|
|
|
|
}
|
|
|
|
|
- (NSString*) helpInspectorClassName
|
|
|
|
|
{
|
2000-02-04 12:08:15 +00:00
|
|
|
|
return @"GormNotApplicableInspector";
|
1999-12-18 07:42:09 +00:00
|
|
|
|
}
|
|
|
|
|
- (NSString*) classInspectorClassName
|
|
|
|
|
{
|
1999-12-21 11:38:49 +00:00
|
|
|
|
return @"GormClassInspector";
|
1999-12-18 07:42:09 +00:00
|
|
|
|
}
|
1999-12-14 17:38:17 +00:00
|
|
|
|
- (NSString*) editorClassName
|
|
|
|
|
{
|
|
|
|
|
return @"GormObjectEditor";
|
|
|
|
|
}
|
1999-12-13 17:01:35 +00:00
|
|
|
|
- (NSImage*) imageForViewer
|
|
|
|
|
{
|
|
|
|
|
static NSImage *image = nil;
|
|
|
|
|
|
|
|
|
|
if (image == nil)
|
|
|
|
|
{
|
|
|
|
|
NSBundle *bundle = [NSBundle mainBundle];
|
1999-12-22 12:20:22 +00:00
|
|
|
|
NSString *path = [bundle pathForImageResource: @"GormUnknown"];
|
1999-12-13 17:01:35 +00:00
|
|
|
|
|
|
|
|
|
image = [[NSImage alloc] initWithContentsOfFile: path];
|
|
|
|
|
}
|
|
|
|
|
return image;
|
|
|
|
|
}
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1999-12-08 15:19:11 +00:00
|
|
|
|
@implementation GormObjectEditor
|
|
|
|
|
|
1999-12-18 07:42:09 +00:00
|
|
|
|
static NSMapTable *docMap = 0;
|
|
|
|
|
|
|
|
|
|
+ (void) initialize
|
|
|
|
|
{
|
|
|
|
|
if (self == [GormObjectEditor class])
|
|
|
|
|
{
|
|
|
|
|
docMap = NSCreateMapTable(NSNonRetainedObjectMapKeyCallBacks,
|
|
|
|
|
NSObjectMapValueCallBacks, 2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2000-01-04 12:21:17 +00:00
|
|
|
|
+ (GormObjectEditor*) editorForDocument: (id<IBDocuments>)aDocument
|
|
|
|
|
{
|
|
|
|
|
id editor = NSMapGet(docMap, (void*)aDocument);
|
|
|
|
|
|
|
|
|
|
if (editor == nil)
|
|
|
|
|
{
|
|
|
|
|
editor = [[self alloc] initWithObject: nil inDocument: aDocument];
|
|
|
|
|
AUTORELEASE(editor);
|
|
|
|
|
}
|
|
|
|
|
return editor;
|
|
|
|
|
}
|
|
|
|
|
|
2001-02-02 05:05:25 +00:00
|
|
|
|
- (BOOL) acceptsFirstMouse: (NSEvent*)theEvent
|
|
|
|
|
{
|
|
|
|
|
return YES; /* Ensure we get initial mouse down event. */
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (BOOL) acceptsTypeFromArray: (NSArray*)types
|
|
|
|
|
{
|
1999-12-19 06:19:31 +00:00
|
|
|
|
if ([types containsObject: IBObjectPboardType] == YES)
|
|
|
|
|
return YES;
|
1999-12-18 11:08:18 +00:00
|
|
|
|
return NO;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (BOOL) activate
|
|
|
|
|
{
|
2000-01-14 19:24:39 +00:00
|
|
|
|
[[self window] makeKeyAndOrderFront: self];
|
1999-12-18 11:08:18 +00:00
|
|
|
|
return YES;
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-08 15:19:11 +00:00
|
|
|
|
- (void) addObject: (id)anObject
|
|
|
|
|
{
|
1999-12-18 07:42:09 +00:00
|
|
|
|
if (anObject != nil
|
|
|
|
|
&& [objects indexOfObjectIdenticalTo: anObject] == NSNotFound)
|
1999-12-08 15:19:11 +00:00
|
|
|
|
{
|
2000-01-04 12:21:17 +00:00
|
|
|
|
NSNotificationCenter *nc;
|
|
|
|
|
|
|
|
|
|
nc = [NSNotificationCenter defaultCenter];
|
|
|
|
|
|
1999-12-08 15:19:11 +00:00
|
|
|
|
[objects addObject: anObject];
|
|
|
|
|
[self refreshCells];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (id) changeSelection: (id)sender
|
|
|
|
|
{
|
|
|
|
|
int row = [self selectedRow];
|
|
|
|
|
int col = [self selectedColumn];
|
|
|
|
|
int index = row * [self numberOfColumns] + col;
|
|
|
|
|
id obj = nil;
|
|
|
|
|
|
|
|
|
|
if (index >= 0 && index < [objects count])
|
|
|
|
|
{
|
|
|
|
|
obj = [objects objectAtIndex: index];
|
1999-12-20 14:20:06 +00:00
|
|
|
|
[self selectObjects: [NSArray arrayWithObject: obj]];
|
1999-12-18 11:08:18 +00:00
|
|
|
|
}
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) close
|
|
|
|
|
{
|
2000-01-03 11:00:14 +00:00
|
|
|
|
[self deactivate];
|
1999-12-18 11:08:18 +00:00
|
|
|
|
[self closeSubeditors];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) closeSubeditors
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (BOOL) containsObject: (id)object
|
|
|
|
|
{
|
|
|
|
|
if ([objects indexOfObjectIdenticalTo: object] == NSNotFound)
|
|
|
|
|
return NO;
|
|
|
|
|
return YES;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) copySelection
|
|
|
|
|
{
|
1999-12-19 06:19:31 +00:00
|
|
|
|
if (selected != nil)
|
|
|
|
|
{
|
|
|
|
|
[document copyObjects: [self selection]
|
|
|
|
|
type: IBViewPboardType
|
|
|
|
|
toPasteboard: [NSPasteboard generalPasteboard]];
|
|
|
|
|
}
|
1999-12-18 11:08:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
2000-01-03 11:00:14 +00:00
|
|
|
|
- (void) deactivate
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-08 15:19:11 +00:00
|
|
|
|
- (void) dealloc
|
|
|
|
|
{
|
|
|
|
|
RELEASE(objects);
|
|
|
|
|
[super dealloc];
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (void) deleteSelection
|
|
|
|
|
{
|
1999-12-19 06:19:31 +00:00
|
|
|
|
if (selected != nil
|
|
|
|
|
&& [[document nameForObject: selected] isEqualToString: @"NSOwner"] == NO
|
|
|
|
|
&& [[document nameForObject: selected] isEqualToString: @"NSFirst"] == NO
|
|
|
|
|
&& [[document nameForObject: selected] isEqualToString: @"NSFont"] == NO)
|
|
|
|
|
{
|
2000-01-04 12:21:17 +00:00
|
|
|
|
NSNotificationCenter *nc;
|
|
|
|
|
|
|
|
|
|
nc = [NSNotificationCenter defaultCenter];
|
|
|
|
|
|
1999-12-19 06:19:31 +00:00
|
|
|
|
[document detachObject: selected];
|
2000-01-04 12:21:17 +00:00
|
|
|
|
if ([selected isKindOfClass: [NSWindow class]] == YES)
|
|
|
|
|
{
|
|
|
|
|
[selected close];
|
|
|
|
|
}
|
1999-12-19 06:19:31 +00:00
|
|
|
|
[objects removeObjectIdenticalTo: selected];
|
|
|
|
|
[self selectObjects: [NSArray array]];
|
|
|
|
|
[self refreshCells];
|
|
|
|
|
}
|
1999-12-18 11:08:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Dragging source protocol implementation
|
|
|
|
|
*/
|
|
|
|
|
- (void) draggedImage: (NSImage*)i endedAt: (NSPoint)p deposited: (BOOL)f
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (unsigned) draggingEntered: (id<NSDraggingInfo>)sender
|
|
|
|
|
{
|
|
|
|
|
NSArray *types;
|
|
|
|
|
|
|
|
|
|
dragPb = [sender draggingPasteboard];
|
|
|
|
|
types = [dragPb types];
|
|
|
|
|
if ([types containsObject: IBObjectPboardType] == YES)
|
|
|
|
|
{
|
|
|
|
|
dragType = IBObjectPboardType;
|
|
|
|
|
}
|
|
|
|
|
else if ([types containsObject: GormLinkPboardType] == YES)
|
|
|
|
|
{
|
|
|
|
|
dragType = GormLinkPboardType;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
dragType = nil;
|
|
|
|
|
}
|
|
|
|
|
return [self draggingUpdated: sender];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (unsigned) draggingUpdated: (id<NSDraggingInfo>)sender
|
|
|
|
|
{
|
|
|
|
|
if (dragType == IBObjectPboardType)
|
|
|
|
|
{
|
|
|
|
|
return NSDragOperationCopy;
|
|
|
|
|
}
|
|
|
|
|
else if (dragType == GormLinkPboardType)
|
|
|
|
|
{
|
|
|
|
|
NSPoint loc = [sender draggingLocation];
|
|
|
|
|
int r, c;
|
|
|
|
|
int pos;
|
|
|
|
|
id obj = nil;
|
|
|
|
|
|
|
|
|
|
loc = [self convertPoint: loc fromView: nil];
|
|
|
|
|
[self getRow: &r column: &c forPoint: loc];
|
|
|
|
|
pos = r * [self numberOfColumns] + c;
|
|
|
|
|
if (pos >= 0 && pos < [objects count])
|
|
|
|
|
{
|
|
|
|
|
obj = [objects objectAtIndex: pos];
|
|
|
|
|
}
|
1999-12-19 06:19:31 +00:00
|
|
|
|
if (obj == [NSApp connectSource])
|
|
|
|
|
{
|
|
|
|
|
return 0; /* Can't drag an object onto itsself */
|
|
|
|
|
}
|
1999-12-18 11:08:18 +00:00
|
|
|
|
[NSApp displayConnectionBetween: [NSApp connectSource] and: obj];
|
1999-12-19 06:19:31 +00:00
|
|
|
|
if (obj != nil)
|
|
|
|
|
{
|
|
|
|
|
return NSDragOperationLink;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
1999-12-18 11:08:18 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)flag
|
|
|
|
|
{
|
|
|
|
|
return NSDragOperationLink;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) drawSelection
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (id<IBDocuments>) document
|
|
|
|
|
{
|
|
|
|
|
return document;
|
|
|
|
|
}
|
|
|
|
|
|
2000-01-04 12:21:17 +00:00
|
|
|
|
- (void) handleNotification: (NSNotification*)aNotification
|
|
|
|
|
{
|
|
|
|
|
id object = [aNotification object];
|
|
|
|
|
NSString *name = [aNotification name];
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (id) editedObject
|
|
|
|
|
{
|
|
|
|
|
return selected;
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-08 15:19:11 +00:00
|
|
|
|
/*
|
|
|
|
|
* Initialisation - register to receive DnD with our own types.
|
|
|
|
|
*/
|
|
|
|
|
- (id) initWithObject: (id)anObject inDocument: (id<IBDocuments>)aDocument
|
|
|
|
|
{
|
1999-12-18 07:42:09 +00:00
|
|
|
|
id old = NSMapGet(docMap, (void*)aDocument);
|
|
|
|
|
|
|
|
|
|
if (old != nil)
|
|
|
|
|
{
|
|
|
|
|
RELEASE(self);
|
|
|
|
|
self = RETAIN(old);
|
|
|
|
|
[self addObject: anObject];
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-08 15:19:11 +00:00
|
|
|
|
self = [super init];
|
1999-12-18 07:42:09 +00:00
|
|
|
|
if (self != nil)
|
1999-12-08 15:19:11 +00:00
|
|
|
|
{
|
|
|
|
|
NSButtonCell *proto;
|
|
|
|
|
|
|
|
|
|
document = aDocument;
|
|
|
|
|
|
|
|
|
|
[self registerForDraggedTypes: [NSArray arrayWithObjects:
|
1999-12-18 11:08:18 +00:00
|
|
|
|
IBObjectPboardType, GormLinkPboardType, nil]];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
|
|
|
|
|
[self setAutosizesCells: NO];
|
|
|
|
|
[self setCellSize: NSMakeSize(72,72)];
|
|
|
|
|
[self setIntercellSpacing: NSMakeSize(8,8)];
|
|
|
|
|
[self setAutoresizingMask: NSViewMinYMargin|NSViewWidthSizable];
|
|
|
|
|
[self setMode: NSRadioModeMatrix];
|
|
|
|
|
/*
|
|
|
|
|
* Send mouse click actions to self, so we can handle selection.
|
|
|
|
|
*/
|
|
|
|
|
[self setAction: @selector(changeSelection:)];
|
|
|
|
|
[self setDoubleAction: @selector(raiseSelection:)];
|
|
|
|
|
[self setTarget: self];
|
|
|
|
|
|
|
|
|
|
objects = [NSMutableArray new];
|
|
|
|
|
proto = [NSButtonCell new];
|
|
|
|
|
[proto setBordered: NO];
|
|
|
|
|
[proto setAlignment: NSCenterTextAlignment];
|
|
|
|
|
[proto setImagePosition: NSImageAbove];
|
|
|
|
|
[proto setSelectable: NO];
|
|
|
|
|
[proto setEditable: NO];
|
|
|
|
|
[self setPrototype: proto];
|
|
|
|
|
RELEASE(proto);
|
1999-12-18 07:42:09 +00:00
|
|
|
|
NSMapInsert(docMap, (void*)aDocument, (void*)self);
|
|
|
|
|
[self addObject: anObject];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
}
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (void) makeSelectionVisible: (BOOL)flag
|
1999-12-08 15:19:11 +00:00
|
|
|
|
{
|
1999-12-18 11:08:18 +00:00
|
|
|
|
if (flag == YES && selected != nil)
|
1999-12-08 15:19:11 +00:00
|
|
|
|
{
|
1999-12-18 11:08:18 +00:00
|
|
|
|
unsigned pos = [objects indexOfObjectIdenticalTo: selected];
|
|
|
|
|
int r = pos / [self numberOfColumns];
|
|
|
|
|
int c = pos % [self numberOfColumns];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
[self selectCellAtRow: r column: c];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
[self deselectAllCells];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
}
|
1999-12-19 06:19:31 +00:00
|
|
|
|
[self displayIfNeeded];
|
|
|
|
|
[[self window] flushWindow];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (void) mouseDown: (NSEvent*)theEvent
|
1999-12-08 15:19:11 +00:00
|
|
|
|
{
|
1999-12-19 06:19:31 +00:00
|
|
|
|
if ([theEvent modifierFlags] & NSControlKeyMask)
|
|
|
|
|
{
|
|
|
|
|
NSPoint loc = [theEvent locationInWindow];
|
|
|
|
|
NSString *name;
|
|
|
|
|
int r, c;
|
|
|
|
|
int pos;
|
|
|
|
|
id obj;
|
|
|
|
|
|
|
|
|
|
loc = [self convertPoint: loc fromView: nil];
|
|
|
|
|
[self getRow: &r column: &c forPoint: loc];
|
|
|
|
|
pos = r * [self numberOfColumns] + c;
|
|
|
|
|
if (pos >= 0 && pos < [objects count])
|
|
|
|
|
{
|
|
|
|
|
obj = [objects objectAtIndex: pos];
|
|
|
|
|
}
|
|
|
|
|
if (obj != nil && obj != selected)
|
|
|
|
|
{
|
|
|
|
|
[self selectObjects: [NSArray arrayWithObject: obj]];
|
|
|
|
|
[self makeSelectionVisible: YES];
|
|
|
|
|
}
|
|
|
|
|
name = [document nameForObject: obj];
|
|
|
|
|
if ([name isEqualToString: @"NSFirst"] == NO)
|
|
|
|
|
{
|
|
|
|
|
NSPasteboard *pb;
|
|
|
|
|
|
|
|
|
|
pb = [NSPasteboard pasteboardWithName: NSDragPboard];
|
|
|
|
|
[pb declareTypes: [NSArray arrayWithObject: GormLinkPboardType]
|
|
|
|
|
owner: self];
|
|
|
|
|
[pb setString: name forType: GormLinkPboardType];
|
|
|
|
|
[NSApp displayConnectionBetween: obj and: nil];
|
|
|
|
|
|
|
|
|
|
[self dragImage: [NSApp linkImage]
|
|
|
|
|
at: loc
|
|
|
|
|
offset: NSZeroSize
|
|
|
|
|
event: theEvent
|
|
|
|
|
pasteboard: pb
|
|
|
|
|
source: self
|
|
|
|
|
slideBack: YES];
|
|
|
|
|
[self makeSelectionVisible: YES];
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
[super mouseDown: theEvent];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (id<IBEditors>) openSubeditorForObject: (id)anObject
|
1999-12-08 15:19:11 +00:00
|
|
|
|
{
|
|
|
|
|
return nil;
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (void) orderFront
|
1999-12-08 15:19:11 +00:00
|
|
|
|
{
|
2000-01-14 19:24:39 +00:00
|
|
|
|
[[self window] orderFront: self];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (void) pasteInSelection
|
1999-12-08 15:19:11 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (BOOL) performDragOperation: (id<NSDraggingInfo>)sender
|
1999-12-08 15:19:11 +00:00
|
|
|
|
{
|
1999-12-18 21:27:22 +00:00
|
|
|
|
if (dragType == IBObjectPboardType)
|
|
|
|
|
{
|
|
|
|
|
NSArray *array;
|
|
|
|
|
NSEnumerator *enumerator;
|
|
|
|
|
id obj;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Ask the document to get the dragged objects from the pasteboard and
|
|
|
|
|
* add them to it's collection of known objects.
|
|
|
|
|
*/
|
|
|
|
|
array = [document pasteType: IBViewPboardType
|
|
|
|
|
fromPasteboard: dragPb
|
|
|
|
|
parent: [objects objectAtIndex: 0]];
|
|
|
|
|
enumerator = [array objectEnumerator];
|
|
|
|
|
while ((obj = [enumerator nextObject]) != nil)
|
|
|
|
|
{
|
|
|
|
|
[self addObject: obj];
|
|
|
|
|
}
|
|
|
|
|
return YES;
|
|
|
|
|
}
|
|
|
|
|
else if (dragType == GormLinkPboardType)
|
|
|
|
|
{
|
|
|
|
|
NSPoint loc = [sender draggingLocation];
|
|
|
|
|
int r, c;
|
|
|
|
|
int pos;
|
|
|
|
|
id obj = nil;
|
|
|
|
|
|
|
|
|
|
loc = [self convertPoint: loc fromView: nil];
|
|
|
|
|
[self getRow: &r column: &c forPoint: loc];
|
|
|
|
|
pos = r * [self numberOfColumns] + c;
|
|
|
|
|
if (pos >= 0 && pos < [objects count])
|
|
|
|
|
{
|
|
|
|
|
obj = [objects objectAtIndex: pos];
|
|
|
|
|
}
|
|
|
|
|
if (obj == nil)
|
|
|
|
|
{
|
|
|
|
|
return NO;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
[NSApp displayConnectionBetween: [NSApp connectSource] and: obj];
|
|
|
|
|
[NSApp startConnecting];
|
|
|
|
|
return YES;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
NSLog(@"Drop with unrecognized type!");
|
|
|
|
|
return NO;
|
|
|
|
|
}
|
1999-12-18 11:08:18 +00:00
|
|
|
|
}
|
1999-12-08 15:19:11 +00:00
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (BOOL) prepareForDragOperation: (id<NSDraggingInfo>)sender
|
|
|
|
|
{
|
1999-12-18 21:27:22 +00:00
|
|
|
|
/*
|
|
|
|
|
* Tell the source that we will accept the drop if we can.
|
|
|
|
|
*/
|
|
|
|
|
if (dragType == IBObjectPboardType)
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* We can accept objects dropped anywhere.
|
|
|
|
|
*/
|
|
|
|
|
return YES;
|
|
|
|
|
}
|
|
|
|
|
else if (dragType == GormLinkPboardType)
|
|
|
|
|
{
|
|
|
|
|
NSPoint loc = [sender draggingLocation];
|
|
|
|
|
int r, c;
|
|
|
|
|
int pos;
|
|
|
|
|
id obj = nil;
|
|
|
|
|
|
|
|
|
|
loc = [self convertPoint: loc fromView: nil];
|
|
|
|
|
[self getRow: &r column: &c forPoint: loc];
|
|
|
|
|
pos = r * [self numberOfColumns] + c;
|
|
|
|
|
if (pos >= 0 && pos < [objects count])
|
|
|
|
|
{
|
|
|
|
|
obj = [objects objectAtIndex: pos];
|
|
|
|
|
}
|
|
|
|
|
if (obj != nil)
|
|
|
|
|
{
|
|
|
|
|
return YES;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return NO;
|
1999-12-08 15:19:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (id) raiseSelection: (id)sender
|
|
|
|
|
{
|
|
|
|
|
id obj = [self changeSelection: sender];
|
1999-12-23 07:49:27 +00:00
|
|
|
|
id e;
|
1999-12-08 15:19:11 +00:00
|
|
|
|
|
1999-12-23 07:49:27 +00:00
|
|
|
|
e = [document editorForObject: obj create: YES];
|
|
|
|
|
[e orderFront];
|
|
|
|
|
[e resetObject: obj];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
/*
|
|
|
|
|
* Return the rectangle in which an objects image will be displayed.
|
2000-01-13 21:19:03 +00:00
|
|
|
|
* (use window coordinates)
|
1999-12-18 11:08:18 +00:00
|
|
|
|
*/
|
|
|
|
|
- (NSRect) rectForObject: (id)anObject
|
|
|
|
|
{
|
|
|
|
|
unsigned pos = [objects indexOfObjectIdenticalTo: anObject];
|
|
|
|
|
NSRect rect;
|
|
|
|
|
int r;
|
|
|
|
|
int c;
|
|
|
|
|
|
|
|
|
|
if (pos == NSNotFound)
|
|
|
|
|
return NSZeroRect;
|
|
|
|
|
r = pos / [self numberOfColumns];
|
|
|
|
|
c = pos % [self numberOfColumns];
|
|
|
|
|
rect = [self cellFrameAtRow: r column: c];
|
|
|
|
|
/*
|
|
|
|
|
* Adjust to image area.
|
|
|
|
|
*/
|
|
|
|
|
rect.size.width -= 15;
|
|
|
|
|
rect.size.height -= 15;
|
2000-01-13 21:19:03 +00:00
|
|
|
|
rect = [self convertRect: rect toView: nil];
|
1999-12-18 11:08:18 +00:00
|
|
|
|
return rect;
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-08 15:19:11 +00:00
|
|
|
|
- (void) refreshCells
|
|
|
|
|
{
|
|
|
|
|
unsigned count = [objects count];
|
|
|
|
|
unsigned index;
|
|
|
|
|
int cols = 0;
|
|
|
|
|
int rows;
|
|
|
|
|
int width;
|
|
|
|
|
|
|
|
|
|
width = [[self superview] bounds].size.width;
|
|
|
|
|
while (width >= 72)
|
|
|
|
|
{
|
|
|
|
|
width -= (72 + 8);
|
|
|
|
|
cols++;
|
|
|
|
|
}
|
|
|
|
|
if (cols == 0)
|
|
|
|
|
{
|
|
|
|
|
cols = 1;
|
|
|
|
|
}
|
|
|
|
|
rows = count / cols;
|
|
|
|
|
if (rows == 0 || rows * cols != count)
|
|
|
|
|
{
|
|
|
|
|
rows++;
|
|
|
|
|
}
|
|
|
|
|
[self renewRows: rows columns: cols];
|
|
|
|
|
|
|
|
|
|
for (index = 0; index < count; index++)
|
|
|
|
|
{
|
|
|
|
|
id obj = [objects objectAtIndex: index];
|
|
|
|
|
NSButtonCell *but = [self cellAtRow: index/cols column: index%cols];
|
|
|
|
|
|
1999-12-13 17:01:35 +00:00
|
|
|
|
[but setImage: [obj imageForViewer]];
|
|
|
|
|
[but setTitle: [document nameForObject: obj]];
|
1999-12-08 16:31:06 +00:00
|
|
|
|
[but setShowsStateBy: NSChangeGrayCellMask];
|
|
|
|
|
[but setHighlightsBy: NSChangeGrayCellMask];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
}
|
|
|
|
|
while (index < rows * cols)
|
|
|
|
|
{
|
|
|
|
|
NSButtonCell *but = [self cellAtRow: index/cols column: index%cols];
|
|
|
|
|
|
|
|
|
|
[but setImage: nil];
|
2001-10-23 21:24:46 +00:00
|
|
|
|
[but setTitle: @""];
|
1999-12-08 16:31:06 +00:00
|
|
|
|
[but setShowsStateBy: NSNoCellMask];
|
|
|
|
|
[but setHighlightsBy: NSNoCellMask];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
index++;
|
|
|
|
|
}
|
|
|
|
|
[self setIntercellSpacing: NSMakeSize(8,8)];
|
|
|
|
|
[self sizeToCells];
|
|
|
|
|
[self setNeedsDisplay: YES];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) removeObject: (id)anObject
|
|
|
|
|
{
|
|
|
|
|
unsigned pos;
|
|
|
|
|
|
|
|
|
|
pos = [objects indexOfObjectIdenticalTo: anObject];
|
|
|
|
|
if (pos == NSNotFound)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
[objects removeObjectAtIndex: pos];
|
|
|
|
|
[self refreshCells];
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (void) resetObject: (id)anObject
|
1999-12-18 07:42:09 +00:00
|
|
|
|
{
|
1999-12-23 07:49:27 +00:00
|
|
|
|
NSString *name = [document nameForObject: anObject];
|
|
|
|
|
GormInspectorsManager *mgr = [(Gorm*)NSApp inspectorsManager];
|
|
|
|
|
|
|
|
|
|
if ([name isEqual: @"NSOwner"] == YES)
|
|
|
|
|
{
|
|
|
|
|
[mgr setClassInspector];
|
|
|
|
|
}
|
|
|
|
|
if ([name isEqual: @"NSFirst"] == YES)
|
|
|
|
|
{
|
|
|
|
|
[mgr setClassInspector];
|
|
|
|
|
}
|
1999-12-18 07:42:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:08:18 +00:00
|
|
|
|
- (void) resizeWithOldSuperviewSize: (NSSize)oldSize
|
1999-12-08 15:19:11 +00:00
|
|
|
|
{
|
1999-12-18 11:08:18 +00:00
|
|
|
|
[self refreshCells];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) selectObjects: (NSArray*)anArray
|
|
|
|
|
{
|
1999-12-18 07:42:09 +00:00
|
|
|
|
id obj = [anArray lastObject];
|
|
|
|
|
|
1999-12-20 14:20:06 +00:00
|
|
|
|
selected = obj;
|
|
|
|
|
[document setSelectionFromEditor: self];
|
2000-01-04 12:21:17 +00:00
|
|
|
|
[self makeSelectionVisible: YES];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (NSArray*) selection
|
|
|
|
|
{
|
|
|
|
|
if (selected == nil)
|
|
|
|
|
return [NSArray array];
|
|
|
|
|
else
|
|
|
|
|
return [NSArray arrayWithObject: selected];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (unsigned) selectionCount
|
|
|
|
|
{
|
|
|
|
|
return (selected == nil) ? 0 : 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) validateEditing
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (BOOL) wantsSelection
|
|
|
|
|
{
|
|
|
|
|
return NO;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (NSWindow*) window
|
|
|
|
|
{
|
1999-12-18 11:08:18 +00:00
|
|
|
|
return [super window];
|
1999-12-08 15:19:11 +00:00
|
|
|
|
}
|
|
|
|
|
@end
|
1999-12-21 15:32:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@implementation NSView (GormInspectors)
|
|
|
|
|
- (NSString*) sizeInspectorClassName
|
|
|
|
|
{
|
|
|
|
|
return @"GormViewSizeInspector";
|
|
|
|
|
}
|
2002-07-08 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
- (NSString*) customClassInspector
|
|
|
|
|
{
|
|
|
|
|
return @"GormCustomClassInspector";
|
|
|
|
|
}
|
1999-12-21 15:32:54 +00:00
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
@interface GormViewSizeInspector : IBInspector
|
|
|
|
|
{
|
|
|
|
|
NSButton *top;
|
|
|
|
|
NSButton *bottom;
|
|
|
|
|
NSButton *left;
|
|
|
|
|
NSButton *right;
|
|
|
|
|
NSButton *width;
|
|
|
|
|
NSButton *height;
|
2001-09-16 18:53:33 +00:00
|
|
|
|
NSForm *sizeForm;
|
1999-12-21 15:32:54 +00:00
|
|
|
|
}
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
@implementation GormViewSizeInspector
|
|
|
|
|
|
|
|
|
|
NSImage *eHCoil = nil;
|
|
|
|
|
NSImage *eVCoil = nil;
|
|
|
|
|
NSImage *eHLine = nil;
|
|
|
|
|
NSImage *eVLine = nil;
|
|
|
|
|
NSImage *mHCoil = nil;
|
|
|
|
|
NSImage *mVCoil = nil;
|
|
|
|
|
NSImage *mHLine = nil;
|
|
|
|
|
NSImage *mVLine = nil;
|
|
|
|
|
|
|
|
|
|
+ (void) initialize
|
|
|
|
|
{
|
|
|
|
|
if (self == [GormViewSizeInspector class])
|
|
|
|
|
{
|
|
|
|
|
NSBundle *bundle = [NSBundle mainBundle];
|
|
|
|
|
NSString *path;
|
|
|
|
|
|
|
|
|
|
path = [bundle pathForImageResource: @"GormEHCoil"];
|
|
|
|
|
eHCoil = [[NSImage alloc] initWithContentsOfFile: path];
|
|
|
|
|
path = [bundle pathForImageResource: @"GormEVCoil"];
|
|
|
|
|
eVCoil = [[NSImage alloc] initWithContentsOfFile: path];
|
|
|
|
|
path = [bundle pathForImageResource: @"GormEHLine"];
|
|
|
|
|
eHLine = [[NSImage alloc] initWithContentsOfFile: path];
|
|
|
|
|
path = [bundle pathForImageResource: @"GormEVLine"];
|
|
|
|
|
eVLine = [[NSImage alloc] initWithContentsOfFile: path];
|
|
|
|
|
path = [bundle pathForImageResource: @"GormMHCoil"];
|
|
|
|
|
mHCoil = [[NSImage alloc] initWithContentsOfFile: path];
|
|
|
|
|
path = [bundle pathForImageResource: @"GormMVCoil"];
|
|
|
|
|
mVCoil = [[NSImage alloc] initWithContentsOfFile: path];
|
|
|
|
|
path = [bundle pathForImageResource: @"GormMHLine"];
|
|
|
|
|
mHLine = [[NSImage alloc] initWithContentsOfFile: path];
|
|
|
|
|
path = [bundle pathForImageResource: @"GormMVLine"];
|
|
|
|
|
mVLine = [[NSImage alloc] initWithContentsOfFile: path];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) dealloc
|
|
|
|
|
{
|
2001-09-16 18:53:33 +00:00
|
|
|
|
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
1999-12-21 15:32:54 +00:00
|
|
|
|
RELEASE(window);
|
|
|
|
|
[super dealloc];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (id) init
|
|
|
|
|
{
|
|
|
|
|
self = [super init];
|
|
|
|
|
if (self != nil)
|
|
|
|
|
{
|
2002-04-07 22:02:41 +00:00
|
|
|
|
if ([NSBundle loadNibNamed: @"GormViewSizeInspector"
|
|
|
|
|
owner: self] == NO)
|
2002-03-31 15:59:18 +00:00
|
|
|
|
{
|
2002-04-07 22:02:41 +00:00
|
|
|
|
|
|
|
|
|
NSDictionary *table;
|
|
|
|
|
NSBundle *bundle;
|
|
|
|
|
|
|
|
|
|
table = [NSDictionary dictionaryWithObject: self
|
|
|
|
|
forKey: @"NSOwner"];
|
|
|
|
|
bundle = [NSBundle mainBundle];
|
|
|
|
|
|
|
|
|
|
if ( [bundle loadNibFile: @"GormViewSizeInspector"
|
|
|
|
|
externalNameTable: table
|
|
|
|
|
withZone: [self zone]] == NO)
|
|
|
|
|
{
|
|
|
|
|
NSLog(@"Could not open gorm GormViewSizeInspector");
|
|
|
|
|
NSLog(@"self %@", self);
|
|
|
|
|
return nil;
|
|
|
|
|
}
|
2002-03-31 15:59:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[top setTag: NSViewMaxYMargin];
|
|
|
|
|
[bottom setTag: NSViewMinYMargin];
|
|
|
|
|
[right setTag: NSViewMaxXMargin];
|
|
|
|
|
[left setTag: NSViewMinXMargin];
|
|
|
|
|
[width setTag: NSViewWidthSizable];
|
|
|
|
|
[height setTag: NSViewHeightSizable];
|
2001-09-16 18:53:33 +00:00
|
|
|
|
|
|
|
|
|
[[NSNotificationCenter defaultCenter]
|
|
|
|
|
addObserver: self
|
|
|
|
|
selector: @selector(viewFrameChangeNotification:)
|
|
|
|
|
name: NSViewFrameDidChangeNotification
|
|
|
|
|
object: nil];
|
|
|
|
|
[[NSNotificationCenter defaultCenter]
|
|
|
|
|
addObserver: self
|
|
|
|
|
selector: @selector(controlTextDidEndEditing:)
|
|
|
|
|
name: NSControlTextDidEndEditingNotification
|
|
|
|
|
object: nil];
|
|
|
|
|
|
1999-12-21 15:32:54 +00:00
|
|
|
|
}
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
|
2001-09-16 18:53:33 +00:00
|
|
|
|
- (void) _setValuesFromControl: control
|
|
|
|
|
{
|
|
|
|
|
if (control == sizeForm)
|
|
|
|
|
{
|
|
|
|
|
NSRect rect;
|
|
|
|
|
rect = NSMakeRect([[control cellAtIndex: 0] floatValue],
|
|
|
|
|
[[control cellAtIndex: 1] floatValue],
|
|
|
|
|
[[control cellAtIndex: 2] floatValue],
|
|
|
|
|
[[control cellAtIndex: 3] floatValue]);
|
2002-04-07 22:02:41 +00:00
|
|
|
|
|
|
|
|
|
if (NSEqualRects(rect, [object frame]) == NO)
|
|
|
|
|
{
|
|
|
|
|
NSRect oldFrame = [object frame];
|
|
|
|
|
|
|
|
|
|
[object setFrame: rect];
|
|
|
|
|
[object display];
|
|
|
|
|
|
|
|
|
|
if ([object superview])
|
|
|
|
|
[[object superview] displayRect:
|
|
|
|
|
GormExtBoundsForRect(oldFrame)];
|
|
|
|
|
[[object superview] lockFocus];
|
|
|
|
|
GormDrawKnobsForRect([object frame]);
|
|
|
|
|
GormShowFastKnobFills();
|
|
|
|
|
[[object superview] unlockFocus];
|
|
|
|
|
[[object window] flushWindow];
|
|
|
|
|
}
|
2001-09-16 18:53:33 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) _getValuesFromObject: anObject
|
|
|
|
|
{
|
|
|
|
|
NSRect frame;
|
|
|
|
|
|
|
|
|
|
if (anObject != object)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
frame = [anObject frame];
|
|
|
|
|
[[sizeForm cellAtIndex: 0] setFloatValue: NSMinX(frame)];
|
|
|
|
|
[[sizeForm cellAtIndex: 1] setFloatValue: NSMinY(frame)];
|
|
|
|
|
[[sizeForm cellAtIndex: 2] setFloatValue: NSWidth(frame)];
|
|
|
|
|
[[sizeForm cellAtIndex: 3] setFloatValue: NSHeight(frame)];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
|
|
|
|
{
|
|
|
|
|
id notifier = [aNotification object];
|
|
|
|
|
[self _setValuesFromControl: notifier];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) viewFrameChangeNotification: (NSNotification*)aNotification
|
|
|
|
|
{
|
|
|
|
|
id notifier = [aNotification object];
|
|
|
|
|
|
|
|
|
|
[self _getValuesFromObject: notifier];
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-21 15:32:54 +00:00
|
|
|
|
- (void) setAutosize: (id)sender
|
|
|
|
|
{
|
|
|
|
|
unsigned mask = [sender tag];
|
|
|
|
|
|
|
|
|
|
if ([sender state] == NSOnState)
|
|
|
|
|
{
|
|
|
|
|
mask = [object autoresizingMask] | mask;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
mask = [object autoresizingMask] & ~mask;
|
|
|
|
|
}
|
|
|
|
|
[object setAutoresizingMask: mask];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void) setObject: (id)anObject
|
|
|
|
|
{
|
2002-04-07 22:02:41 +00:00
|
|
|
|
if ((object != nil) && (anObject != object))
|
2001-09-16 18:53:33 +00:00
|
|
|
|
[object setPostsFrameChangedNotifications: NO];
|
|
|
|
|
|
1999-12-21 15:32:54 +00:00
|
|
|
|
if (anObject != nil && anObject != object)
|
|
|
|
|
{
|
2001-09-16 18:53:33 +00:00
|
|
|
|
NSRect frame;
|
1999-12-21 15:32:54 +00:00
|
|
|
|
unsigned mask = [anObject autoresizingMask];
|
|
|
|
|
|
|
|
|
|
ASSIGN(object, anObject);
|
|
|
|
|
if (mask & NSViewMaxYMargin)
|
|
|
|
|
[top setState: NSOnState];
|
|
|
|
|
else
|
|
|
|
|
[top setState: NSOffState];
|
|
|
|
|
|
|
|
|
|
if (mask & NSViewMinYMargin)
|
|
|
|
|
[bottom setState: NSOnState];
|
|
|
|
|
else
|
|
|
|
|
[bottom setState: NSOffState];
|
|
|
|
|
|
|
|
|
|
if (mask & NSViewMaxXMargin)
|
|
|
|
|
[right setState: NSOnState];
|
|
|
|
|
else
|
|
|
|
|
[right setState: NSOffState];
|
|
|
|
|
|
|
|
|
|
if (mask & NSViewMinXMargin)
|
|
|
|
|
[left setState: NSOnState];
|
|
|
|
|
else
|
|
|
|
|
[left setState: NSOffState];
|
|
|
|
|
|
|
|
|
|
if (mask & NSViewWidthSizable)
|
|
|
|
|
[width setState: NSOnState];
|
|
|
|
|
else
|
|
|
|
|
[width setState: NSOffState];
|
|
|
|
|
|
|
|
|
|
if (mask & NSViewHeightSizable)
|
|
|
|
|
[height setState: NSOnState];
|
|
|
|
|
else
|
|
|
|
|
[height setState: NSOffState];
|
2001-09-16 18:53:33 +00:00
|
|
|
|
|
|
|
|
|
frame = [anObject frame];
|
|
|
|
|
[[sizeForm cellAtIndex: 0] setFloatValue: NSMinX(frame)];
|
|
|
|
|
[[sizeForm cellAtIndex: 1] setFloatValue: NSMinY(frame)];
|
|
|
|
|
[[sizeForm cellAtIndex: 2] setFloatValue: NSWidth(frame)];
|
|
|
|
|
[[sizeForm cellAtIndex: 3] setFloatValue: NSHeight(frame)];
|
|
|
|
|
[anObject setPostsFrameChangedNotifications: YES];
|
1999-12-21 15:32:54 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2002-07-08 04:45:23 +00:00
|
|
|
|
@end
|
1999-12-21 15:32:54 +00:00
|
|
|
|
|
2002-07-08 04:45:23 +00:00
|
|
|
|
// Custom class inspector declaration and definition
|
|
|
|
|
@interface GormCustomClassInspector : IBInspector
|
|
|
|
|
{
|
|
|
|
|
}
|
1999-12-21 15:32:54 +00:00
|
|
|
|
@end
|
|
|
|
|
|
2002-07-08 04:45:23 +00:00
|
|
|
|
@implementation GormCustomClassInspector
|
|
|
|
|
@end
|