PEG Markdown Highlight
|
Highlighting style definition for a Markdown language element. More...
#import <HGMarkdownHighlightingStyle.h>
Public Member Functions | |
(id) | - initWithType:attributesToAdd:toRemove:fontTraitsToAdd: |
Init a new instance. | |
(id) | - initWithStyleAttributes:baseFont: |
Init a new instance based on styles from the stylesheet parser. | |
Static Public Member Functions | |
(NSColor *) | + colorFromARGBColor: |
Properties | |
pmh_element_type | elementType |
The Markdown language element type these styles pertain to. | |
NSFontTraitMask | fontTraitsToAdd |
A bitmask of the font traits to add. | |
NSDictionary * | attributesToAdd |
The string attributes to add. | |
NSArray * | attributesToRemove |
The names of attributes to remove. |
Highlighting style definition for a Markdown language element.
Contains information on the styles to use to highlight occurrences of a specific Markdown language element. You populate HGMarkdownHighlighter::styles with instances of this class to set the highlighting styles.
- (NSDictionary *) attributesToAdd [read, write, copy] |
The string attributes to add.
This dictionary should be in the same format you would use for manipulating styles in an NSMutableAttributedString directly.
- (NSArray *) attributesToRemove [read, write, copy] |
The names of attributes to remove.
Populate this array with attribute names (such as NSForegroundColorAttributeName).
- (NSFontTraitMask) fontTraitsToAdd [read, write, assign] |
A bitmask of the font traits to add.
If you want to remove certain font traits in this style, use the 'opposite' traits (e.g. NSUnboldFontMask to remove the 'bold' trait).