forked from WheretIB/nullc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColorer.h
More file actions
48 lines (39 loc) · 802 Bytes
/
Copy pathColorer.h
File metadata and controls
48 lines (39 loc) · 802 Bytes
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
40
41
42
43
44
45
46
47
48
#include "stdafx.h"
#pragma once
enum COLOR_STYLE
{
COLOR_CODE,
COLOR_RWORD,
COLOR_VAR,
COLOR_VARDEF,
COLOR_FUNC,
COLOR_TEXT,
COLOR_BOLD,
COLOR_CHAR,
COLOR_REAL,
COLOR_INT,
COLOR_ERR,
COLOR_COMMENT,
};
class ColorCodeCallback;
namespace ColorerGrammar
{
class Grammar;
};
class Colorer
{
public:
Colorer();
~Colorer();
bool ColorText(HWND wnd, char *text, void (*)(HWND, unsigned int, unsigned int, int));
std::string GetError();
private:
ColorerGrammar::Grammar *syntax;
friend class ColorCodeCallback;
void ColorCode(int style, const char* start, const char* end);
bool errUnderline;
std::string lastError;
//////////////////////////////////////////////////////////////////////////
HWND richEdit;
char* strBuf;
};