Add attributed string constants for Riccardo

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24932 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-03-26 13:37:33 +00:00
parent efa7803d40
commit 561b06efe1
4 changed files with 53 additions and 20 deletions

View file

@ -1,3 +1,10 @@
2007-03-26 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSAttributedString.m: Wrap excessively long lines
* Source/externs.m: Add new attributed string constants
* Headers/AppKit/NSAttributedString.h: Add constants from current
MacOS-X
2007-03-23 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSAffineTransform.m: Simplify code slightly.

View file

@ -49,17 +49,26 @@
/* Global NSString attribute names used in accessing the respective
property in a text attributes dictionary. if the key is not in the
dictionary the default value is assumed. */
APPKIT_EXPORT NSString *NSFontAttributeName;
APPKIT_EXPORT NSString *NSParagraphStyleAttributeName;
APPKIT_EXPORT NSString *NSForegroundColorAttributeName;
APPKIT_EXPORT NSString *NSUnderlineStyleAttributeName;
APPKIT_EXPORT NSString *NSSuperscriptAttributeName;
APPKIT_EXPORT NSString *NSBackgroundColorAttributeName;
APPKIT_EXPORT NSString *NSAttachmentAttributeName;
APPKIT_EXPORT NSString *NSLigatureAttributeName;
APPKIT_EXPORT NSString *NSBackgroundColorAttributeName;
APPKIT_EXPORT NSString *NSBaselineOffsetAttributeName;
APPKIT_EXPORT NSString *NSCursorAttributeName;
APPKIT_EXPORT NSString *NSExpansionAttributeName;
APPKIT_EXPORT NSString *NSFontAttributeName;
APPKIT_EXPORT NSString *NSForegroundColorAttributeName;
APPKIT_EXPORT NSString *NSKernAttributeName;
APPKIT_EXPORT NSString *NSLigatureAttributeName;
APPKIT_EXPORT NSString *NSLinkAttributeName;
APPKIT_EXPORT NSString *NSObliquenessAttributeName;
APPKIT_EXPORT NSString *NSParagraphStyleAttributeName;
APPKIT_EXPORT NSString *NSShadowAttributeName;
APPKIT_EXPORT NSString *NSStrikethroughColorAttributeName;
APPKIT_EXPORT NSString *NSStrokeColorAttributeName;
APPKIT_EXPORT NSString *NSStrokeWidthAttributeName;
APPKIT_EXPORT NSString *NSSuperscriptAttributeName;
APPKIT_EXPORT NSString *NSToolTipAttributeName;
APPKIT_EXPORT NSString *NSUnderlineColorAttributeName;
APPKIT_EXPORT NSString *NSUnderlineStyleAttributeName;
/* Currently supported values for NSUnderlineStyleAttributeName. */
enum

View file

@ -152,9 +152,15 @@ Class converter_bundles(NSString *format, BOOL producer)
{
NSString *converter_name;
if (producer)
converter_name = [format stringByAppendingString: @"Producer"];
{
converter_name
= [format stringByAppendingString: @"Producer"];
}
else
converter_name = [format stringByAppendingString: @"Consumer"];
{
converter_name
= [format stringByAppendingString: @"Consumer"];
}
converter_class = [aBundle classNamed: converter_name];
}
}
@ -355,7 +361,7 @@ static Class converter_class(NSString *format, BOOL producer)
if (NSMaxRange (aRange) > length || location > length)
{
[NSException raise: NSRangeException
format: @"RangeError in method -lineBreakBeforeIndex: withinRange: "];
format: @"RangeError in method -lineBreakBeforeIndex: withinRange: "];
}
if (!NSLocationInRange (location, aRange))
@ -485,7 +491,7 @@ static Class converter_class(NSString *format, BOOL producer)
if (location > length)
{
[NSException raise: NSRangeException
format: @"RangeError in method -nextWordFromIndex: forward: "];
format: @"RangeError in method -nextWordFromIndex: forward: "];
}
/* Please note that we consider ' a valid word separator. This is
@ -906,7 +912,7 @@ documentAttributes: (NSDictionary **)dict
if (NSMaxRange (range) > [self length])
{
[NSException raise: NSRangeException
format: @"RangeError in method -fixParagraphStyleAttributeInRange: "];
format: @"RangeError in method -fixParagraphStyleAttributeInRange: "];
}
while (loc < NSMaxRange (range))

View file

@ -429,19 +429,30 @@ NSString *NSWorkspaceWillUnmountNotification =
@"NSWorkspaceWillUnmountNotification";
/*
* NSStringDrawing NSString additions
* NSStringDrawing NSAttributedString additions
*/
NSString *NSFontAttributeName = @"NSFontAttributeName";
NSString *NSParagraphStyleAttributeName = @"NSParagraphStyleAttributeName";
NSString *NSForegroundColorAttributeName = @"NSForegroundColorAttributeName";
NSString *NSUnderlineStyleAttributeName = @"NSUnderlineStyleAttributeName";
NSString *NSSuperscriptAttributeName = @"NSSuperscriptAttributeName";
NSString *NSBackgroundColorAttributeName = @"NSBackgroundColorAttributeName";
NSString *NSAttachmentAttributeName = @"NSAttachmentAttributeName";
NSString *NSLigatureAttributeName = @"NSLigatureAttributeName";
NSString *NSBackgroundColorAttributeName = @"NSBackgroundColorAttributeName";
NSString *NSBaselineOffsetAttributeName = @"NSBaselineOffsetAttributeName";
NSString *NSCursorAttributeName = @"NSCursorAttributeName";
NSString *NSExpansionAttributeName = @"NSExpansionAttributeName";
NSString *NSFontAttributeName = @"NSFontAttributeName";
NSString *NSForegroundColorAttributeName = @"NSForegroundColorAttributeName";
NSString *NSKernAttributeName = @"NSKernAttributeName";
NSString *NSLigatureAttributeName = @"NSLigatureAttributeName";
NSString *NSLinkAttributeName = @"NSLinkAttributeName";
NSString *NSObliquenessAttributeName = @"NSObliquenessAttributeName";
NSString *NSParagraphStyleAttributeName = @"NSParagraphStyleAttributeName";
NSString *NSShadowAttributeName = @"NSShadowAttributeName";
NSString *NSStrikethroughColorAttributeName
= @"NSStrikethroughColorAttributeName";
NSString *NSStrokeColorAttributeName = @"NSStrokeColorAttributeName";
NSString *NSStrokeWidthAttributeName = @"NSStrokeWidthAttributeName";
NSString *NSSuperscriptAttributeName = @"NSSuperscriptAttributeName";
NSString *NSToolTipAttributeName = @"NSToolTipAttributeName";
NSString *NSUnderlineColorAttributeName = @"NSUnderlineColorAttributeName";
NSString *NSUnderlineStyleAttributeName = @"NSUnderlineStyleAttributeName";
// NSToolbar notifications
NSString *NSToolbarDidRemoveItemNotification = @"NSToolbarDidRemoveItemNotification";