Main Page | Modules | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

NSAttributedString(attributedCharacter) Class Reference
[Terminal model]

#import <NSTextStorageTerminal.h>


Detailed Description

Extensions to NSAttributedString to provide convenient literals and to translate alt-encoded characters into Unicode for export.

Definition at line 14 of file NSTextStorageTerminal.h.

Public Member Functions

(NSString *) - unicodeString
 Translate internal alt-character coding into Unicode.
(NSAttributedString *) - unicodeAttributedString
 Translate internal alt-character coding into Unicode attributed string.

Static Public Member Functions

(id) + stringWithCharacter:attributes:
 A single-character attributed string with the given attributes.
(NSAttributedString *) + spaceInFont:
 The space character, with only the given font attribute.
(NSAttributedString *) + newlineInFont:
 The newline character, with only the given font attribute.
(NSAttributedString *) + newlineWithAttrs:
 A newline with the given attributes.
(NSAttributedString *) + spaceWithAttrs:
 A space with the given attributes.


Member Function Documentation

+ (NSAttributedString *) newlineInFont: (NSFont *)  aFont  
 

The newline character, with only the given font attribute.

The result has an attribute dictionary with only the font attribute set.

Parameters:
aFont the desired font.
Return values:
NSAttributedString a newline character, in aFont.

Definition at line 21 of file NSTextStorageTerminal.m.

+ (NSAttributedString *) newlineWithAttrs: (NSDictionary *)  attrs  
 

A newline with the given attributes.

Return values:
NSAttributedString a \n with the given attribute dictionary. Allocated and autoreleased for each call.

Definition at line 55 of file NSTextStorageTerminal.m.

+ (NSAttributedString *) spaceInFont: (NSFont *)  aFont  
 

The space character, with only the given font attribute.

The result has an attribute dictionary with only the font attribute set.

Parameters:
aFont the desired font.
Return values:
NSAttributedString a space character, in aFont.

Definition at line 38 of file NSTextStorageTerminal.m.

+ (NSAttributedString *) spaceWithAttrs: (NSDictionary *)  attrs  
 

A space with the given attributes.

Return values:
NSAttributedString a space character with the given attribute dictionary. Allocated and autoreleased for each call.

Definition at line 60 of file NSTextStorageTerminal.m.

+ (id) stringWithCharacter: (unichar)  ch
attributes: (NSDictionary *)  attrs
 
 

A single-character attributed string with the given attributes.

Parameters:
unichar the single-character content for the string.
attrs the attributes the string is to have.
Return values:
NSAttributedString the single character, with the given attributes.

Definition at line 16 of file NSTextStorageTerminal.m.

- (NSAttributedString *) unicodeAttributedString  
 

Translate internal alt-character coding into Unicode attributed string.

Crescat uses an internal code for ANSI alternate characters that must be drawn specially. These have at least close equivalents in Unicode, but the Unicode characters do not render with uniform spacing in Monaco. This method converts runs with the alt-charset character attributes to Unicode, and returns the attributed string without the alt-charset attribute.

Return values:
NSAttributedString a copy of the receiver, with alt-chars translated into Unicode. Formatting not related to alt-char markup is preserved.

- (NSString *) unicodeString  
 

Translate internal alt-character coding into Unicode.

Crescat uses an internal code for ANSI alternate characters that must be drawn specially. These have at least close equivalents in Unicode, but the Unicode characters do not render with uniform spacing in Monaco. This method converts runs with the alt-charset character attributes to Unicode, and returns the plain string.

Return values:
NSString the content of the receiver, with alt-chars translated into Unicode.


The documentation for this class was generated from the following files:
Generated on Fri Sep 30 12:01:13 2005 for Crescat by  doxygen 1.4.4