/
CMHighlighter.h
32 lines (24 loc) · 990 Bytes
/
CMHighlighter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// CMHighlighter.h
// Snippet
//
// Created by Krystof Vasa on 4/28/09.
// Copyright 2009 Krystof Vasa and FuelCollective. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#define CMHighlightedTextViewKey @"CMHighlightedTextViewKey"
#define CMHighlightedRangeKey @"CMHighlightedRangeKey"
#define CMHighlighter NSObject
@interface NSObject (CMHighlighter)
+(NSDictionary*)stringAttributes; //Used for "strings"
+(NSDictionary*)cStringAttributes; //Used for 'strings'
+(NSDictionary*)keywordAttributes; //Used for keywords
+(NSDictionary*)commentAttributes; //Used for comments
+(NSDictionary*)macroAttributes; //Used for different things like macros in C
+(NSDictionary*)foreignLanguageAttributes; //Used for foreign languages like PHP in HTML
+(NSArray*)availableLanguages;
+(NSArray*)enabledLanguages;
+(NSArray*)builtInLanguages;
+(Class)classForLanguage:(NSString*)languageName;
+(void)highlight:(NSDictionary*)aDict;
@end