apps-gorm/GormClassEditor.m
Gregory John Casamento dc86bbbd18 Extensive changes to support GormLib (separation of key functionality from Gorm itself into a subproject library). This will allow easy extension of Gorm in the future.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@16776 72102866-910b-0410-8b05-ffd578937521
2003-05-23 02:25:34 +00:00

73 lines
1.2 KiB
Objective-C

#include "GormPrivate.h"
@implementation GormClassEditor
- (GormClassEditor*) initWithDocument: (GormDocument*)doc
{
self = [super init];
if (self != nil)
{
document = doc; // loose connection
}
return self;
}
- (void) dealloc
{
RELEASE(selectedClassName);
[super dealloc];
}
+ (GormClassEditor*) classEditorForDocument: (GormDocument*)doc
{
return AUTORELEASE([[self alloc] initWithDocument: doc]);
}
- (void) setSelectedClassName: (NSString*)cn
{
ASSIGN(selectedClassName, cn);
}
//--- IBSelectionOwners protocol ---
- (unsigned) selectionCount
{
return (selectedClassName == nil)?0: 1;
}
- (NSArray*) selection
{
// when asked for a selection, it returns a class proxy
if (selectedClassName != nil)
{
NSArray *array;
GormClassProxy *classProxy;
classProxy = [[GormClassProxy alloc] initWithClassName:
selectedClassName];
array = [NSArray arrayWithObject: classProxy];
RELEASE(classProxy);
return array;
}
else
{
return [NSArray array];
}
}
- (void) drawSelection
{
}
- (void) makeSelectionVisible: (BOOL)flag
{
}
- (void) selectObjects: (NSArray*)objects
{
}
@end