* Headers/AppKit/NSLayoutManager.h: Declarations for new methods

to handle temporary attributes.
	* Source/GSNibCompatibility.m: Corrections to nib loading logic.
	* Source/NSLayoutManager.m: Skeleton implementations of new
	methods to handle temporary attributes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27124 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2008-11-23 23:54:00 +00:00
parent 9045dcf521
commit 8b23e80c6d
4 changed files with 74 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2008-11-23 18:56-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Headers/AppKit/NSLayoutManager.h: Declarations for new methods
to handle temporary attributes.
* Source/GSNibCompatibility.m: Corrections to nib loading logic.
* Source/NSLayoutManager.m: Skeleton implementations of new
methods to handle temporary attributes.
2008-11-23 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSControl.m (-initWithCoder:): For keyed decoding make
@ -25,6 +33,7 @@
* Source/NSTextView.m (-updateDragTypeRegistration): Register drag
types for non-rich text NSTextViews, too.
>>>>>>> .r27123
2008-11-22 20:46-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/GSNibCompatibility.m: Further improvements to nib loading

View file

@ -183,6 +183,15 @@ GNUstep extension.
@end
@interface NSLayoutManager (temporaryattributes)
- (void) addTemporaryAttributes: (NSDictionary *)attrs forCharacterRange: (NSRange)range;
- (void) addTemporaryAttribute: (NSString *)attr value: (id)value forCharacterRange: (NSRange)range;
- (void) setTemporaryAttributes:forCharacterRange: (NSRange)range;
- (void) removeTemporaryAttribute: (NSString *)attr forCharacterRange: (NSRange)range;
- (id) temporaryAttribute: (NSString *)attr atCharacterIndex: (unsigned int)index effectiveRange: (NSRange)range;
- (id) temporaryAttribute: (NSString *)attr atCharacterIndex: (unsigned int)index longestEffectiveRange: (NSRange*)longestRange inRange: (NSRange)range;
- (NSDictionary *) temporaryAttributesAtCharacterIndex: (unsigned int)index effectiveRange: (NSRange)range;
- (NSDictionary *) temporaryAttributesAtCharacterIndex: (unsigned int) longestEffectiveRange: (NSRange*)longestRange inRange: (NSRange)range;
@end
#endif

View file

@ -630,8 +630,14 @@ static BOOL _isInInterfaceBuilder = NO;
[NSException raise: NSInternalInconsistencyException
format: @"Unable to find class '%@'", _className];
}
_object = [[aClass allocWithZone: NSDefaultMallocZone()] init];
if(GSObjCIsKindOf(aClass, [NSApplication class]))
{
_object = [aClass sharedApplication];
}
else
{
_object = [[aClass allocWithZone: NSDefaultMallocZone()] init];
}
}
}
else
@ -1072,7 +1078,7 @@ static BOOL _isInInterfaceBuilder = NO;
id menu = nil;
// replace the owner with the actual instance provided.
[_root setObject: owner];
[self setRoot: owner];
// iterate over connections, instantiate, and then establish them.
while ((obj = [en nextObject]) != nil)
@ -1284,7 +1290,7 @@ static BOOL _isInInterfaceBuilder = NO;
{
if ([coder allowsKeyedCoding])
{
ASSIGN(_root, [coder decodeObjectForKey: @"NSRoot"]);
// ASSIGN(_root, [coder decodeObjectForKey: @"NSRoot"]);
ASSIGN(_visibleWindows, (NSMutableArray *)[coder decodeObjectForKey: @"NSVisibleWindows"]);
ASSIGN(_accessibilityConnectors, (NSMutableArray *)[coder decodeObjectForKey: @"NSAccessibilityConnectors"]);
ASSIGN(_fontManager, [coder decodeObjectForKey: @"NSFontManager"]);

View file

@ -2291,3 +2291,48 @@ no_soft_invalidation:
@end
@implementation NSLayoutManager (temporaryattributes)
- (void) addTemporaryAttributes: (NSDictionary *)attrs forCharacterRange: (NSRange)range
{
// to be implemented
}
- (void) addTemporaryAttribute: (NSString *)attr value: (id)value forCharacterRange: (NSRange)range
{
// to be implemented
}
- (void) setTemporaryAttributes:forCharacterRange: (NSRange)range
{
// to be implemented
}
- (void) removeTemporaryAttribute: (NSString *)attr forCharacterRange: (NSRange)range
{
// to be implemented
}
- (id) temporaryAttribute: (NSString *)attr atCharacterIndex: (unsigned int)index effectiveRange: (NSRange)range
{
// to be implemented
return nil;
}
- (id) temporaryAttribute: (NSString *)attr atCharacterIndex: (unsigned int)index longestEffectiveRange: (NSRange*)longestRange inRange: (NSRange)range
{
// to be implemented
return nil;
}
- (NSDictionary *) temporaryAttributesAtCharacterIndex: (unsigned int)index effectiveRange: (NSRange)range
{
// to be implemented
return nil;
}
- (NSDictionary *) temporaryAttributesAtCharacterIndex: (unsigned int) longestEffectiveRange: (NSRange*)longestRange inRange: (NSRange)range
{
// to be implemented
return nil;
}
@end