PEG Markdown Highlight
|
00001 /* PEG Markdown Highlight 00002 * Copyright 2011-2012 Ali Rantakari -- http://hasseg.org 00003 * Licensed under the GPL2+ and MIT licenses (see LICENSE for more info). 00004 * 00005 * HGMarkdownHighlighter.h 00006 */ 00007 00008 #import <Cocoa/Cocoa.h> 00009 #import "pmh_definitions.h" 00010 #import "HGMarkdownHighlightingStyle.h" 00011 00018 @interface HGMarkdownHighlighter : NSObject 00019 00032 @property(nonatomic, copy) NSArray *styles; 00033 00041 @property(retain) HGMarkdownHighlightingStyle *currentLineStyle; 00042 00044 @property NSTimeInterval waitInterval; 00045 00047 @property(nonatomic, retain) NSTextView *targetTextView; 00048 00057 @property BOOL parseAndHighlightAutomatically; 00058 00063 @property BOOL isActive; 00064 00072 @property BOOL resetTypingAttributes; 00073 00079 @property BOOL makeLinksClickable; 00080 00087 @property int extensions; 00088 00089 00091 - (id) initWithTextView:(NSTextView *)textView; 00093 - (id) initWithTextView:(NSTextView *)textView waitInterval:(NSTimeInterval)interval; 00095 - (id) initWithTextView:(NSTextView *)textView waitInterval:(NSTimeInterval)interval styles:(NSArray *)inStyles; 00096 00107 - (void) readClearTextStylesFromTextView; 00108 00118 - (void) applyStylesFromStylesheet:(NSString *)stylesheet 00119 withErrorDelegate:(id)delegate 00120 errorSelector:(SEL)selector; 00121 00123 - (void) parseAndHighlightNow; 00124 00126 - (void) highlightNow; 00127 00132 - (void) clearHighlighting; 00133 00144 - (void) activate; 00145 00149 - (void) deactivate; 00150 00151 00152 @end