1 ////////////////////////////////////////////////////////////////////////////
3 // Purpose: A wxWindows implementation of Scintilla. This class is the
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.
14 // Created: 13-Jan-2000
16 // Copyright: (c) 2000 by Total Control Software
17 // Licence: wxWindows license
18 /////////////////////////////////////////////////////////////////////////////
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
37 // SWIG can't handle "#if" type of conditionals, only "#ifdef"
41 #if wxUSE_DRAG_AND_DROP
46 //----------------------------------------------------------------------
48 // Should a wxPopupWindow be used for the call tips and autocomplete windows?
49 #ifndef wxSTC_USE_POPUP
50 #define wxSTC_USE_POPUP 1
53 //----------------------------------------------------------------------
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
58 #define wxSTC_INVALID_POSITION -1
60 // Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages
61 // as many EM_ messages can be used although that use is deprecated.
62 #define wxSTC_START 2000
63 #define wxSTC_OPTIONAL_START 3000
64 #define wxSTC_LEXER_START 4000
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
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
76 // The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+.
77 #define wxSTC_CP_DBCS 1
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
89 // Shapes used for outlining column.
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
104 // Invisible mark that only sets the line background color.
105 #define wxSTC_MARK_BACKGROUND 22
106 #define wxSTC_MARK_DOTDOTDOT 23
107 #define wxSTC_MARK_ARROWS 24
108 #define wxSTC_MARK_PIXMAP 25
109 #define wxSTC_MARK_CHARACTER 10000
111 // Markers used for outlining column.
112 #define wxSTC_MARKNUM_FOLDEREND 25
113 #define wxSTC_MARKNUM_FOLDEROPENMID 26
114 #define wxSTC_MARKNUM_FOLDERMIDTAIL 27
115 #define wxSTC_MARKNUM_FOLDERTAIL 28
116 #define wxSTC_MARKNUM_FOLDERSUB 29
117 #define wxSTC_MARKNUM_FOLDER 30
118 #define wxSTC_MARKNUM_FOLDEROPEN 31
119 #define wxSTC_MASK_FOLDERS 0xFE000000
120 #define wxSTC_MARGIN_SYMBOL 0
121 #define wxSTC_MARGIN_NUMBER 1
123 // Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
124 // Styles 38 and 39 are for future use.
125 #define wxSTC_STYLE_DEFAULT 32
126 #define wxSTC_STYLE_LINENUMBER 33
127 #define wxSTC_STYLE_BRACELIGHT 34
128 #define wxSTC_STYLE_BRACEBAD 35
129 #define wxSTC_STYLE_CONTROLCHAR 36
130 #define wxSTC_STYLE_INDENTGUIDE 37
131 #define wxSTC_STYLE_LASTPREDEFINED 39
132 #define wxSTC_STYLE_MAX 127
134 // Character set identifiers are used in StyleSetCharacterSet.
135 // The values are the same as the Windows *_CHARSET values.
136 #define wxSTC_CHARSET_ANSI 0
137 #define wxSTC_CHARSET_DEFAULT 1
138 #define wxSTC_CHARSET_BALTIC 186
139 #define wxSTC_CHARSET_CHINESEBIG5 136
140 #define wxSTC_CHARSET_EASTEUROPE 238
141 #define wxSTC_CHARSET_GB2312 134
142 #define wxSTC_CHARSET_GREEK 161
143 #define wxSTC_CHARSET_HANGUL 129
144 #define wxSTC_CHARSET_MAC 77
145 #define wxSTC_CHARSET_OEM 255
146 #define wxSTC_CHARSET_RUSSIAN 204
147 #define wxSTC_CHARSET_SHIFTJIS 128
148 #define wxSTC_CHARSET_SYMBOL 2
149 #define wxSTC_CHARSET_TURKISH 162
150 #define wxSTC_CHARSET_JOHAB 130
151 #define wxSTC_CHARSET_HEBREW 177
152 #define wxSTC_CHARSET_ARABIC 178
153 #define wxSTC_CHARSET_VIETNAMESE 163
154 #define wxSTC_CHARSET_THAI 222
155 #define wxSTC_CASE_MIXED 0
156 #define wxSTC_CASE_UPPER 1
157 #define wxSTC_CASE_LOWER 2
158 #define wxSTC_INDIC_MAX 7
159 #define wxSTC_INDIC_PLAIN 0
160 #define wxSTC_INDIC_SQUIGGLE 1
161 #define wxSTC_INDIC_TT 2
162 #define wxSTC_INDIC_DIAGONAL 3
163 #define wxSTC_INDIC_STRIKE 4
164 #define wxSTC_INDIC_HIDDEN 5
165 #define wxSTC_INDIC_BOX 6
166 #define wxSTC_INDIC0_MASK 0x20
167 #define wxSTC_INDIC1_MASK 0x40
168 #define wxSTC_INDIC2_MASK 0x80
169 #define wxSTC_INDICS_MASK 0xE0
171 // PrintColourMode - use same colours as screen.
172 #define wxSTC_PRINT_NORMAL 0
174 // PrintColourMode - invert the light value of each style for printing.
175 #define wxSTC_PRINT_INVERTLIGHT 1
177 // PrintColourMode - force black text on white background for printing.
178 #define wxSTC_PRINT_BLACKONWHITE 2
180 // PrintColourMode - text stays coloured, but all background is forced to be white for printing.
181 #define wxSTC_PRINT_COLOURONWHITE 3
183 // PrintColourMode - only the default-background is forced to be white for printing.
184 #define wxSTC_PRINT_COLOURONWHITEDEFAULTBG 4
185 #define wxSTC_FIND_WHOLEWORD 2
186 #define wxSTC_FIND_MATCHCASE 4
187 #define wxSTC_FIND_WORDSTART 0x00100000
188 #define wxSTC_FIND_REGEXP 0x00200000
189 #define wxSTC_FIND_POSIX 0x00400000
190 #define wxSTC_FOLDLEVELBASE 0x400
191 #define wxSTC_FOLDLEVELWHITEFLAG 0x1000
192 #define wxSTC_FOLDLEVELHEADERFLAG 0x2000
193 #define wxSTC_FOLDLEVELBOXHEADERFLAG 0x4000
194 #define wxSTC_FOLDLEVELBOXFOOTERFLAG 0x8000
195 #define wxSTC_FOLDLEVELCONTRACTED 0x10000
196 #define wxSTC_FOLDLEVELUNINDENT 0x20000
197 #define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF
198 #define wxSTC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002
199 #define wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004
200 #define wxSTC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008
201 #define wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010
202 #define wxSTC_FOLDFLAG_LEVELNUMBERS 0x0040
203 #define wxSTC_FOLDFLAG_BOX 0x0001
204 #define wxSTC_TIME_FOREVER 10000000
205 #define wxSTC_WRAP_NONE 0
206 #define wxSTC_WRAP_WORD 1
207 #define wxSTC_CACHE_NONE 0
208 #define wxSTC_CACHE_CARET 1
209 #define wxSTC_CACHE_PAGE 2
210 #define wxSTC_CACHE_DOCUMENT 3
211 #define wxSTC_EDGE_NONE 0
212 #define wxSTC_EDGE_LINE 1
213 #define wxSTC_EDGE_BACKGROUND 2
214 #define wxSTC_CURSORNORMAL -1
215 #define wxSTC_CURSORWAIT 4
217 // Constants for use with SetVisiblePolicy, similar to SetCaretPolicy.
218 #define wxSTC_VISIBLE_SLOP 0x01
219 #define wxSTC_VISIBLE_STRICT 0x04
221 // Caret policy, used by SetXCaretPolicy and SetYCaretPolicy.
222 // If CARET_SLOP is set, we can define a slop value: caretSlop.
223 // This value defines an unwanted zone (UZ) where the caret is... unwanted.
224 // This zone is defined as a number of pixels near the vertical margins,
225 // and as a number of lines near the horizontal margins.
226 // By keeping the caret away from the edges, it is seen within its context,
227 // so it is likely that the identifier that the caret is on can be completely seen,
228 // and that the current line is seen with some of the lines following it which are
229 // often dependent on that line.
230 #define wxSTC_CARET_SLOP 0x01
232 // If CARET_STRICT is set, the policy is enforced... strictly.
233 // The caret is centred on the display if slop is not set,
234 // and cannot go in the UZ if slop is set.
235 #define wxSTC_CARET_STRICT 0x04
237 // If CARET_JUMPS is set, the display is moved more energetically
238 // so the caret can move in the same direction longer before the policy is applied again.
239 #define wxSTC_CARET_JUMPS 0x10
241 // If CARET_EVEN is not set, instead of having symmetrical UZs,
242 // the left and bottom UZs are extended up to right and top UZs respectively.
243 // This way, we favour the displaying of useful information: the begining of lines,
244 // where most code reside, and the lines after the caret, eg. the body of a function.
245 #define wxSTC_CARET_EVEN 0x08
248 #define wxSTC_SEL_STREAM 0
249 #define wxSTC_SEL_RECTANGLE 1
250 #define wxSTC_SEL_LINES 2
252 // Maximum value of keywordSet parameter of SetKeyWords.
253 #define wxSTC_KEYWORDSET_MAX 8
256 // Type of modification and the action which caused the modification.
257 // These are defined as a bit mask to make it easy to specify which notifications are wanted.
258 // One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
259 #define wxSTC_MOD_INSERTTEXT 0x1
260 #define wxSTC_MOD_DELETETEXT 0x2
261 #define wxSTC_MOD_CHANGESTYLE 0x4
262 #define wxSTC_MOD_CHANGEFOLD 0x8
263 #define wxSTC_PERFORMED_USER 0x10
264 #define wxSTC_PERFORMED_UNDO 0x20
265 #define wxSTC_PERFORMED_REDO 0x40
266 #define wxSTC_LASTSTEPINUNDOREDO 0x100
267 #define wxSTC_MOD_CHANGEMARKER 0x200
268 #define wxSTC_MOD_BEFOREINSERT 0x400
269 #define wxSTC_MOD_BEFOREDELETE 0x800
270 #define wxSTC_MODEVENTMASKALL 0xF77
272 // Symbolic key codes and modifier flags.
273 // ASCII and other printable characters below 256.
274 // Extended keys above 300.
275 #define wxSTC_KEY_DOWN 300
276 #define wxSTC_KEY_UP 301
277 #define wxSTC_KEY_LEFT 302
278 #define wxSTC_KEY_RIGHT 303
279 #define wxSTC_KEY_HOME 304
280 #define wxSTC_KEY_END 305
281 #define wxSTC_KEY_PRIOR 306
282 #define wxSTC_KEY_NEXT 307
283 #define wxSTC_KEY_DELETE 308
284 #define wxSTC_KEY_INSERT 309
285 #define wxSTC_KEY_ESCAPE 7
286 #define wxSTC_KEY_BACK 8
287 #define wxSTC_KEY_TAB 9
288 #define wxSTC_KEY_RETURN 13
289 #define wxSTC_KEY_ADD 310
290 #define wxSTC_KEY_SUBTRACT 311
291 #define wxSTC_KEY_DIVIDE 312
292 #define wxSTC_SCMOD_SHIFT 1
293 #define wxSTC_SCMOD_CTRL 2
294 #define wxSTC_SCMOD_ALT 4
297 #define wxSTC_LEX_CONTAINER 0
298 #define wxSTC_LEX_NULL 1
299 #define wxSTC_LEX_PYTHON 2
300 #define wxSTC_LEX_CPP 3
301 #define wxSTC_LEX_HTML 4
302 #define wxSTC_LEX_XML 5
303 #define wxSTC_LEX_PERL 6
304 #define wxSTC_LEX_SQL 7
305 #define wxSTC_LEX_VB 8
306 #define wxSTC_LEX_PROPERTIES 9
307 #define wxSTC_LEX_ERRORLIST 10
308 #define wxSTC_LEX_MAKEFILE 11
309 #define wxSTC_LEX_BATCH 12
310 #define wxSTC_LEX_XCODE 13
311 #define wxSTC_LEX_LATEX 14
312 #define wxSTC_LEX_LUA 15
313 #define wxSTC_LEX_DIFF 16
314 #define wxSTC_LEX_CONF 17
315 #define wxSTC_LEX_PASCAL 18
316 #define wxSTC_LEX_AVE 19
317 #define wxSTC_LEX_ADA 20
318 #define wxSTC_LEX_LISP 21
319 #define wxSTC_LEX_RUBY 22
320 #define wxSTC_LEX_EIFFEL 23
321 #define wxSTC_LEX_EIFFELKW 24
322 #define wxSTC_LEX_TCL 25
323 #define wxSTC_LEX_NNCRONTAB 26
324 #define wxSTC_LEX_BULLANT 27
325 #define wxSTC_LEX_VBSCRIPT 28
326 #define wxSTC_LEX_ASP 29
327 #define wxSTC_LEX_PHP 30
328 #define wxSTC_LEX_BAAN 31
329 #define wxSTC_LEX_MATLAB 32
330 #define wxSTC_LEX_SCRIPTOL 33
331 #define wxSTC_LEX_ASM 34
332 #define wxSTC_LEX_CPPNOCASE 35
333 #define wxSTC_LEX_FORTRAN 36
334 #define wxSTC_LEX_F77 37
335 #define wxSTC_LEX_CSS 38
336 #define wxSTC_LEX_POV 39
337 #define wxSTC_LEX_LOUT 40
338 #define wxSTC_LEX_ESCRIPT 41
339 #define wxSTC_LEX_PS 42
340 #define wxSTC_LEX_NSIS 43
341 #define wxSTC_LEX_MMIXAL 44
342 #define wxSTC_LEX_CLW 45
343 #define wxSTC_LEX_CLWNOCASE 46
344 #define wxSTC_LEX_LOT 47
345 #define wxSTC_LEX_YAML 48
346 #define wxSTC_LEX_TEX 49
347 #define wxSTC_LEX_METAPOST 50
348 #define wxSTC_LEX_POWERBASIC 51
349 #define wxSTC_LEX_FORTH 52
350 #define wxSTC_LEX_ERLANG 53
351 #define wxSTC_LEX_OCTAVE 54
353 // When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
354 // value assigned in sequence from SCLEX_AUTOMATIC+1.
355 #define wxSTC_LEX_AUTOMATIC 1000
357 // Lexical states for SCLEX_PYTHON
358 #define wxSTC_P_DEFAULT 0
359 #define wxSTC_P_COMMENTLINE 1
360 #define wxSTC_P_NUMBER 2
361 #define wxSTC_P_STRING 3
362 #define wxSTC_P_CHARACTER 4
363 #define wxSTC_P_WORD 5
364 #define wxSTC_P_TRIPLE 6
365 #define wxSTC_P_TRIPLEDOUBLE 7
366 #define wxSTC_P_CLASSNAME 8
367 #define wxSTC_P_DEFNAME 9
368 #define wxSTC_P_OPERATOR 10
369 #define wxSTC_P_IDENTIFIER 11
370 #define wxSTC_P_COMMENTBLOCK 12
371 #define wxSTC_P_STRINGEOL 13
373 // Lexical states for SCLEX_CPP
374 #define wxSTC_C_DEFAULT 0
375 #define wxSTC_C_COMMENT 1
376 #define wxSTC_C_COMMENTLINE 2
377 #define wxSTC_C_COMMENTDOC 3
378 #define wxSTC_C_NUMBER 4
379 #define wxSTC_C_WORD 5
380 #define wxSTC_C_STRING 6
381 #define wxSTC_C_CHARACTER 7
382 #define wxSTC_C_UUID 8
383 #define wxSTC_C_PREPROCESSOR 9
384 #define wxSTC_C_OPERATOR 10
385 #define wxSTC_C_IDENTIFIER 11
386 #define wxSTC_C_STRINGEOL 12
387 #define wxSTC_C_VERBATIM 13
388 #define wxSTC_C_REGEX 14
389 #define wxSTC_C_COMMENTLINEDOC 15
390 #define wxSTC_C_WORD2 16
391 #define wxSTC_C_COMMENTDOCKEYWORD 17
392 #define wxSTC_C_COMMENTDOCKEYWORDERROR 18
393 #define wxSTC_C_GLOBALCLASS 19
395 // Lexical states for SCLEX_HTML, SCLEX_XML
396 #define wxSTC_H_DEFAULT 0
397 #define wxSTC_H_TAG 1
398 #define wxSTC_H_TAGUNKNOWN 2
399 #define wxSTC_H_ATTRIBUTE 3
400 #define wxSTC_H_ATTRIBUTEUNKNOWN 4
401 #define wxSTC_H_NUMBER 5
402 #define wxSTC_H_DOUBLESTRING 6
403 #define wxSTC_H_SINGLESTRING 7
404 #define wxSTC_H_OTHER 8
405 #define wxSTC_H_COMMENT 9
406 #define wxSTC_H_ENTITY 10
409 #define wxSTC_H_TAGEND 11
410 #define wxSTC_H_XMLSTART 12
411 #define wxSTC_H_XMLEND 13
412 #define wxSTC_H_SCRIPT 14
413 #define wxSTC_H_ASP 15
414 #define wxSTC_H_ASPAT 16
415 #define wxSTC_H_CDATA 17
416 #define wxSTC_H_QUESTION 18
419 #define wxSTC_H_VALUE 19
422 #define wxSTC_H_XCCOMMENT 20
425 #define wxSTC_H_SGML_DEFAULT 21
426 #define wxSTC_H_SGML_COMMAND 22
427 #define wxSTC_H_SGML_1ST_PARAM 23
428 #define wxSTC_H_SGML_DOUBLESTRING 24
429 #define wxSTC_H_SGML_SIMPLESTRING 25
430 #define wxSTC_H_SGML_ERROR 26
431 #define wxSTC_H_SGML_SPECIAL 27
432 #define wxSTC_H_SGML_ENTITY 28
433 #define wxSTC_H_SGML_COMMENT 29
434 #define wxSTC_H_SGML_1ST_PARAM_COMMENT 30
435 #define wxSTC_H_SGML_BLOCK_DEFAULT 31
437 // Embedded Javascript
438 #define wxSTC_HJ_START 40
439 #define wxSTC_HJ_DEFAULT 41
440 #define wxSTC_HJ_COMMENT 42
441 #define wxSTC_HJ_COMMENTLINE 43
442 #define wxSTC_HJ_COMMENTDOC 44
443 #define wxSTC_HJ_NUMBER 45
444 #define wxSTC_HJ_WORD 46
445 #define wxSTC_HJ_KEYWORD 47
446 #define wxSTC_HJ_DOUBLESTRING 48
447 #define wxSTC_HJ_SINGLESTRING 49
448 #define wxSTC_HJ_SYMBOLS 50
449 #define wxSTC_HJ_STRINGEOL 51
450 #define wxSTC_HJ_REGEX 52
453 #define wxSTC_HJA_START 55
454 #define wxSTC_HJA_DEFAULT 56
455 #define wxSTC_HJA_COMMENT 57
456 #define wxSTC_HJA_COMMENTLINE 58
457 #define wxSTC_HJA_COMMENTDOC 59
458 #define wxSTC_HJA_NUMBER 60
459 #define wxSTC_HJA_WORD 61
460 #define wxSTC_HJA_KEYWORD 62
461 #define wxSTC_HJA_DOUBLESTRING 63
462 #define wxSTC_HJA_SINGLESTRING 64
463 #define wxSTC_HJA_SYMBOLS 65
464 #define wxSTC_HJA_STRINGEOL 66
465 #define wxSTC_HJA_REGEX 67
468 #define wxSTC_HB_START 70
469 #define wxSTC_HB_DEFAULT 71
470 #define wxSTC_HB_COMMENTLINE 72
471 #define wxSTC_HB_NUMBER 73
472 #define wxSTC_HB_WORD 74
473 #define wxSTC_HB_STRING 75
474 #define wxSTC_HB_IDENTIFIER 76
475 #define wxSTC_HB_STRINGEOL 77
478 #define wxSTC_HBA_START 80
479 #define wxSTC_HBA_DEFAULT 81
480 #define wxSTC_HBA_COMMENTLINE 82
481 #define wxSTC_HBA_NUMBER 83
482 #define wxSTC_HBA_WORD 84
483 #define wxSTC_HBA_STRING 85
484 #define wxSTC_HBA_IDENTIFIER 86
485 #define wxSTC_HBA_STRINGEOL 87
488 #define wxSTC_HP_START 90
489 #define wxSTC_HP_DEFAULT 91
490 #define wxSTC_HP_COMMENTLINE 92
491 #define wxSTC_HP_NUMBER 93
492 #define wxSTC_HP_STRING 94
493 #define wxSTC_HP_CHARACTER 95
494 #define wxSTC_HP_WORD 96
495 #define wxSTC_HP_TRIPLE 97
496 #define wxSTC_HP_TRIPLEDOUBLE 98
497 #define wxSTC_HP_CLASSNAME 99
498 #define wxSTC_HP_DEFNAME 100
499 #define wxSTC_HP_OPERATOR 101
500 #define wxSTC_HP_IDENTIFIER 102
503 #define wxSTC_HPA_START 105
504 #define wxSTC_HPA_DEFAULT 106
505 #define wxSTC_HPA_COMMENTLINE 107
506 #define wxSTC_HPA_NUMBER 108
507 #define wxSTC_HPA_STRING 109
508 #define wxSTC_HPA_CHARACTER 110
509 #define wxSTC_HPA_WORD 111
510 #define wxSTC_HPA_TRIPLE 112
511 #define wxSTC_HPA_TRIPLEDOUBLE 113
512 #define wxSTC_HPA_CLASSNAME 114
513 #define wxSTC_HPA_DEFNAME 115
514 #define wxSTC_HPA_OPERATOR 116
515 #define wxSTC_HPA_IDENTIFIER 117
518 #define wxSTC_HPHP_DEFAULT 118
519 #define wxSTC_HPHP_HSTRING 119
520 #define wxSTC_HPHP_SIMPLESTRING 120
521 #define wxSTC_HPHP_WORD 121
522 #define wxSTC_HPHP_NUMBER 122
523 #define wxSTC_HPHP_VARIABLE 123
524 #define wxSTC_HPHP_COMMENT 124
525 #define wxSTC_HPHP_COMMENTLINE 125
526 #define wxSTC_HPHP_HSTRING_VARIABLE 126
527 #define wxSTC_HPHP_OPERATOR 127
529 // Lexical states for SCLEX_PERL
530 #define wxSTC_PL_DEFAULT 0
531 #define wxSTC_PL_ERROR 1
532 #define wxSTC_PL_COMMENTLINE 2
533 #define wxSTC_PL_POD 3
534 #define wxSTC_PL_NUMBER 4
535 #define wxSTC_PL_WORD 5
536 #define wxSTC_PL_STRING 6
537 #define wxSTC_PL_CHARACTER 7
538 #define wxSTC_PL_PUNCTUATION 8
539 #define wxSTC_PL_PREPROCESSOR 9
540 #define wxSTC_PL_OPERATOR 10
541 #define wxSTC_PL_IDENTIFIER 11
542 #define wxSTC_PL_SCALAR 12
543 #define wxSTC_PL_ARRAY 13
544 #define wxSTC_PL_HASH 14
545 #define wxSTC_PL_SYMBOLTABLE 15
546 #define wxSTC_PL_REGEX 17
547 #define wxSTC_PL_REGSUBST 18
548 #define wxSTC_PL_LONGQUOTE 19
549 #define wxSTC_PL_BACKTICKS 20
550 #define wxSTC_PL_DATASECTION 21
551 #define wxSTC_PL_HERE_DELIM 22
552 #define wxSTC_PL_HERE_Q 23
553 #define wxSTC_PL_HERE_QQ 24
554 #define wxSTC_PL_HERE_QX 25
555 #define wxSTC_PL_STRING_Q 26
556 #define wxSTC_PL_STRING_QQ 27
557 #define wxSTC_PL_STRING_QX 28
558 #define wxSTC_PL_STRING_QR 29
559 #define wxSTC_PL_STRING_QW 30
561 // Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC
562 #define wxSTC_B_DEFAULT 0
563 #define wxSTC_B_COMMENT 1
564 #define wxSTC_B_NUMBER 2
565 #define wxSTC_B_KEYWORD 3
566 #define wxSTC_B_STRING 4
567 #define wxSTC_B_PREPROCESSOR 5
568 #define wxSTC_B_OPERATOR 6
569 #define wxSTC_B_IDENTIFIER 7
570 #define wxSTC_B_DATE 8
571 #define wxSTC_B_STRINGEOL 9
572 #define wxSTC_B_KEYWORD2 10
573 #define wxSTC_B_KEYWORD3 11
574 #define wxSTC_B_KEYWORD4 12
576 // Lexical states for SCLEX_PROPERTIES
577 #define wxSTC_PROPS_DEFAULT 0
578 #define wxSTC_PROPS_COMMENT 1
579 #define wxSTC_PROPS_SECTION 2
580 #define wxSTC_PROPS_ASSIGNMENT 3
581 #define wxSTC_PROPS_DEFVAL 4
583 // Lexical states for SCLEX_LATEX
584 #define wxSTC_L_DEFAULT 0
585 #define wxSTC_L_COMMAND 1
586 #define wxSTC_L_TAG 2
587 #define wxSTC_L_MATH 3
588 #define wxSTC_L_COMMENT 4
590 // Lexical states for SCLEX_LUA
591 #define wxSTC_LUA_DEFAULT 0
592 #define wxSTC_LUA_COMMENT 1
593 #define wxSTC_LUA_COMMENTLINE 2
594 #define wxSTC_LUA_COMMENTDOC 3
595 #define wxSTC_LUA_NUMBER 4
596 #define wxSTC_LUA_WORD 5
597 #define wxSTC_LUA_STRING 6
598 #define wxSTC_LUA_CHARACTER 7
599 #define wxSTC_LUA_LITERALSTRING 8
600 #define wxSTC_LUA_PREPROCESSOR 9
601 #define wxSTC_LUA_OPERATOR 10
602 #define wxSTC_LUA_IDENTIFIER 11
603 #define wxSTC_LUA_STRINGEOL 12
604 #define wxSTC_LUA_WORD2 13
605 #define wxSTC_LUA_WORD3 14
606 #define wxSTC_LUA_WORD4 15
607 #define wxSTC_LUA_WORD5 16
608 #define wxSTC_LUA_WORD6 17
609 #define wxSTC_LUA_WORD7 18
610 #define wxSTC_LUA_WORD8 19
612 // Lexical states for SCLEX_ERRORLIST
613 #define wxSTC_ERR_DEFAULT 0
614 #define wxSTC_ERR_PYTHON 1
615 #define wxSTC_ERR_GCC 2
616 #define wxSTC_ERR_MS 3
617 #define wxSTC_ERR_CMD 4
618 #define wxSTC_ERR_BORLAND 5
619 #define wxSTC_ERR_PERL 6
620 #define wxSTC_ERR_NET 7
621 #define wxSTC_ERR_LUA 8
622 #define wxSTC_ERR_CTAG 9
623 #define wxSTC_ERR_DIFF_CHANGED 10
624 #define wxSTC_ERR_DIFF_ADDITION 11
625 #define wxSTC_ERR_DIFF_DELETION 12
626 #define wxSTC_ERR_DIFF_MESSAGE 13
627 #define wxSTC_ERR_PHP 14
628 #define wxSTC_ERR_ELF 15
629 #define wxSTC_ERR_IFC 16
630 #define wxSTC_ERR_IFORT 17
631 #define wxSTC_ERR_ABSF 18
633 // Lexical states for SCLEX_BATCH
634 #define wxSTC_BAT_DEFAULT 0
635 #define wxSTC_BAT_COMMENT 1
636 #define wxSTC_BAT_WORD 2
637 #define wxSTC_BAT_LABEL 3
638 #define wxSTC_BAT_HIDE 4
639 #define wxSTC_BAT_COMMAND 5
640 #define wxSTC_BAT_IDENTIFIER 6
641 #define wxSTC_BAT_OPERATOR 7
643 // Lexical states for SCLEX_MAKEFILE
644 #define wxSTC_MAKE_DEFAULT 0
645 #define wxSTC_MAKE_COMMENT 1
646 #define wxSTC_MAKE_PREPROCESSOR 2
647 #define wxSTC_MAKE_IDENTIFIER 3
648 #define wxSTC_MAKE_OPERATOR 4
649 #define wxSTC_MAKE_TARGET 5
650 #define wxSTC_MAKE_IDEOL 9
652 // Lexical states for SCLEX_DIFF
653 #define wxSTC_DIFF_DEFAULT 0
654 #define wxSTC_DIFF_COMMENT 1
655 #define wxSTC_DIFF_COMMAND 2
656 #define wxSTC_DIFF_HEADER 3
657 #define wxSTC_DIFF_POSITION 4
658 #define wxSTC_DIFF_DELETED 5
659 #define wxSTC_DIFF_ADDED 6
661 // Lexical states for SCLEX_CONF (Apache Configuration Files Lexer)
662 #define wxSTC_CONF_DEFAULT 0
663 #define wxSTC_CONF_COMMENT 1
664 #define wxSTC_CONF_NUMBER 2
665 #define wxSTC_CONF_IDENTIFIER 3
666 #define wxSTC_CONF_EXTENSION 4
667 #define wxSTC_CONF_PARAMETER 5
668 #define wxSTC_CONF_STRING 6
669 #define wxSTC_CONF_OPERATOR 7
670 #define wxSTC_CONF_IP 8
671 #define wxSTC_CONF_DIRECTIVE 9
673 // Lexical states for SCLEX_AVE, Avenue
674 #define wxSTC_AVE_DEFAULT 0
675 #define wxSTC_AVE_COMMENT 1
676 #define wxSTC_AVE_NUMBER 2
677 #define wxSTC_AVE_WORD 3
678 #define wxSTC_AVE_STRING 6
679 #define wxSTC_AVE_ENUM 7
680 #define wxSTC_AVE_STRINGEOL 8
681 #define wxSTC_AVE_IDENTIFIER 9
682 #define wxSTC_AVE_OPERATOR 10
683 #define wxSTC_AVE_WORD1 11
684 #define wxSTC_AVE_WORD2 12
685 #define wxSTC_AVE_WORD3 13
686 #define wxSTC_AVE_WORD4 14
687 #define wxSTC_AVE_WORD5 15
688 #define wxSTC_AVE_WORD6 16
690 // Lexical states for SCLEX_ADA
691 #define wxSTC_ADA_DEFAULT 0
692 #define wxSTC_ADA_WORD 1
693 #define wxSTC_ADA_IDENTIFIER 2
694 #define wxSTC_ADA_NUMBER 3
695 #define wxSTC_ADA_DELIMITER 4
696 #define wxSTC_ADA_CHARACTER 5
697 #define wxSTC_ADA_CHARACTEREOL 6
698 #define wxSTC_ADA_STRING 7
699 #define wxSTC_ADA_STRINGEOL 8
700 #define wxSTC_ADA_LABEL 9
701 #define wxSTC_ADA_COMMENTLINE 10
702 #define wxSTC_ADA_ILLEGAL 11
704 // Lexical states for SCLEX_BAAN
705 #define wxSTC_BAAN_DEFAULT 0
706 #define wxSTC_BAAN_COMMENT 1
707 #define wxSTC_BAAN_COMMENTDOC 2
708 #define wxSTC_BAAN_NUMBER 3
709 #define wxSTC_BAAN_WORD 4
710 #define wxSTC_BAAN_STRING 5
711 #define wxSTC_BAAN_PREPROCESSOR 6
712 #define wxSTC_BAAN_OPERATOR 7
713 #define wxSTC_BAAN_IDENTIFIER 8
714 #define wxSTC_BAAN_STRINGEOL 9
715 #define wxSTC_BAAN_WORD2 10
717 // Lexical states for SCLEX_LISP
718 #define wxSTC_LISP_DEFAULT 0
719 #define wxSTC_LISP_COMMENT 1
720 #define wxSTC_LISP_NUMBER 2
721 #define wxSTC_LISP_KEYWORD 3
722 #define wxSTC_LISP_STRING 6
723 #define wxSTC_LISP_STRINGEOL 8
724 #define wxSTC_LISP_IDENTIFIER 9
725 #define wxSTC_LISP_OPERATOR 10
727 // Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
728 #define wxSTC_EIFFEL_DEFAULT 0
729 #define wxSTC_EIFFEL_COMMENTLINE 1
730 #define wxSTC_EIFFEL_NUMBER 2
731 #define wxSTC_EIFFEL_WORD 3
732 #define wxSTC_EIFFEL_STRING 4
733 #define wxSTC_EIFFEL_CHARACTER 5
734 #define wxSTC_EIFFEL_OPERATOR 6
735 #define wxSTC_EIFFEL_IDENTIFIER 7
736 #define wxSTC_EIFFEL_STRINGEOL 8
738 // Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer)
739 #define wxSTC_NNCRONTAB_DEFAULT 0
740 #define wxSTC_NNCRONTAB_COMMENT 1
741 #define wxSTC_NNCRONTAB_TASK 2
742 #define wxSTC_NNCRONTAB_SECTION 3
743 #define wxSTC_NNCRONTAB_KEYWORD 4
744 #define wxSTC_NNCRONTAB_MODIFIER 5
745 #define wxSTC_NNCRONTAB_ASTERISK 6
746 #define wxSTC_NNCRONTAB_NUMBER 7
747 #define wxSTC_NNCRONTAB_STRING 8
748 #define wxSTC_NNCRONTAB_ENVIRONMENT 9
749 #define wxSTC_NNCRONTAB_IDENTIFIER 10
751 // Lexical states for SCLEX_FORTH (Forth Lexer)
752 #define wxSTC_FORTH_DEFAULT 0
753 #define wxSTC_FORTH_COMMENT 1
754 #define wxSTC_FORTH_COMMENT_ML 2
755 #define wxSTC_FORTH_IDENTIFIER 3
756 #define wxSTC_FORTH_CONTROL 4
757 #define wxSTC_FORTH_KEYWORD 5
758 #define wxSTC_FORTH_DEFWORD 6
759 #define wxSTC_FORTH_PREWORD1 7
760 #define wxSTC_FORTH_PREWORD2 8
761 #define wxSTC_FORTH_NUMBER 9
762 #define wxSTC_FORTH_STRING 10
763 #define wxSTC_FORTH_LOCALE 11
765 // Lexical states for SCLEX_MATLAB
766 #define wxSTC_MATLAB_DEFAULT 0
767 #define wxSTC_MATLAB_COMMENT 1
768 #define wxSTC_MATLAB_COMMAND 2
769 #define wxSTC_MATLAB_NUMBER 3
770 #define wxSTC_MATLAB_KEYWORD 4
772 // single quoted string
773 #define wxSTC_MATLAB_STRING 5
774 #define wxSTC_MATLAB_OPERATOR 6
775 #define wxSTC_MATLAB_IDENTIFIER 7
776 #define wxSTC_MATLAB_DOUBLEQUOTESTRING 8
778 // Lexical states for SCLEX_SCRIPTOL
779 #define wxSTC_SCRIPTOL_DEFAULT 0
780 #define wxSTC_SCRIPTOL_WHITE 1
781 #define wxSTC_SCRIPTOL_COMMENTLINE 2
782 #define wxSTC_SCRIPTOL_PERSISTENT 3
783 #define wxSTC_SCRIPTOL_CSTYLE 4
784 #define wxSTC_SCRIPTOL_COMMENTBLOCK 5
785 #define wxSTC_SCRIPTOL_NUMBER 6
786 #define wxSTC_SCRIPTOL_STRING 7
787 #define wxSTC_SCRIPTOL_CHARACTER 8
788 #define wxSTC_SCRIPTOL_STRINGEOL 9
789 #define wxSTC_SCRIPTOL_KEYWORD 10
790 #define wxSTC_SCRIPTOL_OPERATOR 11
791 #define wxSTC_SCRIPTOL_IDENTIFIER 12
792 #define wxSTC_SCRIPTOL_TRIPLE 13
793 #define wxSTC_SCRIPTOL_CLASSNAME 14
794 #define wxSTC_SCRIPTOL_PREPROCESSOR 15
796 // Lexical states for SCLEX_ASM
797 #define wxSTC_ASM_DEFAULT 0
798 #define wxSTC_ASM_COMMENT 1
799 #define wxSTC_ASM_NUMBER 2
800 #define wxSTC_ASM_STRING 3
801 #define wxSTC_ASM_OPERATOR 4
802 #define wxSTC_ASM_IDENTIFIER 5
803 #define wxSTC_ASM_CPUINSTRUCTION 6
804 #define wxSTC_ASM_MATHINSTRUCTION 7
805 #define wxSTC_ASM_REGISTER 8
806 #define wxSTC_ASM_DIRECTIVE 9
807 #define wxSTC_ASM_DIRECTIVEOPERAND 10
808 #define wxSTC_ASM_COMMENTBLOCK 11
809 #define wxSTC_ASM_CHARACTER 12
810 #define wxSTC_ASM_STRINGEOL 13
811 #define wxSTC_ASM_EXTINSTRUCTION 14
813 // Lexical states for SCLEX_FORTRAN
814 #define wxSTC_F_DEFAULT 0
815 #define wxSTC_F_COMMENT 1
816 #define wxSTC_F_NUMBER 2
817 #define wxSTC_F_STRING1 3
818 #define wxSTC_F_STRING2 4
819 #define wxSTC_F_STRINGEOL 5
820 #define wxSTC_F_OPERATOR 6
821 #define wxSTC_F_IDENTIFIER 7
822 #define wxSTC_F_WORD 8
823 #define wxSTC_F_WORD2 9
824 #define wxSTC_F_WORD3 10
825 #define wxSTC_F_PREPROCESSOR 11
826 #define wxSTC_F_OPERATOR2 12
827 #define wxSTC_F_LABEL 13
828 #define wxSTC_F_CONTINUATION 14
830 // Lexical states for SCLEX_CSS
831 #define wxSTC_CSS_DEFAULT 0
832 #define wxSTC_CSS_TAG 1
833 #define wxSTC_CSS_CLASS 2
834 #define wxSTC_CSS_PSEUDOCLASS 3
835 #define wxSTC_CSS_UNKNOWN_PSEUDOCLASS 4
836 #define wxSTC_CSS_OPERATOR 5
837 #define wxSTC_CSS_IDENTIFIER 6
838 #define wxSTC_CSS_UNKNOWN_IDENTIFIER 7
839 #define wxSTC_CSS_VALUE 8
840 #define wxSTC_CSS_COMMENT 9
841 #define wxSTC_CSS_ID 10
842 #define wxSTC_CSS_IMPORTANT 11
843 #define wxSTC_CSS_DIRECTIVE 12
844 #define wxSTC_CSS_DOUBLESTRING 13
845 #define wxSTC_CSS_SINGLESTRING 14
847 // Lexical states for SCLEX_POV
848 #define wxSTC_POV_DEFAULT 0
849 #define wxSTC_POV_COMMENT 1
850 #define wxSTC_POV_COMMENTLINE 2
851 #define wxSTC_POV_NUMBER 3
852 #define wxSTC_POV_OPERATOR 4
853 #define wxSTC_POV_IDENTIFIER 5
854 #define wxSTC_POV_STRING 6
855 #define wxSTC_POV_STRINGEOL 7
856 #define wxSTC_POV_DIRECTIVE 8
857 #define wxSTC_POV_BADDIRECTIVE 9
858 #define wxSTC_POV_WORD2 10
859 #define wxSTC_POV_WORD3 11
860 #define wxSTC_POV_WORD4 12
861 #define wxSTC_POV_WORD5 13
862 #define wxSTC_POV_WORD6 14
863 #define wxSTC_POV_WORD7 15
864 #define wxSTC_POV_WORD8 16
866 // Lexical states for SCLEX_LOUT
867 #define wxSTC_LOUT_DEFAULT 0
868 #define wxSTC_LOUT_COMMENT 1
869 #define wxSTC_LOUT_NUMBER 2
870 #define wxSTC_LOUT_WORD 3
871 #define wxSTC_LOUT_WORD2 4
872 #define wxSTC_LOUT_WORD3 5
873 #define wxSTC_LOUT_WORD4 6
874 #define wxSTC_LOUT_STRING 7
875 #define wxSTC_LOUT_OPERATOR 8
876 #define wxSTC_LOUT_IDENTIFIER 9
877 #define wxSTC_LOUT_STRINGEOL 10
879 // Lexical states for SCLEX_ESCRIPT
880 #define wxSTC_ESCRIPT_DEFAULT 0
881 #define wxSTC_ESCRIPT_COMMENT 1
882 #define wxSTC_ESCRIPT_COMMENTLINE 2
883 #define wxSTC_ESCRIPT_COMMENTDOC 3
884 #define wxSTC_ESCRIPT_NUMBER 4
885 #define wxSTC_ESCRIPT_WORD 5
886 #define wxSTC_ESCRIPT_STRING 6
887 #define wxSTC_ESCRIPT_OPERATOR 7
888 #define wxSTC_ESCRIPT_IDENTIFIER 8
889 #define wxSTC_ESCRIPT_BRACE 9
890 #define wxSTC_ESCRIPT_WORD2 10
891 #define wxSTC_ESCRIPT_WORD3 11
893 // Lexical states for SCLEX_PS
894 #define wxSTC_PS_DEFAULT 0
895 #define wxSTC_PS_COMMENT 1
896 #define wxSTC_PS_DSC_COMMENT 2
897 #define wxSTC_PS_DSC_VALUE 3
898 #define wxSTC_PS_NUMBER 4
899 #define wxSTC_PS_NAME 5
900 #define wxSTC_PS_KEYWORD 6
901 #define wxSTC_PS_LITERAL 7
902 #define wxSTC_PS_IMMEVAL 8
903 #define wxSTC_PS_PAREN_ARRAY 9
904 #define wxSTC_PS_PAREN_DICT 10
905 #define wxSTC_PS_PAREN_PROC 11
906 #define wxSTC_PS_TEXT 12
907 #define wxSTC_PS_HEXSTRING 13
908 #define wxSTC_PS_BASE85STRING 14
909 #define wxSTC_PS_BADSTRINGCHAR 15
911 // Lexical states for SCLEX_NSIS
912 #define wxSTC_NSIS_DEFAULT 0
913 #define wxSTC_NSIS_COMMENT 1
914 #define wxSTC_NSIS_STRINGDQ 2
915 #define wxSTC_NSIS_STRINGLQ 3
916 #define wxSTC_NSIS_STRINGRQ 4
917 #define wxSTC_NSIS_FUNCTION 5
918 #define wxSTC_NSIS_VARIABLE 6
919 #define wxSTC_NSIS_LABEL 7
920 #define wxSTC_NSIS_USERDEFINED 8
921 #define wxSTC_NSIS_SECTIONDEF 9
922 #define wxSTC_NSIS_SUBSECTIONDEF 10
923 #define wxSTC_NSIS_IFDEFINEDEF 11
924 #define wxSTC_NSIS_MACRODEF 12
925 #define wxSTC_NSIS_STRINGVAR 13
927 // Lexical states for SCLEX_MMIXAL
928 #define wxSTC_MMIXAL_LEADWS 0
929 #define wxSTC_MMIXAL_COMMENT 1
930 #define wxSTC_MMIXAL_LABEL 2
931 #define wxSTC_MMIXAL_OPCODE 3
932 #define wxSTC_MMIXAL_OPCODE_PRE 4
933 #define wxSTC_MMIXAL_OPCODE_VALID 5
934 #define wxSTC_MMIXAL_OPCODE_UNKNOWN 6
935 #define wxSTC_MMIXAL_OPCODE_POST 7
936 #define wxSTC_MMIXAL_OPERANDS 8
937 #define wxSTC_MMIXAL_NUMBER 9
938 #define wxSTC_MMIXAL_REF 10
939 #define wxSTC_MMIXAL_CHAR 11
940 #define wxSTC_MMIXAL_STRING 12
941 #define wxSTC_MMIXAL_REGISTER 13
942 #define wxSTC_MMIXAL_HEX 14
943 #define wxSTC_MMIXAL_OPERATOR 15
944 #define wxSTC_MMIXAL_SYMBOL 16
945 #define wxSTC_MMIXAL_INCLUDE 17
947 // Lexical states for SCLEX_CLW
948 #define wxSTC_CLW_DEFAULT 0
949 #define wxSTC_CLW_LABEL 1
950 #define wxSTC_CLW_COMMENT 2
951 #define wxSTC_CLW_STRING 3
952 #define wxSTC_CLW_USER_IDENTIFIER 4
953 #define wxSTC_CLW_INTEGER_CONSTANT 5
954 #define wxSTC_CLW_REAL_CONSTANT 6
955 #define wxSTC_CLW_PICTURE_STRING 7
956 #define wxSTC_CLW_KEYWORD 8
957 #define wxSTC_CLW_COMPILER_DIRECTIVE 9
958 #define wxSTC_CLW_BUILTIN_PROCEDURES_FUNCTION 10
959 #define wxSTC_CLW_STRUCTURE_DATA_TYPE 11
960 #define wxSTC_CLW_ATTRIBUTE 12
961 #define wxSTC_CLW_STANDARD_EQUATE 13
962 #define wxSTC_CLW_ERROR 14
964 // Lexical states for SCLEX_LOT
965 #define wxSTC_LOT_DEFAULT 0
966 #define wxSTC_LOT_HEADER 1
967 #define wxSTC_LOT_BREAK 2
968 #define wxSTC_LOT_SET 3
969 #define wxSTC_LOT_PASS 4
970 #define wxSTC_LOT_FAIL 5
971 #define wxSTC_LOT_ABORT 6
973 // Lexical states for SCLEX_YAML
974 #define wxSTC_YAML_DEFAULT 0
975 #define wxSTC_YAML_COMMENT 1
976 #define wxSTC_YAML_IDENTIFIER 2
977 #define wxSTC_YAML_KEYWORD 3
978 #define wxSTC_YAML_NUMBER 4
979 #define wxSTC_YAML_REFERENCE 5
980 #define wxSTC_YAML_DOCUMENT 6
981 #define wxSTC_YAML_TEXT 7
982 #define wxSTC_YAML_ERROR 8
984 // Lexical states for SCLEX_TEX
985 #define wxSTC_TEX_DEFAULT 0
986 #define wxSTC_TEX_SPECIAL 1
987 #define wxSTC_TEX_GROUP 2
988 #define wxSTC_TEX_SYMBOL 3
989 #define wxSTC_TEX_COMMAND 4
990 #define wxSTC_TEX_TEXT 5
991 #define wxSTC_METAPOST_DEFAULT 0
992 #define wxSTC_METAPOST_SPECIAL 1
993 #define wxSTC_METAPOST_GROUP 2
994 #define wxSTC_METAPOST_SYMBOL 3
995 #define wxSTC_METAPOST_COMMAND 4
996 #define wxSTC_METAPOST_TEXT 5
997 #define wxSTC_METAPOST_EXTRA 6
999 // Lexical states for SCLEX_ERLANG
1000 #define wxSTC_ERLANG_DEFAULT 0
1001 #define wxSTC_ERLANG_COMMENT 1
1002 #define wxSTC_ERLANG_VARIABLE 2
1003 #define wxSTC_ERLANG_NUMBER 3
1004 #define wxSTC_ERLANG_KEYWORD 4
1005 #define wxSTC_ERLANG_STRING 5
1006 #define wxSTC_ERLANG_OPERATOR 6
1007 #define wxSTC_ERLANG_ATOM 7
1008 #define wxSTC_ERLANG_FUNCTION_NAME 8
1009 #define wxSTC_ERLANG_CHARACTER 9
1010 #define wxSTC_ERLANG_MACRO 10
1011 #define wxSTC_ERLANG_RECORD 11
1012 #define wxSTC_ERLANG_SEPARATOR 12
1013 #define wxSTC_ERLANG_NODE_NAME 13
1014 #define wxSTC_ERLANG_UNKNOWN 31
1017 //-----------------------------------------
1018 // Commands that can be bound to keystrokes
1021 // Redoes the next action on the undo history.
1022 #define wxSTC_CMD_REDO 2011
1024 // Select all the text in the document.
1025 #define wxSTC_CMD_SELECTALL 2013
1027 // Undo one action in the undo history.
1028 #define wxSTC_CMD_UNDO 2176
1030 // Cut the selection to the clipboard.
1031 #define wxSTC_CMD_CUT 2177
1033 // Copy the selection to the clipboard.
1034 #define wxSTC_CMD_COPY 2178
1036 // Paste the contents of the clipboard into the document replacing the selection.
1037 #define wxSTC_CMD_PASTE 2179
1039 // Clear the selection.
1040 #define wxSTC_CMD_CLEAR 2180
1042 // Move caret down one line.
1043 #define wxSTC_CMD_LINEDOWN 2300
1045 // Move caret down one line extending selection to new caret position.
1046 #define wxSTC_CMD_LINEDOWNEXTEND 2301
1048 // Move caret up one line.
1049 #define wxSTC_CMD_LINEUP 2302
1051 // Move caret up one line extending selection to new caret position.
1052 #define wxSTC_CMD_LINEUPEXTEND 2303
1054 // Move caret left one character.
1055 #define wxSTC_CMD_CHARLEFT 2304
1057 // Move caret left one character extending selection to new caret position.
1058 #define wxSTC_CMD_CHARLEFTEXTEND 2305
1060 // Move caret right one character.
1061 #define wxSTC_CMD_CHARRIGHT 2306
1063 // Move caret right one character extending selection to new caret position.
1064 #define wxSTC_CMD_CHARRIGHTEXTEND 2307
1066 // Move caret left one word.
1067 #define wxSTC_CMD_WORDLEFT 2308
1069 // Move caret left one word extending selection to new caret position.
1070 #define wxSTC_CMD_WORDLEFTEXTEND 2309
1072 // Move caret right one word.
1073 #define wxSTC_CMD_WORDRIGHT 2310
1075 // Move caret right one word extending selection to new caret position.
1076 #define wxSTC_CMD_WORDRIGHTEXTEND 2311
1078 // Move caret to first position on line.
1079 #define wxSTC_CMD_HOME 2312
1081 // Move caret to first position on line extending selection to new caret position.
1082 #define wxSTC_CMD_HOMEEXTEND 2313
1084 // Move caret to last position on line.
1085 #define wxSTC_CMD_LINEEND 2314
1087 // Move caret to last position on line extending selection to new caret position.
1088 #define wxSTC_CMD_LINEENDEXTEND 2315
1090 // Move caret to first position in document.
1091 #define wxSTC_CMD_DOCUMENTSTART 2316
1093 // Move caret to first position in document extending selection to new caret position.
1094 #define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317
1096 // Move caret to last position in document.
1097 #define wxSTC_CMD_DOCUMENTEND 2318
1099 // Move caret to last position in document extending selection to new caret position.
1100 #define wxSTC_CMD_DOCUMENTENDEXTEND 2319
1102 // Move caret one page up.
1103 #define wxSTC_CMD_PAGEUP 2320
1105 // Move caret one page up extending selection to new caret position.
1106 #define wxSTC_CMD_PAGEUPEXTEND 2321
1108 // Move caret one page down.
1109 #define wxSTC_CMD_PAGEDOWN 2322
1111 // Move caret one page down extending selection to new caret position.
1112 #define wxSTC_CMD_PAGEDOWNEXTEND 2323
1114 // Switch from insert to overtype mode or the reverse.
1115 #define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324
1117 // Cancel any modes such as call tip or auto-completion list display.
1118 #define wxSTC_CMD_CANCEL 2325
1120 // Delete the selection or if no selection, the character before the caret.
1121 #define wxSTC_CMD_DELETEBACK 2326
1123 // If selection is empty or all on one line replace the selection with a tab character.
1124 // If more than one line selected, indent the lines.
1125 #define wxSTC_CMD_TAB 2327
1127 // Dedent the selected lines.
1128 #define wxSTC_CMD_BACKTAB 2328
1130 // Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
1131 #define wxSTC_CMD_NEWLINE 2329
1133 // Insert a Form Feed character.
1134 #define wxSTC_CMD_FORMFEED 2330
1136 // Move caret to before first visible character on line.
1137 // If already there move to first character on line.
1138 #define wxSTC_CMD_VCHOME 2331
1140 // Like VCHome but extending selection to new caret position.
1141 #define wxSTC_CMD_VCHOMEEXTEND 2332
1143 // Magnify the displayed text by increasing the sizes by 1 point.
1144 #define wxSTC_CMD_ZOOMIN 2333
1146 // Make the displayed text smaller by decreasing the sizes by 1 point.
1147 #define wxSTC_CMD_ZOOMOUT 2334
1149 // Delete the word to the left of the caret.
1150 #define wxSTC_CMD_DELWORDLEFT 2335
1152 // Delete the word to the right of the caret.
1153 #define wxSTC_CMD_DELWORDRIGHT 2336
1155 // Cut the line containing the caret.
1156 #define wxSTC_CMD_LINECUT 2337
1158 // Delete the line containing the caret.
1159 #define wxSTC_CMD_LINEDELETE 2338
1161 // Switch the current line with the previous.
1162 #define wxSTC_CMD_LINETRANSPOSE 2339
1164 // Duplicate the current line.
1165 #define wxSTC_CMD_LINEDUPLICATE 2404
1167 // Transform the selection to lower case.
1168 #define wxSTC_CMD_LOWERCASE 2340
1170 // Transform the selection to upper case.
1171 #define wxSTC_CMD_UPPERCASE 2341
1173 // Scroll the document down, keeping the caret visible.
1174 #define wxSTC_CMD_LINESCROLLDOWN 2342
1176 // Scroll the document up, keeping the caret visible.
1177 #define wxSTC_CMD_LINESCROLLUP 2343
1179 // Delete the selection or if no selection, the character before the caret.
1180 // Will not delete the character before at the start of a line.
1181 #define wxSTC_CMD_DELETEBACKNOTLINE 2344
1183 // Move caret to first position on display line.
1184 #define wxSTC_CMD_HOMEDISPLAY 2345
1186 // Move caret to first position on display line extending selection to
1187 // new caret position.
1188 #define wxSTC_CMD_HOMEDISPLAYEXTEND 2346
1190 // Move caret to last position on display line.
1191 #define wxSTC_CMD_LINEENDDISPLAY 2347
1193 // Move caret to last position on display line extending selection to new
1195 #define wxSTC_CMD_LINEENDDISPLAYEXTEND 2348
1197 // These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
1198 // except they behave differently when word-wrap is enabled:
1199 // They go first to the start / end of the display line, like (Home|LineEnd)Display
1200 // The difference is that, the cursor is already at the point, it goes on to the start
1201 // or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
1202 #define wxSTC_CMD_HOMEWRAP 2349
1203 #define wxSTC_CMD_HOMEWRAPEXTEND 2450
1204 #define wxSTC_CMD_LINEENDWRAP 2451
1205 #define wxSTC_CMD_LINEENDWRAPEXTEND 2452
1206 #define wxSTC_CMD_VCHOMEWRAP 2453
1207 #define wxSTC_CMD_VCHOMEWRAPEXTEND 2454
1209 // Move to the previous change in capitalisation.
1210 #define wxSTC_CMD_WORDPARTLEFT 2390
1212 // Move to the previous change in capitalisation extending selection
1213 // to new caret position.
1214 #define wxSTC_CMD_WORDPARTLEFTEXTEND 2391
1216 // Move to the change next in capitalisation.
1217 #define wxSTC_CMD_WORDPARTRIGHT 2392
1219 // Move to the next change in capitalisation extending selection
1220 // to new caret position.
1221 #define wxSTC_CMD_WORDPARTRIGHTEXTEND 2393
1223 // Delete back from the current position to the start of the line.
1224 #define wxSTC_CMD_DELLINELEFT 2395
1226 // Delete forwards from the current position to the end of the line.
1227 #define wxSTC_CMD_DELLINERIGHT 2396
1229 // Move caret between paragraphs (delimited by empty lines).
1230 #define wxSTC_CMD_PARADOWN 2413
1231 #define wxSTC_CMD_PARADOWNEXTEND 2414
1232 #define wxSTC_CMD_PARAUP 2415
1233 #define wxSTC_CMD_PARAUPEXTEND 2416
1235 // Move caret down one line, extending rectangular selection to new caret position.
1236 #define wxSTC_CMD_LINEDOWNRECTEXTEND 2426
1238 // Move caret up one line, extending rectangular selection to new caret position.
1239 #define wxSTC_CMD_LINEUPRECTEXTEND 2427
1241 // Move caret left one character, extending rectangular selection to new caret position.
1242 #define wxSTC_CMD_CHARLEFTRECTEXTEND 2428
1244 // Move caret right one character, extending rectangular selection to new caret position.
1245 #define wxSTC_CMD_CHARRIGHTRECTEXTEND 2429
1247 // Move caret to first position on line, extending rectangular selection to new caret position.
1248 #define wxSTC_CMD_HOMERECTEXTEND 2430
1250 // Move caret to before first visible character on line.
1251 // If already there move to first character on line.
1252 // In either case, extend rectangular selection to new caret position.
1253 #define wxSTC_CMD_VCHOMERECTEXTEND 2431
1255 // Move caret to last position on line, extending rectangular selection to new caret position.
1256 #define wxSTC_CMD_LINEENDRECTEXTEND 2432
1258 // Move caret one page up, extending rectangular selection to new caret position.
1259 #define wxSTC_CMD_PAGEUPRECTEXTEND 2433
1261 // Move caret one page down, extending rectangular selection to new caret position.
1262 #define wxSTC_CMD_PAGEDOWNRECTEXTEND 2434
1264 // Move caret to top of page, or one page up if already at top of page.
1265 #define wxSTC_CMD_STUTTEREDPAGEUP 2435
1267 // Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.
1268 #define wxSTC_CMD_STUTTEREDPAGEUPEXTEND 2436
1270 // Move caret to bottom of page, or one page down if already at bottom of page.
1271 #define wxSTC_CMD_STUTTEREDPAGEDOWN 2437
1273 // Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.
1274 #define wxSTC_CMD_STUTTEREDPAGEDOWNEXTEND 2438
1276 // Move caret left one word, position cursor at end of word.
1277 #define wxSTC_CMD_WORDLEFTEND 2439
1279 // Move caret left one word, position cursor at end of word, extending selection to new caret position.
1280 #define wxSTC_CMD_WORDLEFTENDEXTEND 2440
1282 // Move caret right one word, position cursor at end of word.
1283 #define wxSTC_CMD_WORDRIGHTEND 2441
1285 // Move caret right one word, position cursor at end of word, extending selection to new caret position.
1286 #define wxSTC_CMD_WORDRIGHTENDEXTEND 2442
1289 // END of generated section
1290 //----------------------------------------------------------------------
1292 class ScintillaWX
; // forward declare
1294 struct SCNotification
;
1297 extern WXDLLIMPEXP_STC
const wxChar
* wxSTCNameStr
;
1298 class WXDLLIMPEXP_STC wxStyledTextCtrl
;
1299 class WXDLLIMPEXP_STC wxStyledTextEvent
;
1302 //----------------------------------------------------------------------
1304 class WXDLLIMPEXP_STC wxStyledTextCtrl
: public wxControl
{
1308 %pythonAppend wxStyledTextCtrl
"self._setOORInfo(self)"
1309 %pythonAppend
wxStyledTextCtrl() ""
1311 wxStyledTextCtrl(wxWindow
*parent
, wxWindowID id
,
1312 const wxPoint
& pos
= wxDefaultPosition
,
1313 const wxSize
& size
= wxDefaultSize
, long style
= 0,
1314 const wxString
& name
= wxPySTCNameStr
);
1315 %name
(PreStyledTextCtrl
) wxStyledTextCtrl();
1318 wxStyledTextCtrl(wxWindow
*parent
, wxWindowID id
,
1319 const wxPoint
& pos
= wxDefaultPosition
,
1320 const wxSize
& size
= wxDefaultSize
, long style
= 0,
1321 const wxString
& name
= wxSTCNameStr
);
1322 wxStyledTextCtrl() { m_swx
= NULL
; }
1323 ~wxStyledTextCtrl();
1327 void Create(wxWindow
*parent
, wxWindowID id
,
1328 const wxPoint
& pos
= wxDefaultPosition
,
1329 const wxSize
& size
= wxDefaultSize
, long style
= 0,
1330 const wxString
& name
= wxSTCNameStr
);
1333 //----------------------------------------------------------------------
1334 // BEGIN generated section. The following code is automatically generated
1335 // by gen_iface.py. Do not edit this file. Edit stc.h.in instead
1339 // Add text to the document.
1340 void AddText(const wxString
& text
);
1342 // Add array of cells to document.
1343 void AddStyledText(const wxMemoryBuffer
& data
);
1345 // Insert string at a position.
1346 void InsertText(int pos
, const wxString
& text
);
1348 // Delete all text in the document.
1351 // Set all style bytes to 0, remove all folding information.
1352 void ClearDocumentStyle();
1354 // The number of characters in the document.
1357 // Returns the character byte at the position.
1358 int GetCharAt(int pos
);
1360 // Returns the position of the caret.
1361 int GetCurrentPos();
1363 // Returns the position of the opposite end of the selection to the caret.
1366 // Returns the style byte at the position.
1367 int GetStyleAt(int pos
);
1369 // Redoes the next action on the undo history.
1372 // Choose between collecting actions into the undo
1373 // history and discarding them.
1374 void SetUndoCollection(bool collectUndo
);
1376 // Select all the text in the document.
1379 // Remember the current position in the undo history as the position
1380 // at which the document was saved.
1381 void SetSavePoint();
1383 // Retrieve a buffer of cells.
1384 wxMemoryBuffer
GetStyledText(int startPos
, int endPos
);
1386 // Are there any redoable actions in the undo history?
1389 // Retrieve the line number at which a particular marker is located.
1390 int MarkerLineFromHandle(int handle
);
1393 void MarkerDeleteHandle(int handle
);
1395 // Is undo history being collected?
1396 bool GetUndoCollection();
1398 // Are white space characters currently visible?
1399 // Returns one of SCWS_* constants.
1400 int GetViewWhiteSpace();
1402 // Make white space characters invisible, always visible or visible outside indentation.
1403 void SetViewWhiteSpace(int viewWS
);
1405 // Find the position from a point within the window.
1406 int PositionFromPoint(wxPoint pt
);
1408 // Find the position from a point within the window but return
1409 // INVALID_POSITION if not close to text.
1410 int PositionFromPointClose(int x
, int y
);
1412 // Set caret to start of a line and ensure it is visible.
1413 void GotoLine(int line
);
1415 // Set caret to a position and ensure it is visible.
1416 void GotoPos(int pos
);
1418 // Set the selection anchor to a position. The anchor is the opposite
1419 // end of the selection from the caret.
1420 void SetAnchor(int posAnchor
);
1422 // Retrieve the text of the line containing the caret.
1423 // Returns the index of the caret on the line.
1425 wxString
GetCurLine(int* OUTPUT
);
1427 wxString
GetCurLine(int* linePos
=NULL
);
1430 // Retrieve the position of the last correctly styled character.
1433 // Convert all line endings in the document to one mode.
1434 void ConvertEOLs(int eolMode
);
1436 // Retrieve the current end of line mode - one of CRLF, CR, or LF.
1439 // Set the current end of line mode.
1440 void SetEOLMode(int eolMode
);
1442 // Set the current styling position to pos and the styling mask to mask.
1443 // The styling mask can be used to protect some bits in each styling byte from modification.
1444 void StartStyling(int pos
, int mask
);
1446 // Change style from current styling position for length characters to a style
1447 // and move the current styling position to after this newly styled segment.
1448 void SetStyling(int length
, int style
);
1450 // Is drawing done first into a buffer or direct to the screen?
1451 bool GetBufferedDraw();
1453 // If drawing is buffered then each line of text is drawn into a bitmap buffer
1454 // before drawing it to the screen to avoid flicker.
1455 void SetBufferedDraw(bool buffered
);
1457 // Change the visible size of a tab to be a multiple of the width of a space character.
1458 void SetTabWidth(int tabWidth
);
1460 // Retrieve the visible size of a tab.
1463 // Set the code page used to interpret the bytes of the document as characters.
1464 void SetCodePage(int codePage
);
1466 // Set the symbol used for a particular marker number,
1467 // and optionally the fore and background colours.
1468 void MarkerDefine(int markerNumber
, int markerSymbol
,
1469 const wxColour
& foreground
= wxNullColour
,
1470 const wxColour
& background
= wxNullColour
);
1472 // Set the foreground colour used for a particular marker number.
1473 void MarkerSetForeground(int markerNumber
, const wxColour
& fore
);
1475 // Set the background colour used for a particular marker number.
1476 void MarkerSetBackground(int markerNumber
, const wxColour
& back
);
1478 // Add a marker to a line, returning an ID which can be used to find or delete the marker.
1479 int MarkerAdd(int line
, int markerNumber
);
1481 // Delete a marker from a line.
1482 void MarkerDelete(int line
, int markerNumber
);
1484 // Delete all markers with a particular number from all lines.
1485 void MarkerDeleteAll(int markerNumber
);
1487 // Get a bit mask of all the markers set on a line.
1488 int MarkerGet(int line
);
1490 // Find the next line after lineStart that includes a marker in mask.
1491 int MarkerNext(int lineStart
, int markerMask
);
1493 // Find the previous line before lineStart that includes a marker in mask.
1494 int MarkerPrevious(int lineStart
, int markerMask
);
1496 // Define a marker from a bitmap
1497 void MarkerDefineBitmap(int markerNumber
, const wxBitmap
& bmp
);
1499 // Set a margin to be either numeric or symbolic.
1500 void SetMarginType(int margin
, int marginType
);
1502 // Retrieve the type of a margin.
1503 int GetMarginType(int margin
);
1505 // Set the width of a margin to a width expressed in pixels.
1506 void SetMarginWidth(int margin
, int pixelWidth
);
1508 // Retrieve the width of a margin in pixels.
1509 int GetMarginWidth(int margin
);
1511 // Set a mask that determines which markers are displayed in a margin.
1512 void SetMarginMask(int margin
, int mask
);
1514 // Retrieve the marker mask of a margin.
1515 int GetMarginMask(int margin
);
1517 // Make a margin sensitive or insensitive to mouse clicks.
1518 void SetMarginSensitive(int margin
, bool sensitive
);
1520 // Retrieve the mouse click sensitivity of a margin.
1521 bool GetMarginSensitive(int margin
);
1523 // Clear all the styles and make equivalent to the global default style.
1524 void StyleClearAll();
1526 // Set the foreground colour of a style.
1527 void StyleSetForeground(int style
, const wxColour
& fore
);
1529 // Set the background colour of a style.
1530 void StyleSetBackground(int style
, const wxColour
& back
);
1532 // Set a style to be bold or not.
1533 void StyleSetBold(int style
, bool bold
);
1535 // Set a style to be italic or not.
1536 void StyleSetItalic(int style
, bool italic
);
1538 // Set the size of characters of a style.
1539 void StyleSetSize(int style
, int sizePoints
);
1541 // Set the font of a style.
1542 void StyleSetFaceName(int style
, const wxString
& fontName
);
1544 // Set a style to have its end of line filled or not.
1545 void StyleSetEOLFilled(int style
, bool filled
);
1547 // Reset the default style to its state at startup
1548 void StyleResetDefault();
1550 // Set a style to be underlined or not.
1551 void StyleSetUnderline(int style
, bool underline
);
1553 // Set a style to be mixed case, or to force upper or lower case.
1554 void StyleSetCase(int style
, int caseForce
);
1556 // Set the character set of the font in a style.
1557 void StyleSetCharacterSet(int style
, int characterSet
);
1559 // Set a style to be a hotspot or not.
1560 void StyleSetHotSpot(int style
, bool hotspot
);
1562 // Set the foreground colour of the selection and whether to use this setting.
1563 void SetSelForeground(bool useSetting
, const wxColour
& fore
);
1565 // Set the background colour of the selection and whether to use this setting.
1566 void SetSelBackground(bool useSetting
, const wxColour
& back
);
1568 // Set the foreground colour of the caret.
1569 void SetCaretForeground(const wxColour
& fore
);
1571 // When key+modifier combination km is pressed perform msg.
1572 void CmdKeyAssign(int key
, int modifiers
, int cmd
);
1574 // When key+modifier combination km is pressed do nothing.
1575 void CmdKeyClear(int key
, int modifiers
);
1577 // Drop all key mappings.
1578 void CmdKeyClearAll();
1580 // Set the styles for a segment of the document.
1581 void SetStyleBytes(int length
, char* styleBytes
);
1583 // Set a style to be visible or not.
1584 void StyleSetVisible(int style
, bool visible
);
1586 // Get the time in milliseconds that the caret is on and off.
1587 int GetCaretPeriod();
1589 // Get the time in milliseconds that the caret is on and off. 0 = steady on.
1590 void SetCaretPeriod(int periodMilliseconds
);
1592 // Set the set of characters making up words for when moving or selecting by word.
1593 // First sets deaults like SetCharsDefault.
1594 void SetWordChars(const wxString
& characters
);
1596 // Start a sequence of actions that is undone and redone as a unit.
1598 void BeginUndoAction();
1600 // End a sequence of actions that is undone and redone as a unit.
1601 void EndUndoAction();
1603 // Set an indicator to plain, squiggle or TT.
1604 void IndicatorSetStyle(int indic
, int style
);
1606 // Retrieve the style of an indicator.
1607 int IndicatorGetStyle(int indic
);
1609 // Set the foreground colour of an indicator.
1610 void IndicatorSetForeground(int indic
, const wxColour
& fore
);
1612 // Retrieve the foreground colour of an indicator.
1613 wxColour
IndicatorGetForeground(int indic
);
1615 // Set the foreground colour of all whitespace and whether to use this setting.
1616 void SetWhitespaceForeground(bool useSetting
, const wxColour
& fore
);
1618 // Set the background colour of all whitespace and whether to use this setting.
1619 void SetWhitespaceBackground(bool useSetting
, const wxColour
& back
);
1621 // Divide each styling byte into lexical class bits (default: 5) and indicator
1622 // bits (default: 3). If a lexer requires more than 32 lexical states, then this
1623 // is used to expand the possible states.
1624 void SetStyleBits(int bits
);
1626 // Retrieve number of bits in style bytes used to hold the lexical state.
1629 // Used to hold extra styling information for each line.
1630 void SetLineState(int line
, int state
);
1632 // Retrieve the extra styling information for a line.
1633 int GetLineState(int line
);
1635 // Retrieve the last line number that has line state.
1636 int GetMaxLineState();
1638 // Is the background of the line containing the caret in a different colour?
1639 bool GetCaretLineVisible();
1641 // Display the background of the line containing the caret in a different colour.
1642 void SetCaretLineVisible(bool show
);
1644 // Get the colour of the background of the line containing the caret.
1645 wxColour
GetCaretLineBack();
1647 // Set the colour of the background of the line containing the caret.
1648 void SetCaretLineBack(const wxColour
& back
);
1650 // Set a style to be changeable or not (read only).
1651 // Experimental feature, currently buggy.
1652 void StyleSetChangeable(int style
, bool changeable
);
1654 // Display a auto-completion list.
1655 // The lenEntered parameter indicates how many characters before
1656 // the caret should be used to provide context.
1657 void AutoCompShow(int lenEntered
, const wxString
& itemList
);
1659 // Remove the auto-completion list from the screen.
1660 void AutoCompCancel();
1662 // Is there an auto-completion list visible?
1663 bool AutoCompActive();
1665 // Retrieve the position of the caret when the auto-completion list was displayed.
1666 int AutoCompPosStart();
1668 // User has selected an item so remove the list and insert the selection.
1669 void AutoCompComplete();
1671 // Define a set of character that when typed cancel the auto-completion list.
1672 void AutoCompStops(const wxString
& characterSet
);
1674 // Change the separator character in the string setting up an auto-completion list.
1675 // Default is space but can be changed if items contain space.
1676 void AutoCompSetSeparator(int separatorCharacter
);
1678 // Retrieve the auto-completion list separator character.
1679 int AutoCompGetSeparator();
1681 // Select the item in the auto-completion list that starts with a string.
1682 void AutoCompSelect(const wxString
& text
);
1684 // Should the auto-completion list be cancelled if the user backspaces to a
1685 // position before where the box was created.
1686 void AutoCompSetCancelAtStart(bool cancel
);
1688 // Retrieve whether auto-completion cancelled by backspacing before start.
1689 bool AutoCompGetCancelAtStart();
1691 // Define a set of characters that when typed will cause the autocompletion to
1692 // choose the selected item.
1693 void AutoCompSetFillUps(const wxString
& characterSet
);
1695 // Should a single item auto-completion list automatically choose the item.
1696 void AutoCompSetChooseSingle(bool chooseSingle
);
1698 // Retrieve whether a single item auto-completion list automatically choose the item.
1699 bool AutoCompGetChooseSingle();
1701 // Set whether case is significant when performing auto-completion searches.
1702 void AutoCompSetIgnoreCase(bool ignoreCase
);
1704 // Retrieve state of ignore case flag.
1705 bool AutoCompGetIgnoreCase();
1707 // Display a list of strings and send notification when user chooses one.
1708 void UserListShow(int listType
, const wxString
& itemList
);
1710 // Set whether or not autocompletion is hidden automatically when nothing matches.
1711 void AutoCompSetAutoHide(bool autoHide
);
1713 // Retrieve whether or not autocompletion is hidden automatically when nothing matches.
1714 bool AutoCompGetAutoHide();
1716 // Set whether or not autocompletion deletes any word characters
1717 // after the inserted text upon completion.
1718 void AutoCompSetDropRestOfWord(bool dropRestOfWord
);
1720 // Retrieve whether or not autocompletion deletes any word characters
1721 // after the inserted text upon completion.
1722 bool AutoCompGetDropRestOfWord();
1724 // Register an image for use in autocompletion lists.
1725 void RegisterImage(int type
, const wxBitmap
& bmp
);
1727 // Clear all the registered images.
1728 void ClearRegisteredImages();
1730 // Retrieve the auto-completion list type-separator character.
1731 int AutoCompGetTypeSeparator();
1733 // Change the type-separator character in the string setting up an auto-completion list.
1734 // Default is '?' but can be changed if items contain '?'.
1735 void AutoCompSetTypeSeparator(int separatorCharacter
);
1737 // Set the number of spaces used for one level of indentation.
1738 void SetIndent(int indentSize
);
1740 // Retrieve indentation size.
1743 // Indentation will only use space characters if useTabs is false, otherwise
1744 // it will use a combination of tabs and spaces.
1745 void SetUseTabs(bool useTabs
);
1747 // Retrieve whether tabs will be used in indentation.
1750 // Change the indentation of a line to a number of columns.
1751 void SetLineIndentation(int line
, int indentSize
);
1753 // Retrieve the number of columns that a line is indented.
1754 int GetLineIndentation(int line
);
1756 // Retrieve the position before the first non indentation character on a line.
1757 int GetLineIndentPosition(int line
);
1759 // Retrieve the column number of a position, taking tab width into account.
1760 int GetColumn(int pos
);
1762 // Show or hide the horizontal scroll bar.
1763 void SetUseHorizontalScrollBar(bool show
);
1765 // Is the horizontal scroll bar visible?
1766 bool GetUseHorizontalScrollBar();
1768 // Show or hide indentation guides.
1769 void SetIndentationGuides(bool show
);
1771 // Are the indentation guides visible?
1772 bool GetIndentationGuides();
1774 // Set the highlighted indentation guide column.
1775 // 0 = no highlighted guide.
1776 void SetHighlightGuide(int column
);
1778 // Get the highlighted indentation guide column.
1779 int GetHighlightGuide();
1781 // Get the position after the last visible characters on a line.
1782 int GetLineEndPosition(int line
);
1784 // Get the code page used to interpret the bytes of the document as characters.
1787 // Get the foreground colour of the caret.
1788 wxColour
GetCaretForeground();
1790 // In read-only mode?
1793 // Sets the position of the caret.
1794 void SetCurrentPos(int pos
);
1796 // Sets the position that starts the selection - this becomes the anchor.
1797 void SetSelectionStart(int pos
);
1799 // Returns the position at the start of the selection.
1800 int GetSelectionStart();
1802 // Sets the position that ends the selection - this becomes the currentPosition.
1803 void SetSelectionEnd(int pos
);
1805 // Returns the position at the end of the selection.
1806 int GetSelectionEnd();
1808 // Sets the print magnification added to the point size of each style for printing.
1809 void SetPrintMagnification(int magnification
);
1811 // Returns the print magnification.
1812 int GetPrintMagnification();
1814 // Modify colours when printing for clearer printed text.
1815 void SetPrintColourMode(int mode
);
1817 // Returns the print colour mode.
1818 int GetPrintColourMode();
1820 // Find some text in the document.
1821 int FindText(int minPos
, int maxPos
, const wxString
& text
, int flags
=0);
1823 // On Windows, will draw the document into a display context such as a printer.
1824 int FormatRange(bool doDraw
,
1832 // Retrieve the display line at the top of the display.
1833 int GetFirstVisibleLine();
1835 // Retrieve the contents of a line.
1836 wxString
GetLine(int line
);
1838 // Returns the number of lines in the document. There is always at least one.
1841 // Sets the size in pixels of the left margin.
1842 void SetMarginLeft(int pixelWidth
);
1844 // Returns the size in pixels of the left margin.
1845 int GetMarginLeft();
1847 // Sets the size in pixels of the right margin.
1848 void SetMarginRight(int pixelWidth
);
1850 // Returns the size in pixels of the right margin.
1851 int GetMarginRight();
1853 // Is the document different from when it was last saved?
1856 // Select a range of text.
1857 void SetSelection(int start
, int end
);
1859 // Retrieve the selected text.
1860 wxString
GetSelectedText();
1862 // Retrieve a range of text.
1863 wxString
GetTextRange(int startPos
, int endPos
);
1865 // Draw the selection in normal style or with selection highlighted.
1866 void HideSelection(bool normal
);
1868 // Retrieve the line containing a position.
1869 int LineFromPosition(int pos
);
1871 // Retrieve the position at the start of a line.
1872 int PositionFromLine(int line
);
1874 // Scroll horizontally and vertically.
1875 void LineScroll(int columns
, int lines
);
1877 // Ensure the caret is visible.
1878 void EnsureCaretVisible();
1880 // Replace the selected text with the argument text.
1881 void ReplaceSelection(const wxString
& text
);
1883 // Set to read only or read write.
1884 void SetReadOnly(bool readOnly
);
1886 // Will a paste succeed?
1889 // Are there any undoable actions in the undo history?
1892 // Delete the undo history.
1893 void EmptyUndoBuffer();
1895 // Undo one action in the undo history.
1898 // Cut the selection to the clipboard.
1901 // Copy the selection to the clipboard.
1904 // Paste the contents of the clipboard into the document replacing the selection.
1907 // Clear the selection.
1910 // Replace the contents of the document with the argument text.
1911 void SetText(const wxString
& text
);
1913 // Retrieve all the text in the document.
1916 // Retrieve the number of characters in the document.
1917 int GetTextLength();
1919 // Set to overtype (true) or insert mode.
1920 void SetOvertype(bool overtype
);
1922 // Returns true if overtype mode is active otherwise false is returned.
1925 // Set the width of the insert mode caret.
1926 void SetCaretWidth(int pixelWidth
);
1928 // Returns the width of the insert mode caret.
1929 int GetCaretWidth();
1931 // Sets the position that starts the target which is used for updating the
1932 // document without affecting the scroll position.
1933 void SetTargetStart(int pos
);
1935 // Get the position that starts the target.
1936 int GetTargetStart();
1938 // Sets the position that ends the target which is used for updating the
1939 // document without affecting the scroll position.
1940 void SetTargetEnd(int pos
);
1942 // Get the position that ends the target.
1945 // Replace the target text with the argument text.
1946 // Text is counted so it can contain NULs.
1947 // Returns the length of the replacement text.
1948 int ReplaceTarget(const wxString
& text
);
1950 // Replace the target text with the argument text after \d processing.
1951 // Text is counted so it can contain NULs.
1952 // Looks for \d where d is between 1 and 9 and replaces these with the strings
1953 // matched in the last search operation which were surrounded by \( and \).
1954 // Returns the length of the replacement text including any change
1955 // caused by processing the \d patterns.
1956 int ReplaceTargetRE(const wxString
& text
);
1958 // Search for a counted string in the target and set the target to the found
1959 // range. Text is counted so it can contain NULs.
1960 // Returns length of range or -1 for failure in which case target is not moved.
1961 int SearchInTarget(const wxString
& text
);
1963 // Set the search flags used by SearchInTarget.
1964 void SetSearchFlags(int flags
);
1966 // Get the search flags used by SearchInTarget.
1967 int GetSearchFlags();
1969 // Show a call tip containing a definition near position pos.
1970 void CallTipShow(int pos
, const wxString
& definition
);
1972 // Remove the call tip from the screen.
1973 void CallTipCancel();
1975 // Is there an active call tip?
1976 bool CallTipActive();
1978 // Retrieve the position where the caret was before displaying the call tip.
1979 int CallTipPosAtStart();
1981 // Highlight a segment of the definition.
1982 void CallTipSetHighlight(int start
, int end
);
1984 // Set the background colour for the call tip.
1985 void CallTipSetBackground(const wxColour
& back
);
1987 // Set the foreground colour for the call tip.
1988 void CallTipSetForeground(const wxColour
& fore
);
1990 // Set the foreground colour for the highlighted part of the call tip.
1991 void CallTipSetForegroundHighlight(const wxColour
& fore
);
1993 // Find the display line of a document line taking hidden lines into account.
1994 int VisibleFromDocLine(int line
);
1996 // Find the document line of a display line taking hidden lines into account.
1997 int DocLineFromVisible(int lineDisplay
);
1999 // Set the fold level of a line.
2000 // This encodes an integer level along with flags indicating whether the
2001 // line is a header and whether it is effectively white space.
2002 void SetFoldLevel(int line
, int level
);
2004 // Retrieve the fold level of a line.
2005 int GetFoldLevel(int line
);
2007 // Find the last child line of a header line.
2008 int GetLastChild(int line
, int level
);
2010 // Find the parent line of a child line.
2011 int GetFoldParent(int line
);
2013 // Make a range of lines visible.
2014 void ShowLines(int lineStart
, int lineEnd
);
2016 // Make a range of lines invisible.
2017 void HideLines(int lineStart
, int lineEnd
);
2019 // Is a line visible?
2020 bool GetLineVisible(int line
);
2022 // Show the children of a header line.
2023 void SetFoldExpanded(int line
, bool expanded
);
2025 // Is a header line expanded?
2026 bool GetFoldExpanded(int line
);
2028 // Switch a header line between expanded and contracted.
2029 void ToggleFold(int line
);
2031 // Ensure a particular line is visible by expanding any header line hiding it.
2032 void EnsureVisible(int line
);
2034 // Set some style options for folding.
2035 void SetFoldFlags(int flags
);
2037 // Ensure a particular line is visible by expanding any header line hiding it.
2038 // Use the currently set visibility policy to determine which range to display.
2039 void EnsureVisibleEnforcePolicy(int line
);
2041 // Sets whether a tab pressed when caret is within indentation indents.
2042 void SetTabIndents(bool tabIndents
);
2044 // Does a tab pressed when caret is within indentation indent?
2045 bool GetTabIndents();
2047 // Sets whether a backspace pressed when caret is within indentation unindents.
2048 void SetBackSpaceUnIndents(bool bsUnIndents
);
2050 // Does a backspace pressed when caret is within indentation unindent?
2051 bool GetBackSpaceUnIndents();
2053 // Sets the time the mouse must sit still to generate a mouse dwell event.
2054 void SetMouseDwellTime(int periodMilliseconds
);
2056 // Retrieve the time the mouse must sit still to generate a mouse dwell event.
2057 int GetMouseDwellTime();
2059 // Get position of start of word.
2060 int WordStartPosition(int pos
, bool onlyWordCharacters
);
2062 // Get position of end of word.
2063 int WordEndPosition(int pos
, bool onlyWordCharacters
);
2065 // Sets whether text is word wrapped.
2066 void SetWrapMode(int mode
);
2068 // Retrieve whether text is word wrapped.
2071 // Sets the degree of caching of layout information.
2072 void SetLayoutCache(int mode
);
2074 // Retrieve the degree of caching of layout information.
2075 int GetLayoutCache();
2077 // Sets the document width assumed for scrolling.
2078 void SetScrollWidth(int pixelWidth
);
2080 // Retrieve the document width assumed for scrolling.
2081 int GetScrollWidth();
2083 // Measure the pixel width of some text in a particular style.
2084 // NUL terminated text argument.
2085 // Does not handle tab or control characters.
2086 int TextWidth(int style
, const wxString
& text
);
2088 // Sets the scroll range so that maximum scroll position has
2089 // the last line at the bottom of the view (default).
2090 // Setting this to false allows scrolling one page below the last line.
2091 void SetEndAtLastLine(bool endAtLastLine
);
2093 // Retrieve whether the maximum scroll position has the last
2094 // line at the bottom of the view.
2095 int GetEndAtLastLine();
2097 // Retrieve the height of a particular line of text in pixels.
2098 int TextHeight(int line
);
2100 // Show or hide the vertical scroll bar.
2101 void SetUseVerticalScrollBar(bool show
);
2103 // Is the vertical scroll bar visible?
2104 bool GetUseVerticalScrollBar();
2106 // Append a string to the end of the document without changing the selection.
2107 void AppendText(int length
, const wxString
& text
);
2109 // Is drawing done in two phases with backgrounds drawn before foregrounds?
2110 bool GetTwoPhaseDraw();
2112 // In twoPhaseDraw mode, drawing is performed in two phases, first the background
2113 // and then the foreground. This avoids chopping off characters that overlap the next run.
2114 void SetTwoPhaseDraw(bool twoPhase
);
2116 // Make the target range start and end be the same as the selection range start and end.
2117 void TargetFromSelection();
2119 // Join the lines in the target.
2122 // Split the lines in the target into lines that are less wide than pixelWidth
2124 void LinesSplit(int pixelWidth
);
2126 // Set the colours used as a chequerboard pattern in the fold margin
2127 void SetFoldMarginColour(bool useSetting
, const wxColour
& back
);
2128 void SetFoldMarginHiColour(bool useSetting
, const wxColour
& fore
);
2130 // Duplicate the current line.
2131 void LineDuplicate();
2133 // Move caret to first position on display line.
2136 // Move caret to first position on display line extending selection to
2137 // new caret position.
2138 void HomeDisplayExtend();
2140 // Move caret to last position on display line.
2141 void LineEndDisplay();
2143 // Move caret to last position on display line extending selection to new
2145 void LineEndDisplayExtend();
2147 // Copy the line containing the caret.
2150 // Move the caret inside current view if it's not there already.
2151 void MoveCaretInsideView();
2153 // How many characters are on a line, not including end of line characters?
2154 int LineLength(int line
);
2156 // Highlight the characters at two positions.
2157 void BraceHighlight(int pos1
, int pos2
);
2159 // Highlight the character at a position indicating there is no matching brace.
2160 void BraceBadLight(int pos
);
2162 // Find the position of a matching brace or INVALID_POSITION if no match.
2163 int BraceMatch(int pos
);
2165 // Are the end of line characters visible?
2168 // Make the end of line characters visible or invisible.
2169 void SetViewEOL(bool visible
);
2171 // Retrieve a pointer to the document object.
2172 void* GetDocPointer();
2174 // Change the document object used.
2175 void SetDocPointer(void* docPointer
);
2177 // Set which document modification events are sent to the container.
2178 void SetModEventMask(int mask
);
2180 // Retrieve the column number which text should be kept within.
2181 int GetEdgeColumn();
2183 // Set the column number of the edge.
2184 // If text goes past the edge then it is highlighted.
2185 void SetEdgeColumn(int column
);
2187 // Retrieve the edge highlight mode.
2190 // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
2191 // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
2192 void SetEdgeMode(int mode
);
2194 // Retrieve the colour used in edge indication.
2195 wxColour
GetEdgeColour();
2197 // Change the colour used in edge indication.
2198 void SetEdgeColour(const wxColour
& edgeColour
);
2200 // Sets the current caret position to be the search anchor.
2201 void SearchAnchor();
2203 // Find some text starting at the search anchor.
2204 // Does not ensure the selection is visible.
2205 int SearchNext(int flags
, const wxString
& text
);
2207 // Find some text starting at the search anchor and moving backwards.
2208 // Does not ensure the selection is visible.
2209 int SearchPrev(int flags
, const wxString
& text
);
2211 // Retrieves the number of lines completely visible.
2212 int LinesOnScreen();
2214 // Set whether a pop up menu is displayed automatically when the user presses
2215 // the wrong mouse button.
2216 void UsePopUp(bool allowPopUp
);
2218 // Is the selection rectangular? The alternative is the more common stream selection.
2219 bool SelectionIsRectangle();
2221 // Set the zoom level. This number of points is added to the size of all fonts.
2222 // It may be positive to magnify or negative to reduce.
2223 void SetZoom(int zoom
);
2225 // Retrieve the zoom level.
2228 // Create a new document object.
2229 // Starts with reference count of 1 and not selected into editor.
2230 void* CreateDocument();
2232 // Extend life of document.
2233 void AddRefDocument(void* docPointer
);
2235 // Release a reference to the document, deleting document if it fades to black.
2236 void ReleaseDocument(void* docPointer
);
2238 // Get which document modification events are sent to the container.
2239 int GetModEventMask();
2241 // Change internal focus flag.
2242 void SetSTCFocus(bool focus
);
2244 // Get internal focus flag.
2247 // Change error status - 0 = OK.
2248 void SetStatus(int statusCode
);
2250 // Get error status.
2253 // Set whether the mouse is captured when its button is pressed.
2254 void SetMouseDownCaptures(bool captures
);
2256 // Get whether mouse gets captured.
2257 bool GetMouseDownCaptures();
2259 // Sets the cursor to one of the SC_CURSOR* values.
2260 void SetSTCCursor(int cursorType
);
2265 // Change the way control characters are displayed:
2266 // If symbol is < 32, keep the drawn way, else, use the given character.
2267 void SetControlCharSymbol(int symbol
);
2269 // Get the way control characters are displayed.
2270 int GetControlCharSymbol();
2272 // Move to the previous change in capitalisation.
2273 void WordPartLeft();
2275 // Move to the previous change in capitalisation extending selection
2276 // to new caret position.
2277 void WordPartLeftExtend();
2279 // Move to the change next in capitalisation.
2280 void WordPartRight();
2282 // Move to the next change in capitalisation extending selection
2283 // to new caret position.
2284 void WordPartRightExtend();
2286 // Set the way the display area is determined when a particular line
2287 // is to be moved to by Find, FindNext, GotoLine, etc.
2288 void SetVisiblePolicy(int visiblePolicy
, int visibleSlop
);
2290 // Delete back from the current position to the start of the line.
2293 // Delete forwards from the current position to the end of the line.
2294 void DelLineRight();
2296 // Get and Set the xOffset (ie, horizonal scroll position).
2297 void SetXOffset(int newOffset
);
2300 // Set the last x chosen value to be the caret x position.
2301 void ChooseCaretX();
2303 // Set the way the caret is kept visible when going sideway.
2304 // The exclusion zone is given in pixels.
2305 void SetXCaretPolicy(int caretPolicy
, int caretSlop
);
2307 // Set the way the line the caret is on is kept visible.
2308 // The exclusion zone is given in lines.
2309 void SetYCaretPolicy(int caretPolicy
, int caretSlop
);
2311 // Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
2312 void SetPrintWrapMode(int mode
);
2314 // Is printing line wrapped?
2315 int GetPrintWrapMode();
2317 // Set a fore colour for active hotspots.
2318 void SetHotspotActiveForeground(bool useSetting
, const wxColour
& fore
);
2320 // Set a back colour for active hotspots.
2321 void SetHotspotActiveBackground(bool useSetting
, const wxColour
& back
);
2323 // Enable / Disable underlining active hotspots.
2324 void SetHotspotActiveUnderline(bool underline
);
2326 // Limit hotspots to single line so hotspots on two lines don't merge.
2327 void SetHotspotSingleLine(bool singleLine
);
2329 // Given a valid document position, return the previous position taking code
2330 // page into account. Returns 0 if passed 0.
2331 int PositionBefore(int pos
);
2333 // Given a valid document position, return the next position taking code
2334 // page into account. Maximum value returned is the last position in the document.
2335 int PositionAfter(int pos
);
2337 // Copy a range of text to the clipboard. Positions are clipped into the document.
2338 void CopyRange(int start
, int end
);
2340 // Copy argument text to the clipboard.
2341 void CopyText(int length
, const wxString
& text
);
2343 // Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or
2344 // by lines (SC_SEL_LINES).
2345 void SetSelectionMode(int mode
);
2347 // Get the mode of the current selection.
2348 int GetSelectionMode();
2350 // Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
2351 int GetLineSelStartPosition(int line
);
2353 // Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).
2354 int GetLineSelEndPosition(int line
);
2356 // Set the set of characters making up whitespace for when moving or selecting by word.
2357 // Should be called after SetWordChars.
2358 void SetWhitespaceChars(const wxString
& characters
);
2360 // Reset the set of characters for whitespace and word characters to the defaults.
2361 void SetCharsDefault();
2363 // Get currently selected item position in the auto-completion list
2364 int AutoCompGetCurrent();
2366 // Start notifying the container of all key presses and commands.
2369 // Stop notifying the container of all key presses and commands.
2372 // Set the lexing language of the document.
2373 void SetLexer(int lexer
);
2375 // Retrieve the lexing language of the document.
2378 // Colourise a segment of the document using the current lexing language.
2379 void Colourise(int start
, int end
);
2381 // Set up a value that may be used by a lexer for some optional feature.
2382 void SetProperty(const wxString
& key
, const wxString
& value
);
2384 // Set up the key words used by the lexer.
2385 void SetKeyWords(int keywordSet
, const wxString
& keyWords
);
2387 // Set the lexing language of the document based on string name.
2388 void SetLexerLanguage(const wxString
& language
);
2390 // END of generated section
2391 //----------------------------------------------------------------------
2395 // Returns the line number of the line with the caret.
2396 int GetCurrentLine();
2398 // Extract style settings from a spec-string which is composed of one or
2399 // more of the following comma separated elements:
2401 // bold turns on bold
2402 // italic turns on italics
2403 // fore:#RRGGBB sets the foreground colour
2404 // back:#RRGGBB sets the background colour
2405 // face:[facename] sets the font face name to use
2406 // size:[num] sets the font size in points
2407 // eol turns on eol filling
2408 // underline turns on underlining
2410 void StyleSetSpec(int styleNum
, const wxString
& spec
);
2414 // Set style size, face, bold, italic, and underline attributes from
2415 // a wxFont's attributes.
2416 void StyleSetFont(int styleNum
, wxFont
& font
);
2420 // Set all font style attributes at once.
2421 void StyleSetFontAttr(int styleNum
, int size
,
2422 const wxString
& faceName
,
2423 bool bold
, bool italic
,
2428 // Perform one of the operations defined by the wxSTC_CMD_* constants.
2429 void CmdKeyExecute(int cmd
);
2433 // Set the left and right margin in the edit area, measured in pixels.
2434 void SetMargins(int left
, int right
);
2437 // Retrieve the start and end positions of the current selection.
2439 void GetSelection(int* OUTPUT
, int* OUTPUT
);
2441 void GetSelection(int* startPos
, int* endPos
);
2444 // Retrieve the point in the window where a position is displayed.
2445 wxPoint
PointFromPosition(int pos
);
2448 // Scroll enough to make the given line visible
2449 void ScrollToLine(int line
);
2452 // Scroll enough to make the given column visible
2453 void ScrollToColumn(int column
);
2456 // Send a message to Scintilla
2457 long SendMsg(int msg
, long wp
=0, long lp
=0);
2460 // Set the vertical scrollbar to use instead of the ont that's built-in.
2461 void SetVScrollBar(wxScrollBar
* bar
) { m_vScrollBar
= bar
; }
2464 // Set the horizontal scrollbar to use instead of the ont that's built-in.
2465 void SetHScrollBar(wxScrollBar
* bar
) { m_hScrollBar
= bar
; }
2467 // Can be used to prevent the EVT_CHAR handler from adding the char
2468 bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed
; }
2469 void SetLastKeydownProcessed(bool val
) { m_lastKeyDownConsumed
= val
; }
2471 // Write the contents of the editor to filename
2472 bool SaveFile(const wxString
& filename
);
2474 // Load the contents of filename into the editor
2475 bool LoadFile(const wxString
& filename
);
2478 // Allow for simulating a DnD DragOver
2479 wxDragResult
DoDragOver(wxCoord x
, wxCoord y
, wxDragResult def
);
2481 // Allow for simulating a DnD DropText
2482 bool DoDropText(long x
, long y
, const wxString
& data
);
2485 // Specify whether anti-aliased fonts should be used. Will have no effect
2486 // on some platforms, but on some (wxMac for example) can greatly improve
2488 void SetUseAntiAliasing(bool useAA
);
2490 // Returns the current UseAntiAliasing setting.
2491 bool GetUseAntiAliasing();
2494 //----------------------------------------------------------------------
2500 void OnPaint(wxPaintEvent
& evt
);
2501 void OnScrollWin(wxScrollWinEvent
& evt
);
2502 void OnScroll(wxScrollEvent
& evt
);
2503 void OnSize(wxSizeEvent
& evt
);
2504 void OnMouseLeftDown(wxMouseEvent
& evt
);
2505 void OnMouseMove(wxMouseEvent
& evt
);
2506 void OnMouseLeftUp(wxMouseEvent
& evt
);
2507 void OnMouseRightUp(wxMouseEvent
& evt
);
2508 void OnMouseMiddleUp(wxMouseEvent
& evt
);
2509 void OnContextMenu(wxContextMenuEvent
& evt
);
2510 void OnMouseWheel(wxMouseEvent
& evt
);
2511 void OnChar(wxKeyEvent
& evt
);
2512 void OnKeyDown(wxKeyEvent
& evt
);
2513 void OnLoseFocus(wxFocusEvent
& evt
);
2514 void OnGainFocus(wxFocusEvent
& evt
);
2515 void OnSysColourChanged(wxSysColourChangedEvent
& evt
);
2516 void OnEraseBackground(wxEraseEvent
& evt
);
2517 void OnMenu(wxCommandEvent
& evt
);
2518 void OnListBox(wxCommandEvent
& evt
);
2519 void OnIdle(wxIdleEvent
& evt
);
2522 // Turn notifications from Scintilla into events
2523 void NotifyChange();
2524 void NotifyParent(SCNotification
* scn
);
2526 DECLARE_EVENT_TABLE()
2527 DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl
)
2532 wxStopWatch m_stopWatch
;
2533 wxScrollBar
* m_vScrollBar
;
2534 wxScrollBar
* m_hScrollBar
;
2536 bool m_lastKeyDownConsumed
;
2538 friend class ScintillaWX
;
2539 friend class Platform
;
2543 //----------------------------------------------------------------------
2545 class WXDLLIMPEXP_STC wxStyledTextEvent
: public wxCommandEvent
{
2547 wxStyledTextEvent(wxEventType commandType
=0, int id
=0);
2549 wxStyledTextEvent(const wxStyledTextEvent
& event
);
2551 ~wxStyledTextEvent() {}
2553 void SetPosition(int pos
) { m_position
= pos
; }
2554 void SetKey(int k
) { m_key
= k
; }
2555 void SetModifiers(int m
) { m_modifiers
= m
; }
2556 void SetModificationType(int t
) { m_modificationType
= t
; }
2557 void SetText(const wxString
& t
) { m_text
= t
; }
2558 void SetLength(int len
) { m_length
= len
; }
2559 void SetLinesAdded(int num
) { m_linesAdded
= num
; }
2560 void SetLine(int val
) { m_line
= val
; }
2561 void SetFoldLevelNow(int val
) { m_foldLevelNow
= val
; }
2562 void SetFoldLevelPrev(int val
) { m_foldLevelPrev
= val
; }
2563 void SetMargin(int val
) { m_margin
= val
; }
2564 void SetMessage(int val
) { m_message
= val
; }
2565 void SetWParam(int val
) { m_wParam
= val
; }
2566 void SetLParam(int val
) { m_lParam
= val
; }
2567 void SetListType(int val
) { m_listType
= val
; }
2568 void SetX(int val
) { m_x
= val
; }
2569 void SetY(int val
) { m_y
= val
; }
2570 void SetDragText(const wxString
& val
) { m_dragText
= val
; }
2571 void SetDragAllowMove(bool val
) { m_dragAllowMove
= val
; }
2573 void SetDragResult(wxDragResult val
) { m_dragResult
= val
; }
2576 int GetPosition() const { return m_position
; }
2577 int GetKey() const { return m_key
; }
2578 int GetModifiers() const { return m_modifiers
; }
2579 int GetModificationType() const { return m_modificationType
; }
2580 wxString
GetText() const { return m_text
; }
2581 int GetLength() const { return m_length
; }
2582 int GetLinesAdded() const { return m_linesAdded
; }
2583 int GetLine() const { return m_line
; }
2584 int GetFoldLevelNow() const { return m_foldLevelNow
; }
2585 int GetFoldLevelPrev() const { return m_foldLevelPrev
; }
2586 int GetMargin() const { return m_margin
; }
2587 int GetMessage() const { return m_message
; }
2588 int GetWParam() const { return m_wParam
; }
2589 int GetLParam() const { return m_lParam
; }
2590 int GetListType() const { return m_listType
; }
2591 int GetX() const { return m_x
; }
2592 int GetY() const { return m_y
; }
2593 wxString
GetDragText() { return m_dragText
; }
2594 bool GetDragAllowMove() { return m_dragAllowMove
; }
2596 wxDragResult
GetDragResult() { return m_dragResult
; }
2599 bool GetShift() const;
2600 bool GetControl() const;
2601 bool GetAlt() const;
2603 virtual wxEvent
* Clone() const { return new wxStyledTextEvent(*this); }
2607 DECLARE_DYNAMIC_CLASS(wxStyledTextEvent
)
2613 int m_modificationType
; // wxEVT_STC_MODIFIED
2619 int m_foldLevelPrev
;
2621 int m_margin
; // wxEVT_STC_MARGINCLICK
2623 int m_message
; // wxEVT_STC_MACRORECORD
2631 wxString m_dragText
; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
2632 bool m_dragAllowMove
; // wxEVT_STC_START_DRAG
2634 #if wxUSE_DRAG_AND_DROP
2635 wxDragResult m_dragResult
; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
2643 BEGIN_DECLARE_EVENT_TYPES()
2644 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_CHANGE
, 1650)
2645 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_STYLENEEDED
, 1651)
2646 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_CHARADDED
, 1652)
2647 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_SAVEPOINTREACHED
, 1653)
2648 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_SAVEPOINTLEFT
, 1654)
2649 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_ROMODIFYATTEMPT
, 1655)
2650 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_KEY
, 1656)
2651 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_DOUBLECLICK
, 1657)
2652 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_UPDATEUI
, 1658)
2653 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_MODIFIED
, 1659)
2654 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_MACRORECORD
, 1660)
2655 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_MARGINCLICK
, 1661)
2656 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_NEEDSHOWN
, 1662)
2657 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_POSCHANGED
, 1663)
2658 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_PAINTED
, 1664)
2659 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_USERLISTSELECTION
, 1665)
2660 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_URIDROPPED
, 1666)
2661 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_DWELLSTART
, 1667)
2662 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_DWELLEND
, 1668)
2663 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_START_DRAG
, 1669)
2664 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_DRAG_OVER
, 1670)
2665 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_DO_DROP
, 1671)
2666 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_ZOOM
, 1672)
2667 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_HOTSPOT_CLICK
, 1673)
2668 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_HOTSPOT_DCLICK
, 1674)
2669 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_CALLTIP_CLICK
, 1675)
2670 END_DECLARE_EVENT_TYPES()
2674 wxEVT_STC_STYLENEEDED
,
2675 wxEVT_STC_CHARADDED
,
2676 wxEVT_STC_SAVEPOINTREACHED
,
2677 wxEVT_STC_SAVEPOINTLEFT
,
2678 wxEVT_STC_ROMODIFYATTEMPT
,
2680 wxEVT_STC_DOUBLECLICK
,
2683 wxEVT_STC_MACRORECORD
,
2684 wxEVT_STC_MARGINCLICK
,
2685 wxEVT_STC_NEEDSHOWN
,
2686 wxEVT_STC_POSCHANGED
,
2688 wxEVT_STC_USERLISTSELECTION
,
2689 wxEVT_STC_URIDROPPED
,
2690 wxEVT_STC_DWELLSTART
,
2692 wxEVT_STC_START_DRAG
,
2693 wxEVT_STC_DRAG_OVER
,
2696 wxEVT_STC_HOTSPOT_CLICK
,
2697 wxEVT_STC_HOTSPOT_DCLICK
,
2698 wxEVT_STC_CALLTIP_CLICK
2705 typedef void (wxEvtHandler::*wxStyledTextEventFunction
)(wxStyledTextEvent
&);
2707 #define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2708 #define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2709 #define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2710 #define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2711 #define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2712 #define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2713 #define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2714 #define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2715 #define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2716 #define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2717 #define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2718 #define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2719 #define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2720 #define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2721 #define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2722 #define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2723 #define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2724 #define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2725 #define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2726 #define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2727 #define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2728 #define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2729 #define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2730 #define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2731 #define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2732 #define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
2736 //----------------------------------------------------------------------
2737 // Utility functions used within wxSTC
2741 inline wxString
stc2wx(const char* str
) {
2743 return wxString(str
, wxConvUTF8
);
2745 return wxString(str
);
2750 wxString
stc2wx(const char* str
, size_t len
);
2752 inline wxString
stc2wx(const char* str
, size_t len
) {
2753 return wxString(str
, len
);
2759 inline const wxWX2MBbuf
wx2stc(const wxString
& str
) {
2760 return str
.mb_str(wxConvUTF8
);
2763 inline const wxWX2MBbuf
wx2stc(const wxString
& str
) {
2764 return str
.mbc_str();
2771 //----------------------------------------------------------------------