From 9a2e726278c54fa0f0f19c8e4606fe532dad5e8a Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Tue, 11 Nov 2003 22:25:13 +0000 Subject: [PATCH] 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 --- ChangeLog | 6 + GNUmakefile | 4 +- Gorm.m | 7 +- GormNSSplitViewInspector.h | 10 ++ GormNSSplitViewInspector.m | 74 +++++++++ .../data.classes | 153 ++++++++++++++++++ .../objects.gorm | Bin 0 -> 2534 bytes 7 files changed, 250 insertions(+), 4 deletions(-) create mode 100644 GormNSSplitViewInspector.h create mode 100644 GormNSSplitViewInspector.m create mode 100644 Resources/GormNSSplitViewInspector.gorm/data.classes create mode 100644 Resources/GormNSSplitViewInspector.gorm/objects.gorm diff --git a/ChangeLog b/ChangeLog index 62328001..185120cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-11-11 17:27 Gregory John Casamento + + * GormNSSplitViewInspector.[hm]: Added implementation + * GormNSSplitViewInspector.gorm: Added interface. + * Gorm.m: Updated application:openFile: method. + 2003-11-08 17:56 Gregory John Casamento * GormDocument.m: [_identifierString:] corrected issue which diff --git a/GNUmakefile b/GNUmakefile index 223f4c42..49154ab0 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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 - diff --git a/Gorm.m b/Gorm.m index d1c0b6fc..7600ae1b 100644 --- a/Gorm.m +++ b/Gorm.m @@ -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 ", @"Richard Frith-Macdonald ", @@ -1140,7 +1140,8 @@ NSString *GormWillDetachObjectFromDocumentNotification = @"GormWillDetachObjectF } else { - [[doc window] makeKeyAndOrderFront: self]; + [[doc window] orderFrontRegardless]; + [[doc window] makeKeyWindow]; } return (doc != nil); diff --git a/GormNSSplitViewInspector.h b/GormNSSplitViewInspector.h new file mode 100644 index 00000000..03bc7a1a --- /dev/null +++ b/GormNSSplitViewInspector.h @@ -0,0 +1,10 @@ +/* All Rights reserved */ + +#include +#include + +@interface GormNSSplitViewInspector : IBInspector +{ + id orientation; +} +@end diff --git a/GormNSSplitViewInspector.m b/GormNSSplitViewInspector.m new file mode 100644 index 00000000..04ef3448 --- /dev/null +++ b/GormNSSplitViewInspector.m @@ -0,0 +1,74 @@ +/* All Rights reserved */ + +#include +#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 diff --git a/Resources/GormNSSplitViewInspector.gorm/data.classes b/Resources/GormNSSplitViewInspector.gorm/data.classes new file mode 100644 index 00000000..7d552d76 --- /dev/null +++ b/Resources/GormNSSplitViewInspector.gorm/data.classes @@ -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; + }; +} \ No newline at end of file diff --git a/Resources/GormNSSplitViewInspector.gorm/objects.gorm b/Resources/GormNSSplitViewInspector.gorm/objects.gorm new file mode 100644 index 0000000000000000000000000000000000000000..7a8e353843fbadfcf75ed7bfca10379981bd0075 GIT binary patch literal 2534 zcmcImOLH4V5S|@bFRvm?vZa_{h{vQWFA@Fq9$6JGSK=bOS$fJl_ok{*)92%icfu&h16C79dqdEL!&7 zapWBI-7T*dd4cbQPv}t1iIQcX-xD|SAPX6lB}sM^dj1ja7$WzNV>@E8gzC$g4}Br+K)FLIVmD0)>8re)uAN5jBB)E+SeT^DhqVRk+j!t7Rs zXqeq5ky#`gCLQa?)V37(H>9>%#4!|AQIu0Bw!_e2|ILfMWuGnCMFx4tfcdfZl?LAY z0}<$f2sI=-zg+-6+nxX$+5-q|j*CQ2gqD;^LD_RKDr|j86fK)FAPoA%H)U-Tk=lO} zXy<1F{dyKO-JS)#!k{b*%IXSbNn0mQ*X?T@RVKHetpqG^tV9eIwLnMPs1qub(L&~8 z4M9$Q&R^TBElnwQ{`sYhdaqC`AZ1bIgX;hC-*@^Rmr{2c2F%tz*WAMO|NC;J?GF1U|H43pxuFUUhq@bU7UYxW>R3_7^7LzToHrG#2rIB2R z8){K3SoRn0<7nG+`-jg8_$JFUQ#(w#A9^nOm*z$M4?V22W+q|&#*zZu8ds89vIuW5 zd_9G)%M;H(3{GZ>3f`m(@D{UQQl4+~Nih{vlo491OIsQZbMq(c4D=udJz6B(<~!3R znvSfmJRjasOVoCeM1?3Px%1FW!Bsjuen7JOtI+mp$=Hat?mQLdR`VAD?@kSb%WgeK zm~NQZ;HXe)I1t{O9tcSxxdm|17py5LKAE1jsa;LxNmRqU`xF&#|44mvdu3DT2YH8E zHTE!Wu%rpB>gvA3g3q_m_7LZNPp8W+cElK37Zu~lm6YIpHX}zRo`VlmoyIGF%=r3K zf$&9g8`fCJB_AF!tdHwS9)0p5zFYX-Pz|x9#q1wPeHVl7PYYX1TJRBzn@)4=BWGz2 oACDW!8lrx3QS}oYefU&e74