mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 11:41:05 +00:00
Update controller / document. Add outlineView
This commit is contained in:
parent
77497d00ff
commit
226d5d3067
3 changed files with 51 additions and 1 deletions
|
@ -327,7 +327,8 @@ static NSImage *fileImage = nil;
|
||||||
NSMenu *mainMenu = nil;
|
NSMenu *mainMenu = nil;
|
||||||
NSEnumerator *en = nil;
|
NSEnumerator *en = nil;
|
||||||
id o = nil;
|
id o = nil;
|
||||||
|
NSOutlineView *outlineView = [[NSOutlineView alloc] init];
|
||||||
|
|
||||||
// get the window and cache it...
|
// get the window and cache it...
|
||||||
window = (GormDocumentWindow *)[self _docWindow];
|
window = (GormDocumentWindow *)[self _docWindow];
|
||||||
[IBResourceManager registerForAllPboardTypes:window
|
[IBResourceManager registerForAllPboardTypes:window
|
||||||
|
@ -382,6 +383,15 @@ static NSImage *fileImage = nil;
|
||||||
NSViewHeightSizable|NSViewWidthSizable];
|
NSViewHeightSizable|NSViewWidthSizable];
|
||||||
[scrollView setDocumentView: objectsView];
|
[scrollView setDocumentView: objectsView];
|
||||||
RELEASE(objectsView);
|
RELEASE(objectsView);
|
||||||
|
|
||||||
|
[objectViewController setIconView: scrollView];
|
||||||
|
RELEASE(scrollView);
|
||||||
|
|
||||||
|
[objectViewController setOutlineView: outlineView];
|
||||||
|
[outlineView setDataSource: self];
|
||||||
|
[outlineView reloadData];
|
||||||
|
RELEASE(outlineView);
|
||||||
|
|
||||||
[[objectViewController view] setAutoresizingMask:
|
[[objectViewController view] setAutoresizingMask:
|
||||||
NSViewHeightSizable|NSViewWidthSizable];
|
NSViewHeightSizable|NSViewWidthSizable];
|
||||||
[objectViewController resetDisplayView: scrollView];
|
[objectViewController resetDisplayView: scrollView];
|
||||||
|
|
|
@ -15,11 +15,19 @@
|
||||||
|
|
||||||
// Document
|
// Document
|
||||||
GormDocument *_document;
|
GormDocument *_document;
|
||||||
|
id _iconView;
|
||||||
|
id _outlineView;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (GormDocument *) document;
|
- (GormDocument *) document;
|
||||||
- (void) setDocument: (GormDocument *)document;
|
- (void) setDocument: (GormDocument *)document;
|
||||||
|
|
||||||
|
- (id) iconView;
|
||||||
|
- (void) setIconView: (id)iconView;
|
||||||
|
|
||||||
|
- (id) outlineView;
|
||||||
|
- (void) setOutlineView: (id)outlineView;
|
||||||
|
|
||||||
- (void) resetDisplayView: (NSView *)view;
|
- (void) resetDisplayView: (NSView *)view;
|
||||||
|
|
||||||
- (IBAction) iconView: (id)sender;
|
- (IBAction) iconView: (id)sender;
|
||||||
|
|
|
@ -2,9 +2,19 @@
|
||||||
|
|
||||||
#import "GormObjectViewController.h"
|
#import "GormObjectViewController.h"
|
||||||
#import "GormDocument.h"
|
#import "GormDocument.h"
|
||||||
|
#import "GormObjectEditor.h"
|
||||||
|
|
||||||
@implementation GormObjectViewController
|
@implementation GormObjectViewController
|
||||||
|
|
||||||
|
- (void) dealloc
|
||||||
|
{
|
||||||
|
RELEASE(_document);
|
||||||
|
RELEASE(_iconView);
|
||||||
|
RELEASE(_outlineView);
|
||||||
|
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
- (GormDocument *) document
|
- (GormDocument *) document
|
||||||
{
|
{
|
||||||
return _document;
|
return _document;
|
||||||
|
@ -15,14 +25,36 @@
|
||||||
ASSIGN(_document, document);
|
ASSIGN(_document, document);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (id) iconView
|
||||||
|
{
|
||||||
|
return _iconView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) setIconView: (id)iconView
|
||||||
|
{
|
||||||
|
ASSIGN(_iconView, iconView);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id) outlineView
|
||||||
|
{
|
||||||
|
return _outlineView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) setOutlineView: (id)outlineView
|
||||||
|
{
|
||||||
|
ASSIGN(_outlineView, outlineView);
|
||||||
|
}
|
||||||
|
|
||||||
- (IBAction) iconView: (id)sender
|
- (IBAction) iconView: (id)sender
|
||||||
{
|
{
|
||||||
NSLog(@"Called %@", NSStringFromSelector(_cmd));
|
NSLog(@"Called %@", NSStringFromSelector(_cmd));
|
||||||
|
[self resetDisplayView: _iconView];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction) outlineView: (id)sender
|
- (IBAction) outlineView: (id)sender
|
||||||
{
|
{
|
||||||
NSLog(@"Called %@", NSStringFromSelector(_cmd));
|
NSLog(@"Called %@", NSStringFromSelector(_cmd));
|
||||||
|
[self resetDisplayView: _outlineView];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) resetDisplayView: (NSView *)view
|
- (void) resetDisplayView: (NSView *)view
|
||||||
|
|
Loading…
Reference in a new issue