-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTexEditor.h
39 lines (33 loc) · 957 Bytes
/
TexEditor.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
33
34
35
36
37
38
39
//
// TexEditor.h
// EquaTeX
//
// Created by Thierry Coppey on 31.05.11.
// Copyright 2011 TCKnetwork. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "TexEquation.h"
@protocol TexEditorDelegate;
@interface TexEditor : NSTextView {
@private
BOOL highlight;
NSDictionary* _aCom; // Single-line comments "%[^\n]\n"
NSDictionary* _aBrk; // "{", "}"
NSDictionary* _aKey; // tokens: $, \[, \]
NSDictionary* _aCmd; // commands \[a-z0-9]+
NSDictionary* _aMat; // (), [] \{ \} _ ^
NSColor* _col; // default color
NSTimer* timer;
NSObject<TexEditorDelegate>* delegate;
}
@property (retain) NSObject<TexEditorDelegate>* delegate;
@property (assign)BOOL highlight;
@property (readonly) NSColor* color;
- (void)colorize;
@end
@protocol TexEditorDelegate <NSObject>
@optional
- (void)texPreview:(TexEditor*)editor;
- (void)texCopy:(TexEditor*)editor;
- (NSString*)texPaste:(TexEditor*)editor; // return nil if there is nothing to paste
@end