mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Changes to use IBObjectAdditions informal protocol.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20418 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
191c716d3b
commit
ed4499f43b
15 changed files with 84 additions and 69 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
2004-12-04 17:43 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormBoxEditor.m
|
||||
* GormControlEditor.m
|
||||
* GormInternalViewEditor.m
|
||||
* GormMatrixEditor.m
|
||||
* GormNSSplitViewInspector.m
|
||||
* GormObjectEditor.m
|
||||
* GormScrollViewAttributesInspector.m
|
||||
* GormScrollViewEditor.m
|
||||
* GormSplitViewEditor.m
|
||||
* GormWindowEditor.m
|
||||
* Palettes/2Controls/GormButtonEditor.m
|
||||
* Palettes/2Controls/inspectors.m
|
||||
* Palettes/3Containers/GormTabViewEditor.m
|
||||
* Palettes/3Containers/inspectors.m: Replaced all references
|
||||
of GormObjectAdditions with IBObjectAdditions. This makes
|
||||
Gorm more compliant with the IB API spec.
|
||||
|
||||
2004-12-03 07:09 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormClassManager.[hm]: New method allCustomClassNames which
|
||||
|
|
|
@ -27,12 +27,13 @@
|
|||
#include "GormPrivate.h"
|
||||
#include "GormBoxEditor.h"
|
||||
#include "GormInternalViewEditor.h"
|
||||
#include <InterfaceBuilder/IBObjectAdditions.h>
|
||||
|
||||
#define _EO ((NSBox *)_editedObject)
|
||||
|
||||
@class GormWindowEditor;
|
||||
|
||||
@implementation NSBox (GormObjectAdditions)
|
||||
@implementation NSBox (IBObjectAdditions)
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
// if([[self superview] isKindOfClass: [NSClipView class]])
|
||||
|
|
|
@ -24,19 +24,17 @@
|
|||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <Foundation/NSArchiver.h>
|
||||
|
||||
#include "GormPrivate.h"
|
||||
|
||||
#include "GormViewWithSubviewsEditor.h"
|
||||
#include "GormControlEditor.h"
|
||||
|
||||
#include "GormPlacementInfo.h"
|
||||
#include <InterfaceBuilder/IBObjectAdditions.h>
|
||||
|
||||
#define _EO ((NSControl *)_editedObject)
|
||||
|
||||
@class GormWindowEditor;
|
||||
|
||||
@implementation NSControl (GormObjectAdditions)
|
||||
@implementation NSControl (IBObjectAdditions)
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormControlEditor";
|
||||
|
@ -606,7 +604,7 @@
|
|||
}
|
||||
@end
|
||||
|
||||
@implementation NSTextField (GormObjectAdditions)
|
||||
@implementation NSTextField (IBObjectAdditions)
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormTextFieldEditor";
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "GormPrivate.h"
|
||||
#include "GormInternalViewEditor.h"
|
||||
#include "GormFontViewController.h"
|
||||
#include <InterfaceBuilder/IBObjectAdditions.h>
|
||||
|
||||
@class GormEditorToParent;
|
||||
|
||||
|
@ -41,7 +42,7 @@ static NSImage *horizontalImage;
|
|||
#endif
|
||||
|
||||
|
||||
@implementation NSView (GormObjectAdditions)
|
||||
@implementation NSView (IBObjectAdditions)
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
if ([self superview] &&
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
*/
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
|
||||
#include "GormPrivate.h"
|
||||
#include "GormViewEditor.h"
|
||||
#include "GormMatrixEditor.h"
|
||||
#include "GormViewWithSubviewsEditor.h"
|
||||
#include "GormPlacementInfo.h"
|
||||
#include "GormFontViewController.h"
|
||||
#include <InterfaceBuilder/IBObjectAdditions.h>
|
||||
|
||||
#define _EO ((NSMatrix*)_editedObject)
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
|||
withPlacementInfo: (GormPlacementInfo*)gpi;
|
||||
@end
|
||||
|
||||
@implementation NSMatrix (GormObjectAdditions)
|
||||
@implementation NSMatrix (IBObjectAdditions)
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormMatrixEditor";
|
||||
|
|
|
@ -8,6 +8,11 @@
|
|||
{
|
||||
return @"GormNSSplitViewInspector";
|
||||
}
|
||||
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormSplitViewEditor";
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation GormNSSplitViewInspector
|
||||
|
|
|
@ -24,12 +24,13 @@
|
|||
|
||||
#include "GormPrivate.h"
|
||||
#include "GormFunctions.h"
|
||||
#include <InterfaceBuilder/IBObjectAdditions.h>
|
||||
|
||||
/*
|
||||
* Method to return the image that should be used to display objects within
|
||||
* the matrix containing the objects in a document.
|
||||
*/
|
||||
@implementation NSObject (GormObjectAdditions)
|
||||
@implementation NSObject (IBObjectAdditions)
|
||||
- (NSString*) inspectorClassName
|
||||
{
|
||||
return @"GormObjectInspector";
|
||||
|
|
|
@ -35,6 +35,18 @@
|
|||
{
|
||||
return @"GormScrollViewAttributesInspector";
|
||||
}
|
||||
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
if ([self documentView]
|
||||
&& [[self documentView] isKindOfClass: [NSTableView class]])
|
||||
return @"GormTableViewEditor";
|
||||
else if ([self documentView]
|
||||
&& [[self documentView] isKindOfClass: [NSTextView class]])
|
||||
return @"GormTextViewEditor";
|
||||
else
|
||||
return @"GormScrollViewEditor";
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation GormScrollViewAttributesInspector
|
||||
|
|
|
@ -28,21 +28,6 @@
|
|||
|
||||
#define _EO ((NSScrollView *)_editedObject)
|
||||
|
||||
@implementation NSScrollView (GormObjectAdditions)
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
if ([self documentView]
|
||||
&& [[self documentView] isKindOfClass: [NSTableView class]])
|
||||
return @"GormTableViewEditor";
|
||||
else if ([self documentView]
|
||||
&& [[self documentView] isKindOfClass: [NSTextView class]])
|
||||
return @"GormTextViewEditor";
|
||||
else
|
||||
return @"GormScrollViewEditor";
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@interface GormScrollViewEditor : GormViewWithSubviewsEditor
|
||||
{
|
||||
GormInternalViewEditor *documentViewEditor;
|
||||
|
|
|
@ -27,17 +27,10 @@
|
|||
#include "GormSplitViewEditor.h"
|
||||
#include "GormInternalViewEditor.h"
|
||||
#include "GormBoxEditor.h"
|
||||
#include <InterfaceBuilder/IBObjectAdditions.h>
|
||||
|
||||
#define _EO ((NSSplitView *)_editedObject)
|
||||
|
||||
@implementation NSSplitView (GormObjectAdditions)
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormSplitViewEditor";
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation GormSplitViewEditor
|
||||
|
||||
- (id) initWithObject: (id) anObject
|
||||
|
|
|
@ -24,11 +24,14 @@
|
|||
|
||||
#include "GormPrivate.h"
|
||||
#include "GormViewWithContentViewEditor.h"
|
||||
#include <math.h>
|
||||
#define _EO ((NSWindow *)_editedObject)
|
||||
#include "GormInternalViewEditor.h"
|
||||
#include <InterfaceBuilder/IBViewAdditions.h>
|
||||
#include <InterfaceBuilder/IBObjectAdditions.h>
|
||||
#include <math.h>
|
||||
|
||||
@implementation NSWindow (GormObjectAdditions)
|
||||
#define _EO ((NSWindow *)_editedObject)
|
||||
|
||||
@implementation NSWindow (IBObjectAdditions)
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormWindowEditor";
|
||||
|
@ -52,28 +55,11 @@
|
|||
}
|
||||
@end
|
||||
|
||||
@interface NSWindow (GormWindowEditorAdditions)
|
||||
- (void) unsetInitialFirstResponder;
|
||||
@end
|
||||
|
||||
@implementation NSWindow (GormWindowEditorAdditions)
|
||||
/*
|
||||
* The setFirstResponder method is used in this editor to allow it to
|
||||
* respond to messages forwarded to the window appropriately.
|
||||
* Unfortunately, once it's set to something, it cannot be set to nil.
|
||||
* This method allows us to set it to nil, thus preventing a memory leak.
|
||||
*/
|
||||
- (void) unsetInitialFirstResponder
|
||||
{
|
||||
ASSIGN(_initialFirstResponder, nil);
|
||||
}
|
||||
@end
|
||||
|
||||
/*
|
||||
* Default implementations of methods used for updating a view by
|
||||
* direct action through an editor.
|
||||
*/
|
||||
@implementation NSView (ViewAdditions)
|
||||
@implementation NSView (IBViewAdditions)
|
||||
|
||||
- (BOOL) acceptsColor: (NSColor*)color atPoint: (NSPoint)point
|
||||
{
|
||||
|
@ -110,6 +96,23 @@
|
|||
|
||||
@end
|
||||
|
||||
@interface NSWindow (GormWindowEditorAdditions)
|
||||
- (void) unsetInitialFirstResponder;
|
||||
@end
|
||||
|
||||
@implementation NSWindow (GormWindowEditorAdditions)
|
||||
/*
|
||||
* The setFirstResponder method is used in this editor to allow it to
|
||||
* respond to messages forwarded to the window appropriately.
|
||||
* Unfortunately, once it's set to something, it cannot be set to nil.
|
||||
* This method allows us to set it to nil, thus preventing a memory leak.
|
||||
*/
|
||||
- (void) unsetInitialFirstResponder
|
||||
{
|
||||
ASSIGN(_initialFirstResponder, nil);
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@interface GormWindowEditor : GormViewWithContentViewEditor
|
||||
|
|
|
@ -30,17 +30,11 @@
|
|||
|
||||
#define _EO ((NSButton *)_editedObject)
|
||||
|
||||
@implementation NSButton (GormObjectAdditions)
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormButtonEditor";
|
||||
}
|
||||
@end
|
||||
|
||||
@interface NSButtonCell (GormObjectAdditions)
|
||||
- (NSRect) gormTitleRectForFrame: (NSRect) cellFrame
|
||||
inView: (NSView *)controlView;
|
||||
@end
|
||||
|
||||
@implementation NSButtonCell (GormObjectAdditions)
|
||||
- (NSRect) gormTitleRectForFrame: (NSRect) cellFrame
|
||||
inView: (NSView *)controlView
|
||||
|
|
|
@ -126,6 +126,11 @@
|
|||
*/
|
||||
@implementation NSButton (IBObjectAdditions)
|
||||
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormButtonEditor";
|
||||
}
|
||||
|
||||
- (NSString*) inspectorClassName
|
||||
{
|
||||
return @"GormButtonAttributesInspector";
|
||||
|
|
|
@ -25,17 +25,10 @@
|
|||
#include <AppKit/AppKit.h>
|
||||
#include "GormPrivate.h"
|
||||
#include "GormTabViewEditor.h"
|
||||
#include <InterfaceBuilder/IBObjectAdditions.h>
|
||||
|
||||
#define _EO ((NSTabView *)_editedObject)
|
||||
|
||||
@implementation NSTabView (GormObjectAdditions)
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormTabViewEditor";
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation GormTabViewEditor
|
||||
|
||||
- (void) setOpened: (BOOL) flag
|
||||
|
|
|
@ -737,6 +737,11 @@ static NSString *ITEM=@"item";
|
|||
return @"GormTabViewInspector";
|
||||
}
|
||||
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormTabViewEditor";
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface GormTabViewInspector : IBInspector
|
||||
|
|
Loading…
Reference in a new issue