From 2c832d7795e5dff11e4ce2a000d4430748a40a8f Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Sat, 23 Apr 2005 18:43:36 +0000 Subject: [PATCH] Refactored code out of GormPrivate and into separate headers. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21149 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 31 ++++++++ Gorm.m | 2 + GormCore/GNUmakefile | 4 + GormCore/GormBoxEditor.m | 5 +- GormCore/GormControlEditor.m | 4 +- GormCore/GormDocument.m | 3 + GormCore/GormGenericEditor.h | 92 ++++++++++++++++++++++ GormCore/GormGenericEditor.m | 13 +++- GormCore/GormImageEditor.h | 34 ++++++++ GormCore/GormImageEditor.m | 3 +- GormCore/GormInternalViewEditor.m | 8 +- GormCore/GormMatrixEditor.m | 4 +- GormCore/GormObjectEditor.h | 43 ++++++++++ GormCore/GormObjectEditor.m | 8 +- GormCore/GormPrivate.h | 99 ------------------------ GormCore/GormResourceEditor.h | 40 ++++++++++ GormCore/GormResourceEditor.m | 4 +- GormCore/GormScrollViewEditor.m | 2 + GormCore/GormSoundEditor.h | 34 ++++++++ GormCore/GormSoundEditor.m | 3 +- GormCore/GormSplitViewEditor.m | 4 +- GormCore/GormViewEditor.m | 3 +- GormCore/GormViewSizeInspector.m | 1 + GormCore/GormViewWithContentViewEditor.m | 2 +- GormCore/GormWindowEditor.m | 7 +- GormPrefs/GormPalettesPref.m | 29 ++++++- Palettes/0Menus/GormMenuEditor.m | 2 - Palettes/3Containers/GormTabViewEditor.m | 9 ++- 28 files changed, 369 insertions(+), 124 deletions(-) create mode 100644 GormCore/GormGenericEditor.h create mode 100644 GormCore/GormImageEditor.h create mode 100644 GormCore/GormObjectEditor.h create mode 100644 GormCore/GormResourceEditor.h create mode 100644 GormCore/GormSoundEditor.h diff --git a/ChangeLog b/ChangeLog index 02ff2a3e..cbac36a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,34 @@ +2005-04-23 14:37 Gregory John Casamento + + * GormCore/GNUmakefile: Added new files. + * GormCore/GormBoxEditor.m: Added new includes. + * GormCore/GormControlEditor.m: Added new includes + * GormCore/GormDocument.m: Added new includes. + * GormCore/GormGenericEditor.m: Added new includes. + * GormCore/GormImageEditor.m: Added new includes. + * GormCore/GormInternalViewEditor.m: + * GormCore/GormMatrixEditor.m: Added new includes + * GormCore/GormObjectEditor.m: Added new header. + * GormCore/GormPrivate.h: Removed declarations. + * GormCore/GormResourceEditor.m: Include new header. + * GormCore/GormScrollViewEditor.m: Include new header. + * GormCore/GormSoundEditor.m: Include new header. + * GormCore/GormSplitViewEditor.m: Added GormViewKnobs.h + * GormCore/GormViewEditor.m: Added GormViewKnobs.h + * GormCore/GormViewSizeInspector.m: Added GormViewKnobs.h + * GormCore/GormViewWithContentViewEditor.m: Added GormViewKnobs.h + * GormCore/GormWindowEditor.m: Added GormViewKnobs.h + * GormCore/GormSoundEditor.h: Pulled out of GormPrivate.h + * GormCore/GormImageEditor.h: Pulled out of GormPrivate.h + * GormCore/GormResourceEditor.h: Pulled out of GormPrivate.h + * GormCore/GormObjectEditor.h: Pulled out of GormPrivate.h + * GormCore/GormGenericEditor.h: Pulled out of GormPrivate.h + * Gorm.m: Added new includes + * GormPrefs/GormPalettesPref.m: Eliminated warning. + * Palettes/0Menus/GormMenuEditor.m: Removed unused variable. + * Palettes/3Containers/GormTabViewEditor.m: Added include to + GormViewKnobs.h + 2005-04-23 13:11 Gregory John Casamento * GormCore/GNUmakefile: Added new files. diff --git a/Gorm.m b/Gorm.m index 8fbbf349..22519953 100644 --- a/Gorm.m +++ b/Gorm.m @@ -23,6 +23,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include #include #include #include diff --git a/GormCore/GNUmakefile b/GormCore/GNUmakefile index a26ab1c2..74e6f241 100644 --- a/GormCore/GNUmakefile +++ b/GormCore/GNUmakefile @@ -138,7 +138,9 @@ GormCore_HEADER_FILES = \ GormFilesOwner.h \ GormFontViewController.h \ GormFunctions.h \ + GormGenericEditor.h \ GormImage.h \ + GormImageEditor.h \ GormImageInspector.h \ GormInspectorsManager.h \ GormInternalViewEditor.h \ @@ -149,9 +151,11 @@ GormCore_HEADER_FILES = \ GormPlacementInfo.h \ GormPrivate.h \ GormResource.h \ + GormResourceEditor.h \ GormScrollViewAttributesInspector.h \ GormSetNameController.h \ GormSound.h \ + GormSoundEditor.h \ GormSoundInspector.h \ GormSoundView.h \ GormSplitViewEditor.h \ diff --git a/GormCore/GormBoxEditor.m b/GormCore/GormBoxEditor.m index 0e482a81..8a298d8a 100644 --- a/GormCore/GormBoxEditor.m +++ b/GormCore/GormBoxEditor.m @@ -22,12 +22,13 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - +#include #include + #include "GormPrivate.h" #include "GormBoxEditor.h" #include "GormInternalViewEditor.h" -#include +#include "GormViewKnobs.h" #define _EO ((NSBox *)_editedObject) diff --git a/GormCore/GormControlEditor.m b/GormCore/GormControlEditor.m index b52aac68..c131ab7c 100644 --- a/GormCore/GormControlEditor.m +++ b/GormCore/GormControlEditor.m @@ -22,13 +22,15 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include + #include "GormPrivate.h" #include "GormViewWithSubviewsEditor.h" #include "GormControlEditor.h" #include "GormPlacementInfo.h" -#include +#include "GormViewKnobs.h" #define _EO ((NSControl *)_editedObject) diff --git a/GormCore/GormDocument.m b/GormCore/GormDocument.m index f8a14749..7214a21b 100644 --- a/GormCore/GormDocument.m +++ b/GormCore/GormDocument.m @@ -47,6 +47,9 @@ #include "GormImage.h" #include "GormViewResourceManager.h" #include "GormClassEditor.h" +#include "GormSoundEditor.h" +#include "GormImageEditor.h" +#include "GormObjectEditor.h" @interface GormDisplayCell : NSButtonCell @end diff --git a/GormCore/GormGenericEditor.h b/GormCore/GormGenericEditor.h new file mode 100644 index 00000000..e1ed5250 --- /dev/null +++ b/GormCore/GormGenericEditor.h @@ -0,0 +1,92 @@ +/* GormGenericEditor.h + * + * Copyright (C) 1999, 2003 Free Software Foundation, Inc. + * + * Author: Richard Frith-Macdonald + * Author: Gregory John Casamento + * Date: 1999, 2003, 2004 + * + * 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. + */ + +#ifndef INCLUDED_GormGenericEditor_h +#define INCLUDED_GormGenericEditor_h + +#include +#include +#include + +@interface GormGenericEditor : NSMatrix +{ + NSMutableArray *objects; + id document; + id selected; + NSPasteboard *dragPb; + NSString *dragType; + BOOL closed; + BOOL activated; + IBResourceManager *resourceManager; +} + +// class methods... ++ (id) editorForDocument: (id)aDocument; ++ (void) setEditor: (id)editor + forDocument: (id)aDocument; + +// selection methods... +- (void) selectObjects: (NSArray*)objects; +- (BOOL) wantsSelection; +- (void) copySelection; +- (void) deleteSelection; +- (void) pasteInSelection; +- (void) refreshCells; +- (void) closeSubeditors; + +- (NSWindow*) window; +- (void) addObject: (id)anObject; +- (void) refreshCells; +- (void) removeObject: (id)anObject; +- (BOOL) activate; +- (id) initWithObject: (id)anObject inDocument: (id)aDocument; +- (void) close; +- (void) closeSubeditors; +- (BOOL) containsObject: (id)anObject; +- (void) copySelection; +- (void) deleteSelection; +- (id) document; +- (id) editedObject; +- (id) openSubeditorForObject: (id)anObject; +- (void) orderFront; +- (void) pasteInSelection; +- (NSRect) rectForObject: (id)anObject; + +- (NSArray *) objects; +- (BOOL) isOpened; +- (NSArray *) fileTypes; +@end + +// private methods... +@interface GormGenericEditor (PrivateMethods) +- (void) groupSelectionInScrollView; +- (void) groupSelectionInSplitView; +- (void) groupSelectionInBox; +- (void) ungroup; +- (void) setEditor: (id)anEditor forDocument: (id)doc; +- (id) changeSelection: (id)sender; +@end + +#endif diff --git a/GormCore/GormGenericEditor.m b/GormCore/GormGenericEditor.m index 7f6b7e1b..5ac02301 100644 --- a/GormCore/GormGenericEditor.m +++ b/GormCore/GormGenericEditor.m @@ -23,15 +23,26 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "GormPrivate.h" +#include "GormGenericEditor.h" @implementation GormGenericEditor ++ (id) editorForDocument: (id)aDocument +{ + // does nothing here, the subclass must define this. + return nil; +} + - (id) editorForDocument: (id)aDocument { return [[self class] editorForDocument: aDocument]; } ++ (void) setEditor: (id)editor + forDocument: (id)aDocument +{ + // does nothing, defined by subclass. +} - (void) setEditor: (id)editor forDocument: (id)aDocument diff --git a/GormCore/GormImageEditor.h b/GormCore/GormImageEditor.h new file mode 100644 index 00000000..33afc1a9 --- /dev/null +++ b/GormCore/GormImageEditor.h @@ -0,0 +1,34 @@ +/* GormImageEditor.h + * + * Copyright (C) 1999, 2003 Free Software Foundation, Inc. + * + * Author: Gregory John Casamento + * Date: 1999, 2003, 2004 + * + * 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. + */ + +#ifndef INCLUDED_GormImageEditor_h +#define INCLUDED_GormImageEditor_h + +#include "GormResourceEditor.h" + +@interface GormImageEditor : GormResourceEditor +// + (GormImageEditor*) editorForDocument: (id)aDocument; +@end + +#endif diff --git a/GormCore/GormImageEditor.m b/GormCore/GormImageEditor.m index 8c7a7c9a..527376e4 100644 --- a/GormCore/GormImageEditor.m +++ b/GormCore/GormImageEditor.m @@ -22,7 +22,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "GormPrivate.h" +#include "GormImageEditor.h" +#include "GormProtocol.h" #include "GormFunctions.h" #include "GormPalettesManager.h" #include diff --git a/GormCore/GormInternalViewEditor.m b/GormCore/GormInternalViewEditor.m index a2d87c49..0bdabaf4 100644 --- a/GormCore/GormInternalViewEditor.m +++ b/GormCore/GormInternalViewEditor.m @@ -22,11 +22,14 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include + #include "GormPrivate.h" #include "GormInternalViewEditor.h" #include "GormFontViewController.h" -#include + +#include "GormViewKnobs.h" @class GormEditorToParent; @@ -45,9 +48,10 @@ static NSImage *horizontalImage; @implementation NSView (IBObjectAdditions) - (NSString*) editorClassName { + // using NSBox gets rid of compiler warning, should be safe for all classes. if ([self superview] && (([[self superview] respondsToSelector: @selector(contentView)] && - [(id)[self superview] contentView] == self) + [(NSBox *)[self superview] contentView] == self) || [[self superview] isKindOfClass: [NSTabView class]] || diff --git a/GormCore/GormMatrixEditor.m b/GormCore/GormMatrixEditor.m index d9d845bf..a6746844 100644 --- a/GormCore/GormMatrixEditor.m +++ b/GormCore/GormMatrixEditor.m @@ -24,7 +24,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include + #include "GormPrivate.h" #include "GormImage.h" #include "GormViewEditor.h" @@ -32,7 +34,7 @@ #include "GormViewWithSubviewsEditor.h" #include "GormPlacementInfo.h" #include "GormFontViewController.h" -#include +#include "GormViewKnobs.h" #define _EO ((NSMatrix*)_editedObject) diff --git a/GormCore/GormObjectEditor.h b/GormCore/GormObjectEditor.h new file mode 100644 index 00000000..243c4162 --- /dev/null +++ b/GormCore/GormObjectEditor.h @@ -0,0 +1,43 @@ +/* GormObjectEditor.h + * + * Copyright (C) 1999, 2003 Free Software Foundation, Inc. + * + * Author: Richard Frith-Macdonald + * Author: Gregory John Casamento + * Date: 1999, 2003, 2004 + * + * 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. + */ + +#ifndef INCLUDED_GormObjectEditor_h +#define INCLUDED_GormObjectEditor_h + +#include "GormGenericEditor.h" + +@interface GormObjectEditor : GormGenericEditor +{ +} ++ (void) setEditor: (id)editor forDocument: (id)aDocument; +- (void) draggedImage: (NSImage*)i endedAt: (NSPoint)p deposited: (BOOL)f; +- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)flag; +- (BOOL) acceptsTypeFromArray: (NSArray*)types; +- (void) makeSelectionVisible: (BOOL)flag; +- (void) resetObject: (id)anObject; +- (void) removeAllInstancesOfClass: (NSString *)className; +@end + +#endif diff --git a/GormCore/GormObjectEditor.m b/GormCore/GormObjectEditor.m index 62532815..81b6b8c3 100644 --- a/GormCore/GormObjectEditor.m +++ b/GormCore/GormObjectEditor.m @@ -24,10 +24,12 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "GormPrivate.h" -#include "GormFunctions.h" #include - +#include "GormPrivate.h" +#include "GormObjectEditor.h" +#include "GormFunctions.h" +#include "GormDocument.h" +#include "GormClassManager.h" /* * Method to return the image that should be used to display objects within * the matrix containing the objects in a document. diff --git a/GormCore/GormPrivate.h b/GormCore/GormPrivate.h index da24f577..01c4c834 100644 --- a/GormCore/GormPrivate.h +++ b/GormCore/GormPrivate.h @@ -82,95 +82,6 @@ extern NSString *GormResizeCellNotification; - (NSString*) sizeInspectorClassName; @end -@interface GormGenericEditor : NSMatrix -{ - NSMutableArray *objects; - id document; - id selected; - NSPasteboard *dragPb; - NSString *dragType; - BOOL closed; - BOOL activated; - IBResourceManager *resourceManager; -} -// selection methods... -- (void) selectObjects: (NSArray*)objects; -- (BOOL) wantsSelection; -- (void) copySelection; -- (void) deleteSelection; -- (void) pasteInSelection; -- (void) refreshCells; -- (void) closeSubeditors; - -- (NSWindow*) window; -- (void) addObject: (id)anObject; -- (void) refreshCells; -- (void) removeObject: (id)anObject; -- (BOOL) activate; -- (id) initWithObject: (id)anObject inDocument: (id)aDocument; -- (void) close; -- (void) closeSubeditors; -- (BOOL) containsObject: (id)anObject; -- (void) copySelection; -- (void) deleteSelection; -- (id) document; -- (id) editedObject; -- (id) openSubeditorForObject: (id)anObject; -- (void) orderFront; -- (void) pasteInSelection; -- (NSRect) rectForObject: (id)anObject; - -- (NSArray *) objects; -- (BOOL) isOpened; -- (NSArray *) fileTypes; -@end - -// private methods... -@interface GormGenericEditor (PrivateMethods) -- (void) groupSelectionInScrollView; -- (void) groupSelectionInSplitView; -- (void) groupSelectionInBox; -- (void) ungroup; -- (void) setEditor: (id)anEditor forDocument: (id)doc; -- (id) changeSelection: (id)sender; -@end - -@interface GormObjectEditor : GormGenericEditor -{ -} -+ (void) setEditor: (id)editor forDocument: (id)aDocument; -- (void) draggedImage: (NSImage*)i endedAt: (NSPoint)p deposited: (BOOL)f; -- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)flag; -- (BOOL) acceptsTypeFromArray: (NSArray*)types; -- (void) makeSelectionVisible: (BOOL)flag; -- (void) resetObject: (id)anObject; -- (void) removeAllInstancesOfClass: (NSString *)className; -@end - -@interface GormResourceEditor : GormGenericEditor -{ -} -- (void) draggedImage: (NSImage*)i endedAt: (NSPoint)p deposited: (BOOL)f; -- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)flag; -- (void) refreshCells; -- (id) placeHolderWithPath: (NSString *)path; -- (NSArray *) pbTypes; -- (NSString *) resourceType; -- (void) addSystemResources; -@end - -@interface GormSoundEditor : GormResourceEditor -{ -} -+ (GormSoundEditor*) editorForDocument: (id)aDocument; -@end - -@interface GormImageEditor : GormResourceEditor -{ -} -+ (GormImageEditor*) editorForDocument: (id)aDocument; -@end - /* * NSDateFormatter and NSNumberFormatter extensions * for Gorm Formatters used in the Data Palette @@ -218,14 +129,4 @@ extern NSString *GormResizeCellNotification; inDocument: (id)document; @end -/* - * Functions for drawing knobs etc. - */ -void GormDrawKnobsForRect(NSRect aFrame); -void GormDrawOpenKnobsForRect(NSRect aFrame); -NSRect GormExtBoundsForRect(NSRect aFrame); -IBKnobPosition GormKnobHitInRect(NSRect aFrame, NSPoint p); -void GormShowFastKnobFills(void); -void GormShowFrameWithKnob(NSRect aRect, IBKnobPosition aKnob); - #endif diff --git a/GormCore/GormResourceEditor.h b/GormCore/GormResourceEditor.h new file mode 100644 index 00000000..2f2f8050 --- /dev/null +++ b/GormCore/GormResourceEditor.h @@ -0,0 +1,40 @@ +/* GormResourceEditor.h + * + * Copyright (C) 2005 Free Software Foundation, Inc. + * + * Author: Gregory John Casamento + * Date: 2005 + * + * 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. + */ + +#ifndef INCLUDED_GormResourceEditor_h +#define INCLUDED_GormResourceEditor_h + +#include "GormGenericEditor.h" + +@interface GormResourceEditor : GormGenericEditor +- (void) draggedImage: (NSImage*)i endedAt: (NSPoint)p deposited: (BOOL)f; +- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)flag; +- (void) refreshCells; +- (id) placeHolderWithPath: (NSString *)path; +- (NSArray *) pbTypes; +- (NSString *) resourceType; +- (void) addSystemResources; +@end + +#endif diff --git a/GormCore/GormResourceEditor.m b/GormCore/GormResourceEditor.m index f8353294..b5ae74be 100644 --- a/GormCore/GormResourceEditor.m +++ b/GormCore/GormResourceEditor.m @@ -22,10 +22,12 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include +#include "GormDocument.h" #include "GormPrivate.h" +#include "GormResourceEditor.h" #include "GormFunctions.h" #include "GormPalettesManager.h" -#include #include "GormResource.h" @implementation GormResourceEditor diff --git a/GormCore/GormScrollViewEditor.m b/GormCore/GormScrollViewEditor.m index f83dea20..25b72bef 100644 --- a/GormCore/GormScrollViewEditor.m +++ b/GormCore/GormScrollViewEditor.m @@ -23,8 +23,10 @@ */ #include + #include "GormPrivate.h" #include "GormBoxEditor.h" +#include "GormViewKnobs.h" #define _EO ((NSScrollView *)_editedObject) diff --git a/GormCore/GormSoundEditor.h b/GormCore/GormSoundEditor.h new file mode 100644 index 00000000..d957e609 --- /dev/null +++ b/GormCore/GormSoundEditor.h @@ -0,0 +1,34 @@ +/* GormSoundEditor.h + * + * Copyright (C) 1999, 2003 Free Software Foundation, Inc. + * + * Author: Gregory John Casamento + * Date: 1999, 2003, 2004 + * + * 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. + */ + +#ifndef INCLUDED_GormSoundEditor_h +#define INCLUDED_GormSoundEditor_h + +#include "GormResourceEditor.h" + +@interface GormSoundEditor : GormResourceEditor +// + (GormSoundEditor*) editorForDocument: (id)aDocument; +@end + +#endif diff --git a/GormCore/GormSoundEditor.m b/GormCore/GormSoundEditor.m index ea2625e8..00a90df3 100644 --- a/GormCore/GormSoundEditor.m +++ b/GormCore/GormSoundEditor.m @@ -22,7 +22,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "GormPrivate.h" +#include "GormSoundEditor.h" +#include "GormProtocol.h" #include "GormFunctions.h" #include "GormPalettesManager.h" #include diff --git a/GormCore/GormSplitViewEditor.m b/GormCore/GormSplitViewEditor.m index c6bd791c..a37d680b 100644 --- a/GormCore/GormSplitViewEditor.m +++ b/GormCore/GormSplitViewEditor.m @@ -22,12 +22,14 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include + #include "GormPrivate.h" #include "GormSplitViewEditor.h" #include "GormInternalViewEditor.h" #include "GormBoxEditor.h" -#include +#include "GormViewKnobs.h" #define _EO ((NSSplitView *)_editedObject) diff --git a/GormCore/GormViewEditor.m b/GormCore/GormViewEditor.m index 51729d34..bbe889ea 100644 --- a/GormCore/GormViewEditor.m +++ b/GormCore/GormViewEditor.m @@ -25,12 +25,13 @@ #include #include -#include "GormPrivate.h" +#include "GormGenericEditor.h" #include "GormViewEditor.h" #include "GormViewWithSubviewsEditor.h" #include "GormPlacementInfo.h" #include "GormFunctions.h" #include "GormViewWindow.h" +#include "GormViewKnobs.h" #include #include diff --git a/GormCore/GormViewSizeInspector.m b/GormCore/GormViewSizeInspector.m index a74bdb95..2eb2ffca 100644 --- a/GormCore/GormViewSizeInspector.m +++ b/GormCore/GormViewSizeInspector.m @@ -23,6 +23,7 @@ */ #include "GormPrivate.h" +#include "GormViewKnobs.h" @implementation NSView (GormInspectors) - (NSString*) sizeInspectorClassName diff --git a/GormCore/GormViewWithContentViewEditor.m b/GormCore/GormViewWithContentViewEditor.m index 925c4027..83b8ceee 100644 --- a/GormCore/GormViewWithContentViewEditor.m +++ b/GormCore/GormViewWithContentViewEditor.m @@ -27,7 +27,7 @@ #include "GormViewWithContentViewEditor.h" #include "GormPlacementInfo.h" #include "GormSplitViewEditor.h" - +#include "GormViewKnobs.h" @interface GormViewEditor (Private) - (NSRect) _displayMovingFrameWithHint: (NSRect) frame diff --git a/GormCore/GormWindowEditor.m b/GormCore/GormWindowEditor.m index 27dff894..c7aa689d 100644 --- a/GormCore/GormWindowEditor.m +++ b/GormCore/GormWindowEditor.m @@ -22,11 +22,14 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include +#include + #include "GormPrivate.h" #include "GormViewWithContentViewEditor.h" #include "GormInternalViewEditor.h" -#include -#include +#include "GormViewKnobs.h" + #include #define _EO ((NSWindow *)_editedObject) diff --git a/GormPrefs/GormPalettesPref.m b/GormPrefs/GormPalettesPref.m index dca5675f..8256c898 100644 --- a/GormPrefs/GormPalettesPref.m +++ b/GormPrefs/GormPalettesPref.m @@ -1,7 +1,32 @@ -#include +#/* GormPalettesPref.m + * + * Copyright (C) 2004 Free Software Foundation, Inc. + * + * Author: Gregory John Casamento + * Date: 2004 + * + * 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. + */ + #include #include #include + +#include #include "GormPalettesPref.h" @class NSTableView; @@ -47,7 +72,7 @@ objectValueForTableColumn: (NSTableColumn *)tc return nil; } - _view = [[window contentView] retain]; + _view = [[(NSWindow *)window contentView] retain]; return self; } diff --git a/Palettes/0Menus/GormMenuEditor.m b/Palettes/0Menus/GormMenuEditor.m index 56e73df9..7842bbc6 100644 --- a/Palettes/0Menus/GormMenuEditor.m +++ b/Palettes/0Menus/GormMenuEditor.m @@ -778,8 +778,6 @@ void _attachAll(NSMenu *menu, id document) enumerator = [items objectEnumerator]; while ((item = [enumerator nextObject]) != nil) { - NSString *title = [item title]; - if ([edited _ownedByPopUp]) { [item setOnStateImage: nil]; diff --git a/Palettes/3Containers/GormTabViewEditor.m b/Palettes/3Containers/GormTabViewEditor.m index 078ad9ac..232766f9 100644 --- a/Palettes/3Containers/GormTabViewEditor.m +++ b/Palettes/3Containers/GormTabViewEditor.m @@ -22,10 +22,13 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include -#include -#include "GormTabViewEditor.h" #include +#include + +#include +#include + +#include "GormTabViewEditor.h" #define _EO ((NSTabView *)_editedObject)