Added code to inspect scroll views.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@16844 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2003-06-01 04:51:41 +00:00
parent a65bdd2b70
commit 4a749387da
5 changed files with 55 additions and 6 deletions

View file

@ -1,3 +1,12 @@
2003-05-31 Gregory John Casamento <greg_casamento@yahoo.com>
* GormScrollViewAttributesInspector.m: Added code to make changes
to a scroll view. The inspector is now functional.
* GormScrollViewAttributesInspector.gorm: Added connections
to window.
* Palettes/3Containers/inspectors.m: Commented out dummy inspector
for scroll views.
2003-05-29 Gregory John Casamento <greg_casamento@yahoo.com>
* Resources/GormScrollViewAttributesInspector.gorm: new

View file

@ -12,28 +12,71 @@
@end
@implementation GormScrollViewAttributesInspector
- init
{
self = [super init];
if (self != nil)
{
if ([NSBundle loadNibNamed: @"GormScrollViewAttributesInspector"
owner: self] == NO)
{
NSDictionary *table;
NSBundle *bundle;
table = [NSDictionary dictionaryWithObject: self forKey: @"NSOwner"];
bundle = [NSBundle mainBundle];
if ([bundle loadNibFile: @"GormScrollViewAttributesInspector"
externalNameTable: table
withZone: [self zone]] == NO)
{
NSLog(@"Could not open gorm GormScrollViewAttributesInspector");
NSLog(@"self %@", self);
return nil;
}
}
}
return self;
}
- (void) _getValuesFromObject
{
[color setColor: [object backgroundColor]];
[horizontalScroll setState: [object hasHorizontalScroller]?NSOnState:NSOffState];
[verticalScroll setState: [object hasVerticalScroller]?NSOnState:NSOffState];
}
- (void) setObject: (id)anObject
{
[super setObject: anObject];
[self _getValuesFromObject];
}
- (void) colorSelected: (id)sender
{
/* insert your code here */
[object setBackgroundColor: [color color]];
}
- (void) verticalSelected: (id)sender
{
/* insert your code here */
[object setHasVerticalScroller: ([verticalScroll state] == NSOnState)];
}
- (void) horizontalSelected: (id)sender
{
/* insert your code here */
[object setHasHorizontalScroller: ([horizontalScroll state] == NSOnState)];
}
- (void) borderSelected: (id)sender
{
/* insert your code here */
[object setBorderType: [[borderMatrix selectedCell] tag]];
}
@end

View file

@ -23,13 +23,9 @@
*/
#include "GormPrivate.h"
#include "GormViewWithContentViewEditor.h"
#include <math.h>
#define _EO ((NSWindow *)_editedObject)
#include "GormInternalViewEditor.h"
@ -246,7 +242,7 @@
// - (void) selectObjects: (NSArray*)objects;
// - (void) validateEditing;
// - (BOOL) wantsSelection;
//- (NSWindow*) window;
// - (NSWindow*) window;
@end
@implementation GormWindowEditor

View file

@ -564,6 +564,7 @@
* (like horizontal and vertical scrollbar)
*/
/*
@implementation NSScrollView (IBObjectAdditions)
- (NSString*) inspectorClassName
@ -580,7 +581,7 @@
@implementation GormScrollViewAttributesInspector
@end
*/
/*----------------------------------------------------------------------------
* NSTabView (possibly embedded in a Scroll view)