ChangeLog

GormWindowEditor.m
GNUmakefile
GormObjectEditor.m
GormTableViewEditor.m
ClassInformation.plist
GormDocument.m
Palettes/3Containers/main.m
Palettes/3Containers/GNUmakefile
Palettes/3Containers/inspectors.m
Palettes/2Controls/GormBoxInspector.gorm
Palettes/2Controls/GormTextFieldInspector.gorm
Palettes/2Controls/GormSliderInspector.gorm
Palettes/2Controls/GormFormInspector.gorm
Palettes/2Controls/GormButtonInspector.gorm
Resources/GormViewSizeInspector.gorm
Resources/GormViewSizeInspector.classes
Palettes/3Containers/GormNSOutlineView.m
Palettes/3Containers/GormNSOutlineView.h


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@13277 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Pierre-Yves Rivaille 2002-03-31 15:59:18 +00:00
parent 1ff190361e
commit 3f892d52a9
18 changed files with 1139 additions and 140 deletions

View file

@ -1,3 +1,35 @@
2002-03-31 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
* GormWindowEditor.m
When resizing matrix, use integer values for setCellSize.
When dropping an object from the palettes, use integer
coordinates for its frame.
* GNUMakefile
* GormObjectEditor.m
* Resources/GormViewSizeInspector.gorm
* Resources/GormViewSizeInspector.classes
Moved GormViewSizeInspector to gorm.
* ClassInformation.plist: NSOutlineView declaration.
* GormDocument.m ([GormDocument -{load, save}Document]):
* GormTableViewEditor.m ([-outlineViewSelectionDidChange:])
* Palettes/3Containers/GNUMakefile
* Palettes/3Containers/main.m
* Palettes/3Containers/GormNSOutlineView.m
* Palettes/3Containers/GormNSOutlineView.h
* Palettes/3Containers/inspectors.m
GormNSOutlineView replaces NSOutlineView when editing interface.
GormNSOutlineView features a dummy dataSource during editing and
testing.
* Palettes/2Controls/GormBoxInspector.gorm
* Palettes/2Controls/GormButtonInspector.gorm
* Palettes/2Controls/GormFormInspector.gorm
* Palettes/2Controls/GormSliderInspector.gorm
* Palettes/2Controls/GormTextFieldInspector.gorm
Cosmetic changes.
2002-03-29 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
* GormDocument.m ([GormDocument -windowAndRect:forObject:]):

View file

@ -478,6 +478,10 @@
Super = NSControl;
};
NSOutlineView = {
Super = NSTableView;
};
NSText = {
Actions = (
alignCenter:,

View file

@ -103,6 +103,7 @@ Gorm_RESOURCE_FILES = \
Images/iconTopLeft_nib.tiff \
Images/iconTopRight_nib.tiff \
Images/iconTop_nib.tiff \
Resources/GormViewSizeInspector.gorm
Gorm_HEADERS = \
Gorm.h \

View file

@ -1343,6 +1343,7 @@ static NSImage *classesImage = nil;
[u decodeClassName: @"NSWindow" asClassName: @"GormNSWindow"];
[u decodeClassName: @"NSBrowser" asClassName: @"GormNSBrowser"];
[u decodeClassName: @"NSTableView" asClassName: @"GormNSTableView"];
[u decodeClassName: @"NSOutlineView" asClassName: @"GormNSOutlineView"];
c = [u decodeObject];
if (c == nil || [c isKindOfClass: [GSNibContainer class]] == NO)
@ -1882,14 +1883,16 @@ static NSImage *classesImage = nil;
archiverData = [NSMutableData dataWithCapacity: 0];
archiver = [[NSArchiver alloc] initForWritingWithMutableData: archiverData];
[archiver encodeClassName: @"GormObjectProxy" intoClassName: @"GSNibItem"];
[archiver encodeClassName: @"GormCustomView"
[archiver encodeClassName: @"GormCustomView"
intoClassName: @"GSCustomView"];
[archiver encodeClassName: @"GormNSWindow"
[archiver encodeClassName: @"GormNSWindow"
intoClassName: @"NSWindow"];
[archiver encodeClassName: @"GormNSBrowser"
[archiver encodeClassName: @"GormNSBrowser"
intoClassName: @"NSBrowser"];
[archiver encodeClassName: @"GormNSTableView"
[archiver encodeClassName: @"GormNSTableView"
intoClassName: @"NSTableView"];
[archiver encodeClassName: @"GormNSOutlineView"
intoClassName: @"NSOutlineView"];
[archiver encodeRootObject: self];
archiveResult = [archiverData writeToFile: documentPath atomically: YES];
//archiveResult = [NSArchiver archiveRootObject: self toFile: documentPath];
@ -2150,7 +2153,6 @@ numberOfChildrenOfItem: (id)item
child: (int)index
ofItem: (id)item
{
NSLog(@"child:ofItem");
if(item == nil && index == 0)
{
return @"NSObject";

View file

@ -740,36 +740,18 @@ NSImage *mVLine = nil;
self = [super init];
if (self != nil)
{
NSView *contents;
NSButton *button;
NSBox *box, *sizeBox;
NSRect rect;
if ([NSBundle loadNibNamed: @"GormViewSizeInspector" owner: self] == NO)
{
NSLog(@"Could not open gorm GormViewSizeInspector");
return nil;
}
rect = NSMakeRect(0, 0, IVW, IVH);
window = [[NSWindow alloc] initWithContentRect: rect
styleMask: NSBorderlessWindowMask
backing: NSBackingStoreRetained
defer: NO];
contents = [window contentView];
rect = NSMakeRect((IVW-200)/2, IVW, 200, 80);
sizeBox = [[NSBox alloc] initWithFrame: NSZeroRect];
[sizeBox setBorderType: NSBezelBorder];
[sizeBox setTitle: @"Size"];
[sizeBox setTitlePosition: NSAtTop];
[sizeBox setFrameFromContentFrame: rect];
[contents addSubview: sizeBox];
RELEASE(sizeBox);
rect = NSMakeRect(25, 5, 150, 75);
sizeForm = [[NSForm alloc] initWithFrame: rect];
[sizeForm addEntry: @"X"];
[sizeForm addEntry: @"Y"];
[sizeForm addEntry: @"Width"];
[sizeForm addEntry: @"Height"];
[sizeForm setEntryWidth: 150];
[sizeForm setInterlineSpacing: 3];
[sizeBox addSubview: sizeForm];
[top setTag: NSViewMaxYMargin];
[bottom setTag: NSViewMinYMargin];
[right setTag: NSViewMaxXMargin];
[left setTag: NSViewMinXMargin];
[width setTag: NSViewWidthSizable];
[height setTag: NSViewHeightSizable];
[[NSNotificationCenter defaultCenter]
addObserver: self
@ -782,98 +764,6 @@ NSImage *mVLine = nil;
name: NSControlTextDidEndEditingNotification
object: nil];
rect = NSMakeRect((IVW-200)/2, (IVW-200)/2, 200, 200);
box = [[NSBox alloc] initWithFrame: NSZeroRect];
[box setBorderType: NSBezelBorder];
[box setTitle: @"Autosizing"];
[box setTitlePosition: NSAtTop];
[box setFrameFromContentFrame: rect];
[contents addSubview: box];
RELEASE(box);
rect = NSMakeRect(50, 50, 100, 100);
button = [[NSButton alloc] initWithFrame: rect];
[button setTitle: @""];
[button setEnabled: NO];
[box addSubview: button];
rect = NSMakeRect(91,151,20,50);
top = [[NSButton alloc] initWithFrame: rect];
[top setImagePosition: NSImageOnly];
[top setImage: eVLine];
[top setAlternateImage: eVCoil];
[top setBordered: NO];
[top setButtonType: NSToggleButton];
[top setTag: NSViewMaxYMargin];
[top setTarget: self];
[top setAction: @selector(setAutosize:)];
[box addSubview: top];
RELEASE(top);
rect = NSMakeRect(91,0,20,50);
bottom = [[NSButton alloc] initWithFrame: rect];
[bottom setImagePosition: NSImageOnly];
[bottom setImage: eVLine];
[bottom setAlternateImage: eVCoil];
[bottom setBordered: NO];
[bottom setButtonType: NSToggleButton];
[bottom setTag: NSViewMinYMargin];
[bottom setTarget: self];
[bottom setAction: @selector(setAutosize:)];
[box addSubview: bottom];
RELEASE(bottom);
rect = NSMakeRect(0,91,50,20);
left = [[NSButton alloc] initWithFrame: rect];
[left setImagePosition: NSImageOnly];
[left setImage: eHLine];
[left setAlternateImage: eHCoil];
[left setBordered: NO];
[left setButtonType: NSToggleButton];
[left setTag: NSViewMinXMargin];
[left setTarget: self];
[left setAction: @selector(setAutosize:)];
[box addSubview: left];
RELEASE(left);
rect = NSMakeRect(151,91,50,20);
right = [[NSButton alloc] initWithFrame: rect];
[right setImagePosition: NSImageOnly];
[right setImage: eHLine];
[right setAlternateImage: eHCoil];
[right setBordered: NO];
[right setButtonType: NSToggleButton];
[right setTag: NSViewMaxXMargin];
[right setTarget: self];
[right setAction: @selector(setAutosize:)];
[box addSubview: right];
RELEASE(right);
rect = NSMakeRect(51,92,97,19);
width = [[NSButton alloc] initWithFrame: rect];
[width setImagePosition: NSImageOnly];
[width setImage: mHLine];
[width setAlternateImage: mHCoil];
[width setBordered: NO];
[width setButtonType: NSToggleButton];
[width setTag: NSViewWidthSizable];
[width setTarget: self];
[width setAction: @selector(setAutosize:)];
[box addSubview: width];
RELEASE(width);
rect = NSMakeRect(91,52,19,96);
height = [[NSButton alloc] initWithFrame: rect];
[height setImagePosition: NSImageOnly];
[height setImage: mVLine];
[height setAlternateImage: mVCoil];
[height setBordered: NO];
[height setButtonType: NSToggleButton];
[height setTag: NSViewHeightSizable];
[height setTarget: self];
[height setAction: @selector(setAutosize:)];
[box addSubview: height];
RELEASE(height);
}
return self;
}

View file

@ -306,7 +306,6 @@ static NSColor *_oldColor;
[[[tableView enclosingScrollView] superview]
convertPoint: [theEvent locationInWindow]
fromView: nil]];
NSLog(@"mouseDown %@", hitView);
if (hitView == [tableView headerView])
{
@ -343,6 +342,23 @@ static NSColor *_oldColor;
NSLog(@"no selection");
}
}
- (void) outlineViewSelectionDidChange: (id) tv
{
if ([tableView selectedColumn] != -1)
{
selected = [[tableView tableColumns]
objectAtIndex: [tableView selectedColumn]];
[self selectObjects:
[NSArray arrayWithObject: selected]];
}
else
{
NSLog(@"no selection");
}
}
- (void) editHeader: (NSTableHeaderView*) th
withEvent: (NSEvent *) theEvent
{

View file

@ -24,6 +24,8 @@
#include "GormPrivate.h"
#include <math.h>
static NSRect
NSRectFromPoints(NSPoint p0, NSPoint p1)
{
@ -590,10 +592,12 @@ static BOOL done_editing;
else
{
/* Increase the cell size */
cellSize = NSMakeSize((NSWidth(frame)+intercellSpace.width)/cols
- intercellSpace.width,
(NSHeight(frame)+intercellSpace.height)/rows
- intercellSpace.height);
cellSize = NSMakeSize
(floor((NSWidth(frame)+intercellSpace.width)/cols -
intercellSpace.width),
floor((NSHeight(frame)+intercellSpace.height)/rows -
intercellSpace.height));
/* Check if it is already too small and we're just making it bigger */
if (NSWidth(frame) < NSWidth(oldFrame)
&& NSHeight(frame) < NSHeight(oldFrame))
@ -604,6 +608,7 @@ static BOOL done_editing;
if (cellSize.height < minSize.height)
return NO;
}
if (update)
[view setCellSize: cellSize];
}
@ -1686,9 +1691,14 @@ static BOOL done_editing;
while ((sub = [enumerator nextObject]) != nil)
{
NSRect rect = [sub frame];
rect.origin = loc;
[sub setFrame: rect];
rect.origin.x = (int) rect.origin.x;
rect.origin.y = (int) rect.origin.y;
rect.size.width = (int) rect.size.width;
rect.size.height = (int) rect.size.height;
[edit_view addSubview: sub];
}
[self selectObjects: views];

View file

@ -26,8 +26,10 @@ include $(GNUSTEP_MAKEFILES)/common.make
PALETTE_NAME = 3Containers
3Containers_PALETTE_ICON = ContainersPalette
3Containers_OBJC_FILES = main.m inspectors.m GormNSBrowser.m \
GormNSTableView.m
3Containers_HEADER_FILES = GormNSBrowser.h GormNSTableView.h
GormNSTableView.m \
GormNSOutlineView.m
3Containers_HEADER_FILES = GormNSBrowser.h GormNSTableView.h \
GormNSOutlineView.h
3Containers_PRINCIPAL_CLASS = ContainersPalette
3Containers_RESOURCE_FILES = ContainersPalette.tiff \
GormBrowserInspector.gorm \

View file

@ -0,0 +1,37 @@
/* GormNSOutlineView.h
Copyright (C) 2002 Free Software Foundation, Inc.
Author: Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
Date: 2002
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.
*/
#import <AppKit/AppKit.h>
@interface GormNSOutlineView : NSOutlineView
{
id _gormDataSource;
id _gormDelegate;
BOOL _gormAllowsColumnReordering;
BOOL _gormAllowsColumnResizing;
BOOL _gormAllowsColumnSelection;
BOOL _gormAllowsMultipleSelection;
BOOL _gormAllowsEmptySelection;
}
@end

View file

@ -0,0 +1,389 @@
/* GormNSOutlineView.m
Copyright (C) 2002 Free Software Foundation, Inc.
Author: Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
Date: 2002
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.
*/
#import "GormNSOutlineView.h"
/* ---------------------------------------------------------------
* NSTableView dataSource
*/
@interface NSOutlineViewDataSource: NSObject
{
}
- (id)outlineView: (NSOutlineView *)outlineView
child: (int)index
ofItem: (id)item;
- (BOOL)outlineView: (NSOutlineView *)outlineView
isItemExpandable: (id)item;
- (int) outlineView: (NSOutlineView *)outlineView
numberOfChildrenOfItem: (id)item;
- (id) outlineView: (NSOutlineView *)outlineView
objectValueForTableColumn: (NSTableColumn *)tableColumn
byItem: (id)item;
@end
@implementation NSOutlineViewDataSource
// required methods for data source
- (id)outlineView: (NSOutlineView *)outlineView
child: (int)index
ofItem: (id)item
{
if([item isEqual: @"NSObject"])
{
switch(index)
{
case 0:
return @"NSApplication";
break;
case 1:
return @"NSPanel";
break;
case 2:
return @"NSWindow";
break;
case 3:
return @"NSOutlineView";
break;
default:
break;
}
}
if([item isEqual: @"NSPanel"])
{
switch(index)
{
case 0:
return @"class1";
break;
case 1:
return @"class2";
break;
case 2:
return @"class3";
break;
case 3:
return @"class4";
break;
default:
break;
}
}
else
if(item == nil)
{
if(index == 0)
return @"NSObject";
}
return nil;
}
- (BOOL)outlineView: (NSOutlineView *)outlineView
isItemExpandable: (id)item
{
if([item isEqual: @"NSObject"])
return YES;
if([item isEqual: @"NSPanel"])
return YES;
return NO;
}
- (int) outlineView: (NSOutlineView *)outlineView
numberOfChildrenOfItem: (id)item
{
if(item == nil)
return 1;
else
if([item isEqual: @"NSObject"])
return 4;
else
if([item isEqual: @"NSPanel"])
return 4;
return 0;
}
- (id) outlineView: (NSOutlineView *)outlineView
objectValueForTableColumn: (NSTableColumn *)tableColumn
byItem: (id)item
{
NSString *value = nil;
if([item isEqual: @"NSObject"])
{
if([[tableColumn identifier] isEqual: @"classes"])
{
value = @"NSObject";
}
else
if([[tableColumn identifier] isEqual: @"outlets"])
{
value = @"1";
}
else
if([[tableColumn identifier] isEqual: @"actions"])
{
value = @"2";
}
}
if([item isEqual: @"NSApplication"])
{
if([[tableColumn identifier] isEqual: @"classes"])
{
value = @"NSApplication";
}
else
if([[tableColumn identifier] isEqual: @"outlets"])
{
value = @"2";
}
else
if([[tableColumn identifier] isEqual: @"actions"])
{
value = @"3";
}
}
if([item isEqual: @"NSPanel"])
{
if([[tableColumn identifier] isEqual: @"classes"])
{
value = @"NSPanel";
}
else
if([[tableColumn identifier] isEqual: @"outlets"])
{
value = @"2";
}
else
if([[tableColumn identifier] isEqual: @"actions"])
{
value = @"3";
}
}
if([item isEqual: @"NSWindow"])
{
if([[tableColumn identifier] isEqual: @"classes"])
{
value = @"NSWindow";
}
else
if([[tableColumn identifier] isEqual: @"outlets"])
{
value = @"3";
}
else
if([[tableColumn identifier] isEqual: @"actions"])
{
value = @"5";
}
}
if([item isEqual: @"NSOutlineView"])
{
if([[tableColumn identifier] isEqual: @"classes"])
{
value = @"NSOutlineView";
}
else
if([[tableColumn identifier] isEqual: @"outlets"])
{
value = @"4";
}
else
if([[tableColumn identifier] isEqual: @"actions"])
{
value = @"6";
}
}
if([item isEqual: @"class1"] ||
[item isEqual: @"class2"] ||
[item isEqual: @"class3"] ||
[item isEqual: @"class4"])
{
if([[tableColumn identifier] isEqual: @"classes"])
{
value = item;
}
else
if([[tableColumn identifier] isEqual: @"outlets"])
{
value = @"2";
}
else
if([[tableColumn identifier] isEqual: @"actions"])
{
value = @"3";
}
}
return value;
}
@end
static id _sharedDataSource = nil;
@implementation GormNSOutlineView
+ (id) sharedDataSource
{
if (_sharedDataSource == nil)
{
_sharedDataSource = [[NSOutlineViewDataSource alloc] init];
}
return _sharedDataSource;
}
- (id) initWithFrame: (NSRect) aRect
{
self = [super initWithFrame: aRect];
[super setDataSource: [GormNSOutlineView sharedDataSource]];
_gormDataSource = nil;
return self;
}
- (void)setDataSource: (id)anObject
{
_gormDataSource = anObject;
}
- (id)dataSource
{
return _gormDataSource;
}
- (void)setDelegate: (id)anObject
{
_gormDelegate = anObject;
}
- (id)delegate
{
return _gormDelegate;
}
- (id)setGormDelegate: (id)anObject
{
[super setDelegate: anObject];
}
- (void)encodeWithCoder: (NSCoder*) aCoder
{
id oldDelegate;
int oldNumberOfRows;
_allowsColumnReordering = _gormAllowsColumnReordering;
_allowsColumnResizing = _gormAllowsColumnResizing;
_allowsColumnSelection = _gormAllowsColumnSelection;
_allowsMultipleSelection = _gormAllowsMultipleSelection;
_allowsEmptySelection = _gormAllowsEmptySelection;
_dataSource = _gormDataSource;
oldDelegate = _delegate;
_delegate = _gormDelegate;
oldNumberOfRows = _numberOfRows;
_numberOfRows = 0;
[super encodeWithCoder: aCoder];
_numberOfRows = oldNumberOfRows;
_allowsColumnReordering = YES;
_allowsColumnResizing = YES;
_allowsColumnSelection = YES;
_allowsMultipleSelection = NO;
_allowsEmptySelection = YES;
_delegate = oldDelegate;
_dataSource = _sharedDataSource;
}
- (id) initWithCoder: (NSCoder*) aCoder
{
self = [super initWithCoder: aCoder];
[super setDataSource: [GormNSOutlineView sharedDataSource]];
_gormAllowsColumnReordering = _allowsColumnReordering;
_gormAllowsColumnResizing = _allowsColumnResizing;
_gormAllowsColumnSelection = _allowsColumnSelection;
_gormAllowsMultipleSelection = _allowsMultipleSelection;
_gormAllowsEmptySelection = _allowsEmptySelection;
_gormDelegate = _delegate;
_delegate = nil;
return self;
}
- (void) setGormAllowsColumnReordering: (BOOL)flag
{
_gormAllowsColumnReordering = flag;
}
- (BOOL) gormAllowsColumnReordering
{
return _gormAllowsColumnReordering;
}
- (void) setGormAllowsColumnResizing: (BOOL)flag
{
_gormAllowsColumnResizing = flag;
}
- (BOOL) gormAllowsColumnResizing
{
return _gormAllowsColumnResizing;
}
- (void) setGormAllowsMultipleSelection: (BOOL)flag
{
_gormAllowsMultipleSelection = flag;
}
- (BOOL) gormAllowsMultipleSelection
{
return _gormAllowsMultipleSelection;
}
- (void) setGormAllowsEmptySelection: (BOOL)flag
{
_gormAllowsEmptySelection = flag;
}
- (BOOL) gormAllowsEmptySelection
{
return _gormAllowsEmptySelection;
}
- (void) setGormAllowsColumnSelection: (BOOL)flag
{
_gormAllowsColumnSelection = flag;
}
- (BOOL) gormAllowsColumnSelection
{
return _gormAllowsColumnSelection;
}
@end

View file

@ -337,7 +337,6 @@
- (void) ok: (id)sender
{
NSLog(@"ok");
[self _setValuesFromControl: sender];
}

View file

@ -26,6 +26,7 @@
#include "../../Gorm.h"
#include "GormNSBrowser.h"
#include "GormNSTableView.h"
#include "GormNSOutlineView.h"
#include <math.h>
@ -44,9 +45,10 @@
{
NSView *contents;
NSTableView *tv;
NSTableColumn *tc;
NSSize contentSize;
NSTableView *tv;
NSOutlineView *ov;
NSTableColumn *tc;
NSSize contentSize;
id v;
window = [[NSWindow alloc] initWithContentRect: NSMakeRect(0, 0, 272, 192)
@ -86,7 +88,8 @@
// NSTableView
v = [[NSScrollView alloc] initWithFrame: NSMakeRect(136, 38, 124, 116)];
v = [[NSScrollView alloc] initWithFrame:
NSMakeRect(136, 10, 124, 78)];
[v setHasVerticalScroller: YES];
[v setHasHorizontalScroller: NO];
@ -94,7 +97,7 @@
contentSize = [v contentSize];
tv = [[GormNSTableView alloc] initWithFrame:
NSMakeRect(0,0,contentSize.width, contentSize.height)];
NSZeroRect];
// [tv setDataSource: [[NSTableViewDataSource alloc] init]];
// [tv setAutoresizesAllColumnsToFit: YES];
[v setDocumentView: tv];
@ -124,6 +127,49 @@
RELEASE(tv);
RELEASE(v);
// NSOutlineView
v = [[NSScrollView alloc] initWithFrame:
NSMakeRect(136, 98, 124, 78)];
[v setHasVerticalScroller: YES];
[v setHasHorizontalScroller: NO];
//[v setAutoresizingMask: NSViewHeightSizable|NSViewWidthSizable];
contentSize = [v contentSize];
ov = [[GormNSOutlineView alloc] initWithFrame:
NSMakeRect(0,0,contentSize.width, contentSize.height)];
// [tv setAutoresizesAllColumnsToFit: YES];
[v setDocumentView: ov];
RELEASE(tv);
tc = [[NSTableColumn alloc] initWithIdentifier: @"classes"];
[[tc headerCell] setStringValue: @" "];
[tc setWidth: floor(contentSize.width/2)];
[tc setMinWidth: 20];
[tc setResizable: YES];
[tc setEditable: YES];
[ov addTableColumn: tc];
[ov setOutlineTableColumn: tc];
RELEASE(tc);
tc = [[NSTableColumn alloc] initWithIdentifier: @"outlets"];
[[tc headerCell] setStringValue: @" "];
[tc setWidth: ceil(contentSize.width/2)];
[tc setMinWidth: 20];
[tc setResizable: YES];
[tc setEditable: YES];
[ov addTableColumn: tc];
RELEASE(tc);
[ov setFrame: NSMakeRect(0,0,contentSize.width, contentSize.height)];
[ov setDrawsGrid: NO];
[ov setIndentationPerLevel: 10.];
[ov setIndentationMarkerFollowsCell: YES];
[contents addSubview: v];
RELEASE(ov);
RELEASE(v);
}
@end

View file

@ -0,0 +1,571 @@
{
FirstResponder = {
Actions = (
activateContextHelpMode:,
alignCenter:,
alignJustified:,
alignLeft:,
alignRight:,
arrangeInFront:,
cancel:,
capitalizeWord:,
changeColor:,
changeFont:,
checkSpelling:,
close:,
complete:,
copy:,
copyFont:,
copyRuler:,
cut:,
delete:,
deleteBackward:,
deleteForward:,
deleteToBeginningOfLine:,
deleteToBeginningOfParagraph:,
deleteToEndOfLine:,
deleteToEndOfParagraph:,
deleteToMark:,
deleteWordBackward:,
deleteWordForward:,
deminiaturize:,
deselectAll:,
fax:,
hide:,
hideOtherApplications:,
indent:,
loosenKerning:,
lowerBaseline:,
lowercaseWord:,
makeKeyAndOrderFront:,
miniaturize:,
miniaturizeAll:,
moveBackward:,
moveBackwardAndModifySelection:,
moveDown:,
moveDownAndModifySelection:,
moveForward:,
moveForwardAndModifySelection:,
moveLeft:,
moveRight:,
moveToBeginningOfDocument:,
moveToBeginningOfLine:,
moveToBeginningOfParagraph:,
moveToEndOfDocument:,
moveToEndOfLine:,
moveToEndOfParagraph:,
moveUp:,
moveUpAndModifySelection:,
moveWordBackward:,
moveWordBackwardAndModifySelection:,
moveWordForward:,
moveWordForwardAndModifySelection:,
ok:,
open:,
orderBack:,
orderFront:,
orderFrontColorPanel:,
orderFrontDataLinkPanel:,
orderFrontHelpPanel:,
orderFrontStandardAboutPanel:,
orderFrontStandardInfoPanel:,
orderOut:,
pageDown:,
pageUp:,
paste:,
pasteAsPlainText:,
pasteAsRichText:,
pasteFont:,
pasteRuler:,
performClose:,
performMiniaturize:,
performZoom:,
print:,
raiseBaseline:,
runPageLayout:,
runToolbarCustomizationPalette:,
scrollLineDown:,
scrollLineUp:,
scrollPageDown:,
scrollPageUp:,
scrollViaScroller:,
selectAll:,
selectLine:,
selectNextKeyView:,
selectParagraph:,
selectPreviousKeyView:,
selectText:,
selectText:,
selectToMark:,
selectWord:,
showContextHelp:,
showGuessPanel:,
showHelp:,
showWindow:,
stop:,
subscript:,
superscript:,
swapWithMark:,
takeDoubleValueFrom:,
takeFloatValueFrom:,
takeIntValueFrom:,
takeObjectValueFrom:,
takeStringValueFrom:,
terminate:,
tightenKerning:,
toggle:,
toggleContinuousSpellChecking:,
toggleRuler:,
toggleToolbarShown:,
toggleTraditionalCharacterShape:,
transpose:,
transposeWords:,
turnOffKerning:,
turnOffLigatures:,
underline:,
unhide:,
unhideAllApplications:,
unscript:,
uppercaseWord:,
useAllLigatures:,
useStandardKerning:,
useStandardLigatures:,
yank:,
zoom:
);
Super = NSObject;
};
GormViewSizeInpector = {
Actions = (
setAutosize:
);
Outlets = (
bottom,
height,
left,
right,
sizeForm,
top,
width
);
Super = IBInspector;
};
IBInspector = {
Actions = (
ok:,
revert:,
touch:
);
Outlets = (
window
);
Super = NSObject;
};
IBPalette = {
Actions = (
);
Outlets = (
originalWindow
);
Super = NSObject;
};
NSActionCell = {
Super = NSCell;
};
NSApplication = {
Actions = (
arrangeInFront:,
hide:,
hideOtherApplications:,
miniaturizeAll:,
orderFrontColorPanel:,
orderFrontDataLinkPanel:,
orderFrontHelpPanel:,
orderFrontStandardAboutPanel:,
orderFrontStandardInfoPanel:,
runPageLayout:,
stop:,
terminate:,
unhide:,
unhideAllApplications:
);
Outlets = (
delegate
);
Super = NSResponder;
};
NSArray = {
Super = NSObject;
};
NSBrowser = {
Actions = (
doClick:,
doDoubleClick:,
selectAll:
);
Outlets = (
delegate
);
Super = NSControl;
};
NSBrowserCell = {
Super = NSCell;
};
NSButton = {
Actions = (
performClick:
);
Super = NSControl;
};
NSButtonCell = {
Actions = (
performClick:
);
Super = NSActionCell;
};
NSCStringText = {
Actions = (
clear:,
selectText:
);
Super = NSText;
};
NSCell = {
Actions = (
takeDoubleValueFrom:,
takeFloatValueFrom:,
takeIntValueFrom:,
takeStringValueFrom:
);
Super = NSObject;
};
NSColorWell = {
Actions = (
takeColorFrom:
);
Super = NSControl;
};
NSComboBox = {
Outlets = (
dataSource
);
Super = NSTextField;
};
NSControl = {
Actions = (
takeDoubleValueFrom:,
takeFloatValueFrom:,
takeIntValueFrom:,
takeObjectValueFrom:,
takeStringValueFrom:
);
Outlets = (
target
);
Super = NSView;
};
NSCursor = {
Super = NSObject;
};
NSDateFormatter = {
Super = NSFormatter;
};
NSDictionary = {
Super = NSObject;
};
NSDocument = {
Actions = (
printDocument:,
revertDocumentToSaved:,
runPageLayout:,
saveDocument:,
saveDocumentAs:,
saveDocumentTo:
);
Super = NSObject;
};
NSDocumentController = {
Actions = (
clearRecentDocuments:,
newDocument:,
openDocument:,
saveAllDocuments:
);
Super = NSObject;
};
NSDrawer = {
Actions = (
close:,
open:,
toggle:
);
Outlets = (
delegate
);
Super = NSResponder;
};
NSFontManager = {
Actions = (
addFontTrait:,
modifyFont:,
modifyFontViaPanel:,
orderFrontFontPanel:,
removeFontTrait:
);
Outlets = (
menu
);
Super = NSResponder;
};
NSForm = {
Super = NSMatrix;
};
NSFormCell = {
Super = NSActionCell;
};
NSFormatter = {
Super = NSObject;
};
NSHelpManager = {
Actions = (
activateContextHelpMode:,
showHelp:
);
Super = NSResponder;
};
NSImage = {
Super = NSObject;
};
NSImageView = {
Super = NScontrol;
};
NSMatrix = {
Actions = (
selectAll:,
selectText:
);
Outlets = (
delegate
);
Super = NSControl;
};
NSMenu = {
Super = NSObject;
};
NSMenuItem = {
Outlets = (
target
);
Super = NSObject;
};
NSMutableArray = {
Super = NSArray;
};
NSMutableDictionary = {
Super = NSDictionary;
};
NSNumberFormatter = {
Super = NSFormatter;
};
NSOutlineView = {
Super = NSTableView;
};
NSPanel = {
Super = NSWindow;
};
NSPopUpButton = {
Super = NSButton;
};
NSProgressIndicator = {
Actions = (
animate:,
startAnimation:,
stopAnimation:
);
Super = NSObject;
};
NSResponder = {
Outlets = (
menu
);
Super = NSObject;
};
NSRulerView = {
Super = NSView;
};
NSScrollView = {
Super = NSView;
};
NSScroller = {
Super = NSControl;
};
NSSecureTextField = {
Super = NSTextField;
};
NSSecureTextFieldCell = {
Super = NSTextFieldCell;
};
NSSlider = {
Super = NSControl;
};
NSSliderCell = {
Super = NSActionCell;
};
NSSplitView = {
Super = NSView;
};
NSTabView = {
Actions = (
selectFirstTabViewItem:,
selectLastTabViewItem:,
selectNextTabViewItem:,
selectPreviousTabViewItem:,
takeSelectedTabViewItemFromSender:
);
Outlets = (
delegate
);
Super = NSView;
};
NSTableColumn = {
Super = NSObject;
};
NSTableHeaderCell = {
Super = NSTextFieldCell;
};
NSTableHeaderView = {
Super = NSView;
};
NSTableView = {
Actions = (
deselectAll:,
selectAll:
);
Outlets = (
dataSource,
delegate
);
Super = NSControl;
};
NSText = {
Actions = (
alignCenter:,
alignLeft:,
alignRight:,
changeFont:,
changeSpelling:,
checkSpelling:,
copy:,
copyFont:,
copyRuler:,
cut:,
delete:,
ignoreSpelling:,
paste:,
pasteFont:,
pasteRuler:,
selectAll:,
showGuessPanel:,
subscript:,
superscript:,
toggleRuler:,
underline:,
unscript:
);
Outlets = (
delegate
);
Super = NSView;
};
NSTextField = {
Actions = (
selectText:
);
Outlets = (
delegate
);
Super = NSControl;
};
NSTextFieldCell = {
Super = NSActionCell;
};
NSTextView = {
Actions = (
alignJustified:,
changeColor:,
deleteBackwards:,
insertBacktab:,
insertNewLine:,
insertParagraphSeparator:,
insertTab:,
loosenKerning:,
lowerBaseline:,
moveBackward:,
moveDown:,
moveForward:,
moveLeft:,
moveRight:,
moveUp:,
pasteAsPlainText:,
pasteAsRichText:,
raiseBaseline:,
tightenKerning:,
toggleContinuousSpellChecking:,
toggleTraditionalCharacterShape:,
turnOffKerning:,
turnOffLigatures:,
useAllLigatures:,
useDefaultBaseline:,
useDefaultKerning:,
useDefaultLigatures:,
useStandardBaseline:,
useStandardKerning:,
useStandardLigatures:
);
Super = NSText;
};
NSView = {
Actions = (
fax:,
print:
);
Outlets = (
nextKeyView
);
Super = NSResponder;
};
NSWindow = {
Actions = (
deminiaturize:,
fax:,
makeKeyAndOrderFront:,
miniaturize:,
orderBack:,
orderFront:,
orderOut:,
performClose:,
performMiniaturize:,
performZoom:,
print:,
runToolbarCustomizationPalette:,
selectNextKeyView:,
selectPreviousKeyView:,
toggleToolbarShown:,
zoom:
);
Outlets = (
delegate,
initialFirstResponder
);
Super = NSResponder;
};
NSWindowController = {
Actions = (
showWindow:
);
Outlets = (
document
);
Super = NSResponder;
};
}