2003-10-25 20:50:08 +00:00
|
|
|
/*
|
|
|
|
GSNibCompatibility.h
|
|
|
|
|
|
|
|
Copyright (C) 1997, 1999 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Author: Gregory John Casamento <greg_casamento@yahoo.com>
|
|
|
|
Date: 2002
|
|
|
|
|
|
|
|
This file is part of the GNUstep GUI Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-10-29 21:16:17 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
2003-10-25 20:50:08 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-10 04:01:49 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
2007-10-29 21:16:17 +00:00
|
|
|
|
2003-10-25 20:50:08 +00:00
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-10-29 21:16:17 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
2003-10-25 20:50:08 +00:00
|
|
|
|
2007-10-29 21:16:17 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; see the file COPYING.LIB.
|
|
|
|
If not, see <http://www.gnu.org/licenses/> or write to the
|
|
|
|
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA.
|
2003-10-25 20:50:08 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GNUstep_H_GSNibCompatibility
|
|
|
|
#define _GNUstep_H_GSNibCompatibility
|
|
|
|
|
2010-03-20 14:09:02 +00:00
|
|
|
#import <Foundation/NSObject.h>
|
2007-10-07 03:04:39 +00:00
|
|
|
|
2010-03-20 14:09:02 +00:00
|
|
|
#import <AppKit/NSButton.h>
|
|
|
|
#import <AppKit/NSControl.h>
|
|
|
|
#import <AppKit/NSEvent.h>
|
|
|
|
#import <AppKit/NSGraphicsContext.h>
|
|
|
|
#import <AppKit/NSGraphics.h>
|
|
|
|
#import <AppKit/NSMenu.h>
|
|
|
|
#import <AppKit/NSNibConnector.h>
|
|
|
|
#import <AppKit/NSResponder.h>
|
|
|
|
#import <AppKit/NSText.h>
|
|
|
|
#import <AppKit/NSTextView.h>
|
|
|
|
#import <AppKit/NSView.h>
|
|
|
|
#import <AppKit/NSWindow.h>
|
2007-10-07 03:04:39 +00:00
|
|
|
|
2010-03-20 14:09:02 +00:00
|
|
|
#import "GNUstepGUI/GSNibContainer.h"
|
|
|
|
#import "GNUstepGUI/GSInstantiator.h"
|
|
|
|
|
|
|
|
@class NSDictionary;
|
|
|
|
@class NSMapTable;
|
|
|
|
@class NSMutableArray;
|
|
|
|
@class NSMutableSet;
|
|
|
|
@class NSString;
|
2003-10-25 20:50:08 +00:00
|
|
|
|
|
|
|
// templates
|
2006-05-20 22:12:46 +00:00
|
|
|
@protocol OSXNibTemplate
|
2003-10-25 20:50:08 +00:00
|
|
|
- (void) setClassName: (NSString *)className;
|
|
|
|
- (NSString *)className;
|
2008-12-15 23:34:09 +00:00
|
|
|
- (void) setRealObject: (id)o;
|
2006-05-20 22:12:46 +00:00
|
|
|
- (id) realObject;
|
2003-10-25 20:50:08 +00:00
|
|
|
@end
|
|
|
|
|
2008-12-15 23:34:09 +00:00
|
|
|
@protocol GSNibLoading
|
|
|
|
- (id) nibInstantiate;
|
|
|
|
@end
|
|
|
|
|
2006-05-20 22:12:46 +00:00
|
|
|
typedef struct _GSWindowTemplateFlags
|
2003-10-25 20:50:08 +00:00
|
|
|
{
|
2010-05-29 08:32:02 +00:00
|
|
|
#if GS_WORDS_BIGENDIAN == 1
|
2006-05-20 22:12:46 +00:00
|
|
|
unsigned int isHiddenOnDeactivate:1;
|
|
|
|
unsigned int isNotReleasedOnClose:1;
|
|
|
|
unsigned int isDeferred:1;
|
|
|
|
unsigned int isOneShot:1;
|
|
|
|
unsigned int isVisible:1;
|
|
|
|
unsigned int wantsToBeColor:1;
|
|
|
|
unsigned int dynamicDepthLimit:1;
|
|
|
|
unsigned int autoPositionMask:6;
|
|
|
|
unsigned int savePosition:1;
|
|
|
|
unsigned int style:2;
|
|
|
|
unsigned int _unused:16; // currently not used, contains Cocoa specific info
|
|
|
|
#else
|
|
|
|
unsigned int _unused:16; // currently not used, contains Cocoa specific info
|
|
|
|
unsigned int style:2;
|
|
|
|
unsigned int savePosition:1;
|
|
|
|
unsigned int autoPositionMask:6;
|
|
|
|
unsigned int dynamicDepthLimit:1;
|
|
|
|
unsigned int wantsToBeColor:1;
|
|
|
|
unsigned int isVisible:1;
|
|
|
|
unsigned int isOneShot:1;
|
|
|
|
unsigned int isDeferred:1;
|
|
|
|
unsigned int isNotReleasedOnClose:1;
|
|
|
|
unsigned int isHiddenOnDeactivate:1;
|
|
|
|
#endif
|
|
|
|
} GSWindowTemplateFlags;
|
|
|
|
|
2006-06-18 18:40:11 +00:00
|
|
|
// help connector class...
|
|
|
|
@interface NSIBHelpConnector : NSNibConnector
|
2006-10-07 14:03:50 +00:00
|
|
|
{
|
|
|
|
id _marker;
|
|
|
|
id _file;
|
|
|
|
}
|
|
|
|
- (void) setFile: (id)file;
|
|
|
|
- (id) file;
|
|
|
|
- (void) setMarker: (id)file;
|
|
|
|
- (id) marker;
|
2006-06-18 18:40:11 +00:00
|
|
|
@end
|
2006-08-09 01:37:32 +00:00
|
|
|
/**
|
|
|
|
* Button image source class.
|
|
|
|
*/
|
|
|
|
@interface NSButtonImageSource : NSObject <NSCoding>
|
|
|
|
{
|
|
|
|
NSString *imageName;
|
|
|
|
}
|
|
|
|
- (id) initWithImageNamed: (NSString *)name;
|
|
|
|
- (NSString *)imageName;
|
|
|
|
@end
|
|
|
|
|
2006-05-20 22:12:46 +00:00
|
|
|
/**
|
|
|
|
* This class acts as a placeholder for the window. It doesn't derive from
|
|
|
|
* NSWindow for two reasons. First, it shouldn't instantiate a window immediately
|
|
|
|
* when it's unarchived and second, it holds certain attributes (but doesn't set them
|
|
|
|
* on the window, when the window is being edited in the application builder.
|
|
|
|
*/
|
2008-12-15 23:34:09 +00:00
|
|
|
@interface NSWindowTemplate : NSObject <OSXNibTemplate, NSCoding, GSNibLoading>
|
2006-05-20 22:12:46 +00:00
|
|
|
{
|
|
|
|
NSBackingStoreType _backingStoreType;
|
|
|
|
NSSize _maxSize;
|
|
|
|
NSSize _minSize;
|
|
|
|
unsigned _windowStyle;
|
|
|
|
NSString *_title;
|
|
|
|
NSString *_viewClass;
|
|
|
|
NSString *_windowClass;
|
|
|
|
NSRect _windowRect;
|
|
|
|
NSRect _screenRect;
|
|
|
|
id _realObject;
|
|
|
|
id _view;
|
|
|
|
GSWindowTemplateFlags _flags;
|
|
|
|
NSString *_autosaveName;
|
2006-06-15 04:53:09 +00:00
|
|
|
Class _baseWindowClass;
|
2003-10-25 20:50:08 +00:00
|
|
|
}
|
2006-07-14 05:18:08 +00:00
|
|
|
- (id) initWithWindow: (NSWindow *)window
|
|
|
|
className: (NSString *)windowClass
|
2006-08-05 12:46:20 +00:00
|
|
|
isDeferred: (BOOL) deferred
|
2006-07-14 05:18:08 +00:00
|
|
|
isOneShot: (BOOL) oneShot
|
|
|
|
isVisible: (BOOL) visible
|
|
|
|
wantsToBeColor: (BOOL) wantsToBeColor
|
|
|
|
autoPositionMask: (int) autoPositionMask;
|
2006-05-20 22:12:46 +00:00
|
|
|
- (void) setBackingStoreType: (NSBackingStoreType)type;
|
|
|
|
- (NSBackingStoreType) backingStoreType;
|
|
|
|
- (void) setDeferred: (BOOL)flag;
|
|
|
|
- (BOOL) isDeferred;
|
|
|
|
- (void) setMaxSize: (NSSize)maxSize;
|
|
|
|
- (NSSize) maxSize;
|
|
|
|
- (void) setMinSize: (NSSize)minSize;
|
|
|
|
- (NSSize) minSize;
|
|
|
|
- (void) setWindowStyle: (unsigned)sty;
|
|
|
|
- (unsigned) windowStyle;
|
|
|
|
- (void) setTitle: (NSString *) title;
|
|
|
|
- (NSString *)title;
|
|
|
|
- (void) setViewClass: (NSString *)viewClass;
|
|
|
|
- (NSString *)viewClass;
|
|
|
|
- (void) setWindowRect: (NSRect)rect;
|
|
|
|
- (NSRect)windowRect;
|
|
|
|
- (void) setScreenRect: (NSRect)rect;
|
|
|
|
- (NSRect) screenRect;
|
|
|
|
- (void) setView: (id)view;
|
|
|
|
- (id) view;
|
2006-06-15 04:53:09 +00:00
|
|
|
- (Class) baseWindowClass;
|
2003-10-25 20:50:08 +00:00
|
|
|
@end
|
|
|
|
|
2006-05-20 22:12:46 +00:00
|
|
|
@interface NSViewTemplate : NSView <OSXNibTemplate, NSCoding>
|
2003-10-25 20:50:08 +00:00
|
|
|
{
|
|
|
|
NSString *_className;
|
2006-05-20 22:12:46 +00:00
|
|
|
id _realObject;
|
2003-10-25 20:50:08 +00:00
|
|
|
}
|
2008-12-15 23:34:09 +00:00
|
|
|
- (id) initWithObject: (id)o
|
|
|
|
className: (NSString *)name;
|
2003-10-25 20:50:08 +00:00
|
|
|
@end
|
|
|
|
|
2006-05-20 22:12:46 +00:00
|
|
|
@interface NSTextTemplate : NSViewTemplate
|
2003-10-25 20:50:08 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2006-05-20 22:12:46 +00:00
|
|
|
@interface NSTextViewTemplate : NSViewTemplate
|
2003-10-25 20:50:08 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2006-05-20 22:12:46 +00:00
|
|
|
@interface NSMenuTemplate : NSObject <OSXNibTemplate, NSCoding>
|
2003-10-25 20:50:08 +00:00
|
|
|
{
|
2006-05-20 22:12:46 +00:00
|
|
|
NSString *_menuClass;
|
|
|
|
NSString *_title;
|
|
|
|
id _realObject;
|
|
|
|
id _parentMenu;
|
|
|
|
NSPoint _location;
|
|
|
|
BOOL _isWindowsMenu;
|
|
|
|
BOOL _isServicesMenu;
|
|
|
|
BOOL _isFontMenu;
|
|
|
|
NSInterfaceStyle _interfaceStyle;
|
2003-10-25 20:50:08 +00:00
|
|
|
}
|
2006-05-20 22:12:46 +00:00
|
|
|
- (void) setClassName: (NSString *)name;
|
|
|
|
- (NSString *)className;
|
2003-10-25 20:50:08 +00:00
|
|
|
@end
|
|
|
|
|
2008-12-15 23:34:09 +00:00
|
|
|
@interface NSCustomObject : NSObject <NSCoding, GSNibLoading>
|
2003-10-25 20:50:08 +00:00
|
|
|
{
|
2006-05-20 22:12:46 +00:00
|
|
|
NSString *_className;
|
|
|
|
NSString *_extension;
|
|
|
|
id _object;
|
2003-10-25 20:50:08 +00:00
|
|
|
}
|
2006-05-20 22:12:46 +00:00
|
|
|
- (void) setClassName: (NSString *)name;
|
|
|
|
- (NSString *)className;
|
|
|
|
- (void) setExtension: (NSString *)ext;
|
|
|
|
- (NSString *)extension;
|
2003-10-25 20:50:08 +00:00
|
|
|
@end
|
|
|
|
|
2008-12-15 23:34:09 +00:00
|
|
|
@interface NSCustomView : NSView <GSNibLoading>
|
2003-10-25 20:50:08 +00:00
|
|
|
{
|
2006-05-20 22:12:46 +00:00
|
|
|
NSString *_className;
|
|
|
|
NSString *_extension;
|
|
|
|
NSView *_superview;
|
|
|
|
NSView *_view;
|
2003-10-25 20:50:08 +00:00
|
|
|
}
|
2006-05-20 22:12:46 +00:00
|
|
|
- (void) setClassName: (NSString *)name;
|
|
|
|
- (NSString *)className;
|
|
|
|
- (void) setExtension: (NSString *)view;
|
|
|
|
- (NSString *)extension;
|
2008-12-12 07:03:48 +00:00
|
|
|
- (id)nibInstantiateWithCoder: (NSCoder *)coder;
|
2003-10-25 20:50:08 +00:00
|
|
|
@end
|
2006-05-20 22:12:46 +00:00
|
|
|
|
|
|
|
@interface NSCustomResource : NSObject <NSCoding>
|
|
|
|
{
|
|
|
|
NSString *_className;
|
|
|
|
NSString *_resourceName;
|
|
|
|
}
|
|
|
|
- (void) setClassName: (NSString *)className;
|
|
|
|
- (NSString *)className;
|
|
|
|
- (void) setResourceName: (NSString *)view;
|
|
|
|
- (NSString *)resourceName;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSClassSwapper : NSObject <NSCoding>
|
|
|
|
{
|
|
|
|
NSString *_className;
|
|
|
|
NSString *_originalClassName;
|
|
|
|
id _template;
|
|
|
|
}
|
2006-08-05 12:46:20 +00:00
|
|
|
- (id) initWithObject: (id)object
|
|
|
|
withClassName: (NSString *)className
|
|
|
|
originalClassName: (NSString *)origClassName;
|
2006-06-15 04:53:09 +00:00
|
|
|
+ (void) setIsInInterfaceBuilder: (BOOL)flag;
|
|
|
|
+ (BOOL) isInInterfaceBuilder;
|
2006-05-20 22:12:46 +00:00
|
|
|
- (void) setTemplate: (id)temp;
|
|
|
|
- (id) template;
|
|
|
|
- (void) setClassName: (NSString *)className;
|
|
|
|
- (NSString *)className;
|
2006-08-05 12:46:20 +00:00
|
|
|
- (void) setOriginalClassName: (NSString *)className;
|
|
|
|
- (NSString *)originalClassName;
|
2006-05-20 22:12:46 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSIBObjectData : NSObject <NSCoding, GSInstantiator, GSNibContainer>
|
|
|
|
{
|
|
|
|
id _root;
|
|
|
|
NSMapTable *_objects;
|
|
|
|
NSMapTable *_names;
|
|
|
|
NSMapTable *_oids;
|
|
|
|
NSMapTable *_classes;
|
|
|
|
NSMapTable *_instantiatedObjs;
|
2006-08-05 12:46:20 +00:00
|
|
|
NSMutableArray *_visibleWindows;
|
2006-05-20 22:12:46 +00:00
|
|
|
NSMutableArray *_connections;
|
|
|
|
id _firstResponder;
|
|
|
|
id _fontManager;
|
|
|
|
NSString *_framework;
|
|
|
|
unsigned _nextOid;
|
|
|
|
NSMutableArray *_accessibilityConnectors;
|
|
|
|
NSMapTable *_accessibilityOids;
|
2006-06-15 04:53:09 +00:00
|
|
|
NSMutableSet *_topLevelObjects;
|
2006-05-20 22:12:46 +00:00
|
|
|
}
|
|
|
|
- (id) instantiateObject: (id)obj;
|
|
|
|
- (void) nibInstantiateWithOwner: (id)owner topLevelObjects: (NSMutableArray *)toplevel;
|
|
|
|
- (id) objectForName: (NSString *)name;
|
|
|
|
- (NSString *) nameForObject: (id)name;
|
2006-06-21 01:02:25 +00:00
|
|
|
- (NSMapTable *) objects;
|
|
|
|
- (NSMapTable *) names;
|
|
|
|
- (NSMapTable *) classes;
|
2006-08-15 05:04:35 +00:00
|
|
|
- (NSMapTable *) oids;
|
2006-08-05 12:46:20 +00:00
|
|
|
- (NSMutableArray *) visibleWindows;
|
|
|
|
- (void) setRoot: (id)root;
|
|
|
|
- (id) root;
|
|
|
|
- (void) setNextOid: (int)noid;
|
|
|
|
- (int) nextOid;
|
2006-05-20 22:12:46 +00:00
|
|
|
@end
|
|
|
|
|
2006-08-12 22:44:56 +00:00
|
|
|
// class needed for nib encoding/decoding by the progress bar...
|
|
|
|
@interface NSPSMatrix : NSObject
|
|
|
|
@end
|
|
|
|
|
2007-10-07 03:04:39 +00:00
|
|
|
@interface NSNibAXAttributeConnector : NSObject <NSCoding>
|
|
|
|
{
|
|
|
|
NSString *_attributeType;
|
|
|
|
NSString *_attributeValue;
|
|
|
|
id _destination;
|
|
|
|
id _source;
|
|
|
|
NSString *_label;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Attribute name/type.
|
|
|
|
- (NSString *) attributeType;
|
|
|
|
- (void) setAttributeType: (NSString *)type;
|
|
|
|
- (NSString *) attributeValue;
|
|
|
|
- (void) setAttributeValue: (NSString *)value;
|
|
|
|
|
|
|
|
// Source destination, connectors.
|
|
|
|
- (id) destination;
|
|
|
|
- (void) setDestination: (id)destination;
|
|
|
|
- (NSString *) label;
|
|
|
|
- (void) setLabel: (NSString *)label;
|
|
|
|
- (id) source;
|
|
|
|
- (void) setSource: (id)source;
|
|
|
|
|
|
|
|
// establish connection...
|
|
|
|
- (void) establishConnection;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSNibAXRelationshipConnector : NSNibConnector
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSNibBindingConnector: NSNibConnector
|
|
|
|
{
|
|
|
|
NSDictionary *_options;
|
|
|
|
NSString *_binding;
|
|
|
|
NSString *_keyPath;
|
|
|
|
BOOL _hasEstablishedConnection;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (NSString *) binding;
|
|
|
|
- (NSString *) keyPath;
|
|
|
|
- (NSDictionary *) options;
|
|
|
|
- (void) setBinding: (NSString *)bindings;
|
|
|
|
- (void) setKeyPath: (NSString *)keyPath;
|
|
|
|
- (void) setOptions: (NSDictionary *)options;
|
|
|
|
@end
|
2003-10-25 20:50:08 +00:00
|
|
|
#endif /* _GNUstep_H_GSNibCompatibility */
|