FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
NSAttributedString+Cocoa.h File Reference

NSMutableAttributedString attributes dictionary and data type to support it. More...

#import <Cocoa/Cocoa.h>
#import <FoundationExtension/NSADictionary.h>

Go to the source code of this file.

Classes

category  NSMutableAttributedString(AttributeProperties)
 Dictionary with easy attribute interface. More...
 
class  NSAttributedStringAttributeDictionary
 NSMutableAttributedString attributes dictionary. More...
 

Macros

#define NSTextAlignmentLeft   NSLeftTextAlignment
 
#define NSTextAlignmentRight   NSRightTextAlignment
 
#define NSTextAlignmentCenter   NSCenterTextAlignment
 
#define NSTextAlignmentJustified   NSJustifiedTextAlignment
 
#define NSTextAlignmentNatural   NSNaturalTextAlignment
 
#define NSWritingDirectionEmbedding   kCTWritingDirectionEmbedding
 
#define NSWritingDirectionOverride   kCTWritingDirectionOverride
 

Typedefs

typedef NSUInteger NSLigatureType
 Type for ligature style. More...
 
typedef NSInteger NSUnderlineStyle
 
typedef NSInteger NSWritingDirectionFormatType
 
typedef NSUInteger NSWritingDirectionAttributes
 Type for writing direction. More...
 
typedef NSUInteger NSVerticalGlyphForm
 Type for vertical glyph form. More...
 

Enumerations

enum  { NSLigatureNo = 0, NSLigatureStandard = 1, NSLigatureAll = 2 }
 Values for ligature style. More...
 
enum  { NSWritingDirectionAttributeLRE = 1 << (NSWritingDirectionLeftToRight | NSWritingDirectionEmbedding), NSWritingDirectionAttributeRLE = 1 << (NSWritingDirectionRightToLeft | NSWritingDirectionEmbedding), NSWritingDirectionAttributeLRO = 1 << (NSWritingDirectionLeftToRight | NSWritingDirectionOverride), NSWritingDirectionAttributeRLO = 1 << (NSWritingDirectionRightToLeft | NSWritingDirectionOverride) }
 Values for writing direction. More...
 
enum  { NSVerticalGlyphFormHorizontal = 0, NSVerticalGlyphFormVertical = 1 }
 Values for vertical glyph form. More...
 

Detailed Description

NSMutableAttributedString attributes dictionary and data type to support it.

NSAttributedString uses dictionary to set or add attribute to string. But this interface is very human-unfriendly. This file adds new interface for attributes dictionary.

AppKit is required.

Macro Definition Documentation

#define NSTextAlignmentCenter   NSCenterTextAlignment
#define NSTextAlignmentJustified   NSJustifiedTextAlignment
#define NSTextAlignmentLeft   NSLeftTextAlignment
#define NSTextAlignmentNatural   NSNaturalTextAlignment
#define NSTextAlignmentRight   NSRightTextAlignment
#define NSWritingDirectionEmbedding   kCTWritingDirectionEmbedding
#define NSWritingDirectionOverride   kCTWritingDirectionOverride

Typedef Documentation

typedef NSUInteger NSLigatureType

Type for ligature style.

See also
NSLigatureAttributeName
typedef NSInteger NSUnderlineStyle
typedef NSUInteger NSVerticalGlyphForm

Type for vertical glyph form.

See also
NSVerticalGlyphFormAttributeName
typedef NSUInteger NSWritingDirectionAttributes

Type for writing direction.

See also
NSWritingDirectionAttributeName
typedef NSInteger NSWritingDirectionFormatType

Enumeration Type Documentation

anonymous enum

Values for ligature style.

See also
NSLigatureAttributeName
Enumerator
NSLigatureNo 
NSLigatureStandard 
NSLigatureAll 
anonymous enum

Values for writing direction.

Use bitmask to set array in a value. Masked bit order is the value set to array.

See also
NSWritingDirectionAttributeName
Enumerator
NSWritingDirectionAttributeLRE 
NSWritingDirectionAttributeRLE 
NSWritingDirectionAttributeLRO 
NSWritingDirectionAttributeRLO 
anonymous enum

Values for vertical glyph form.

See also
NSVerticalGlyphFormAttributeName
Enumerator
NSVerticalGlyphFormHorizontal 
NSVerticalGlyphFormVertical