]> git.saurik.com Git - wxWidgets.git/blame - src/stc/scintilla/include/ILexer.h
Add missing WXK constants for the control keys
[wxWidgets.git] / src / stc / scintilla / include / ILexer.h
CommitLineData
1dcf666d
RD
1// Scintilla source code edit control
2/** @file ILexer.h
3 ** Interface between Scintilla and lexers.
4 **/
5// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
6// The License.txt file describes the conditions under which this software may be distributed.
7
8#ifndef ILEXER_H
9#define ILEXER_H
10
11#ifdef SCI_NAMESPACE
12namespace Scintilla {
13#endif
14
15#ifdef _WIN32
16 #define SCI_METHOD __stdcall
17#else
18 #define SCI_METHOD
19#endif
20
21enum { dvOriginal=0 };
22
23class IDocument {
24public:
25 virtual int SCI_METHOD Version() const = 0;
26 virtual void SCI_METHOD SetErrorStatus(int status) = 0;
27 virtual int SCI_METHOD Length() const = 0;
28 virtual void SCI_METHOD GetCharRange(char *buffer, int position, int lengthRetrieve) const = 0;
29 virtual char SCI_METHOD StyleAt(int position) const = 0;
30 virtual int SCI_METHOD LineFromPosition(int position) const = 0;
31 virtual int SCI_METHOD LineStart(int line) const = 0;
32 virtual int SCI_METHOD GetLevel(int line) const = 0;
33 virtual int SCI_METHOD SetLevel(int line, int level) = 0;
34 virtual int SCI_METHOD GetLineState(int line) const = 0;
35 virtual int SCI_METHOD SetLineState(int line, int state) = 0;
36 virtual void SCI_METHOD StartStyling(int position, char mask) = 0;
37 virtual bool SCI_METHOD SetStyleFor(int length, char style) = 0;
38 virtual bool SCI_METHOD SetStyles(int length, const char *styles) = 0;
39 virtual void SCI_METHOD DecorationSetCurrentIndicator(int indicator) = 0;
40 virtual void SCI_METHOD DecorationFillRange(int position, int value, int fillLength) = 0;
41 virtual void SCI_METHOD ChangeLexerState(int start, int end) = 0;
42 virtual int SCI_METHOD CodePage() const = 0;
43 virtual bool SCI_METHOD IsDBCSLeadByte(char ch) const = 0;
44 virtual const char * SCI_METHOD BufferPointer() = 0;
45 virtual int SCI_METHOD GetLineIndentation(int line) = 0;
46};
47
48enum { lvOriginal=0 };
49
50class ILexer {
51public:
52 virtual int SCI_METHOD Version() const = 0;
53 virtual void SCI_METHOD Release() = 0;
54 virtual const char * SCI_METHOD PropertyNames() = 0;
55 virtual int SCI_METHOD PropertyType(const char *name) = 0;
56 virtual const char * SCI_METHOD DescribeProperty(const char *name) = 0;
57 virtual int SCI_METHOD PropertySet(const char *key, const char *val) = 0;
58 virtual const char * SCI_METHOD DescribeWordListSets() = 0;
59 virtual int SCI_METHOD WordListSet(int n, const char *wl) = 0;
60 virtual void SCI_METHOD Lex(unsigned int startPos, int lengthDoc, int initStyle, IDocument *pAccess) = 0;
61 virtual void SCI_METHOD Fold(unsigned int startPos, int lengthDoc, int initStyle, IDocument *pAccess) = 0;
62 virtual void * SCI_METHOD PrivateCall(int operation, void *pointer) = 0;
63};
64
65class ILoader {
66public:
67 virtual int SCI_METHOD Release() = 0;
68 // Returns a status code from SC_STATUS_*
69 virtual int SCI_METHOD AddData(char *data, int length) = 0;
70 virtual void * SCI_METHOD ConvertToDocument() = 0;
71};
72
73#ifdef SCI_NAMESPACE
74}
75#endif
76
77#endif