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