]> git.saurik.com Git - wxWidgets.git/blame - include/wx/stc/stc.h
typo
[wxWidgets.git] / include / wx / stc / stc.h
CommitLineData
9ce192d4
RD
1////////////////////////////////////////////////////////////////////////////
2// Name: stc.h
be5a51fb 3// Purpose: A wxWidgets implementation of Scintilla. This class is the
9ce192d4
RD
4// one meant to be used directly by wx applications. It does not
5// derive directly from the Scintilla classes, and in fact there
6// is no mention of Scintilla classes at all in this header.
7// This class delegates all method calls and events to the
8// Scintilla objects and so forth. This allows the use of
9// Scintilla without polluting the namespace with all the
10// classes and itentifiers from Scintilla.
11//
12// Author: Robin Dunn
13//
14// Created: 13-Jan-2000
15// RCS-ID: $Id$
16// Copyright: (c) 2000 by Total Control Software
17// Licence: wxWindows license
18/////////////////////////////////////////////////////////////////////////////
19
20#ifndef __stc_h__
21#define __stc_h__
22
23
d6655166
WS
24#include "wx/wx.h"
25#include "wx/dnd.h"
9ce192d4 26
39c0acb6 27
7ba1412f
RD
28#ifdef WXMAKINGDLL_STC
29 #define WXDLLIMPEXP_STC WXEXPORT
30#elif defined(WXUSINGDLL)
31 #define WXDLLIMPEXP_STC WXIMPORT
32#else // not making nor using DLL
33 #define WXDLLIMPEXP_STC
34#endif
402ce755 35
2b5f62a0 36
9d41f689
RD
37// SWIG can't handle "#if" type of conditionals, only "#ifdef"
38#ifdef SWIG
39#define STC_USE_DND 1
40#else
41#if wxUSE_DRAG_AND_DROP
42#define STC_USE_DND 1
43#endif
44#endif
45
9c46ea66
RD
46//----------------------------------------------------------------------
47
48// Should a wxPopupWindow be used for the call tips and autocomplete windows?
49#ifndef wxSTC_USE_POPUP
50#define wxSTC_USE_POPUP 1
51#endif
52
9ce192d4 53//----------------------------------------------------------------------
4370573a
RD
54// BEGIN generated section. The following code is automatically generated
55// by gen_iface.py. Do not edit this file. Edit stc.h.in instead
56// and regenerate
57
58#define wxSTC_INVALID_POSITION -1
d25f5fbb 59
8e54aaed 60// Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages
d25f5fbb 61// as many EM_ messages can be used although that use is deprecated.
4370573a
RD
62#define wxSTC_START 2000
63#define wxSTC_OPTIONAL_START 3000
64#define wxSTC_LEXER_START 4000
4370573a
RD
65#define wxSTC_WS_INVISIBLE 0
66#define wxSTC_WS_VISIBLEALWAYS 1
67#define wxSTC_WS_VISIBLEAFTERINDENT 2
68#define wxSTC_EOL_CRLF 0
69#define wxSTC_EOL_CR 1
70#define wxSTC_EOL_LF 2
71
72// The SC_CP_UTF8 value can be used to enter Unicode mode.
73// This is the same value as CP_UTF8 in Windows
74#define wxSTC_CP_UTF8 65001
9e730a78
RD
75
76// The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+.
77#define wxSTC_CP_DBCS 1
4370573a
RD
78#define wxSTC_MARKER_MAX 31
79#define wxSTC_MARK_CIRCLE 0
80#define wxSTC_MARK_ROUNDRECT 1
81#define wxSTC_MARK_ARROW 2
82#define wxSTC_MARK_SMALLRECT 3
83#define wxSTC_MARK_SHORTARROW 4
84#define wxSTC_MARK_EMPTY 5
85#define wxSTC_MARK_ARROWDOWN 6
86#define wxSTC_MARK_MINUS 7
87#define wxSTC_MARK_PLUS 8
65ec6247 88
a834585d 89// Shapes used for outlining column.
65ec6247
RD
90#define wxSTC_MARK_VLINE 9
91#define wxSTC_MARK_LCORNER 10
92#define wxSTC_MARK_TCORNER 11
93#define wxSTC_MARK_BOXPLUS 12
94#define wxSTC_MARK_BOXPLUSCONNECTED 13
95#define wxSTC_MARK_BOXMINUS 14
96#define wxSTC_MARK_BOXMINUSCONNECTED 15
97#define wxSTC_MARK_LCORNERCURVE 16
98#define wxSTC_MARK_TCORNERCURVE 17
99#define wxSTC_MARK_CIRCLEPLUS 18
100#define wxSTC_MARK_CIRCLEPLUSCONNECTED 19
101#define wxSTC_MARK_CIRCLEMINUS 20
102#define wxSTC_MARK_CIRCLEMINUSCONNECTED 21
1a2fb4cd 103
a834585d 104// Invisible mark that only sets the line background color.
1a2fb4cd 105#define wxSTC_MARK_BACKGROUND 22
f114b858
RD
106#define wxSTC_MARK_DOTDOTDOT 23
107#define wxSTC_MARK_ARROWS 24
9e730a78 108#define wxSTC_MARK_PIXMAP 25
1e9bafca 109#define wxSTC_MARK_FULLRECT 26
b8b0e402 110#define wxSTC_MARK_CHARACTER 10000
65ec6247 111
a834585d 112// Markers used for outlining column.
65ec6247
RD
113#define wxSTC_MARKNUM_FOLDEREND 25
114#define wxSTC_MARKNUM_FOLDEROPENMID 26
115#define wxSTC_MARKNUM_FOLDERMIDTAIL 27
116#define wxSTC_MARKNUM_FOLDERTAIL 28
117#define wxSTC_MARKNUM_FOLDERSUB 29
4370573a
RD
118#define wxSTC_MARKNUM_FOLDER 30
119#define wxSTC_MARKNUM_FOLDEROPEN 31
1a2fb4cd 120#define wxSTC_MASK_FOLDERS 0xFE000000
4370573a
RD
121#define wxSTC_MARGIN_SYMBOL 0
122#define wxSTC_MARGIN_NUMBER 1
b8b0e402
RD
123
124// Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
125// Styles 38 and 39 are for future use.
4370573a
RD
126#define wxSTC_STYLE_DEFAULT 32
127#define wxSTC_STYLE_LINENUMBER 33
128#define wxSTC_STYLE_BRACELIGHT 34
129#define wxSTC_STYLE_BRACEBAD 35
130#define wxSTC_STYLE_CONTROLCHAR 36
131#define wxSTC_STYLE_INDENTGUIDE 37
b8b0e402 132#define wxSTC_STYLE_LASTPREDEFINED 39
4370573a
RD
133#define wxSTC_STYLE_MAX 127
134
135// Character set identifiers are used in StyleSetCharacterSet.
136// The values are the same as the Windows *_CHARSET values.
137#define wxSTC_CHARSET_ANSI 0
138#define wxSTC_CHARSET_DEFAULT 1
139#define wxSTC_CHARSET_BALTIC 186
140#define wxSTC_CHARSET_CHINESEBIG5 136
141#define wxSTC_CHARSET_EASTEUROPE 238
142#define wxSTC_CHARSET_GB2312 134
143#define wxSTC_CHARSET_GREEK 161
144#define wxSTC_CHARSET_HANGUL 129
145#define wxSTC_CHARSET_MAC 77
146#define wxSTC_CHARSET_OEM 255
147#define wxSTC_CHARSET_RUSSIAN 204
1e9bafca 148#define wxSTC_CHARSET_CYRILLIC 1251
4370573a
RD
149#define wxSTC_CHARSET_SHIFTJIS 128
150#define wxSTC_CHARSET_SYMBOL 2
151#define wxSTC_CHARSET_TURKISH 162
152#define wxSTC_CHARSET_JOHAB 130
153#define wxSTC_CHARSET_HEBREW 177
154#define wxSTC_CHARSET_ARABIC 178
155#define wxSTC_CHARSET_VIETNAMESE 163
156#define wxSTC_CHARSET_THAI 222
1e9bafca 157#define wxSTC_CHARSET_8859_15 1000
65ec6247
RD
158#define wxSTC_CASE_MIXED 0
159#define wxSTC_CASE_UPPER 1
160#define wxSTC_CASE_LOWER 2
4370573a
RD
161#define wxSTC_INDIC_MAX 7
162#define wxSTC_INDIC_PLAIN 0
163#define wxSTC_INDIC_SQUIGGLE 1
164#define wxSTC_INDIC_TT 2
165#define wxSTC_INDIC_DIAGONAL 3
166#define wxSTC_INDIC_STRIKE 4
88a8b04e 167#define wxSTC_INDIC_HIDDEN 5
8e54aaed 168#define wxSTC_INDIC_BOX 6
1a2fb4cd
RD
169#define wxSTC_INDIC0_MASK 0x20
170#define wxSTC_INDIC1_MASK 0x40
171#define wxSTC_INDIC2_MASK 0x80
172#define wxSTC_INDICS_MASK 0xE0
4370573a
RD
173
174// PrintColourMode - use same colours as screen.
175#define wxSTC_PRINT_NORMAL 0
176
177// PrintColourMode - invert the light value of each style for printing.
178#define wxSTC_PRINT_INVERTLIGHT 1
179
180// PrintColourMode - force black text on white background for printing.
181#define wxSTC_PRINT_BLACKONWHITE 2
65ec6247
RD
182
183// PrintColourMode - text stays coloured, but all background is forced to be white for printing.
184#define wxSTC_PRINT_COLOURONWHITE 3
185
186// PrintColourMode - only the default-background is forced to be white for printing.
187#define wxSTC_PRINT_COLOURONWHITEDEFAULTBG 4
4370573a
RD
188#define wxSTC_FIND_WHOLEWORD 2
189#define wxSTC_FIND_MATCHCASE 4
190#define wxSTC_FIND_WORDSTART 0x00100000
4370573a 191#define wxSTC_FIND_REGEXP 0x00200000
9e730a78 192#define wxSTC_FIND_POSIX 0x00400000
4370573a
RD
193#define wxSTC_FOLDLEVELBASE 0x400
194#define wxSTC_FOLDLEVELWHITEFLAG 0x1000
195#define wxSTC_FOLDLEVELHEADERFLAG 0x2000
9e730a78
RD
196#define wxSTC_FOLDLEVELBOXHEADERFLAG 0x4000
197#define wxSTC_FOLDLEVELBOXFOOTERFLAG 0x8000
198#define wxSTC_FOLDLEVELCONTRACTED 0x10000
199#define wxSTC_FOLDLEVELUNINDENT 0x20000
4370573a 200#define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF
9e730a78
RD
201#define wxSTC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002
202#define wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004
203#define wxSTC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008
204#define wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010
205#define wxSTC_FOLDFLAG_LEVELNUMBERS 0x0040
206#define wxSTC_FOLDFLAG_BOX 0x0001
65ec6247 207#define wxSTC_TIME_FOREVER 10000000
1a2fb4cd
RD
208#define wxSTC_WRAP_NONE 0
209#define wxSTC_WRAP_WORD 1
1e9bafca 210#define wxSTC_WRAP_CHAR 2
591d01be
RD
211#define wxSTC_WRAPVISUALFLAG_NONE 0x0000
212#define wxSTC_WRAPVISUALFLAG_END 0x0001
213#define wxSTC_WRAPVISUALFLAG_START 0x0002
214#define wxSTC_WRAPVISUALFLAGLOC_DEFAULT 0x0000
215#define wxSTC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001
216#define wxSTC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002
1a2fb4cd
RD
217#define wxSTC_CACHE_NONE 0
218#define wxSTC_CACHE_CARET 1
219#define wxSTC_CACHE_PAGE 2
220#define wxSTC_CACHE_DOCUMENT 3
4370573a
RD
221#define wxSTC_EDGE_NONE 0
222#define wxSTC_EDGE_LINE 1
223#define wxSTC_EDGE_BACKGROUND 2
a834585d 224#define wxSTC_CURSORNORMAL -1
9e730a78 225#define wxSTC_CURSORWAIT 4
4370573a 226
a834585d
RD
227// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy.
228#define wxSTC_VISIBLE_SLOP 0x01
229#define wxSTC_VISIBLE_STRICT 0x04
4370573a 230
a834585d
RD
231// Caret policy, used by SetXCaretPolicy and SetYCaretPolicy.
232// If CARET_SLOP is set, we can define a slop value: caretSlop.
233// This value defines an unwanted zone (UZ) where the caret is... unwanted.
234// This zone is defined as a number of pixels near the vertical margins,
235// and as a number of lines near the horizontal margins.
236// By keeping the caret away from the edges, it is seen within its context,
237// so it is likely that the identifier that the caret is on can be completely seen,
238// and that the current line is seen with some of the lines following it which are
239// often dependent on that line.
240#define wxSTC_CARET_SLOP 0x01
4370573a 241
a834585d
RD
242// If CARET_STRICT is set, the policy is enforced... strictly.
243// The caret is centred on the display if slop is not set,
244// and cannot go in the UZ if slop is set.
4370573a
RD
245#define wxSTC_CARET_STRICT 0x04
246
a834585d
RD
247// If CARET_JUMPS is set, the display is moved more energetically
248// so the caret can move in the same direction longer before the policy is applied again.
249#define wxSTC_CARET_JUMPS 0x10
65ec6247 250
a834585d
RD
251// If CARET_EVEN is not set, instead of having symmetrical UZs,
252// the left and bottom UZs are extended up to right and top UZs respectively.
253// This way, we favour the displaying of useful information: the begining of lines,
254// where most code reside, and the lines after the caret, eg. the body of a function.
255#define wxSTC_CARET_EVEN 0x08
65ec6247 256
8e54aaed
RD
257// Selection modes
258#define wxSTC_SEL_STREAM 0
259#define wxSTC_SEL_RECTANGLE 1
260#define wxSTC_SEL_LINES 2
261
88a8b04e
RD
262// Maximum value of keywordSet parameter of SetKeyWords.
263#define wxSTC_KEYWORDSET_MAX 8
264
4370573a 265// Notifications
a834585d 266// Type of modification and the action which caused the modification.
4370573a
RD
267// These are defined as a bit mask to make it easy to specify which notifications are wanted.
268// One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
269#define wxSTC_MOD_INSERTTEXT 0x1
270#define wxSTC_MOD_DELETETEXT 0x2
271#define wxSTC_MOD_CHANGESTYLE 0x4
272#define wxSTC_MOD_CHANGEFOLD 0x8
273#define wxSTC_PERFORMED_USER 0x10
274#define wxSTC_PERFORMED_UNDO 0x20
275#define wxSTC_PERFORMED_REDO 0x40
1e9bafca 276#define wxSTC_MULTISTEPUNDOREDO 0x80
4370573a
RD
277#define wxSTC_LASTSTEPINUNDOREDO 0x100
278#define wxSTC_MOD_CHANGEMARKER 0x200
279#define wxSTC_MOD_BEFOREINSERT 0x400
280#define wxSTC_MOD_BEFOREDELETE 0x800
1e9bafca
RD
281#define wxSTC_MULTILINEUNDOREDO 0x1000
282#define wxSTC_MODEVENTMASKALL 0x1FFF
4370573a 283
a834585d
RD
284// Symbolic key codes and modifier flags.
285// ASCII and other printable characters below 256.
286// Extended keys above 300.
4370573a
RD
287#define wxSTC_KEY_DOWN 300
288#define wxSTC_KEY_UP 301
289#define wxSTC_KEY_LEFT 302
290#define wxSTC_KEY_RIGHT 303
291#define wxSTC_KEY_HOME 304
292#define wxSTC_KEY_END 305
293#define wxSTC_KEY_PRIOR 306
294#define wxSTC_KEY_NEXT 307
295#define wxSTC_KEY_DELETE 308
296#define wxSTC_KEY_INSERT 309
297#define wxSTC_KEY_ESCAPE 7
298#define wxSTC_KEY_BACK 8
299#define wxSTC_KEY_TAB 9
300#define wxSTC_KEY_RETURN 13
301#define wxSTC_KEY_ADD 310
302#define wxSTC_KEY_SUBTRACT 311
303#define wxSTC_KEY_DIVIDE 312
1e9bafca 304#define wxSTC_SCMOD_NORM 0
4370573a
RD
305#define wxSTC_SCMOD_SHIFT 1
306#define wxSTC_SCMOD_CTRL 2
307#define wxSTC_SCMOD_ALT 4
308
309// For SciLexer.h
310#define wxSTC_LEX_CONTAINER 0
311#define wxSTC_LEX_NULL 1
312#define wxSTC_LEX_PYTHON 2
313#define wxSTC_LEX_CPP 3
314#define wxSTC_LEX_HTML 4
315#define wxSTC_LEX_XML 5
316#define wxSTC_LEX_PERL 6
317#define wxSTC_LEX_SQL 7
318#define wxSTC_LEX_VB 8
319#define wxSTC_LEX_PROPERTIES 9
320#define wxSTC_LEX_ERRORLIST 10
321#define wxSTC_LEX_MAKEFILE 11
322#define wxSTC_LEX_BATCH 12
323#define wxSTC_LEX_XCODE 13
324#define wxSTC_LEX_LATEX 14
325#define wxSTC_LEX_LUA 15
326#define wxSTC_LEX_DIFF 16
65ec6247
RD
327#define wxSTC_LEX_CONF 17
328#define wxSTC_LEX_PASCAL 18
329#define wxSTC_LEX_AVE 19
330#define wxSTC_LEX_ADA 20
331#define wxSTC_LEX_LISP 21
332#define wxSTC_LEX_RUBY 22
333#define wxSTC_LEX_EIFFEL 23
334#define wxSTC_LEX_EIFFELKW 24
335#define wxSTC_LEX_TCL 25
b8b0e402 336#define wxSTC_LEX_NNCRONTAB 26
1a2fb4cd
RD
337#define wxSTC_LEX_BULLANT 27
338#define wxSTC_LEX_VBSCRIPT 28
1a2fb4cd
RD
339#define wxSTC_LEX_BAAN 31
340#define wxSTC_LEX_MATLAB 32
a834585d 341#define wxSTC_LEX_SCRIPTOL 33
9e730a78
RD
342#define wxSTC_LEX_ASM 34
343#define wxSTC_LEX_CPPNOCASE 35
344#define wxSTC_LEX_FORTRAN 36
345#define wxSTC_LEX_F77 37
346#define wxSTC_LEX_CSS 38
347#define wxSTC_LEX_POV 39
e14d10b0
RD
348#define wxSTC_LEX_LOUT 40
349#define wxSTC_LEX_ESCRIPT 41
88a8b04e
RD
350#define wxSTC_LEX_PS 42
351#define wxSTC_LEX_NSIS 43
352#define wxSTC_LEX_MMIXAL 44
8e54aaed
RD
353#define wxSTC_LEX_CLW 45
354#define wxSTC_LEX_CLWNOCASE 46
355#define wxSTC_LEX_LOT 47
356#define wxSTC_LEX_YAML 48
357#define wxSTC_LEX_TEX 49
358#define wxSTC_LEX_METAPOST 50
359#define wxSTC_LEX_POWERBASIC 51
360#define wxSTC_LEX_FORTH 52
361#define wxSTC_LEX_ERLANG 53
362#define wxSTC_LEX_OCTAVE 54
591d01be
RD
363#define wxSTC_LEX_MSSQL 55
364#define wxSTC_LEX_VERILOG 56
365#define wxSTC_LEX_KIX 57
366#define wxSTC_LEX_GUI4CLI 58
367#define wxSTC_LEX_SPECMAN 59
368#define wxSTC_LEX_AU3 60
369#define wxSTC_LEX_APDL 61
370#define wxSTC_LEX_BASH 62
a33203cb
RD
371#define wxSTC_LEX_ASN1 63
372#define wxSTC_LEX_VHDL 64
1e9bafca
RD
373#define wxSTC_LEX_CAML 65
374#define wxSTC_LEX_BLITZBASIC 66
375#define wxSTC_LEX_PUREBASIC 67
376#define wxSTC_LEX_HASKELL 68
377#define wxSTC_LEX_PHPSCRIPT 69
378#define wxSTC_LEX_TADS3 70
379#define wxSTC_LEX_REBOL 71
380#define wxSTC_LEX_SMALLTALK 72
381#define wxSTC_LEX_FLAGSHIP 73
382#define wxSTC_LEX_CSOUND 74
383#define wxSTC_LEX_FREEBASIC 75
65ec6247
RD
384
385// When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
386// value assigned in sequence from SCLEX_AUTOMATIC+1.
387#define wxSTC_LEX_AUTOMATIC 1000
4370573a
RD
388
389// Lexical states for SCLEX_PYTHON
390#define wxSTC_P_DEFAULT 0
391#define wxSTC_P_COMMENTLINE 1
392#define wxSTC_P_NUMBER 2
393#define wxSTC_P_STRING 3
394#define wxSTC_P_CHARACTER 4
395#define wxSTC_P_WORD 5
396#define wxSTC_P_TRIPLE 6
397#define wxSTC_P_TRIPLEDOUBLE 7
398#define wxSTC_P_CLASSNAME 8
399#define wxSTC_P_DEFNAME 9
400#define wxSTC_P_OPERATOR 10
401#define wxSTC_P_IDENTIFIER 11
402#define wxSTC_P_COMMENTBLOCK 12
403#define wxSTC_P_STRINGEOL 13
1e9bafca
RD
404#define wxSTC_P_WORD2 14
405#define wxSTC_P_DECORATOR 15
4370573a 406
1a2fb4cd 407// Lexical states for SCLEX_CPP
4370573a
RD
408#define wxSTC_C_DEFAULT 0
409#define wxSTC_C_COMMENT 1
410#define wxSTC_C_COMMENTLINE 2
411#define wxSTC_C_COMMENTDOC 3
412#define wxSTC_C_NUMBER 4
413#define wxSTC_C_WORD 5
414#define wxSTC_C_STRING 6
415#define wxSTC_C_CHARACTER 7
416#define wxSTC_C_UUID 8
417#define wxSTC_C_PREPROCESSOR 9
418#define wxSTC_C_OPERATOR 10
419#define wxSTC_C_IDENTIFIER 11
420#define wxSTC_C_STRINGEOL 12
421#define wxSTC_C_VERBATIM 13
65ec6247
RD
422#define wxSTC_C_REGEX 14
423#define wxSTC_C_COMMENTLINEDOC 15
424#define wxSTC_C_WORD2 16
b8b0e402
RD
425#define wxSTC_C_COMMENTDOCKEYWORD 17
426#define wxSTC_C_COMMENTDOCKEYWORDERROR 18
e14d10b0 427#define wxSTC_C_GLOBALCLASS 19
4370573a
RD
428
429// Lexical states for SCLEX_HTML, SCLEX_XML
430#define wxSTC_H_DEFAULT 0
431#define wxSTC_H_TAG 1
432#define wxSTC_H_TAGUNKNOWN 2
433#define wxSTC_H_ATTRIBUTE 3
434#define wxSTC_H_ATTRIBUTEUNKNOWN 4
435#define wxSTC_H_NUMBER 5
436#define wxSTC_H_DOUBLESTRING 6
437#define wxSTC_H_SINGLESTRING 7
438#define wxSTC_H_OTHER 8
439#define wxSTC_H_COMMENT 9
440#define wxSTC_H_ENTITY 10
441
442// XML and ASP
443#define wxSTC_H_TAGEND 11
444#define wxSTC_H_XMLSTART 12
445#define wxSTC_H_XMLEND 13
446#define wxSTC_H_SCRIPT 14
447#define wxSTC_H_ASP 15
448#define wxSTC_H_ASPAT 16
449#define wxSTC_H_CDATA 17
450#define wxSTC_H_QUESTION 18
451
452// More HTML
453#define wxSTC_H_VALUE 19
454
65ec6247
RD
455// X-Code
456#define wxSTC_H_XCCOMMENT 20
457
458// SGML
b8b0e402
RD
459#define wxSTC_H_SGML_DEFAULT 21
460#define wxSTC_H_SGML_COMMAND 22
461#define wxSTC_H_SGML_1ST_PARAM 23
462#define wxSTC_H_SGML_DOUBLESTRING 24
463#define wxSTC_H_SGML_SIMPLESTRING 25
464#define wxSTC_H_SGML_ERROR 26
465#define wxSTC_H_SGML_SPECIAL 27
466#define wxSTC_H_SGML_ENTITY 28
467#define wxSTC_H_SGML_COMMENT 29
468#define wxSTC_H_SGML_1ST_PARAM_COMMENT 30
469#define wxSTC_H_SGML_BLOCK_DEFAULT 31
65ec6247 470
4370573a
RD
471// Embedded Javascript
472#define wxSTC_HJ_START 40
473#define wxSTC_HJ_DEFAULT 41
474#define wxSTC_HJ_COMMENT 42
475#define wxSTC_HJ_COMMENTLINE 43
476#define wxSTC_HJ_COMMENTDOC 44
477#define wxSTC_HJ_NUMBER 45
478#define wxSTC_HJ_WORD 46
479#define wxSTC_HJ_KEYWORD 47
480#define wxSTC_HJ_DOUBLESTRING 48
481#define wxSTC_HJ_SINGLESTRING 49
482#define wxSTC_HJ_SYMBOLS 50
483#define wxSTC_HJ_STRINGEOL 51
65ec6247 484#define wxSTC_HJ_REGEX 52
4370573a
RD
485
486// ASP Javascript
487#define wxSTC_HJA_START 55
488#define wxSTC_HJA_DEFAULT 56
489#define wxSTC_HJA_COMMENT 57
490#define wxSTC_HJA_COMMENTLINE 58
491#define wxSTC_HJA_COMMENTDOC 59
492#define wxSTC_HJA_NUMBER 60
493#define wxSTC_HJA_WORD 61
494#define wxSTC_HJA_KEYWORD 62
495#define wxSTC_HJA_DOUBLESTRING 63
496#define wxSTC_HJA_SINGLESTRING 64
497#define wxSTC_HJA_SYMBOLS 65
498#define wxSTC_HJA_STRINGEOL 66
65ec6247 499#define wxSTC_HJA_REGEX 67
4370573a
RD
500
501// Embedded VBScript
502#define wxSTC_HB_START 70
503#define wxSTC_HB_DEFAULT 71
504#define wxSTC_HB_COMMENTLINE 72
505#define wxSTC_HB_NUMBER 73
506#define wxSTC_HB_WORD 74
507#define wxSTC_HB_STRING 75
508#define wxSTC_HB_IDENTIFIER 76
509#define wxSTC_HB_STRINGEOL 77
510
511// ASP VBScript
512#define wxSTC_HBA_START 80
513#define wxSTC_HBA_DEFAULT 81
514#define wxSTC_HBA_COMMENTLINE 82
515#define wxSTC_HBA_NUMBER 83
516#define wxSTC_HBA_WORD 84
517#define wxSTC_HBA_STRING 85
518#define wxSTC_HBA_IDENTIFIER 86
519#define wxSTC_HBA_STRINGEOL 87
520
521// Embedded Python
522#define wxSTC_HP_START 90
523#define wxSTC_HP_DEFAULT 91
524#define wxSTC_HP_COMMENTLINE 92
525#define wxSTC_HP_NUMBER 93
526#define wxSTC_HP_STRING 94
527#define wxSTC_HP_CHARACTER 95
528#define wxSTC_HP_WORD 96
529#define wxSTC_HP_TRIPLE 97
530#define wxSTC_HP_TRIPLEDOUBLE 98
531#define wxSTC_HP_CLASSNAME 99
532#define wxSTC_HP_DEFNAME 100
533#define wxSTC_HP_OPERATOR 101
534#define wxSTC_HP_IDENTIFIER 102
535
591d01be
RD
536// PHP
537#define wxSTC_HPHP_COMPLEX_VARIABLE 104
538
4370573a
RD
539// ASP Python
540#define wxSTC_HPA_START 105
541#define wxSTC_HPA_DEFAULT 106
542#define wxSTC_HPA_COMMENTLINE 107
543#define wxSTC_HPA_NUMBER 108
544#define wxSTC_HPA_STRING 109
545#define wxSTC_HPA_CHARACTER 110
546#define wxSTC_HPA_WORD 111
547#define wxSTC_HPA_TRIPLE 112
548#define wxSTC_HPA_TRIPLEDOUBLE 113
549#define wxSTC_HPA_CLASSNAME 114
550#define wxSTC_HPA_DEFNAME 115
551#define wxSTC_HPA_OPERATOR 116
552#define wxSTC_HPA_IDENTIFIER 117
553
554// PHP
555#define wxSTC_HPHP_DEFAULT 118
556#define wxSTC_HPHP_HSTRING 119
557#define wxSTC_HPHP_SIMPLESTRING 120
558#define wxSTC_HPHP_WORD 121
559#define wxSTC_HPHP_NUMBER 122
560#define wxSTC_HPHP_VARIABLE 123
561#define wxSTC_HPHP_COMMENT 124
562#define wxSTC_HPHP_COMMENTLINE 125
65ec6247
RD
563#define wxSTC_HPHP_HSTRING_VARIABLE 126
564#define wxSTC_HPHP_OPERATOR 127
4370573a
RD
565
566// Lexical states for SCLEX_PERL
567#define wxSTC_PL_DEFAULT 0
65ec6247 568#define wxSTC_PL_ERROR 1
4370573a
RD
569#define wxSTC_PL_COMMENTLINE 2
570#define wxSTC_PL_POD 3
571#define wxSTC_PL_NUMBER 4
572#define wxSTC_PL_WORD 5
573#define wxSTC_PL_STRING 6
574#define wxSTC_PL_CHARACTER 7
575#define wxSTC_PL_PUNCTUATION 8
576#define wxSTC_PL_PREPROCESSOR 9
577#define wxSTC_PL_OPERATOR 10
578#define wxSTC_PL_IDENTIFIER 11
579#define wxSTC_PL_SCALAR 12
580#define wxSTC_PL_ARRAY 13
581#define wxSTC_PL_HASH 14
582#define wxSTC_PL_SYMBOLTABLE 15
1e9bafca 583#define wxSTC_PL_VARIABLE_INDEXER 16
4370573a
RD
584#define wxSTC_PL_REGEX 17
585#define wxSTC_PL_REGSUBST 18
586#define wxSTC_PL_LONGQUOTE 19
587#define wxSTC_PL_BACKTICKS 20
588#define wxSTC_PL_DATASECTION 21
65ec6247
RD
589#define wxSTC_PL_HERE_DELIM 22
590#define wxSTC_PL_HERE_Q 23
591#define wxSTC_PL_HERE_QQ 24
592#define wxSTC_PL_HERE_QX 25
593#define wxSTC_PL_STRING_Q 26
594#define wxSTC_PL_STRING_QQ 27
595#define wxSTC_PL_STRING_QX 28
596#define wxSTC_PL_STRING_QR 29
597#define wxSTC_PL_STRING_QW 30
1e9bafca
RD
598#define wxSTC_PL_POD_VERB 31
599
600// Lexical states for SCLEX_RUBY
601#define wxSTC_RB_DEFAULT 0
602#define wxSTC_RB_ERROR 1
603#define wxSTC_RB_COMMENTLINE 2
604#define wxSTC_RB_POD 3
605#define wxSTC_RB_NUMBER 4
606#define wxSTC_RB_WORD 5
607#define wxSTC_RB_STRING 6
608#define wxSTC_RB_CHARACTER 7
609#define wxSTC_RB_CLASSNAME 8
610#define wxSTC_RB_DEFNAME 9
611#define wxSTC_RB_OPERATOR 10
612#define wxSTC_RB_IDENTIFIER 11
613#define wxSTC_RB_REGEX 12
614#define wxSTC_RB_GLOBAL 13
615#define wxSTC_RB_SYMBOL 14
616#define wxSTC_RB_MODULE_NAME 15
617#define wxSTC_RB_INSTANCE_VAR 16
618#define wxSTC_RB_CLASS_VAR 17
619#define wxSTC_RB_BACKTICKS 18
620#define wxSTC_RB_DATASECTION 19
621#define wxSTC_RB_HERE_DELIM 20
622#define wxSTC_RB_HERE_Q 21
623#define wxSTC_RB_HERE_QQ 22
624#define wxSTC_RB_HERE_QX 23
625#define wxSTC_RB_STRING_Q 24
626#define wxSTC_RB_STRING_QQ 25
627#define wxSTC_RB_STRING_QX 26
628#define wxSTC_RB_STRING_QR 27
629#define wxSTC_RB_STRING_QW 28
630#define wxSTC_RB_WORD_DEMOTED 29
631#define wxSTC_RB_STDIN 30
632#define wxSTC_RB_STDOUT 31
633#define wxSTC_RB_STDERR 40
634#define wxSTC_RB_UPPER_BOUND 41
4370573a 635
8e54aaed 636// Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC
a834585d
RD
637#define wxSTC_B_DEFAULT 0
638#define wxSTC_B_COMMENT 1
639#define wxSTC_B_NUMBER 2
640#define wxSTC_B_KEYWORD 3
641#define wxSTC_B_STRING 4
642#define wxSTC_B_PREPROCESSOR 5
643#define wxSTC_B_OPERATOR 6
644#define wxSTC_B_IDENTIFIER 7
645#define wxSTC_B_DATE 8
8e54aaed
RD
646#define wxSTC_B_STRINGEOL 9
647#define wxSTC_B_KEYWORD2 10
648#define wxSTC_B_KEYWORD3 11
649#define wxSTC_B_KEYWORD4 12
591d01be
RD
650#define wxSTC_B_CONSTANT 13
651#define wxSTC_B_ASM 14
1e9bafca
RD
652#define wxSTC_B_LABEL 15
653#define wxSTC_B_ERROR 16
654#define wxSTC_B_HEXNUMBER 17
655#define wxSTC_B_BINNUMBER 18
a834585d
RD
656
657// Lexical states for SCLEX_PROPERTIES
658#define wxSTC_PROPS_DEFAULT 0
659#define wxSTC_PROPS_COMMENT 1
660#define wxSTC_PROPS_SECTION 2
661#define wxSTC_PROPS_ASSIGNMENT 3
662#define wxSTC_PROPS_DEFVAL 4
663
4370573a
RD
664// Lexical states for SCLEX_LATEX
665#define wxSTC_L_DEFAULT 0
666#define wxSTC_L_COMMAND 1
667#define wxSTC_L_TAG 2
668#define wxSTC_L_MATH 3
669#define wxSTC_L_COMMENT 4
670
671// Lexical states for SCLEX_LUA
672#define wxSTC_LUA_DEFAULT 0
673#define wxSTC_LUA_COMMENT 1
674#define wxSTC_LUA_COMMENTLINE 2
675#define wxSTC_LUA_COMMENTDOC 3
676#define wxSTC_LUA_NUMBER 4
677#define wxSTC_LUA_WORD 5
678#define wxSTC_LUA_STRING 6
679#define wxSTC_LUA_CHARACTER 7
680#define wxSTC_LUA_LITERALSTRING 8
681#define wxSTC_LUA_PREPROCESSOR 9
682#define wxSTC_LUA_OPERATOR 10
683#define wxSTC_LUA_IDENTIFIER 11
684#define wxSTC_LUA_STRINGEOL 12
1a2fb4cd
RD
685#define wxSTC_LUA_WORD2 13
686#define wxSTC_LUA_WORD3 14
687#define wxSTC_LUA_WORD4 15
688#define wxSTC_LUA_WORD5 16
689#define wxSTC_LUA_WORD6 17
88a8b04e
RD
690#define wxSTC_LUA_WORD7 18
691#define wxSTC_LUA_WORD8 19
65ec6247
RD
692
693// Lexical states for SCLEX_ERRORLIST
4370573a
RD
694#define wxSTC_ERR_DEFAULT 0
695#define wxSTC_ERR_PYTHON 1
696#define wxSTC_ERR_GCC 2
697#define wxSTC_ERR_MS 3
698#define wxSTC_ERR_CMD 4
699#define wxSTC_ERR_BORLAND 5
700#define wxSTC_ERR_PERL 6
65ec6247
RD
701#define wxSTC_ERR_NET 7
702#define wxSTC_ERR_LUA 8
a834585d 703#define wxSTC_ERR_CTAG 9
65ec6247
RD
704#define wxSTC_ERR_DIFF_CHANGED 10
705#define wxSTC_ERR_DIFF_ADDITION 11
706#define wxSTC_ERR_DIFF_DELETION 12
707#define wxSTC_ERR_DIFF_MESSAGE 13
9e730a78
RD
708#define wxSTC_ERR_PHP 14
709#define wxSTC_ERR_ELF 15
710#define wxSTC_ERR_IFC 16
8e54aaed
RD
711#define wxSTC_ERR_IFORT 17
712#define wxSTC_ERR_ABSF 18
591d01be 713#define wxSTC_ERR_TIDY 19
a33203cb 714#define wxSTC_ERR_JAVA_STACK 20
65ec6247
RD
715
716// Lexical states for SCLEX_BATCH
717#define wxSTC_BAT_DEFAULT 0
718#define wxSTC_BAT_COMMENT 1
719#define wxSTC_BAT_WORD 2
720#define wxSTC_BAT_LABEL 3
721#define wxSTC_BAT_HIDE 4
722#define wxSTC_BAT_COMMAND 5
723#define wxSTC_BAT_IDENTIFIER 6
724#define wxSTC_BAT_OPERATOR 7
725
726// Lexical states for SCLEX_MAKEFILE
727#define wxSTC_MAKE_DEFAULT 0
728#define wxSTC_MAKE_COMMENT 1
729#define wxSTC_MAKE_PREPROCESSOR 2
730#define wxSTC_MAKE_IDENTIFIER 3
731#define wxSTC_MAKE_OPERATOR 4
732#define wxSTC_MAKE_TARGET 5
733#define wxSTC_MAKE_IDEOL 9
734
a834585d
RD
735// Lexical states for SCLEX_DIFF
736#define wxSTC_DIFF_DEFAULT 0
737#define wxSTC_DIFF_COMMENT 1
738#define wxSTC_DIFF_COMMAND 2
739#define wxSTC_DIFF_HEADER 3
740#define wxSTC_DIFF_POSITION 4
741#define wxSTC_DIFF_DELETED 5
742#define wxSTC_DIFF_ADDED 6
743
744// Lexical states for SCLEX_CONF (Apache Configuration Files Lexer)
65ec6247
RD
745#define wxSTC_CONF_DEFAULT 0
746#define wxSTC_CONF_COMMENT 1
747#define wxSTC_CONF_NUMBER 2
748#define wxSTC_CONF_IDENTIFIER 3
749#define wxSTC_CONF_EXTENSION 4
750#define wxSTC_CONF_PARAMETER 5
751#define wxSTC_CONF_STRING 6
752#define wxSTC_CONF_OPERATOR 7
753#define wxSTC_CONF_IP 8
754#define wxSTC_CONF_DIRECTIVE 9
755
a834585d 756// Lexical states for SCLEX_AVE, Avenue
65ec6247
RD
757#define wxSTC_AVE_DEFAULT 0
758#define wxSTC_AVE_COMMENT 1
759#define wxSTC_AVE_NUMBER 2
760#define wxSTC_AVE_WORD 3
65ec6247
RD
761#define wxSTC_AVE_STRING 6
762#define wxSTC_AVE_ENUM 7
763#define wxSTC_AVE_STRINGEOL 8
764#define wxSTC_AVE_IDENTIFIER 9
765#define wxSTC_AVE_OPERATOR 10
9e730a78
RD
766#define wxSTC_AVE_WORD1 11
767#define wxSTC_AVE_WORD2 12
768#define wxSTC_AVE_WORD3 13
769#define wxSTC_AVE_WORD4 14
770#define wxSTC_AVE_WORD5 15
771#define wxSTC_AVE_WORD6 16
65ec6247
RD
772
773// Lexical states for SCLEX_ADA
774#define wxSTC_ADA_DEFAULT 0
9e730a78
RD
775#define wxSTC_ADA_WORD 1
776#define wxSTC_ADA_IDENTIFIER 2
777#define wxSTC_ADA_NUMBER 3
778#define wxSTC_ADA_DELIMITER 4
65ec6247 779#define wxSTC_ADA_CHARACTER 5
9e730a78
RD
780#define wxSTC_ADA_CHARACTEREOL 6
781#define wxSTC_ADA_STRING 7
65ec6247 782#define wxSTC_ADA_STRINGEOL 8
9e730a78
RD
783#define wxSTC_ADA_LABEL 9
784#define wxSTC_ADA_COMMENTLINE 10
785#define wxSTC_ADA_ILLEGAL 11
65ec6247 786
1a2fb4cd
RD
787// Lexical states for SCLEX_BAAN
788#define wxSTC_BAAN_DEFAULT 0
789#define wxSTC_BAAN_COMMENT 1
790#define wxSTC_BAAN_COMMENTDOC 2
791#define wxSTC_BAAN_NUMBER 3
792#define wxSTC_BAAN_WORD 4
793#define wxSTC_BAAN_STRING 5
794#define wxSTC_BAAN_PREPROCESSOR 6
795#define wxSTC_BAAN_OPERATOR 7
796#define wxSTC_BAAN_IDENTIFIER 8
797#define wxSTC_BAAN_STRINGEOL 9
798#define wxSTC_BAAN_WORD2 10
799
65ec6247
RD
800// Lexical states for SCLEX_LISP
801#define wxSTC_LISP_DEFAULT 0
802#define wxSTC_LISP_COMMENT 1
803#define wxSTC_LISP_NUMBER 2
804#define wxSTC_LISP_KEYWORD 3
1e9bafca
RD
805#define wxSTC_LISP_KEYWORD_KW 4
806#define wxSTC_LISP_SYMBOL 5
65ec6247
RD
807#define wxSTC_LISP_STRING 6
808#define wxSTC_LISP_STRINGEOL 8
809#define wxSTC_LISP_IDENTIFIER 9
810#define wxSTC_LISP_OPERATOR 10
1e9bafca
RD
811#define wxSTC_LISP_SPECIAL 11
812#define wxSTC_LISP_MULTI_COMMENT 12
65ec6247
RD
813
814// Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
815#define wxSTC_EIFFEL_DEFAULT 0
816#define wxSTC_EIFFEL_COMMENTLINE 1
817#define wxSTC_EIFFEL_NUMBER 2
818#define wxSTC_EIFFEL_WORD 3
819#define wxSTC_EIFFEL_STRING 4
820#define wxSTC_EIFFEL_CHARACTER 5
821#define wxSTC_EIFFEL_OPERATOR 6
822#define wxSTC_EIFFEL_IDENTIFIER 7
823#define wxSTC_EIFFEL_STRINGEOL 8
4370573a 824
a834585d 825// Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer)
b8b0e402
RD
826#define wxSTC_NNCRONTAB_DEFAULT 0
827#define wxSTC_NNCRONTAB_COMMENT 1
828#define wxSTC_NNCRONTAB_TASK 2
829#define wxSTC_NNCRONTAB_SECTION 3
830#define wxSTC_NNCRONTAB_KEYWORD 4
831#define wxSTC_NNCRONTAB_MODIFIER 5
832#define wxSTC_NNCRONTAB_ASTERISK 6
833#define wxSTC_NNCRONTAB_NUMBER 7
834#define wxSTC_NNCRONTAB_STRING 8
835#define wxSTC_NNCRONTAB_ENVIRONMENT 9
836#define wxSTC_NNCRONTAB_IDENTIFIER 10
837
8e54aaed
RD
838// Lexical states for SCLEX_FORTH (Forth Lexer)
839#define wxSTC_FORTH_DEFAULT 0
840#define wxSTC_FORTH_COMMENT 1
841#define wxSTC_FORTH_COMMENT_ML 2
842#define wxSTC_FORTH_IDENTIFIER 3
843#define wxSTC_FORTH_CONTROL 4
844#define wxSTC_FORTH_KEYWORD 5
845#define wxSTC_FORTH_DEFWORD 6
846#define wxSTC_FORTH_PREWORD1 7
847#define wxSTC_FORTH_PREWORD2 8
848#define wxSTC_FORTH_NUMBER 9
849#define wxSTC_FORTH_STRING 10
850#define wxSTC_FORTH_LOCALE 11
851
1a2fb4cd
RD
852// Lexical states for SCLEX_MATLAB
853#define wxSTC_MATLAB_DEFAULT 0
854#define wxSTC_MATLAB_COMMENT 1
855#define wxSTC_MATLAB_COMMAND 2
856#define wxSTC_MATLAB_NUMBER 3
857#define wxSTC_MATLAB_KEYWORD 4
8e54aaed
RD
858
859// single quoted string
1a2fb4cd
RD
860#define wxSTC_MATLAB_STRING 5
861#define wxSTC_MATLAB_OPERATOR 6
862#define wxSTC_MATLAB_IDENTIFIER 7
8e54aaed 863#define wxSTC_MATLAB_DOUBLEQUOTESTRING 8
9ce192d4 864
a834585d
RD
865// Lexical states for SCLEX_SCRIPTOL
866#define wxSTC_SCRIPTOL_DEFAULT 0
8e54aaed 867#define wxSTC_SCRIPTOL_WHITE 1
a834585d 868#define wxSTC_SCRIPTOL_COMMENTLINE 2
8e54aaed
RD
869#define wxSTC_SCRIPTOL_PERSISTENT 3
870#define wxSTC_SCRIPTOL_CSTYLE 4
871#define wxSTC_SCRIPTOL_COMMENTBLOCK 5
872#define wxSTC_SCRIPTOL_NUMBER 6
873#define wxSTC_SCRIPTOL_STRING 7
874#define wxSTC_SCRIPTOL_CHARACTER 8
875#define wxSTC_SCRIPTOL_STRINGEOL 9
876#define wxSTC_SCRIPTOL_KEYWORD 10
877#define wxSTC_SCRIPTOL_OPERATOR 11
878#define wxSTC_SCRIPTOL_IDENTIFIER 12
879#define wxSTC_SCRIPTOL_TRIPLE 13
880#define wxSTC_SCRIPTOL_CLASSNAME 14
881#define wxSTC_SCRIPTOL_PREPROCESSOR 15
a834585d 882
9e730a78
RD
883// Lexical states for SCLEX_ASM
884#define wxSTC_ASM_DEFAULT 0
885#define wxSTC_ASM_COMMENT 1
886#define wxSTC_ASM_NUMBER 2
887#define wxSTC_ASM_STRING 3
888#define wxSTC_ASM_OPERATOR 4
889#define wxSTC_ASM_IDENTIFIER 5
890#define wxSTC_ASM_CPUINSTRUCTION 6
891#define wxSTC_ASM_MATHINSTRUCTION 7
892#define wxSTC_ASM_REGISTER 8
893#define wxSTC_ASM_DIRECTIVE 9
894#define wxSTC_ASM_DIRECTIVEOPERAND 10
8e54aaed
RD
895#define wxSTC_ASM_COMMENTBLOCK 11
896#define wxSTC_ASM_CHARACTER 12
897#define wxSTC_ASM_STRINGEOL 13
898#define wxSTC_ASM_EXTINSTRUCTION 14
9e730a78
RD
899
900// Lexical states for SCLEX_FORTRAN
901#define wxSTC_F_DEFAULT 0
902#define wxSTC_F_COMMENT 1
903#define wxSTC_F_NUMBER 2
904#define wxSTC_F_STRING1 3
905#define wxSTC_F_STRING2 4
906#define wxSTC_F_STRINGEOL 5
907#define wxSTC_F_OPERATOR 6
908#define wxSTC_F_IDENTIFIER 7
909#define wxSTC_F_WORD 8
910#define wxSTC_F_WORD2 9
911#define wxSTC_F_WORD3 10
912#define wxSTC_F_PREPROCESSOR 11
913#define wxSTC_F_OPERATOR2 12
914#define wxSTC_F_LABEL 13
915#define wxSTC_F_CONTINUATION 14
916
917// Lexical states for SCLEX_CSS
918#define wxSTC_CSS_DEFAULT 0
919#define wxSTC_CSS_TAG 1
920#define wxSTC_CSS_CLASS 2
921#define wxSTC_CSS_PSEUDOCLASS 3
922#define wxSTC_CSS_UNKNOWN_PSEUDOCLASS 4
923#define wxSTC_CSS_OPERATOR 5
924#define wxSTC_CSS_IDENTIFIER 6
925#define wxSTC_CSS_UNKNOWN_IDENTIFIER 7
926#define wxSTC_CSS_VALUE 8
927#define wxSTC_CSS_COMMENT 9
928#define wxSTC_CSS_ID 10
929#define wxSTC_CSS_IMPORTANT 11
930#define wxSTC_CSS_DIRECTIVE 12
931#define wxSTC_CSS_DOUBLESTRING 13
932#define wxSTC_CSS_SINGLESTRING 14
a33203cb 933#define wxSTC_CSS_IDENTIFIER2 15
1e9bafca 934#define wxSTC_CSS_ATTRIBUTE 16
9e730a78
RD
935
936// Lexical states for SCLEX_POV
937#define wxSTC_POV_DEFAULT 0
938#define wxSTC_POV_COMMENT 1
939#define wxSTC_POV_COMMENTLINE 2
88a8b04e
RD
940#define wxSTC_POV_NUMBER 3
941#define wxSTC_POV_OPERATOR 4
942#define wxSTC_POV_IDENTIFIER 5
9e730a78 943#define wxSTC_POV_STRING 6
88a8b04e
RD
944#define wxSTC_POV_STRINGEOL 7
945#define wxSTC_POV_DIRECTIVE 8
946#define wxSTC_POV_BADDIRECTIVE 9
9e730a78 947#define wxSTC_POV_WORD2 10
88a8b04e
RD
948#define wxSTC_POV_WORD3 11
949#define wxSTC_POV_WORD4 12
950#define wxSTC_POV_WORD5 13
951#define wxSTC_POV_WORD6 14
952#define wxSTC_POV_WORD7 15
953#define wxSTC_POV_WORD8 16
9e730a78 954
e14d10b0
RD
955// Lexical states for SCLEX_LOUT
956#define wxSTC_LOUT_DEFAULT 0
957#define wxSTC_LOUT_COMMENT 1
958#define wxSTC_LOUT_NUMBER 2
959#define wxSTC_LOUT_WORD 3
960#define wxSTC_LOUT_WORD2 4
961#define wxSTC_LOUT_WORD3 5
962#define wxSTC_LOUT_WORD4 6
963#define wxSTC_LOUT_STRING 7
964#define wxSTC_LOUT_OPERATOR 8
965#define wxSTC_LOUT_IDENTIFIER 9
966#define wxSTC_LOUT_STRINGEOL 10
967
968// Lexical states for SCLEX_ESCRIPT
969#define wxSTC_ESCRIPT_DEFAULT 0
970#define wxSTC_ESCRIPT_COMMENT 1
971#define wxSTC_ESCRIPT_COMMENTLINE 2
972#define wxSTC_ESCRIPT_COMMENTDOC 3
973#define wxSTC_ESCRIPT_NUMBER 4
974#define wxSTC_ESCRIPT_WORD 5
975#define wxSTC_ESCRIPT_STRING 6
976#define wxSTC_ESCRIPT_OPERATOR 7
977#define wxSTC_ESCRIPT_IDENTIFIER 8
978#define wxSTC_ESCRIPT_BRACE 9
979#define wxSTC_ESCRIPT_WORD2 10
980#define wxSTC_ESCRIPT_WORD3 11
981
88a8b04e
RD
982// Lexical states for SCLEX_PS
983#define wxSTC_PS_DEFAULT 0
984#define wxSTC_PS_COMMENT 1
985#define wxSTC_PS_DSC_COMMENT 2
986#define wxSTC_PS_DSC_VALUE 3
987#define wxSTC_PS_NUMBER 4
988#define wxSTC_PS_NAME 5
989#define wxSTC_PS_KEYWORD 6
990#define wxSTC_PS_LITERAL 7
991#define wxSTC_PS_IMMEVAL 8
992#define wxSTC_PS_PAREN_ARRAY 9
993#define wxSTC_PS_PAREN_DICT 10
994#define wxSTC_PS_PAREN_PROC 11
995#define wxSTC_PS_TEXT 12
996#define wxSTC_PS_HEXSTRING 13
997#define wxSTC_PS_BASE85STRING 14
998#define wxSTC_PS_BADSTRINGCHAR 15
999
1000// Lexical states for SCLEX_NSIS
1001#define wxSTC_NSIS_DEFAULT 0
1002#define wxSTC_NSIS_COMMENT 1
1003#define wxSTC_NSIS_STRINGDQ 2
1004#define wxSTC_NSIS_STRINGLQ 3
1005#define wxSTC_NSIS_STRINGRQ 4
1006#define wxSTC_NSIS_FUNCTION 5
1007#define wxSTC_NSIS_VARIABLE 6
1008#define wxSTC_NSIS_LABEL 7
1009#define wxSTC_NSIS_USERDEFINED 8
1010#define wxSTC_NSIS_SECTIONDEF 9
1011#define wxSTC_NSIS_SUBSECTIONDEF 10
1012#define wxSTC_NSIS_IFDEFINEDEF 11
1013#define wxSTC_NSIS_MACRODEF 12
1014#define wxSTC_NSIS_STRINGVAR 13
591d01be 1015#define wxSTC_NSIS_NUMBER 14
1e9bafca
RD
1016#define wxSTC_NSIS_SECTIONGROUP 15
1017#define wxSTC_NSIS_PAGEEX 16
1018#define wxSTC_NSIS_FUNCTIONDEF 17
1019#define wxSTC_NSIS_COMMENTBOX 18
88a8b04e
RD
1020
1021// Lexical states for SCLEX_MMIXAL
1022#define wxSTC_MMIXAL_LEADWS 0
1023#define wxSTC_MMIXAL_COMMENT 1
1024#define wxSTC_MMIXAL_LABEL 2
1025#define wxSTC_MMIXAL_OPCODE 3
1026#define wxSTC_MMIXAL_OPCODE_PRE 4
1027#define wxSTC_MMIXAL_OPCODE_VALID 5
1028#define wxSTC_MMIXAL_OPCODE_UNKNOWN 6
1029#define wxSTC_MMIXAL_OPCODE_POST 7
1030#define wxSTC_MMIXAL_OPERANDS 8
1031#define wxSTC_MMIXAL_NUMBER 9
1032#define wxSTC_MMIXAL_REF 10
1033#define wxSTC_MMIXAL_CHAR 11
1034#define wxSTC_MMIXAL_STRING 12
1035#define wxSTC_MMIXAL_REGISTER 13
1036#define wxSTC_MMIXAL_HEX 14
1037#define wxSTC_MMIXAL_OPERATOR 15
1038#define wxSTC_MMIXAL_SYMBOL 16
1039#define wxSTC_MMIXAL_INCLUDE 17
1040
8e54aaed
RD
1041// Lexical states for SCLEX_CLW
1042#define wxSTC_CLW_DEFAULT 0
1043#define wxSTC_CLW_LABEL 1
1044#define wxSTC_CLW_COMMENT 2
1045#define wxSTC_CLW_STRING 3
1046#define wxSTC_CLW_USER_IDENTIFIER 4
1047#define wxSTC_CLW_INTEGER_CONSTANT 5
1048#define wxSTC_CLW_REAL_CONSTANT 6
1049#define wxSTC_CLW_PICTURE_STRING 7
1050#define wxSTC_CLW_KEYWORD 8
1051#define wxSTC_CLW_COMPILER_DIRECTIVE 9
1e9bafca
RD
1052#define wxSTC_CLW_RUNTIME_EXPRESSIONS 10
1053#define wxSTC_CLW_BUILTIN_PROCEDURES_FUNCTION 11
1054#define wxSTC_CLW_STRUCTURE_DATA_TYPE 12
1055#define wxSTC_CLW_ATTRIBUTE 13
1056#define wxSTC_CLW_STANDARD_EQUATE 14
1057#define wxSTC_CLW_ERROR 15
1058#define wxSTC_CLW_DEPRECATED 16
8e54aaed
RD
1059
1060// Lexical states for SCLEX_LOT
1061#define wxSTC_LOT_DEFAULT 0
1062#define wxSTC_LOT_HEADER 1
1063#define wxSTC_LOT_BREAK 2
1064#define wxSTC_LOT_SET 3
1065#define wxSTC_LOT_PASS 4
1066#define wxSTC_LOT_FAIL 5
1067#define wxSTC_LOT_ABORT 6
1068
1069// Lexical states for SCLEX_YAML
1070#define wxSTC_YAML_DEFAULT 0
1071#define wxSTC_YAML_COMMENT 1
1072#define wxSTC_YAML_IDENTIFIER 2
1073#define wxSTC_YAML_KEYWORD 3
1074#define wxSTC_YAML_NUMBER 4
1075#define wxSTC_YAML_REFERENCE 5
1076#define wxSTC_YAML_DOCUMENT 6
1077#define wxSTC_YAML_TEXT 7
1078#define wxSTC_YAML_ERROR 8
1079
1080// Lexical states for SCLEX_TEX
1081#define wxSTC_TEX_DEFAULT 0
1082#define wxSTC_TEX_SPECIAL 1
1083#define wxSTC_TEX_GROUP 2
1084#define wxSTC_TEX_SYMBOL 3
1085#define wxSTC_TEX_COMMAND 4
1086#define wxSTC_TEX_TEXT 5
1087#define wxSTC_METAPOST_DEFAULT 0
1088#define wxSTC_METAPOST_SPECIAL 1
1089#define wxSTC_METAPOST_GROUP 2
1090#define wxSTC_METAPOST_SYMBOL 3
1091#define wxSTC_METAPOST_COMMAND 4
1092#define wxSTC_METAPOST_TEXT 5
1093#define wxSTC_METAPOST_EXTRA 6
1094
1095// Lexical states for SCLEX_ERLANG
1096#define wxSTC_ERLANG_DEFAULT 0
1097#define wxSTC_ERLANG_COMMENT 1
1098#define wxSTC_ERLANG_VARIABLE 2
1099#define wxSTC_ERLANG_NUMBER 3
1100#define wxSTC_ERLANG_KEYWORD 4
1101#define wxSTC_ERLANG_STRING 5
1102#define wxSTC_ERLANG_OPERATOR 6
1103#define wxSTC_ERLANG_ATOM 7
1104#define wxSTC_ERLANG_FUNCTION_NAME 8
1105#define wxSTC_ERLANG_CHARACTER 9
1106#define wxSTC_ERLANG_MACRO 10
1107#define wxSTC_ERLANG_RECORD 11
1108#define wxSTC_ERLANG_SEPARATOR 12
1109#define wxSTC_ERLANG_NODE_NAME 13
1110#define wxSTC_ERLANG_UNKNOWN 31
1111
591d01be
RD
1112// Lexical states for SCLEX_OCTAVE are identical to MatLab
1113// Lexical states for SCLEX_MSSQL
1114#define wxSTC_MSSQL_DEFAULT 0
1115#define wxSTC_MSSQL_COMMENT 1
1116#define wxSTC_MSSQL_LINE_COMMENT 2
1117#define wxSTC_MSSQL_NUMBER 3
1118#define wxSTC_MSSQL_STRING 4
1119#define wxSTC_MSSQL_OPERATOR 5
1120#define wxSTC_MSSQL_IDENTIFIER 6
1121#define wxSTC_MSSQL_VARIABLE 7
1122#define wxSTC_MSSQL_COLUMN_NAME 8
1123#define wxSTC_MSSQL_STATEMENT 9
1124#define wxSTC_MSSQL_DATATYPE 10
1125#define wxSTC_MSSQL_SYSTABLE 11
1126#define wxSTC_MSSQL_GLOBAL_VARIABLE 12
1127#define wxSTC_MSSQL_FUNCTION 13
1128#define wxSTC_MSSQL_STORED_PROCEDURE 14
1129#define wxSTC_MSSQL_DEFAULT_PREF_DATATYPE 15
1130#define wxSTC_MSSQL_COLUMN_NAME_2 16
1131
1132// Lexical states for SCLEX_VERILOG
1133#define wxSTC_V_DEFAULT 0
1134#define wxSTC_V_COMMENT 1
1135#define wxSTC_V_COMMENTLINE 2
1136#define wxSTC_V_COMMENTLINEBANG 3
1137#define wxSTC_V_NUMBER 4
1138#define wxSTC_V_WORD 5
1139#define wxSTC_V_STRING 6
1140#define wxSTC_V_WORD2 7
1141#define wxSTC_V_WORD3 8
1142#define wxSTC_V_PREPROCESSOR 9
1143#define wxSTC_V_OPERATOR 10
1144#define wxSTC_V_IDENTIFIER 11
1145#define wxSTC_V_STRINGEOL 12
1146#define wxSTC_V_USER 19
1147
1148// Lexical states for SCLEX_KIX
1149#define wxSTC_KIX_DEFAULT 0
1150#define wxSTC_KIX_COMMENT 1
1151#define wxSTC_KIX_STRING1 2
1152#define wxSTC_KIX_STRING2 3
1153#define wxSTC_KIX_NUMBER 4
1154#define wxSTC_KIX_VAR 5
1155#define wxSTC_KIX_MACRO 6
1156#define wxSTC_KIX_KEYWORD 7
1157#define wxSTC_KIX_FUNCTIONS 8
1158#define wxSTC_KIX_OPERATOR 9
1159#define wxSTC_KIX_IDENTIFIER 31
1160
1161// Lexical states for SCLEX_GUI4CLI
1162#define wxSTC_GC_DEFAULT 0
1163#define wxSTC_GC_COMMENTLINE 1
1164#define wxSTC_GC_COMMENTBLOCK 2
1165#define wxSTC_GC_GLOBAL 3
1166#define wxSTC_GC_EVENT 4
1167#define wxSTC_GC_ATTRIBUTE 5
1168#define wxSTC_GC_CONTROL 6
1169#define wxSTC_GC_COMMAND 7
1170#define wxSTC_GC_STRING 8
1171#define wxSTC_GC_OPERATOR 9
1172
1173// Lexical states for SCLEX_SPECMAN
1174#define wxSTC_SN_DEFAULT 0
1175#define wxSTC_SN_CODE 1
1176#define wxSTC_SN_COMMENTLINE 2
1177#define wxSTC_SN_COMMENTLINEBANG 3
1178#define wxSTC_SN_NUMBER 4
1179#define wxSTC_SN_WORD 5
1180#define wxSTC_SN_STRING 6
1181#define wxSTC_SN_WORD2 7
1182#define wxSTC_SN_WORD3 8
1183#define wxSTC_SN_PREPROCESSOR 9
1184#define wxSTC_SN_OPERATOR 10
1185#define wxSTC_SN_IDENTIFIER 11
1186#define wxSTC_SN_STRINGEOL 12
1187#define wxSTC_SN_REGEXTAG 13
1188#define wxSTC_SN_SIGNAL 14
1189#define wxSTC_SN_USER 19
1190
1191// Lexical states for SCLEX_AU3
1192#define wxSTC_AU3_DEFAULT 0
1193#define wxSTC_AU3_COMMENT 1
1194#define wxSTC_AU3_COMMENTBLOCK 2
1195#define wxSTC_AU3_NUMBER 3
1196#define wxSTC_AU3_FUNCTION 4
1197#define wxSTC_AU3_KEYWORD 5
1198#define wxSTC_AU3_MACRO 6
1199#define wxSTC_AU3_STRING 7
1200#define wxSTC_AU3_OPERATOR 8
1201#define wxSTC_AU3_VARIABLE 9
1202#define wxSTC_AU3_SENT 10
1203#define wxSTC_AU3_PREPROCESSOR 11
a33203cb 1204#define wxSTC_AU3_SPECIAL 12
1e9bafca
RD
1205#define wxSTC_AU3_EXPAND 13
1206#define wxSTC_AU3_COMOBJ 14
591d01be
RD
1207
1208// Lexical states for SCLEX_APDL
1209#define wxSTC_APDL_DEFAULT 0
1210#define wxSTC_APDL_COMMENT 1
1211#define wxSTC_APDL_COMMENTBLOCK 2
1212#define wxSTC_APDL_NUMBER 3
1213#define wxSTC_APDL_STRING 4
a33203cb
RD
1214#define wxSTC_APDL_OPERATOR 5
1215#define wxSTC_APDL_WORD 6
591d01be 1216#define wxSTC_APDL_PROCESSOR 7
a33203cb
RD
1217#define wxSTC_APDL_COMMAND 8
1218#define wxSTC_APDL_SLASHCOMMAND 9
1219#define wxSTC_APDL_STARCOMMAND 10
1220#define wxSTC_APDL_ARGUMENT 11
1221#define wxSTC_APDL_FUNCTION 12
591d01be
RD
1222
1223// Lexical states for SCLEX_BASH
1224#define wxSTC_SH_DEFAULT 0
1225#define wxSTC_SH_ERROR 1
1226#define wxSTC_SH_COMMENTLINE 2
1227#define wxSTC_SH_NUMBER 3
1228#define wxSTC_SH_WORD 4
1229#define wxSTC_SH_STRING 5
1230#define wxSTC_SH_CHARACTER 6
1231#define wxSTC_SH_OPERATOR 7
1232#define wxSTC_SH_IDENTIFIER 8
1233#define wxSTC_SH_SCALAR 9
1234#define wxSTC_SH_PARAM 10
1235#define wxSTC_SH_BACKTICKS 11
1236#define wxSTC_SH_HERE_DELIM 12
1237#define wxSTC_SH_HERE_Q 13
1238
a33203cb
RD
1239// Lexical states for SCLEX_ASN1
1240#define wxSTC_ASN1_DEFAULT 0
1241#define wxSTC_ASN1_COMMENT 1
1242#define wxSTC_ASN1_IDENTIFIER 2
1243#define wxSTC_ASN1_STRING 3
1244#define wxSTC_ASN1_OID 4
1245#define wxSTC_ASN1_SCALAR 5
1246#define wxSTC_ASN1_KEYWORD 6
1247#define wxSTC_ASN1_ATTRIBUTE 7
1248#define wxSTC_ASN1_DESCRIPTOR 8
1249#define wxSTC_ASN1_TYPE 9
1250#define wxSTC_ASN1_OPERATOR 10
1251
1252// Lexical states for SCLEX_VHDL
1253#define wxSTC_VHDL_DEFAULT 0
1254#define wxSTC_VHDL_COMMENT 1
1255#define wxSTC_VHDL_COMMENTLINEBANG 2
1256#define wxSTC_VHDL_NUMBER 3
1257#define wxSTC_VHDL_STRING 4
1258#define wxSTC_VHDL_OPERATOR 5
1259#define wxSTC_VHDL_IDENTIFIER 6
1260#define wxSTC_VHDL_STRINGEOL 7
1261#define wxSTC_VHDL_KEYWORD 8
1262#define wxSTC_VHDL_STDOPERATOR 9
1263#define wxSTC_VHDL_ATTRIBUTE 10
1264#define wxSTC_VHDL_STDFUNCTION 11
1265#define wxSTC_VHDL_STDPACKAGE 12
1266#define wxSTC_VHDL_STDTYPE 13
1267#define wxSTC_VHDL_USERWORD 14
1268
1e9bafca
RD
1269// Lexical states for SCLEX_CAML
1270#define wxSTC_CAML_DEFAULT 0
1271#define wxSTC_CAML_IDENTIFIER 1
1272#define wxSTC_CAML_TAGNAME 2
1273#define wxSTC_CAML_KEYWORD 3
1274#define wxSTC_CAML_KEYWORD2 4
1275#define wxSTC_CAML_KEYWORD3 5
1276#define wxSTC_CAML_LINENUM 6
1277#define wxSTC_CAML_OPERATOR 7
1278#define wxSTC_CAML_NUMBER 8
1279#define wxSTC_CAML_CHAR 9
1280#define wxSTC_CAML_STRING 11
1281#define wxSTC_CAML_COMMENT 12
1282#define wxSTC_CAML_COMMENT1 13
1283#define wxSTC_CAML_COMMENT2 14
1284#define wxSTC_CAML_COMMENT3 15
1285
1286// Lexical states for SCLEX_HASKELL
1287#define wxSTC_HA_DEFAULT 0
1288#define wxSTC_HA_IDENTIFIER 1
1289#define wxSTC_HA_KEYWORD 2
1290#define wxSTC_HA_NUMBER 3
1291#define wxSTC_HA_STRING 4
1292#define wxSTC_HA_CHARACTER 5
1293#define wxSTC_HA_CLASS 6
1294#define wxSTC_HA_MODULE 7
1295#define wxSTC_HA_CAPITAL 8
1296#define wxSTC_HA_DATA 9
1297#define wxSTC_HA_IMPORT 10
1298#define wxSTC_HA_OPERATOR 11
1299#define wxSTC_HA_INSTANCE 12
1300#define wxSTC_HA_COMMENTLINE 13
1301#define wxSTC_HA_COMMENTBLOCK 14
1302#define wxSTC_HA_COMMENTBLOCK2 15
1303#define wxSTC_HA_COMMENTBLOCK3 16
1304
1305// Lexical states of SCLEX_TADS3
1306#define wxSTC_T3_DEFAULT 0
1307#define wxSTC_T3_X_DEFAULT 1
1308#define wxSTC_T3_PREPROCESSOR 2
1309#define wxSTC_T3_BLOCK_COMMENT 3
1310#define wxSTC_T3_LINE_COMMENT 4
1311#define wxSTC_T3_OPERATOR 5
1312#define wxSTC_T3_KEYWORD 6
1313#define wxSTC_T3_NUMBER 7
1314#define wxSTC_T3_IDENTIFIER 8
1315#define wxSTC_T3_S_STRING 9
1316#define wxSTC_T3_D_STRING 10
1317#define wxSTC_T3_X_STRING 11
1318#define wxSTC_T3_LIB_DIRECTIVE 12
1319#define wxSTC_T3_MSG_PARAM 13
1320#define wxSTC_T3_HTML_TAG 14
1321#define wxSTC_T3_HTML_DEFAULT 15
1322#define wxSTC_T3_HTML_STRING 16
1323#define wxSTC_T3_USER1 17
1324#define wxSTC_T3_USER2 18
1325#define wxSTC_T3_USER3 19
1326
1327// Lexical states for SCLEX_REBOL
1328#define wxSTC_REBOL_DEFAULT 0
1329#define wxSTC_REBOL_COMMENTLINE 1
1330#define wxSTC_REBOL_COMMENTBLOCK 2
1331#define wxSTC_REBOL_PREFACE 3
1332#define wxSTC_REBOL_OPERATOR 4
1333#define wxSTC_REBOL_CHARACTER 5
1334#define wxSTC_REBOL_QUOTEDSTRING 6
1335#define wxSTC_REBOL_BRACEDSTRING 7
1336#define wxSTC_REBOL_NUMBER 8
1337#define wxSTC_REBOL_PAIR 9
1338#define wxSTC_REBOL_TUPLE 10
1339#define wxSTC_REBOL_BINARY 11
1340#define wxSTC_REBOL_MONEY 12
1341#define wxSTC_REBOL_ISSUE 13
1342#define wxSTC_REBOL_TAG 14
1343#define wxSTC_REBOL_FILE 15
1344#define wxSTC_REBOL_EMAIL 16
1345#define wxSTC_REBOL_URL 17
1346#define wxSTC_REBOL_DATE 18
1347#define wxSTC_REBOL_TIME 19
1348#define wxSTC_REBOL_IDENTIFIER 20
1349#define wxSTC_REBOL_WORD 21
1350#define wxSTC_REBOL_WORD2 22
1351#define wxSTC_REBOL_WORD3 23
1352#define wxSTC_REBOL_WORD4 24
1353#define wxSTC_REBOL_WORD5 25
1354#define wxSTC_REBOL_WORD6 26
1355#define wxSTC_REBOL_WORD7 27
1356#define wxSTC_REBOL_WORD8 28
1357
1358// Lexical states for SCLEX_SQL
1359#define wxSTC_SQL_DEFAULT 0
1360#define wxSTC_SQL_COMMENT 1
1361#define wxSTC_SQL_COMMENTLINE 2
1362#define wxSTC_SQL_COMMENTDOC 3
1363#define wxSTC_SQL_NUMBER 4
1364#define wxSTC_SQL_WORD 5
1365#define wxSTC_SQL_STRING 6
1366#define wxSTC_SQL_CHARACTER 7
1367#define wxSTC_SQL_SQLPLUS 8
1368#define wxSTC_SQL_SQLPLUS_PROMPT 9
1369#define wxSTC_SQL_OPERATOR 10
1370#define wxSTC_SQL_IDENTIFIER 11
1371#define wxSTC_SQL_SQLPLUS_COMMENT 13
1372#define wxSTC_SQL_COMMENTLINEDOC 15
1373#define wxSTC_SQL_WORD2 16
1374#define wxSTC_SQL_COMMENTDOCKEYWORD 17
1375#define wxSTC_SQL_COMMENTDOCKEYWORDERROR 18
1376#define wxSTC_SQL_USER1 19
1377#define wxSTC_SQL_USER2 20
1378#define wxSTC_SQL_USER3 21
1379#define wxSTC_SQL_USER4 22
1380#define wxSTC_SQL_QUOTEDIDENTIFIER 23
1381
1382// Lexical states for SCLEX_SMALLTALK
1383#define wxSTC_ST_DEFAULT 0
1384#define wxSTC_ST_STRING 1
1385#define wxSTC_ST_NUMBER 2
1386#define wxSTC_ST_COMMENT 3
1387#define wxSTC_ST_SYMBOL 4
1388#define wxSTC_ST_BINARY 5
1389#define wxSTC_ST_BOOL 6
1390#define wxSTC_ST_SELF 7
1391#define wxSTC_ST_SUPER 8
1392#define wxSTC_ST_NIL 9
1393#define wxSTC_ST_GLOBAL 10
1394#define wxSTC_ST_RETURN 11
1395#define wxSTC_ST_SPECIAL 12
1396#define wxSTC_ST_KWSEND 13
1397#define wxSTC_ST_ASSIGN 14
1398#define wxSTC_ST_CHARACTER 15
1399#define wxSTC_ST_SPEC_SEL 16
1400
1401// Lexical states for SCLEX_FLAGSHIP (clipper)
1402#define wxSTC_FS_DEFAULT 0
1403#define wxSTC_FS_COMMENT 1
1404#define wxSTC_FS_COMMENTLINE 2
1405#define wxSTC_FS_COMMENTDOC 3
1406#define wxSTC_FS_COMMENTLINEDOC 4
1407#define wxSTC_FS_COMMENTDOCKEYWORD 5
1408#define wxSTC_FS_COMMENTDOCKEYWORDERROR 6
1409#define wxSTC_FS_KEYWORD 7
1410#define wxSTC_FS_KEYWORD2 8
1411#define wxSTC_FS_KEYWORD3 9
1412#define wxSTC_FS_KEYWORD4 10
1413#define wxSTC_FS_NUMBER 11
1414#define wxSTC_FS_STRING 12
1415#define wxSTC_FS_PREPROCESSOR 13
1416#define wxSTC_FS_OPERATOR 14
1417#define wxSTC_FS_IDENTIFIER 15
1418#define wxSTC_FS_DATE 16
1419#define wxSTC_FS_STRINGEOL 17
1420#define wxSTC_FS_CONSTANT 18
1421#define wxSTC_FS_ASM 19
1422#define wxSTC_FS_LABEL 20
1423#define wxSTC_FS_ERROR 21
1424#define wxSTC_FS_HEXNUMBER 22
1425#define wxSTC_FS_BINNUMBER 23
1426
1427// Lexical states for SCLEX_CSOUND
1428#define wxSTC_CSOUND_DEFAULT 0
1429#define wxSTC_CSOUND_COMMENT 1
1430#define wxSTC_CSOUND_NUMBER 2
1431#define wxSTC_CSOUND_OPERATOR 3
1432#define wxSTC_CSOUND_INSTR 4
1433#define wxSTC_CSOUND_IDENTIFIER 5
1434#define wxSTC_CSOUND_OPCODE 6
1435#define wxSTC_CSOUND_HEADERSTMT 7
1436#define wxSTC_CSOUND_USERKEYWORD 8
1437#define wxSTC_CSOUND_COMMENTBLOCK 9
1438#define wxSTC_CSOUND_PARAM 10
1439#define wxSTC_CSOUND_ARATE_VAR 11
1440#define wxSTC_CSOUND_KRATE_VAR 12
1441#define wxSTC_CSOUND_IRATE_VAR 13
1442#define wxSTC_CSOUND_GLOBAL_VAR 14
1443#define wxSTC_CSOUND_STRINGEOL 15
1444
2b5f62a0
VZ
1445
1446//-----------------------------------------
1447// Commands that can be bound to keystrokes
1448
88a8b04e 1449
2b5f62a0
VZ
1450// Redoes the next action on the undo history.
1451#define wxSTC_CMD_REDO 2011
1452
1453// Select all the text in the document.
1454#define wxSTC_CMD_SELECTALL 2013
1455
1456// Undo one action in the undo history.
1457#define wxSTC_CMD_UNDO 2176
1458
1459// Cut the selection to the clipboard.
1460#define wxSTC_CMD_CUT 2177
1461
1462// Copy the selection to the clipboard.
1463#define wxSTC_CMD_COPY 2178
1464
1465// Paste the contents of the clipboard into the document replacing the selection.
1466#define wxSTC_CMD_PASTE 2179
1467
1468// Clear the selection.
1469#define wxSTC_CMD_CLEAR 2180
1470
1471// Move caret down one line.
1472#define wxSTC_CMD_LINEDOWN 2300
1473
1474// Move caret down one line extending selection to new caret position.
1475#define wxSTC_CMD_LINEDOWNEXTEND 2301
1476
1477// Move caret up one line.
1478#define wxSTC_CMD_LINEUP 2302
1479
1480// Move caret up one line extending selection to new caret position.
1481#define wxSTC_CMD_LINEUPEXTEND 2303
1482
1483// Move caret left one character.
1484#define wxSTC_CMD_CHARLEFT 2304
1485
1486// Move caret left one character extending selection to new caret position.
1487#define wxSTC_CMD_CHARLEFTEXTEND 2305
1488
1489// Move caret right one character.
1490#define wxSTC_CMD_CHARRIGHT 2306
1491
1492// Move caret right one character extending selection to new caret position.
1493#define wxSTC_CMD_CHARRIGHTEXTEND 2307
1494
1495// Move caret left one word.
1496#define wxSTC_CMD_WORDLEFT 2308
1497
1498// Move caret left one word extending selection to new caret position.
1499#define wxSTC_CMD_WORDLEFTEXTEND 2309
1500
1501// Move caret right one word.
1502#define wxSTC_CMD_WORDRIGHT 2310
1503
1504// Move caret right one word extending selection to new caret position.
1505#define wxSTC_CMD_WORDRIGHTEXTEND 2311
1506
1507// Move caret to first position on line.
1508#define wxSTC_CMD_HOME 2312
1509
1510// Move caret to first position on line extending selection to new caret position.
1511#define wxSTC_CMD_HOMEEXTEND 2313
1512
1513// Move caret to last position on line.
1514#define wxSTC_CMD_LINEEND 2314
1515
1516// Move caret to last position on line extending selection to new caret position.
1517#define wxSTC_CMD_LINEENDEXTEND 2315
1518
1519// Move caret to first position in document.
1520#define wxSTC_CMD_DOCUMENTSTART 2316
1521
1522// Move caret to first position in document extending selection to new caret position.
1523#define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317
1524
1525// Move caret to last position in document.
1526#define wxSTC_CMD_DOCUMENTEND 2318
1527
1528// Move caret to last position in document extending selection to new caret position.
1529#define wxSTC_CMD_DOCUMENTENDEXTEND 2319
1530
1531// Move caret one page up.
1532#define wxSTC_CMD_PAGEUP 2320
1533
1534// Move caret one page up extending selection to new caret position.
1535#define wxSTC_CMD_PAGEUPEXTEND 2321
1536
1537// Move caret one page down.
1538#define wxSTC_CMD_PAGEDOWN 2322
1539
1540// Move caret one page down extending selection to new caret position.
1541#define wxSTC_CMD_PAGEDOWNEXTEND 2323
1542
1543// Switch from insert to overtype mode or the reverse.
1544#define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324
1545
1546// Cancel any modes such as call tip or auto-completion list display.
1547#define wxSTC_CMD_CANCEL 2325
1548
1549// Delete the selection or if no selection, the character before the caret.
1550#define wxSTC_CMD_DELETEBACK 2326
1551
1552// If selection is empty or all on one line replace the selection with a tab character.
1553// If more than one line selected, indent the lines.
1554#define wxSTC_CMD_TAB 2327
1555
1556// Dedent the selected lines.
1557#define wxSTC_CMD_BACKTAB 2328
1558
1559// Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
1560#define wxSTC_CMD_NEWLINE 2329
1561
1562// Insert a Form Feed character.
1563#define wxSTC_CMD_FORMFEED 2330
1564
1565// Move caret to before first visible character on line.
1566// If already there move to first character on line.
1567#define wxSTC_CMD_VCHOME 2331
1568
1569// Like VCHome but extending selection to new caret position.
1570#define wxSTC_CMD_VCHOMEEXTEND 2332
1571
1572// Magnify the displayed text by increasing the sizes by 1 point.
1573#define wxSTC_CMD_ZOOMIN 2333
1574
1575// Make the displayed text smaller by decreasing the sizes by 1 point.
1576#define wxSTC_CMD_ZOOMOUT 2334
1577
1578// Delete the word to the left of the caret.
1579#define wxSTC_CMD_DELWORDLEFT 2335
1580
1581// Delete the word to the right of the caret.
1582#define wxSTC_CMD_DELWORDRIGHT 2336
1583
1584// Cut the line containing the caret.
1585#define wxSTC_CMD_LINECUT 2337
1586
1587// Delete the line containing the caret.
1588#define wxSTC_CMD_LINEDELETE 2338
1589
1590// Switch the current line with the previous.
1591#define wxSTC_CMD_LINETRANSPOSE 2339
1592
9e730a78
RD
1593// Duplicate the current line.
1594#define wxSTC_CMD_LINEDUPLICATE 2404
1595
2b5f62a0
VZ
1596// Transform the selection to lower case.
1597#define wxSTC_CMD_LOWERCASE 2340
1598
1599// Transform the selection to upper case.
1600#define wxSTC_CMD_UPPERCASE 2341
1601
1602// Scroll the document down, keeping the caret visible.
1603#define wxSTC_CMD_LINESCROLLDOWN 2342
1604
1605// Scroll the document up, keeping the caret visible.
1606#define wxSTC_CMD_LINESCROLLUP 2343
1607
1608// Delete the selection or if no selection, the character before the caret.
1609// Will not delete the character before at the start of a line.
1610#define wxSTC_CMD_DELETEBACKNOTLINE 2344
1611
1612// Move caret to first position on display line.
1613#define wxSTC_CMD_HOMEDISPLAY 2345
1614
1615// Move caret to first position on display line extending selection to
1616// new caret position.
1617#define wxSTC_CMD_HOMEDISPLAYEXTEND 2346
1618
1619// Move caret to last position on display line.
1620#define wxSTC_CMD_LINEENDDISPLAY 2347
1621
1622// Move caret to last position on display line extending selection to new
1623// caret position.
1624#define wxSTC_CMD_LINEENDDISPLAYEXTEND 2348
1625
9e730a78
RD
1626// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
1627// except they behave differently when word-wrap is enabled:
1628// They go first to the start / end of the display line, like (Home|LineEnd)Display
1629// The difference is that, the cursor is already at the point, it goes on to the start
8e54aaed 1630// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
9e730a78
RD
1631#define wxSTC_CMD_HOMEWRAP 2349
1632#define wxSTC_CMD_HOMEWRAPEXTEND 2450
1633#define wxSTC_CMD_LINEENDWRAP 2451
1634#define wxSTC_CMD_LINEENDWRAPEXTEND 2452
1635#define wxSTC_CMD_VCHOMEWRAP 2453
1636#define wxSTC_CMD_VCHOMEWRAPEXTEND 2454
1637
c26dba42
RD
1638// Copy the line containing the caret.
1639#define wxSTC_CMD_LINECOPY 2455
1640
2b5f62a0
VZ
1641// Move to the previous change in capitalisation.
1642#define wxSTC_CMD_WORDPARTLEFT 2390
1643
1644// Move to the previous change in capitalisation extending selection
1645// to new caret position.
1646#define wxSTC_CMD_WORDPARTLEFTEXTEND 2391
1647
1648// Move to the change next in capitalisation.
1649#define wxSTC_CMD_WORDPARTRIGHT 2392
1650
1651// Move to the next change in capitalisation extending selection
1652// to new caret position.
1653#define wxSTC_CMD_WORDPARTRIGHTEXTEND 2393
1654
1655// Delete back from the current position to the start of the line.
1656#define wxSTC_CMD_DELLINELEFT 2395
1657
1658// Delete forwards from the current position to the end of the line.
1659#define wxSTC_CMD_DELLINERIGHT 2396
1660
8e54aaed 1661// Move caret between paragraphs (delimited by empty lines).
9e730a78
RD
1662#define wxSTC_CMD_PARADOWN 2413
1663#define wxSTC_CMD_PARADOWNEXTEND 2414
1664#define wxSTC_CMD_PARAUP 2415
1665#define wxSTC_CMD_PARAUPEXTEND 2416
1666
8e54aaed
RD
1667// Move caret down one line, extending rectangular selection to new caret position.
1668#define wxSTC_CMD_LINEDOWNRECTEXTEND 2426
1669
1670// Move caret up one line, extending rectangular selection to new caret position.
1671#define wxSTC_CMD_LINEUPRECTEXTEND 2427
1672
1673// Move caret left one character, extending rectangular selection to new caret position.
1674#define wxSTC_CMD_CHARLEFTRECTEXTEND 2428
1675
1676// Move caret right one character, extending rectangular selection to new caret position.
1677#define wxSTC_CMD_CHARRIGHTRECTEXTEND 2429
1678
1679// Move caret to first position on line, extending rectangular selection to new caret position.
1680#define wxSTC_CMD_HOMERECTEXTEND 2430
1681
1682// Move caret to before first visible character on line.
1683// If already there move to first character on line.
1684// In either case, extend rectangular selection to new caret position.
1685#define wxSTC_CMD_VCHOMERECTEXTEND 2431
1686
1687// Move caret to last position on line, extending rectangular selection to new caret position.
1688#define wxSTC_CMD_LINEENDRECTEXTEND 2432
1689
1690// Move caret one page up, extending rectangular selection to new caret position.
1691#define wxSTC_CMD_PAGEUPRECTEXTEND 2433
1692
1693// Move caret one page down, extending rectangular selection to new caret position.
1694#define wxSTC_CMD_PAGEDOWNRECTEXTEND 2434
1695
1696// Move caret to top of page, or one page up if already at top of page.
1697#define wxSTC_CMD_STUTTEREDPAGEUP 2435
1698
1699// Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.
1700#define wxSTC_CMD_STUTTEREDPAGEUPEXTEND 2436
1701
1702// Move caret to bottom of page, or one page down if already at bottom of page.
1703#define wxSTC_CMD_STUTTEREDPAGEDOWN 2437
1704
1705// Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.
1706#define wxSTC_CMD_STUTTEREDPAGEDOWNEXTEND 2438
1707
1708// Move caret left one word, position cursor at end of word.
1709#define wxSTC_CMD_WORDLEFTEND 2439
1710
1711// Move caret left one word, position cursor at end of word, extending selection to new caret position.
1712#define wxSTC_CMD_WORDLEFTENDEXTEND 2440
1713
1714// Move caret right one word, position cursor at end of word.
1715#define wxSTC_CMD_WORDRIGHTEND 2441
1716
1717// Move caret right one word, position cursor at end of word, extending selection to new caret position.
1718#define wxSTC_CMD_WORDRIGHTENDEXTEND 2442
1719
2b5f62a0 1720
1a2fb4cd 1721// END of generated section
4370573a 1722//----------------------------------------------------------------------
9ce192d4
RD
1723
1724class ScintillaWX; // forward declare
1725class WordList;
1726struct SCNotification;
1727
2b5f62a0 1728#ifndef SWIG
7ba1412f
RD
1729extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr;
1730class WXDLLIMPEXP_STC wxStyledTextCtrl;
1731class WXDLLIMPEXP_STC wxStyledTextEvent;
2b5f62a0 1732#endif
9ce192d4
RD
1733
1734//----------------------------------------------------------------------
1735
ba8a4f66 1736class WXDLLIMPEXP_STC wxStyledTextCtrl : public wxControl {
9ce192d4
RD
1737public:
1738
f6bcfd97 1739#ifdef SWIG
faadde7e
RD
1740 %pythonAppend wxStyledTextCtrl "self._setOORInfo(self)"
1741 %pythonAppend wxStyledTextCtrl() ""
39c0acb6 1742
f325fa52 1743 wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY,
f6bcfd97
BP
1744 const wxPoint& pos = wxDefaultPosition,
1745 const wxSize& size = wxDefaultSize, long style = 0,
137b5242 1746 const wxString& name = wxPySTCNameStr);
3c1705d9 1747 %RenameCtor(PreStyledTextCtrl, wxStyledTextCtrl());
7e126a07 1748
f6bcfd97 1749#else
f325fa52 1750 wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY,
9ce192d4
RD
1751 const wxPoint& pos = wxDefaultPosition,
1752 const wxSize& size = wxDefaultSize, long style = 0,
1753 const wxString& name = wxSTCNameStr);
39c0acb6
RD
1754 wxStyledTextCtrl() { m_swx = NULL; }
1755 ~wxStyledTextCtrl();
7e126a07 1756
f6bcfd97
BP
1757#endif
1758
a48cb415
RD
1759 bool Create(wxWindow *parent, wxWindowID id=wxID_ANY,
1760 const wxPoint& pos = wxDefaultPosition,
1761 const wxSize& size = wxDefaultSize, long style = 0,
1762 const wxString& name = wxSTCNameStr);
9ce192d4
RD
1763
1764
4370573a
RD
1765//----------------------------------------------------------------------
1766// BEGIN generated section. The following code is automatically generated
1767// by gen_iface.py. Do not edit this file. Edit stc.h.in instead
1768// and regenerate
9ce192d4 1769
4370573a 1770
591d01be 1771 // Add text to the document at current position.
4370573a
RD
1772 void AddText(const wxString& text);
1773
a834585d 1774 // Add array of cells to document.
10ef30eb 1775 void AddStyledText(const wxMemoryBuffer& data);
4370573a 1776
a834585d 1777 // Insert string at a position.
4370573a
RD
1778 void InsertText(int pos, const wxString& text);
1779
a834585d 1780 // Delete all text in the document.
4370573a
RD
1781 void ClearAll();
1782
a834585d 1783 // Set all style bytes to 0, remove all folding information.
4370573a
RD
1784 void ClearDocumentStyle();
1785
591d01be 1786 // Returns the number of characters in the document.
4370573a
RD
1787 int GetLength();
1788
a834585d 1789 // Returns the character byte at the position.
4370573a
RD
1790 int GetCharAt(int pos);
1791
a834585d 1792 // Returns the position of the caret.
4370573a
RD
1793 int GetCurrentPos();
1794
a834585d 1795 // Returns the position of the opposite end of the selection to the caret.
4370573a
RD
1796 int GetAnchor();
1797
a834585d 1798 // Returns the style byte at the position.
4370573a
RD
1799 int GetStyleAt(int pos);
1800
a834585d 1801 // Redoes the next action on the undo history.
4370573a
RD
1802 void Redo();
1803
1804 // Choose between collecting actions into the undo
1805 // history and discarding them.
1806 void SetUndoCollection(bool collectUndo);
1807
1808 // Select all the text in the document.
1809 void SelectAll();
1810
1811 // Remember the current position in the undo history as the position
1812 // at which the document was saved.
1813 void SetSavePoint();
1814
1815 // Retrieve a buffer of cells.
10ef30eb 1816 wxMemoryBuffer GetStyledText(int startPos, int endPos);
4370573a 1817
a834585d 1818 // Are there any redoable actions in the undo history?
4370573a
RD
1819 bool CanRedo();
1820
a834585d 1821 // Retrieve the line number at which a particular marker is located.
4370573a
RD
1822 int MarkerLineFromHandle(int handle);
1823
1824 // Delete a marker.
1825 void MarkerDeleteHandle(int handle);
1826
1827 // Is undo history being collected?
1828 bool GetUndoCollection();
1829
1830 // Are white space characters currently visible?
1831 // Returns one of SCWS_* constants.
1832 int GetViewWhiteSpace();
1833
1834 // Make white space characters invisible, always visible or visible outside indentation.
1835 void SetViewWhiteSpace(int viewWS);
1836
1837 // Find the position from a point within the window.
1838 int PositionFromPoint(wxPoint pt);
1839
65ec6247
RD
1840 // Find the position from a point within the window but return
1841 // INVALID_POSITION if not close to text.
1842 int PositionFromPointClose(int x, int y);
1843
4370573a
RD
1844 // Set caret to start of a line and ensure it is visible.
1845 void GotoLine(int line);
1846
1847 // Set caret to a position and ensure it is visible.
1848 void GotoPos(int pos);
1849
1850 // Set the selection anchor to a position. The anchor is the opposite
1851 // end of the selection from the caret.
1852 void SetAnchor(int posAnchor);
1853
1854 // Retrieve the text of the line containing the caret.
1855 // Returns the index of the caret on the line.
8de28db9
RD
1856 #ifdef SWIG
1857 wxString GetCurLine(int* OUTPUT);
1858#else
1859 wxString GetCurLine(int* linePos=NULL);
1860#endif
4370573a
RD
1861
1862 // Retrieve the position of the last correctly styled character.
1863 int GetEndStyled();
1864
65ec6247
RD
1865 // Convert all line endings in the document to one mode.
1866 void ConvertEOLs(int eolMode);
4370573a
RD
1867
1868 // Retrieve the current end of line mode - one of CRLF, CR, or LF.
1869 int GetEOLMode();
1870
1871 // Set the current end of line mode.
1872 void SetEOLMode(int eolMode);
1873
1874 // Set the current styling position to pos and the styling mask to mask.
a834585d 1875 // The styling mask can be used to protect some bits in each styling byte from modification.
4370573a
RD
1876 void StartStyling(int pos, int mask);
1877
1878 // Change style from current styling position for length characters to a style
1879 // and move the current styling position to after this newly styled segment.
1880 void SetStyling(int length, int style);
1881
a834585d 1882 // Is drawing done first into a buffer or direct to the screen?
4370573a
RD
1883 bool GetBufferedDraw();
1884
1885 // If drawing is buffered then each line of text is drawn into a bitmap buffer
1886 // before drawing it to the screen to avoid flicker.
1887 void SetBufferedDraw(bool buffered);
1888
a834585d 1889 // Change the visible size of a tab to be a multiple of the width of a space character.
4370573a
RD
1890 void SetTabWidth(int tabWidth);
1891
1892 // Retrieve the visible size of a tab.
1893 int GetTabWidth();
1894
1895 // Set the code page used to interpret the bytes of the document as characters.
4370573a
RD
1896 void SetCodePage(int codePage);
1897
1898 // Set the symbol used for a particular marker number,
1a2fb4cd 1899 // and optionally the fore and background colours.
4370573a 1900 void MarkerDefine(int markerNumber, int markerSymbol,
9e730a78
RD
1901 const wxColour& foreground = wxNullColour,
1902 const wxColour& background = wxNullColour);
4370573a
RD
1903
1904 // Set the foreground colour used for a particular marker number.
1905 void MarkerSetForeground(int markerNumber, const wxColour& fore);
1906
1907 // Set the background colour used for a particular marker number.
1908 void MarkerSetBackground(int markerNumber, const wxColour& back);
1909
1a2fb4cd
RD
1910 // Add a marker to a line, returning an ID which can be used to find or delete the marker.
1911 int MarkerAdd(int line, int markerNumber);
4370573a 1912
a834585d 1913 // Delete a marker from a line.
4370573a
RD
1914 void MarkerDelete(int line, int markerNumber);
1915
a834585d 1916 // Delete all markers with a particular number from all lines.
4370573a
RD
1917 void MarkerDeleteAll(int markerNumber);
1918
1919 // Get a bit mask of all the markers set on a line.
1920 int MarkerGet(int line);
1921
1922 // Find the next line after lineStart that includes a marker in mask.
1923 int MarkerNext(int lineStart, int markerMask);
1924
1925 // Find the previous line before lineStart that includes a marker in mask.
1926 int MarkerPrevious(int lineStart, int markerMask);
1927
9e730a78
RD
1928 // Define a marker from a bitmap
1929 void MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp);
1930
1e9bafca
RD
1931 // Add a set of markers to a line.
1932 void MarkerAddSet(int line, int set);
1933
4370573a
RD
1934 // Set a margin to be either numeric or symbolic.
1935 void SetMarginType(int margin, int marginType);
1936
1937 // Retrieve the type of a margin.
1938 int GetMarginType(int margin);
1939
1940 // Set the width of a margin to a width expressed in pixels.
9ce192d4 1941 void SetMarginWidth(int margin, int pixelWidth);
4370573a
RD
1942
1943 // Retrieve the width of a margin in pixels.
1944 int GetMarginWidth(int margin);
1945
1946 // Set a mask that determines which markers are displayed in a margin.
9ce192d4 1947 void SetMarginMask(int margin, int mask);
4370573a
RD
1948
1949 // Retrieve the marker mask of a margin.
1950 int GetMarginMask(int margin);
1951
1952 // Make a margin sensitive or insensitive to mouse clicks.
9ce192d4 1953 void SetMarginSensitive(int margin, bool sensitive);
4370573a
RD
1954
1955 // Retrieve the mouse click sensitivity of a margin.
9ce192d4
RD
1956 bool GetMarginSensitive(int margin);
1957
4370573a
RD
1958 // Clear all the styles and make equivalent to the global default style.
1959 void StyleClearAll();
1960
1961 // Set the foreground colour of a style.
1962 void StyleSetForeground(int style, const wxColour& fore);
1963
1964 // Set the background colour of a style.
1965 void StyleSetBackground(int style, const wxColour& back);
1966
1967 // Set a style to be bold or not.
1968 void StyleSetBold(int style, bool bold);
1969
1970 // Set a style to be italic or not.
1971 void StyleSetItalic(int style, bool italic);
1972
1973 // Set the size of characters of a style.
1974 void StyleSetSize(int style, int sizePoints);
1975
1976 // Set the font of a style.
1977 void StyleSetFaceName(int style, const wxString& fontName);
1978
1979 // Set a style to have its end of line filled or not.
1980 void StyleSetEOLFilled(int style, bool filled);
1981
1982 // Reset the default style to its state at startup
1983 void StyleResetDefault();
1984
1985 // Set a style to be underlined or not.
1986 void StyleSetUnderline(int style, bool underline);
1987
65ec6247
RD
1988 // Set a style to be mixed case, or to force upper or lower case.
1989 void StyleSetCase(int style, int caseForce);
1990
9e730a78
RD
1991 // Set a style to be a hotspot or not.
1992 void StyleSetHotSpot(int style, bool hotspot);
1993
4370573a
RD
1994 // Set the foreground colour of the selection and whether to use this setting.
1995 void SetSelForeground(bool useSetting, const wxColour& fore);
1996
1997 // Set the background colour of the selection and whether to use this setting.
1998 void SetSelBackground(bool useSetting, const wxColour& back);
1999
2000 // Set the foreground colour of the caret.
2001 void SetCaretForeground(const wxColour& fore);
2002
2003 // When key+modifier combination km is pressed perform msg.
2004 void CmdKeyAssign(int key, int modifiers, int cmd);
2005
8e54aaed 2006 // When key+modifier combination km is pressed do nothing.
4370573a
RD
2007 void CmdKeyClear(int key, int modifiers);
2008
2009 // Drop all key mappings.
2010 void CmdKeyClearAll();
2011
2012 // Set the styles for a segment of the document.
2013 void SetStyleBytes(int length, char* styleBytes);
2014
2015 // Set a style to be visible or not.
2016 void StyleSetVisible(int style, bool visible);
2017
2018 // Get the time in milliseconds that the caret is on and off.
2019 int GetCaretPeriod();
2020
2021 // Get the time in milliseconds that the caret is on and off. 0 = steady on.
2022 void SetCaretPeriod(int periodMilliseconds);
2023
a834585d 2024 // Set the set of characters making up words for when moving or selecting by word.
8e54aaed 2025 // First sets deaults like SetCharsDefault.
4370573a
RD
2026 void SetWordChars(const wxString& characters);
2027
2028 // Start a sequence of actions that is undone and redone as a unit.
2029 // May be nested.
2030 void BeginUndoAction();
2031
2032 // End a sequence of actions that is undone and redone as a unit.
2033 void EndUndoAction();
2034
2035 // Set an indicator to plain, squiggle or TT.
2036 void IndicatorSetStyle(int indic, int style);
2037
2038 // Retrieve the style of an indicator.
2039 int IndicatorGetStyle(int indic);
2040
2041 // Set the foreground colour of an indicator.
2042 void IndicatorSetForeground(int indic, const wxColour& fore);
2043
2044 // Retrieve the foreground colour of an indicator.
2045 wxColour IndicatorGetForeground(int indic);
2046
f114b858
RD
2047 // Set the foreground colour of all whitespace and whether to use this setting.
2048 void SetWhitespaceForeground(bool useSetting, const wxColour& fore);
2049
2050 // Set the background colour of all whitespace and whether to use this setting.
2051 void SetWhitespaceBackground(bool useSetting, const wxColour& back);
2052
a834585d
RD
2053 // Divide each styling byte into lexical class bits (default: 5) and indicator
2054 // bits (default: 3). If a lexer requires more than 32 lexical states, then this
4370573a
RD
2055 // is used to expand the possible states.
2056 void SetStyleBits(int bits);
2057
2058 // Retrieve number of bits in style bytes used to hold the lexical state.
2059 int GetStyleBits();
2060
2061 // Used to hold extra styling information for each line.
2062 void SetLineState(int line, int state);
2063
2064 // Retrieve the extra styling information for a line.
2065 int GetLineState(int line);
2066
2067 // Retrieve the last line number that has line state.
2068 int GetMaxLineState();
2069
65ec6247
RD
2070 // Is the background of the line containing the caret in a different colour?
2071 bool GetCaretLineVisible();
2072
a834585d 2073 // Display the background of the line containing the caret in a different colour.
65ec6247
RD
2074 void SetCaretLineVisible(bool show);
2075
2076 // Get the colour of the background of the line containing the caret.
2077 wxColour GetCaretLineBack();
2078
2079 // Set the colour of the background of the line containing the caret.
2080 void SetCaretLineBack(const wxColour& back);
2081
1a2fb4cd
RD
2082 // Set a style to be changeable or not (read only).
2083 // Experimental feature, currently buggy.
2084 void StyleSetChangeable(int style, bool changeable);
2085
4370573a
RD
2086 // Display a auto-completion list.
2087 // The lenEntered parameter indicates how many characters before
2088 // the caret should be used to provide context.
2089 void AutoCompShow(int lenEntered, const wxString& itemList);
2090
2091 // Remove the auto-completion list from the screen.
2092 void AutoCompCancel();
2093
2094 // Is there an auto-completion list visible?
2095 bool AutoCompActive();
2096
a834585d 2097 // Retrieve the position of the caret when the auto-completion list was displayed.
4370573a
RD
2098 int AutoCompPosStart();
2099
2100 // User has selected an item so remove the list and insert the selection.
2101 void AutoCompComplete();
2102
2103 // Define a set of character that when typed cancel the auto-completion list.
2104 void AutoCompStops(const wxString& characterSet);
2105
a834585d
RD
2106 // Change the separator character in the string setting up an auto-completion list.
2107 // Default is space but can be changed if items contain space.
4370573a
RD
2108 void AutoCompSetSeparator(int separatorCharacter);
2109
2110 // Retrieve the auto-completion list separator character.
2111 int AutoCompGetSeparator();
2112
2113 // Select the item in the auto-completion list that starts with a string.
2114 void AutoCompSelect(const wxString& text);
2115
2116 // Should the auto-completion list be cancelled if the user backspaces to a
2117 // position before where the box was created.
2118 void AutoCompSetCancelAtStart(bool cancel);
2119
2120 // Retrieve whether auto-completion cancelled by backspacing before start.
2121 bool AutoCompGetCancelAtStart();
2122
1a2fb4cd
RD
2123 // Define a set of characters that when typed will cause the autocompletion to
2124 // choose the selected item.
4370573a
RD
2125 void AutoCompSetFillUps(const wxString& characterSet);
2126
2127 // Should a single item auto-completion list automatically choose the item.
2128 void AutoCompSetChooseSingle(bool chooseSingle);
2129
2130 // Retrieve whether a single item auto-completion list automatically choose the item.
2131 bool AutoCompGetChooseSingle();
2132
2133 // Set whether case is significant when performing auto-completion searches.
2134 void AutoCompSetIgnoreCase(bool ignoreCase);
2135
2136 // Retrieve state of ignore case flag.
2137 bool AutoCompGetIgnoreCase();
2138
65ec6247
RD
2139 // Display a list of strings and send notification when user chooses one.
2140 void UserListShow(int listType, const wxString& itemList);
2141
a834585d 2142 // Set whether or not autocompletion is hidden automatically when nothing matches.
65ec6247
RD
2143 void AutoCompSetAutoHide(bool autoHide);
2144
a834585d 2145 // Retrieve whether or not autocompletion is hidden automatically when nothing matches.
65ec6247
RD
2146 bool AutoCompGetAutoHide();
2147
a834585d
RD
2148 // Set whether or not autocompletion deletes any word characters
2149 // after the inserted text upon completion.
1a2fb4cd
RD
2150 void AutoCompSetDropRestOfWord(bool dropRestOfWord);
2151
a834585d
RD
2152 // Retrieve whether or not autocompletion deletes any word characters
2153 // after the inserted text upon completion.
1a2fb4cd
RD
2154 bool AutoCompGetDropRestOfWord();
2155
9e730a78
RD
2156 // Register an image for use in autocompletion lists.
2157 void RegisterImage(int type, const wxBitmap& bmp);
2158
2159 // Clear all the registered images.
2160 void ClearRegisteredImages();
2161
2162 // Retrieve the auto-completion list type-separator character.
2163 int AutoCompGetTypeSeparator();
2164
2165 // Change the type-separator character in the string setting up an auto-completion list.
2166 // Default is '?' but can be changed if items contain '?'.
2167 void AutoCompSetTypeSeparator(int separatorCharacter);
2168
1e9bafca
RD
2169 // Set the maximum width, in characters, of auto-completion and user lists.
2170 // Set to 0 to autosize to fit longest item, which is the default.
2171 void AutoCompSetMaxWidth(int characterCount);
2172
2173 // Get the maximum width, in characters, of auto-completion and user lists.
2174 int AutoCompGetMaxWidth();
2175
2176 // Set the maximum height, in rows, of auto-completion and user lists.
2177 // The default is 5 rows.
2178 void AutoCompSetMaxHeight(int rowCount);
2179
2180 // Set the maximum height, in rows, of auto-completion and user lists.
2181 int AutoCompGetMaxHeight();
2182
4370573a
RD
2183 // Set the number of spaces used for one level of indentation.
2184 void SetIndent(int indentSize);
2185
2186 // Retrieve indentation size.
2187 int GetIndent();
2188
2189 // Indentation will only use space characters if useTabs is false, otherwise
2190 // it will use a combination of tabs and spaces.
2191 void SetUseTabs(bool useTabs);
2192
2193 // Retrieve whether tabs will be used in indentation.
2194 bool GetUseTabs();
2195
2196 // Change the indentation of a line to a number of columns.
2197 void SetLineIndentation(int line, int indentSize);
9ce192d4 2198
4370573a
RD
2199 // Retrieve the number of columns that a line is indented.
2200 int GetLineIndentation(int line);
2201
2202 // Retrieve the position before the first non indentation character on a line.
2203 int GetLineIndentPosition(int line);
2204
2205 // Retrieve the column number of a position, taking tab width into account.
2206 int GetColumn(int pos);
2207
2208 // Show or hide the horizontal scroll bar.
2209 void SetUseHorizontalScrollBar(bool show);
2210
2211 // Is the horizontal scroll bar visible?
2212 bool GetUseHorizontalScrollBar();
2213
2214 // Show or hide indentation guides.
2215 void SetIndentationGuides(bool show);
2216
2217 // Are the indentation guides visible?
2218 bool GetIndentationGuides();
2219
2220 // Set the highlighted indentation guide column.
2221 // 0 = no highlighted guide.
2222 void SetHighlightGuide(int column);
2223
2224 // Get the highlighted indentation guide column.
2225 int GetHighlightGuide();
2226
2227 // Get the position after the last visible characters on a line.
2228 int GetLineEndPosition(int line);
2229
2230 // Get the code page used to interpret the bytes of the document as characters.
2231 int GetCodePage();
2232
2233 // Get the foreground colour of the caret.
2234 wxColour GetCaretForeground();
2235
2236 // In read-only mode?
2237 bool GetReadOnly();
2238
2239 // Sets the position of the caret.
2240 void SetCurrentPos(int pos);
2241
2242 // Sets the position that starts the selection - this becomes the anchor.
2243 void SetSelectionStart(int pos);
2244
2245 // Returns the position at the start of the selection.
2246 int GetSelectionStart();
2247
2248 // Sets the position that ends the selection - this becomes the currentPosition.
2249 void SetSelectionEnd(int pos);
2250
2251 // Returns the position at the end of the selection.
2252 int GetSelectionEnd();
2253
2254 // Sets the print magnification added to the point size of each style for printing.
2255 void SetPrintMagnification(int magnification);
2256
2257 // Returns the print magnification.
2258 int GetPrintMagnification();
2259
2260 // Modify colours when printing for clearer printed text.
2261 void SetPrintColourMode(int mode);
2262
2263 // Returns the print colour mode.
2264 int GetPrintColourMode();
2265
2266 // Find some text in the document.
c13219d6 2267 int FindText(int minPos, int maxPos, const wxString& text, int flags=0);
4370573a 2268
a834585d 2269 // On Windows, will draw the document into a display context such as a printer.
4370573a 2270 int FormatRange(bool doDraw,
9e730a78
RD
2271 int startPos,
2272 int endPos,
2273 wxDC* draw,
dc8005e2 2274 wxDC* target,
9e730a78
RD
2275 wxRect renderRect,
2276 wxRect pageRect);
2277
2278 // Retrieve the display line at the top of the display.
4370573a
RD
2279 int GetFirstVisibleLine();
2280
2281 // Retrieve the contents of a line.
2282 wxString GetLine(int line);
2283
2284 // Returns the number of lines in the document. There is always at least one.
2285 int GetLineCount();
2286
2287 // Sets the size in pixels of the left margin.
65ec6247 2288 void SetMarginLeft(int pixelWidth);
4370573a
RD
2289
2290 // Returns the size in pixels of the left margin.
2291 int GetMarginLeft();
2292
2293 // Sets the size in pixels of the right margin.
65ec6247 2294 void SetMarginRight(int pixelWidth);
4370573a
RD
2295
2296 // Returns the size in pixels of the right margin.
2297 int GetMarginRight();
2298
2299 // Is the document different from when it was last saved?
2300 bool GetModify();
2301
2302 // Select a range of text.
2303 void SetSelection(int start, int end);
2304
2305 // Retrieve the selected text.
2306 wxString GetSelectedText();
2307
2308 // Retrieve a range of text.
2309 wxString GetTextRange(int startPos, int endPos);
2310
2311 // Draw the selection in normal style or with selection highlighted.
2312 void HideSelection(bool normal);
2313
2314 // Retrieve the line containing a position.
2315 int LineFromPosition(int pos);
2316
2317 // Retrieve the position at the start of a line.
2318 int PositionFromLine(int line);
2319
2320 // Scroll horizontally and vertically.
2321 void LineScroll(int columns, int lines);
2322
2323 // Ensure the caret is visible.
2324 void EnsureCaretVisible();
2325
2326 // Replace the selected text with the argument text.
2327 void ReplaceSelection(const wxString& text);
2328
2329 // Set to read only or read write.
2330 void SetReadOnly(bool readOnly);
2331
2332 // Will a paste succeed?
2333 bool CanPaste();
2334
a834585d 2335 // Are there any undoable actions in the undo history?
4370573a
RD
2336 bool CanUndo();
2337
2338 // Delete the undo history.
2339 void EmptyUndoBuffer();
2340
2341 // Undo one action in the undo history.
2342 void Undo();
2343
2344 // Cut the selection to the clipboard.
2345 void Cut();
2346
2347 // Copy the selection to the clipboard.
2348 void Copy();
2349
2350 // Paste the contents of the clipboard into the document replacing the selection.
2351 void Paste();
2352
2353 // Clear the selection.
2354 void Clear();
2355
2356 // Replace the contents of the document with the argument text.
2357 void SetText(const wxString& text);
2358
2359 // Retrieve all the text in the document.
2360 wxString GetText();
2361
2362 // Retrieve the number of characters in the document.
2363 int GetTextLength();
2364
a834585d 2365 // Set to overtype (true) or insert mode.
4370573a
RD
2366 void SetOvertype(bool overtype);
2367
2368 // Returns true if overtype mode is active otherwise false is returned.
2369 bool GetOvertype();
2370
a834585d 2371 // Set the width of the insert mode caret.
65ec6247
RD
2372 void SetCaretWidth(int pixelWidth);
2373
a834585d 2374 // Returns the width of the insert mode caret.
65ec6247
RD
2375 int GetCaretWidth();
2376
2377 // Sets the position that starts the target which is used for updating the
2378 // document without affecting the scroll position.
2379 void SetTargetStart(int pos);
2380
2381 // Get the position that starts the target.
2382 int GetTargetStart();
2383
2384 // Sets the position that ends the target which is used for updating the
2385 // document without affecting the scroll position.
2386 void SetTargetEnd(int pos);
2387
2388 // Get the position that ends the target.
2389 int GetTargetEnd();
2390
2391 // Replace the target text with the argument text.
8e54aaed 2392 // Text is counted so it can contain NULs.
65ec6247
RD
2393 // Returns the length of the replacement text.
2394 int ReplaceTarget(const wxString& text);
2395
2396 // Replace the target text with the argument text after \d processing.
8e54aaed 2397 // Text is counted so it can contain NULs.
65ec6247
RD
2398 // Looks for \d where d is between 1 and 9 and replaces these with the strings
2399 // matched in the last search operation which were surrounded by \( and \).
2400 // Returns the length of the replacement text including any change
2401 // caused by processing the \d patterns.
2402 int ReplaceTargetRE(const wxString& text);
2403
2404 // Search for a counted string in the target and set the target to the found
8e54aaed 2405 // range. Text is counted so it can contain NULs.
65ec6247
RD
2406 // Returns length of range or -1 for failure in which case target is not moved.
2407 int SearchInTarget(const wxString& text);
2408
a834585d 2409 // Set the search flags used by SearchInTarget.
65ec6247
RD
2410 void SetSearchFlags(int flags);
2411
a834585d 2412 // Get the search flags used by SearchInTarget.
65ec6247
RD
2413 int GetSearchFlags();
2414
4370573a
RD
2415 // Show a call tip containing a definition near position pos.
2416 void CallTipShow(int pos, const wxString& definition);
2417
2418 // Remove the call tip from the screen.
2419 void CallTipCancel();
2420
2421 // Is there an active call tip?
2422 bool CallTipActive();
2423
2424 // Retrieve the position where the caret was before displaying the call tip.
2425 int CallTipPosAtStart();
2426
2427 // Highlight a segment of the definition.
2428 void CallTipSetHighlight(int start, int end);
2429
2430 // Set the background colour for the call tip.
2431 void CallTipSetBackground(const wxColour& back);
2432
9e730a78
RD
2433 // Set the foreground colour for the call tip.
2434 void CallTipSetForeground(const wxColour& fore);
2435
2436 // Set the foreground colour for the highlighted part of the call tip.
2437 void CallTipSetForegroundHighlight(const wxColour& fore);
2438
4370573a
RD
2439 // Find the display line of a document line taking hidden lines into account.
2440 int VisibleFromDocLine(int line);
2441
2442 // Find the document line of a display line taking hidden lines into account.
2443 int DocLineFromVisible(int lineDisplay);
2444
1e9bafca
RD
2445 // The number of display lines needed to wrap a document line
2446 int WrapCount(int line);
2447
4370573a
RD
2448 // Set the fold level of a line.
2449 // This encodes an integer level along with flags indicating whether the
2450 // line is a header and whether it is effectively white space.
2451 void SetFoldLevel(int line, int level);
2452
2453 // Retrieve the fold level of a line.
2454 int GetFoldLevel(int line);
2455
2456 // Find the last child line of a header line.
2457 int GetLastChild(int line, int level);
2458
2459 // Find the parent line of a child line.
2460 int GetFoldParent(int line);
2461
2462 // Make a range of lines visible.
2463 void ShowLines(int lineStart, int lineEnd);
2464
2465 // Make a range of lines invisible.
2466 void HideLines(int lineStart, int lineEnd);
2467
2468 // Is a line visible?
2469 bool GetLineVisible(int line);
2470
2471 // Show the children of a header line.
2472 void SetFoldExpanded(int line, bool expanded);
2473
2474 // Is a header line expanded?
2475 bool GetFoldExpanded(int line);
2476
2477 // Switch a header line between expanded and contracted.
2478 void ToggleFold(int line);
2479
2480 // Ensure a particular line is visible by expanding any header line hiding it.
2481 void EnsureVisible(int line);
2482
9e730a78 2483 // Set some style options for folding.
4370573a
RD
2484 void SetFoldFlags(int flags);
2485
65ec6247
RD
2486 // Ensure a particular line is visible by expanding any header line hiding it.
2487 // Use the currently set visibility policy to determine which range to display.
2488 void EnsureVisibleEnforcePolicy(int line);
2489
a834585d 2490 // Sets whether a tab pressed when caret is within indentation indents.
65ec6247
RD
2491 void SetTabIndents(bool tabIndents);
2492
2493 // Does a tab pressed when caret is within indentation indent?
2494 bool GetTabIndents();
2495
a834585d 2496 // Sets whether a backspace pressed when caret is within indentation unindents.
65ec6247
RD
2497 void SetBackSpaceUnIndents(bool bsUnIndents);
2498
2499 // Does a backspace pressed when caret is within indentation unindent?
2500 bool GetBackSpaceUnIndents();
2501
a834585d 2502 // Sets the time the mouse must sit still to generate a mouse dwell event.
65ec6247
RD
2503 void SetMouseDwellTime(int periodMilliseconds);
2504
a834585d 2505 // Retrieve the time the mouse must sit still to generate a mouse dwell event.
65ec6247
RD
2506 int GetMouseDwellTime();
2507
a834585d 2508 // Get position of start of word.
1a2fb4cd
RD
2509 int WordStartPosition(int pos, bool onlyWordCharacters);
2510
a834585d 2511 // Get position of end of word.
1a2fb4cd
RD
2512 int WordEndPosition(int pos, bool onlyWordCharacters);
2513
a834585d 2514 // Sets whether text is word wrapped.
1a2fb4cd
RD
2515 void SetWrapMode(int mode);
2516
a834585d 2517 // Retrieve whether text is word wrapped.
1a2fb4cd
RD
2518 int GetWrapMode();
2519
591d01be
RD
2520 // Set the display mode of visual flags for wrapped lines.
2521 void SetWrapVisualFlags(int wrapVisualFlags);
2522
2523 // Retrive the display mode of visual flags for wrapped lines.
2524 int GetWrapVisualFlags();
2525
2526 // Set the location of visual flags for wrapped lines.
2527 void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation);
2528
2529 // Retrive the location of visual flags for wrapped lines.
2530 int GetWrapVisualFlagsLocation();
2531
2532 // Set the start indent for wrapped lines.
2533 void SetWrapStartIndent(int indent);
2534
2535 // Retrive the start indent for wrapped lines.
2536 int GetWrapStartIndent();
2537
a834585d 2538 // Sets the degree of caching of layout information.
1a2fb4cd
RD
2539 void SetLayoutCache(int mode);
2540
a834585d 2541 // Retrieve the degree of caching of layout information.
1a2fb4cd
RD
2542 int GetLayoutCache();
2543
a834585d
RD
2544 // Sets the document width assumed for scrolling.
2545 void SetScrollWidth(int pixelWidth);
2546
2547 // Retrieve the document width assumed for scrolling.
2548 int GetScrollWidth();
2549
2550 // Measure the pixel width of some text in a particular style.
8e54aaed 2551 // NUL terminated text argument.
a834585d
RD
2552 // Does not handle tab or control characters.
2553 int TextWidth(int style, const wxString& text);
2554
2555 // Sets the scroll range so that maximum scroll position has
2556 // the last line at the bottom of the view (default).
2557 // Setting this to false allows scrolling one page below the last line.
2558 void SetEndAtLastLine(bool endAtLastLine);
2559
2560 // Retrieve whether the maximum scroll position has the last
2561 // line at the bottom of the view.
1e9bafca 2562 bool GetEndAtLastLine();
a834585d
RD
2563
2564 // Retrieve the height of a particular line of text in pixels.
2565 int TextHeight(int line);
2566
9e730a78
RD
2567 // Show or hide the vertical scroll bar.
2568 void SetUseVerticalScrollBar(bool show);
2569
2570 // Is the vertical scroll bar visible?
2571 bool GetUseVerticalScrollBar();
2572
2573 // Append a string to the end of the document without changing the selection.
41a499cd 2574 void AppendText(const wxString& text);
9e730a78
RD
2575
2576 // Is drawing done in two phases with backgrounds drawn before foregrounds?
2577 bool GetTwoPhaseDraw();
2578
2579 // In twoPhaseDraw mode, drawing is performed in two phases, first the background
2580 // and then the foreground. This avoids chopping off characters that overlap the next run.
2581 void SetTwoPhaseDraw(bool twoPhase);
2582
2583 // Make the target range start and end be the same as the selection range start and end.
2584 void TargetFromSelection();
2585
2586 // Join the lines in the target.
2587 void LinesJoin();
2588
2589 // Split the lines in the target into lines that are less wide than pixelWidth
2590 // where possible.
2591 void LinesSplit(int pixelWidth);
2592
2593 // Set the colours used as a chequerboard pattern in the fold margin
2594 void SetFoldMarginColour(bool useSetting, const wxColour& back);
2595 void SetFoldMarginHiColour(bool useSetting, const wxColour& fore);
2596
c26dba42
RD
2597 // Move caret down one line.
2598 void LineDown();
2599
2600 // Move caret down one line extending selection to new caret position.
2601 void LineDownExtend();
2602
2603 // Move caret up one line.
2604 void LineUp();
2605
2606 // Move caret up one line extending selection to new caret position.
2607 void LineUpExtend();
2608
2609 // Move caret left one character.
2610 void CharLeft();
2611
2612 // Move caret left one character extending selection to new caret position.
2613 void CharLeftExtend();
2614
2615 // Move caret right one character.
2616 void CharRight();
2617
2618 // Move caret right one character extending selection to new caret position.
2619 void CharRightExtend();
2620
2621 // Move caret left one word.
2622 void WordLeft();
2623
2624 // Move caret left one word extending selection to new caret position.
2625 void WordLeftExtend();
2626
2627 // Move caret right one word.
2628 void WordRight();
2629
2630 // Move caret right one word extending selection to new caret position.
2631 void WordRightExtend();
2632
2633 // Move caret to first position on line.
2634 void Home();
2635
2636 // Move caret to first position on line extending selection to new caret position.
2637 void HomeExtend();
2638
2639 // Move caret to last position on line.
2640 void LineEnd();
2641
2642 // Move caret to last position on line extending selection to new caret position.
2643 void LineEndExtend();
2644
2645 // Move caret to first position in document.
2646 void DocumentStart();
2647
2648 // Move caret to first position in document extending selection to new caret position.
2649 void DocumentStartExtend();
2650
2651 // Move caret to last position in document.
2652 void DocumentEnd();
2653
2654 // Move caret to last position in document extending selection to new caret position.
2655 void DocumentEndExtend();
2656
2657 // Move caret one page up.
2658 void PageUp();
2659
2660 // Move caret one page up extending selection to new caret position.
2661 void PageUpExtend();
2662
2663 // Move caret one page down.
2664 void PageDown();
2665
2666 // Move caret one page down extending selection to new caret position.
2667 void PageDownExtend();
2668
2669 // Switch from insert to overtype mode or the reverse.
2670 void EditToggleOvertype();
2671
2672 // Cancel any modes such as call tip or auto-completion list display.
2673 void Cancel();
2674
2675 // Delete the selection or if no selection, the character before the caret.
2676 void DeleteBack();
2677
2678 // If selection is empty or all on one line replace the selection with a tab character.
2679 // If more than one line selected, indent the lines.
2680 void Tab();
2681
2682 // Dedent the selected lines.
2683 void BackTab();
2684
2685 // Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
2686 void NewLine();
2687
2688 // Insert a Form Feed character.
2689 void FormFeed();
2690
2691 // Move caret to before first visible character on line.
2692 // If already there move to first character on line.
2693 void VCHome();
2694
2695 // Like VCHome but extending selection to new caret position.
2696 void VCHomeExtend();
2697
2698 // Magnify the displayed text by increasing the sizes by 1 point.
2699 void ZoomIn();
2700
2701 // Make the displayed text smaller by decreasing the sizes by 1 point.
2702 void ZoomOut();
2703
2704 // Delete the word to the left of the caret.
2705 void DelWordLeft();
2706
2707 // Delete the word to the right of the caret.
2708 void DelWordRight();
2709
2710 // Cut the line containing the caret.
2711 void LineCut();
2712
2713 // Delete the line containing the caret.
2714 void LineDelete();
2715
2716 // Switch the current line with the previous.
2717 void LineTranspose();
2718
9e730a78
RD
2719 // Duplicate the current line.
2720 void LineDuplicate();
2721
c26dba42
RD
2722 // Transform the selection to lower case.
2723 void LowerCase();
2724
2725 // Transform the selection to upper case.
2726 void UpperCase();
2727
2728 // Scroll the document down, keeping the caret visible.
2729 void LineScrollDown();
2730
2731 // Scroll the document up, keeping the caret visible.
2732 void LineScrollUp();
2733
2734 // Delete the selection or if no selection, the character before the caret.
2735 // Will not delete the character before at the start of a line.
2736 void DeleteBackNotLine();
2737
f114b858
RD
2738 // Move caret to first position on display line.
2739 void HomeDisplay();
2740
2b5f62a0 2741 // Move caret to first position on display line extending selection to
f114b858
RD
2742 // new caret position.
2743 void HomeDisplayExtend();
2744
2745 // Move caret to last position on display line.
2746 void LineEndDisplay();
2747
2b5f62a0 2748 // Move caret to last position on display line extending selection to new
f114b858
RD
2749 // caret position.
2750 void LineEndDisplayExtend();
2751
c26dba42
RD
2752 // These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
2753 // except they behave differently when word-wrap is enabled:
2754 // They go first to the start / end of the display line, like (Home|LineEnd)Display
2755 // The difference is that, the cursor is already at the point, it goes on to the start
2756 // or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
2757 void HomeWrap();
2758 void HomeWrapExtend();
2759 void LineEndWrap();
2760 void LineEndWrapExtend();
2761 void VCHomeWrap();
2762 void VCHomeWrapExtend();
2763
e14d10b0
RD
2764 // Copy the line containing the caret.
2765 void LineCopy();
2766
a834585d 2767 // Move the caret inside current view if it's not there already.
65ec6247
RD
2768 void MoveCaretInsideView();
2769
a834585d 2770 // How many characters are on a line, not including end of line characters?
4370573a
RD
2771 int LineLength(int line);
2772
2773 // Highlight the characters at two positions.
2774 void BraceHighlight(int pos1, int pos2);
2775
2776 // Highlight the character at a position indicating there is no matching brace.
2777 void BraceBadLight(int pos);
2778
2779 // Find the position of a matching brace or INVALID_POSITION if no match.
2780 int BraceMatch(int pos);
2781
a834585d 2782 // Are the end of line characters visible?
4370573a
RD
2783 bool GetViewEOL();
2784
a834585d 2785 // Make the end of line characters visible or invisible.
4370573a
RD
2786 void SetViewEOL(bool visible);
2787
2788 // Retrieve a pointer to the document object.
2789 void* GetDocPointer();
2790
2791 // Change the document object used.
2792 void SetDocPointer(void* docPointer);
2793
2794 // Set which document modification events are sent to the container.
2795 void SetModEventMask(int mask);
2796
2797 // Retrieve the column number which text should be kept within.
2798 int GetEdgeColumn();
2799
2800 // Set the column number of the edge.
2801 // If text goes past the edge then it is highlighted.
2802 void SetEdgeColumn(int column);
2803
2804 // Retrieve the edge highlight mode.
2805 int GetEdgeMode();
2806
2807 // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
2808 // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
2809 void SetEdgeMode(int mode);
2810
2811 // Retrieve the colour used in edge indication.
9ce192d4 2812 wxColour GetEdgeColour();
9ce192d4 2813
4370573a
RD
2814 // Change the colour used in edge indication.
2815 void SetEdgeColour(const wxColour& edgeColour);
2816
2817 // Sets the current caret position to be the search anchor.
2818 void SearchAnchor();
2819
2820 // Find some text starting at the search anchor.
65ec6247 2821 // Does not ensure the selection is visible.
4370573a
RD
2822 int SearchNext(int flags, const wxString& text);
2823
2824 // Find some text starting at the search anchor and moving backwards.
65ec6247 2825 // Does not ensure the selection is visible.
4370573a
RD
2826 int SearchPrev(int flags, const wxString& text);
2827
4370573a
RD
2828 // Retrieves the number of lines completely visible.
2829 int LinesOnScreen();
2830
2831 // Set whether a pop up menu is displayed automatically when the user presses
2832 // the wrong mouse button.
2833 void UsePopUp(bool allowPopUp);
2834
a834585d 2835 // Is the selection rectangular? The alternative is the more common stream selection.
4370573a
RD
2836 bool SelectionIsRectangle();
2837
2838 // Set the zoom level. This number of points is added to the size of all fonts.
2839 // It may be positive to magnify or negative to reduce.
2840 void SetZoom(int zoom);
2841
2842 // Retrieve the zoom level.
2843 int GetZoom();
2844
2845 // Create a new document object.
2846 // Starts with reference count of 1 and not selected into editor.
2847 void* CreateDocument();
9ce192d4 2848
4370573a
RD
2849 // Extend life of document.
2850 void AddRefDocument(void* docPointer);
9ce192d4 2851
4370573a
RD
2852 // Release a reference to the document, deleting document if it fades to black.
2853 void ReleaseDocument(void* docPointer);
2854
2855 // Get which document modification events are sent to the container.
2856 int GetModEventMask();
2857
a834585d 2858 // Change internal focus flag.
8de28db9 2859 void SetSTCFocus(bool focus);
65ec6247 2860
a834585d 2861 // Get internal focus flag.
8de28db9 2862 bool GetSTCFocus();
65ec6247 2863
a834585d 2864 // Change error status - 0 = OK.
65ec6247
RD
2865 void SetStatus(int statusCode);
2866
a834585d 2867 // Get error status.
65ec6247
RD
2868 int GetStatus();
2869
a834585d 2870 // Set whether the mouse is captured when its button is pressed.
65ec6247
RD
2871 void SetMouseDownCaptures(bool captures);
2872
a834585d 2873 // Get whether mouse gets captured.
65ec6247
RD
2874 bool GetMouseDownCaptures();
2875
a834585d 2876 // Sets the cursor to one of the SC_CURSOR* values.
88a8b04e 2877 void SetSTCCursor(int cursorType);
65ec6247 2878
a834585d 2879 // Get cursor type.
88a8b04e 2880 int GetSTCCursor();
65ec6247 2881
1a2fb4cd 2882 // Change the way control characters are displayed:
a834585d 2883 // If symbol is < 32, keep the drawn way, else, use the given character.
1a2fb4cd
RD
2884 void SetControlCharSymbol(int symbol);
2885
a834585d 2886 // Get the way control characters are displayed.
1a2fb4cd
RD
2887 int GetControlCharSymbol();
2888
a834585d 2889 // Move to the previous change in capitalisation.
65ec6247
RD
2890 void WordPartLeft();
2891
a834585d
RD
2892 // Move to the previous change in capitalisation extending selection
2893 // to new caret position.
65ec6247
RD
2894 void WordPartLeftExtend();
2895
a834585d 2896 // Move to the change next in capitalisation.
65ec6247
RD
2897 void WordPartRight();
2898
a834585d
RD
2899 // Move to the next change in capitalisation extending selection
2900 // to new caret position.
65ec6247
RD
2901 void WordPartRightExtend();
2902
a834585d
RD
2903 // Set the way the display area is determined when a particular line
2904 // is to be moved to by Find, FindNext, GotoLine, etc.
65ec6247
RD
2905 void SetVisiblePolicy(int visiblePolicy, int visibleSlop);
2906
a834585d 2907 // Delete back from the current position to the start of the line.
65ec6247
RD
2908 void DelLineLeft();
2909
a834585d 2910 // Delete forwards from the current position to the end of the line.
65ec6247
RD
2911 void DelLineRight();
2912
a834585d 2913 // Get and Set the xOffset (ie, horizonal scroll position).
1a2fb4cd
RD
2914 void SetXOffset(int newOffset);
2915 int GetXOffset();
2916
8e54aaed 2917 // Set the last x chosen value to be the caret x position.
9e730a78
RD
2918 void ChooseCaretX();
2919
a834585d
RD
2920 // Set the way the caret is kept visible when going sideway.
2921 // The exclusion zone is given in pixels.
2922 void SetXCaretPolicy(int caretPolicy, int caretSlop);
2923
2924 // Set the way the line the caret is on is kept visible.
2925 // The exclusion zone is given in lines.
2926 void SetYCaretPolicy(int caretPolicy, int caretSlop);
2927
9e730a78
RD
2928 // Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
2929 void SetPrintWrapMode(int mode);
2930
8e54aaed 2931 // Is printing line wrapped?
9e730a78
RD
2932 int GetPrintWrapMode();
2933
2934 // Set a fore colour for active hotspots.
2935 void SetHotspotActiveForeground(bool useSetting, const wxColour& fore);
2936
2937 // Set a back colour for active hotspots.
2938 void SetHotspotActiveBackground(bool useSetting, const wxColour& back);
2939
2940 // Enable / Disable underlining active hotspots.
2941 void SetHotspotActiveUnderline(bool underline);
2942
8e54aaed
RD
2943 // Limit hotspots to single line so hotspots on two lines don't merge.
2944 void SetHotspotSingleLine(bool singleLine);
2945
c26dba42
RD
2946 // Move caret between paragraphs (delimited by empty lines).
2947 void ParaDown();
2948 void ParaDownExtend();
2949 void ParaUp();
2950 void ParaUpExtend();
2951
e14d10b0
RD
2952 // Given a valid document position, return the previous position taking code
2953 // page into account. Returns 0 if passed 0.
2954 int PositionBefore(int pos);
2955
2956 // Given a valid document position, return the next position taking code
2957 // page into account. Maximum value returned is the last position in the document.
2958 int PositionAfter(int pos);
2959
2960 // Copy a range of text to the clipboard. Positions are clipped into the document.
2961 void CopyRange(int start, int end);
2962
2963 // Copy argument text to the clipboard.
2964 void CopyText(int length, const wxString& text);
2965
8e54aaed
RD
2966 // Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or
2967 // by lines (SC_SEL_LINES).
2968 void SetSelectionMode(int mode);
2969
2970 // Get the mode of the current selection.
2971 int GetSelectionMode();
2972
2973 // Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
2974 int GetLineSelStartPosition(int line);
2975
2976 // Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).
2977 int GetLineSelEndPosition(int line);
2978
c26dba42
RD
2979 // Move caret down one line, extending rectangular selection to new caret position.
2980 void LineDownRectExtend();
2981
2982 // Move caret up one line, extending rectangular selection to new caret position.
2983 void LineUpRectExtend();
2984
2985 // Move caret left one character, extending rectangular selection to new caret position.
2986 void CharLeftRectExtend();
2987
2988 // Move caret right one character, extending rectangular selection to new caret position.
2989 void CharRightRectExtend();
2990
2991 // Move caret to first position on line, extending rectangular selection to new caret position.
2992 void HomeRectExtend();
2993
2994 // Move caret to before first visible character on line.
2995 // If already there move to first character on line.
2996 // In either case, extend rectangular selection to new caret position.
2997 void VCHomeRectExtend();
2998
2999 // Move caret to last position on line, extending rectangular selection to new caret position.
3000 void LineEndRectExtend();
3001
3002 // Move caret one page up, extending rectangular selection to new caret position.
3003 void PageUpRectExtend();
3004
3005 // Move caret one page down, extending rectangular selection to new caret position.
3006 void PageDownRectExtend();
3007
3008 // Move caret to top of page, or one page up if already at top of page.
3009 void StutteredPageUp();
3010
3011 // Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.
3012 void StutteredPageUpExtend();
3013
3014 // Move caret to bottom of page, or one page down if already at bottom of page.
3015 void StutteredPageDown();
3016
3017 // Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.
3018 void StutteredPageDownExtend();
3019
3020 // Move caret left one word, position cursor at end of word.
3021 void WordLeftEnd();
3022
3023 // Move caret left one word, position cursor at end of word, extending selection to new caret position.
3024 void WordLeftEndExtend();
3025
3026 // Move caret right one word, position cursor at end of word.
3027 void WordRightEnd();
3028
3029 // Move caret right one word, position cursor at end of word, extending selection to new caret position.
3030 void WordRightEndExtend();
3031
8e54aaed
RD
3032 // Set the set of characters making up whitespace for when moving or selecting by word.
3033 // Should be called after SetWordChars.
3034 void SetWhitespaceChars(const wxString& characters);
3035
3036 // Reset the set of characters for whitespace and word characters to the defaults.
3037 void SetCharsDefault();
3038
3039 // Get currently selected item position in the auto-completion list
3040 int AutoCompGetCurrent();
3041
591d01be
RD
3042 // Enlarge the document to a particular size of text bytes.
3043 void Allocate(int bytes);
3044
1e9bafca 3045 // Find the position of a column on a line taking into account tabs and
a33203cb
RD
3046 // multi-byte characters. If beyond end of line, return line end position.
3047 int FindColumn(int line, int column);
3048
1e9bafca
RD
3049 // Can the caret preferred x position only be changed by explicit movement commands?
3050 bool GetCaretSticky();
3051
3052 // Stop the caret preferred x position changing when the user types.
3053 void SetCaretSticky(bool useCaretStickyBehaviour);
3054
3055 // Switch between sticky and non-sticky: meant to be bound to a key.
3056 void ToggleCaretSticky();
3057
3058 // Enable/Disable convert-on-paste for line endings
3059 void SetPasteConvertEndings(bool convert);
3060
3061 // Get convert-on-paste setting
3062 bool GetPasteConvertEndings();
3063
3064 // Duplicate the selection. If selection empty duplicate the line containing the caret.
3065 void SelectionDuplicate();
3066
4370573a
RD
3067 // Start notifying the container of all key presses and commands.
3068 void StartRecord();
3069
3070 // Stop notifying the container of all key presses and commands.
3071 void StopRecord();
3072
3073 // Set the lexing language of the document.
3074 void SetLexer(int lexer);
3075
3076 // Retrieve the lexing language of the document.
3077 int GetLexer();
3078
3079 // Colourise a segment of the document using the current lexing language.
3080 void Colourise(int start, int end);
3081
3082 // Set up a value that may be used by a lexer for some optional feature.
3083 void SetProperty(const wxString& key, const wxString& value);
3084
3085 // Set up the key words used by the lexer.
3086 void SetKeyWords(int keywordSet, const wxString& keyWords);
3087
65ec6247
RD
3088 // Set the lexing language of the document based on string name.
3089 void SetLexerLanguage(const wxString& language);
3090
1e9bafca
RD
3091 // Retrieve a 'property' value previously set with SetProperty.
3092 wxString GetProperty(const wxString& key);
3093
3094 // Retrieve a 'property' value previously set with SetProperty,
3095 // with '$()' variable replacement on returned buffer.
3096 wxString GetPropertyExpanded(const wxString& key);
3097
3098 // Retrieve a 'property' value previously set with SetProperty,
3099 // interpreted as an int AFTER any '$()' variable replacement.
3100 int GetPropertyInt(const wxString& key);
3101
3102 // Retrieve the number of bits the current lexer needs for styling.
3103 int GetStyleBitsNeeded();
3104
4370573a
RD
3105// END of generated section
3106//----------------------------------------------------------------------
3107// Others...
3108
3109
3110 // Returns the line number of the line with the caret.
3111 int GetCurrentLine();
3112
3113 // Extract style settings from a spec-string which is composed of one or
3114 // more of the following comma separated elements:
3115 //
3116 // bold turns on bold
3117 // italic turns on italics
5ee1d760
RD
3118 // fore:[name or #RRGGBB] sets the foreground colour
3119 // back:[name or #RRGGBB] sets the background colour
4370573a
RD
3120 // face:[facename] sets the font face name to use
3121 // size:[num] sets the font size in points
3122 // eol turns on eol filling
3123 // underline turns on underlining
3124 //
3125 void StyleSetSpec(int styleNum, const wxString& spec);
3126
3127
3128
3129 // Set style size, face, bold, italic, and underline attributes from
3130 // a wxFont's attributes.
3131 void StyleSetFont(int styleNum, wxFont& font);
3132
3133
3134
3135 // Set all font style attributes at once.
3136 void StyleSetFontAttr(int styleNum, int size,
3137 const wxString& faceName,
3138 bool bold, bool italic,
3727c043
RD
3139 bool underline,
3140 wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
4370573a
RD
3141
3142
3727c043
RD
3143 // Set the character set of the font in a style. Converts the Scintilla
3144 // character set values to a wxFontEncoding.
3145 void StyleSetCharacterSet(int style, int characterSet);
3146
3147 // Set the font encoding to be used by a style.
3148 void StyleSetFontEncoding(int style, wxFontEncoding encoding);
3149
4370573a
RD
3150
3151 // Perform one of the operations defined by the wxSTC_CMD_* constants.
3152 void CmdKeyExecute(int cmd);
3153
3154
4370573a
RD
3155 // Set the left and right margin in the edit area, measured in pixels.
3156 void SetMargins(int left, int right);
3157
3158
3159 // Retrieve the start and end positions of the current selection.
3160#ifdef SWIG
3161 void GetSelection(int* OUTPUT, int* OUTPUT);
3162#else
3163 void GetSelection(int* startPos, int* endPos);
3164#endif
3165
3166 // Retrieve the point in the window where a position is displayed.
3167 wxPoint PointFromPosition(int pos);
3168
f97d84a6
RD
3169
3170 // Scroll enough to make the given line visible
3171 void ScrollToLine(int line);
3172
3173
3174 // Scroll enough to make the given column visible
3175 void ScrollToColumn(int column);
3176
65ec6247
RD
3177
3178 // Send a message to Scintilla
3179 long SendMsg(int msg, long wp=0, long lp=0);
3180
5fa4613c
RD
3181
3182 // Set the vertical scrollbar to use instead of the ont that's built-in.
ccfc3219 3183 void SetVScrollBar(wxScrollBar* bar);
5fa4613c
RD
3184
3185
3186 // Set the horizontal scrollbar to use instead of the ont that's built-in.
ccfc3219 3187 void SetHScrollBar(wxScrollBar* bar);
5fa4613c 3188
0b9dfbc0
RD
3189 // Can be used to prevent the EVT_CHAR handler from adding the char
3190 bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; }
3191 void SetLastKeydownProcessed(bool val) { m_lastKeyDownConsumed = val; }
3192
51566b0b
RD
3193 // Write the contents of the editor to filename
3194 bool SaveFile(const wxString& filename);
3195
3196 // Load the contents of filename into the editor
3197 bool LoadFile(const wxString& filename);
3198
9d41f689 3199#ifdef STC_USE_DND
4a65f2c8 3200 // Allow for simulating a DnD DragOver
7e126a07 3201 wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def);
4a65f2c8
RD
3202
3203 // Allow for simulating a DnD DropText
3204 bool DoDropText(long x, long y, const wxString& data);
9d41f689
RD
3205#endif
3206
d1558f3d
RD
3207 // Specify whether anti-aliased fonts should be used. Will have no effect
3208 // on some platforms, but on some (wxMac for example) can greatly improve
3209 // performance.
3210 void SetUseAntiAliasing(bool useAA);
4a65f2c8 3211
d1558f3d
RD
3212 // Returns the current UseAntiAliasing setting.
3213 bool GetUseAntiAliasing();
7e126a07 3214
0b9dfbc0 3215
41a499cd
RD
3216
3217 // The following methods are nearly equivallent to their similarly named
3218 // cousins above. The difference is that these methods bypass wxString
3219 // and always use a char* even if used in a unicode build of wxWidgets.
3220 // In that case the character data will be utf-8 encoded since that is
3221 // what is used internally by Scintilla in unicode builds.
3222
3223 // Add text to the document at current position.
3224 void AddTextRaw(const char* text);
3225
3226 // Insert string at a position.
3227 void InsertTextRaw(int pos, const char* text);
3228
3229 // Retrieve the text of the line containing the caret.
3230 // Returns the index of the caret on the line.
3231#ifdef SWIG
3232 wxCharBuffer GetCurLineRaw(int* OUTPUT);
3233#else
3234 wxCharBuffer GetCurLineRaw(int* linePos=NULL);
3235#endif
3236
3237 // Retrieve the contents of a line.
3238 wxCharBuffer GetLineRaw(int line);
3239
3240 // Retrieve the selected text.
3241 wxCharBuffer GetSelectedTextRaw();
3242
3243 // Retrieve a range of text.
3244 wxCharBuffer GetTextRangeRaw(int startPos, int endPos);
3245
3246 // Replace the contents of the document with the argument text.
3247 void SetTextRaw(const char* text);
3248
3249 // Retrieve all the text in the document.
3250 wxCharBuffer GetTextRaw();
3251
3252 // Append a string to the end of the document without changing the selection.
3253 void AppendTextRaw(const char* text);
3254
1ce1bd84
RD
3255#ifdef SWIG
3256 %pythoncode "_stc_utf8_methods.py"
3257#endif
4370573a 3258//----------------------------------------------------------------------
9ce192d4
RD
3259
3260
f6bcfd97 3261#ifndef SWIG
5e6880e6 3262protected:
9ce192d4
RD
3263 // Event handlers
3264 void OnPaint(wxPaintEvent& evt);
3265 void OnScrollWin(wxScrollWinEvent& evt);
5fa4613c 3266 void OnScroll(wxScrollEvent& evt);
9ce192d4
RD
3267 void OnSize(wxSizeEvent& evt);
3268 void OnMouseLeftDown(wxMouseEvent& evt);
3269 void OnMouseMove(wxMouseEvent& evt);
3270 void OnMouseLeftUp(wxMouseEvent& evt);
ddf2da08 3271 void OnMouseRightUp(wxMouseEvent& evt);
2b5f62a0 3272 void OnMouseMiddleUp(wxMouseEvent& evt);
65ec6247 3273 void OnContextMenu(wxContextMenuEvent& evt);
37d62433 3274 void OnMouseWheel(wxMouseEvent& evt);
9ce192d4 3275 void OnChar(wxKeyEvent& evt);
f6bcfd97 3276 void OnKeyDown(wxKeyEvent& evt);
9ce192d4
RD
3277 void OnLoseFocus(wxFocusEvent& evt);
3278 void OnGainFocus(wxFocusEvent& evt);
3279 void OnSysColourChanged(wxSysColourChangedEvent& evt);
3280 void OnEraseBackground(wxEraseEvent& evt);
3281 void OnMenu(wxCommandEvent& evt);
f6bcfd97 3282 void OnListBox(wxCommandEvent& evt);
8e54aaed 3283 void OnIdle(wxIdleEvent& evt);
7e126a07 3284
8ae4f086 3285 virtual wxSize DoGetBestSize() const;
9ce192d4
RD
3286
3287 // Turn notifications from Scintilla into events
3288 void NotifyChange();
3289 void NotifyParent(SCNotification* scn);
3290
5e6880e6 3291private:
9ce192d4 3292 DECLARE_EVENT_TABLE()
ba8a4f66 3293 DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl)
9ce192d4 3294
9e730a78
RD
3295protected:
3296
9ce192d4
RD
3297 ScintillaWX* m_swx;
3298 wxStopWatch m_stopWatch;
5fa4613c
RD
3299 wxScrollBar* m_vScrollBar;
3300 wxScrollBar* m_hScrollBar;
9ce192d4 3301
d6582821 3302 bool m_lastKeyDownConsumed;
9ce192d4
RD
3303
3304 friend class ScintillaWX;
3305 friend class Platform;
f6bcfd97 3306#endif
9ce192d4
RD
3307};
3308
3309//----------------------------------------------------------------------
3310
ba8a4f66 3311class WXDLLIMPEXP_STC wxStyledTextEvent : public wxCommandEvent {
9ce192d4 3312public:
f6bcfd97 3313 wxStyledTextEvent(wxEventType commandType=0, int id=0);
4161723f
RD
3314#ifndef SWIG
3315 wxStyledTextEvent(const wxStyledTextEvent& event);
3316#endif
9ce192d4
RD
3317 ~wxStyledTextEvent() {}
3318
a29a241f
RD
3319 void SetPosition(int pos) { m_position = pos; }
3320 void SetKey(int k) { m_key = k; }
3321 void SetModifiers(int m) { m_modifiers = m; }
3322 void SetModificationType(int t) { m_modificationType = t; }
10ef30eb 3323 void SetText(const wxString& t) { m_text = t; }
a29a241f
RD
3324 void SetLength(int len) { m_length = len; }
3325 void SetLinesAdded(int num) { m_linesAdded = num; }
3326 void SetLine(int val) { m_line = val; }
3327 void SetFoldLevelNow(int val) { m_foldLevelNow = val; }
3328 void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; }
3329 void SetMargin(int val) { m_margin = val; }
3330 void SetMessage(int val) { m_message = val; }
3331 void SetWParam(int val) { m_wParam = val; }
3332 void SetLParam(int val) { m_lParam = val; }
3333 void SetListType(int val) { m_listType = val; }
3334 void SetX(int val) { m_x = val; }
3335 void SetY(int val) { m_y = val; }
3336 void SetDragText(const wxString& val) { m_dragText = val; }
3337 void SetDragAllowMove(bool val) { m_dragAllowMove = val; }
92bbd64f 3338#ifdef STC_USE_DND
a29a241f 3339 void SetDragResult(wxDragResult val) { m_dragResult = val; }
92bbd64f 3340#endif
9ce192d4
RD
3341
3342 int GetPosition() const { return m_position; }
3343 int GetKey() const { return m_key; }
3344 int GetModifiers() const { return m_modifiers; }
3345 int GetModificationType() const { return m_modificationType; }
3346 wxString GetText() const { return m_text; }
3347 int GetLength() const { return m_length; }
3348 int GetLinesAdded() const { return m_linesAdded; }
3349 int GetLine() const { return m_line; }
3350 int GetFoldLevelNow() const { return m_foldLevelNow; }
3351 int GetFoldLevelPrev() const { return m_foldLevelPrev; }
3352 int GetMargin() const { return m_margin; }
3353 int GetMessage() const { return m_message; }
3354 int GetWParam() const { return m_wParam; }
3355 int GetLParam() const { return m_lParam; }
65ec6247
RD
3356 int GetListType() const { return m_listType; }
3357 int GetX() const { return m_x; }
3358 int GetY() const { return m_y; }
a29a241f
RD
3359 wxString GetDragText() { return m_dragText; }
3360 bool GetDragAllowMove() { return m_dragAllowMove; }
92bbd64f 3361#ifdef STC_USE_DND
a29a241f 3362 wxDragResult GetDragResult() { return m_dragResult; }
92bbd64f 3363#endif
9ce192d4
RD
3364
3365 bool GetShift() const;
3366 bool GetControl() const;
3367 bool GetAlt() const;
3368
41286fd1 3369 virtual wxEvent* Clone() const { return new wxStyledTextEvent(*this); }
9ce192d4 3370
f6bcfd97 3371#ifndef SWIG
9ce192d4 3372private:
f6bcfd97
BP
3373 DECLARE_DYNAMIC_CLASS(wxStyledTextEvent)
3374
9ce192d4
RD
3375 int m_position;
3376 int m_key;
3377 int m_modifiers;
3378
3379 int m_modificationType; // wxEVT_STC_MODIFIED
3380 wxString m_text;
3381 int m_length;
3382 int m_linesAdded;
3383 int m_line;
3384 int m_foldLevelNow;
3385 int m_foldLevelPrev;
3386
3387 int m_margin; // wxEVT_STC_MARGINCLICK
3388
3389 int m_message; // wxEVT_STC_MACRORECORD
3390 int m_wParam;
3391 int m_lParam;
65ec6247
RD
3392
3393 int m_listType;
3394 int m_x;
3395 int m_y;
a29a241f
RD
3396
3397 wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
3398 bool m_dragAllowMove; // wxEVT_STC_START_DRAG
3399
92bbd64f 3400#if wxUSE_DRAG_AND_DROP
a29a241f 3401 wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
f6bcfd97 3402#endif
92bbd64f 3403#endif
9ce192d4
RD
3404};
3405
9e730a78
RD
3406
3407
d25f5fbb
RD
3408#ifndef SWIG
3409BEGIN_DECLARE_EVENT_TYPES()
7ba1412f
RD
3410 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_CHANGE, 1650)
3411 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_STYLENEEDED, 1651)
3412 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_CHARADDED, 1652)
3413 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTREACHED, 1653)
3414 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTLEFT, 1654)
3415 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_ROMODIFYATTEMPT, 1655)
3416 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_KEY, 1656)
3417 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DOUBLECLICK, 1657)
3418 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_UPDATEUI, 1658)
3419 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_MODIFIED, 1659)
3420 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_MACRORECORD, 1660)
3421 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_MARGINCLICK, 1661)
3422 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_NEEDSHOWN, 1662)
7ba1412f
RD
3423 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_PAINTED, 1664)
3424 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_USERLISTSELECTION, 1665)
3425 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_URIDROPPED, 1666)
3426 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DWELLSTART, 1667)
3427 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DWELLEND, 1668)
3428 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_START_DRAG, 1669)
3429 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DRAG_OVER, 1670)
3430 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DO_DROP, 1671)
3431 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_ZOOM, 1672)
3432 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_HOTSPOT_CLICK, 1673)
3433 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_HOTSPOT_DCLICK, 1674)
3434 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_CALLTIP_CLICK, 1675)
1e9bafca 3435 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_AUTOCOMP_SELECTION, 1676)
d25f5fbb
RD
3436END_DECLARE_EVENT_TYPES()
3437#else
3438 enum {
3439 wxEVT_STC_CHANGE,
3440 wxEVT_STC_STYLENEEDED,
3441 wxEVT_STC_CHARADDED,
d25f5fbb
RD
3442 wxEVT_STC_SAVEPOINTREACHED,
3443 wxEVT_STC_SAVEPOINTLEFT,
3444 wxEVT_STC_ROMODIFYATTEMPT,
65ec6247 3445 wxEVT_STC_KEY,
d25f5fbb 3446 wxEVT_STC_DOUBLECLICK,
65ec6247 3447 wxEVT_STC_UPDATEUI,
d25f5fbb 3448 wxEVT_STC_MODIFIED,
d25f5fbb
RD
3449 wxEVT_STC_MACRORECORD,
3450 wxEVT_STC_MARGINCLICK,
3451 wxEVT_STC_NEEDSHOWN,
65ec6247
RD
3452 wxEVT_STC_PAINTED,
3453 wxEVT_STC_USERLISTSELECTION,
3454 wxEVT_STC_URIDROPPED,
3455 wxEVT_STC_DWELLSTART,
3456 wxEVT_STC_DWELLEND,
a29a241f
RD
3457 wxEVT_STC_START_DRAG,
3458 wxEVT_STC_DRAG_OVER,
3459 wxEVT_STC_DO_DROP,
a834585d 3460 wxEVT_STC_ZOOM,
9e730a78
RD
3461 wxEVT_STC_HOTSPOT_CLICK,
3462 wxEVT_STC_HOTSPOT_DCLICK,
1e9bafca
RD
3463 wxEVT_STC_CALLTIP_CLICK,
3464 wxEVT_STC_AUTOCOMP_SELECTION
d25f5fbb
RD
3465 };
3466#endif
9ce192d4 3467
9ce192d4 3468
f6bcfd97
BP
3469
3470#ifndef SWIG
9ce192d4
RD
3471typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
3472
7e126a07
WS
3473#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3474#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3475#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3476#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3477#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3478#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3479#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3480#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3481#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3482#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3483#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3484#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3485#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3486#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3487#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3488#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3489#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3490#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3491#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3492#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3493#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3494#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3495#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3496#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
3497#define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
1e9bafca 3498#define EVT_STC_AUTOCOMP_SELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
1bc32508 3499#endif
9ce192d4
RD
3500
3501//----------------------------------------------------------------------
0c5b83b0
RD
3502// Utility functions used within wxSTC
3503
3504#ifndef SWIG
6636ac1e
RD
3505#if wxUSE_UNICODE
3506
696b38f7
JS
3507WXDLLIMPEXP_STC wxString stc2wx(const char* str);
3508WXDLLIMPEXP_STC wxString stc2wx(const char* str, size_t len);
3509WXDLLIMPEXP_STC const wxWX2MBbuf wx2stc(const wxString& str);
6636ac1e
RD
3510
3511#else // not UNICODE
0c5b83b0
RD
3512
3513inline wxString stc2wx(const char* str) {
0c5b83b0 3514 return wxString(str);
0c5b83b0 3515}
d99859e4 3516inline wxString stc2wx(const char* str, size_t len) {
0c5b83b0 3517 return wxString(str, len);
0c5b83b0 3518}
0c5b83b0
RD
3519inline const wxWX2MBbuf wx2stc(const wxString& str) {
3520 return str.mbc_str();
3521}
0c5b83b0 3522
6636ac1e
RD
3523#endif // UNICODE
3524#endif // SWIG
0c5b83b0 3525
9ce192d4
RD
3526//----------------------------------------------------------------------
3527#endif
3528
3529