Implementation of new inspector for split views.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18076 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2003-11-11 22:25:13 +00:00
parent cfdeb3f9cd
commit 9a2e726278
7 changed files with 250 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2003-11-11 17:27 Gregory John Casamento <greg_casamento@yahoo.com>
* GormNSSplitViewInspector.[hm]: Added implementation
* GormNSSplitViewInspector.gorm: Added interface.
* Gorm.m: Updated application:openFile: method.
2003-11-08 17:56 Gregory John Casamento <greg_casamento@yahoo.com>
* GormDocument.m: [_identifierString:] corrected issue which

View file

@ -123,6 +123,7 @@ Gorm_RESOURCE_FILES = \
Resources/GormPrefHeaders.gorm \
Resources/GormPrefGeneral.gorm \
Resources/GormScrollViewAttributesInspector.gorm \
Resources/GormNSSplitViewInspector.gorm \
Resources/GormClassInspector.gorm \
Resources/GormFontView.gorm \
Resources/GormSetName.gorm \
@ -135,6 +136,7 @@ Gorm_HEADERS = \
GormOutlineView.h \
GormCustomClassInspector.h \
GormScrollViewAttributesInspector.h \
GormNSSplitViewInspector.h \
GormSoundInspector.h \
GormImageInspector.h \
GormMatrixEditor.h \
@ -176,6 +178,7 @@ Gorm_OBJC_FILES = \
GormObjectInspector.m \
GormViewSizeInspector.m \
GormScrollViewAttributesInspector.m \
GormNSSplitViewInspector.m \
GormWindowEditor.m \
GormClassManager.m \
GormInspectorsManager.m \
@ -213,4 +216,3 @@ include $(GNUSTEP_MAKEFILES)/aggregate.make
include $(GNUSTEP_MAKEFILES)/application.make
-include GNUmakefile.postamble

7
Gorm.m
View file

@ -519,9 +519,9 @@ NSString *GormWillDetachObjectFromDocumentNotification = @"GormWillDetachObjectF
forKey: @"ApplicationName"];
[dict setObject: @"[GNUstep | Graphical] Object Relationship Modeller"
forKey: @"ApplicationDescription"];
[dict setObject: @"Gorm 0.4.8 (Beta)"
[dict setObject: @"Gorm 0.4.9 (Beta)"
forKey: @"ApplicationRelease"];
[dict setObject: @"0.4.8 Nov 1 2003"
[dict setObject: @"0.4.9 Nov 11 2003"
forKey: @"FullVersionID"];
[dict setObject: [NSArray arrayWithObjects: @"Gregory John Casamento <greg_casamento@yahoo.com>",
@"Richard Frith-Macdonald <rfm@gnu.org>",
@ -1140,7 +1140,8 @@ NSString *GormWillDetachObjectFromDocumentNotification = @"GormWillDetachObjectF
}
else
{
[[doc window] makeKeyAndOrderFront: self];
[[doc window] orderFrontRegardless];
[[doc window] makeKeyWindow];
}
return (doc != nil);

View file

@ -0,0 +1,10 @@
/* All Rights reserved */
#include <AppKit/AppKit.h>
#include <InterfaceBuilder/IBInspector.h>
@interface GormNSSplitViewInspector : IBInspector
{
id orientation;
}
@end

View file

@ -0,0 +1,74 @@
/* All Rights reserved */
#include <AppKit/AppKit.h>
#include "GormNSSplitViewInspector.h"
@implementation NSSplitView (IBObjectAdditions)
- (NSString *) inspectorClassName
{
return @"GormNSSplitViewInspector";
}
@end
@implementation GormNSSplitViewInspector
- init
{
self = [super init];
if (self != nil)
{
if ([NSBundle loadNibNamed: @"GormNSSplitViewInspector"
owner: self] == NO)
{
NSDictionary *table;
NSBundle *bundle;
table = [NSDictionary dictionaryWithObject: self forKey: @"NSOwner"];
bundle = [NSBundle mainBundle];
if ([bundle loadNibFile: @"GormNSSplitViewInspector"
externalNameTable: table
withZone: [self zone]] == NO)
{
NSLog(@"Could not open gorm GormNSSplitViewInspector");
NSLog(@"self %@", self);
return nil;
}
}
}
return self;
}
- (void) _getValuesFromObject
{
BOOL state = [(NSSplitView *)object isVertical];
// get the values from the object
if(state == NO)
{
[orientation selectCellAtRow: 0 column: 0];
}
else
{
[orientation selectCellAtRow: 1 column: 0];
}
}
- (void) setObject: (id)anObject
{
[super setObject: anObject];
[self _getValuesFromObject];
}
- (void) ok: (id)sender
{
id cell = nil;
BOOL state = NO;
// horizontal switch.. if it's active/inactive we
// know what the selection is.
cell = [orientation cellAtRow: 0 column: 0];
state = ([cell state] == NSOnState)?NO:YES;
[object setVertical: state];
[object setNeedsDisplay: YES];
}
@end

View file

@ -0,0 +1,153 @@
{
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:",
"newDocument:",
"ok:",
"openDocument:",
"orderBack:",
"orderFront:",
"orderFrontColorPanel:",
"orderFrontDataLinkPanel:",
"orderFrontFontPanel:",
"orderFrontHelpPanel:",
"orderFrontStandardAboutPanel:",
"orderFrontStandardInfoPanel:",
"orderOut:",
"pageDown:",
"pageUp:",
"paste:",
"pasteAsPlainText:",
"pasteAsRichText:",
"pasteFont:",
"pasteRuler:",
"performClose:",
"performMiniaturize:",
"performZoom:",
"print:",
"raiseBaseline:",
"revertDocumentToSaved:",
"runPageLayout:",
"runToolbarCustomizationPalette:",
"saveAllDocuments:",
"saveDocument:",
"saveDocumentAs:",
"saveDocumentTo:",
"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;
};
GormNSSplitViewInspector = {
Actions = (
);
Outlets = (
orientation
);
Super = IBInspector;
};
}

Binary file not shown.