1 ////////////////////////////////////////////////////////////////////////////
3 // Purpose: A wxWindows implementation of Scintilla. This class is the
4 // one meant to be used directly by wx applications. It does not
5 // derive directly from the Scintilla classes, and in fact there
6 // is no mention of Scintilla classes at all in this header.
7 // This class delegates all method calls and events to the
8 // Scintilla objects and so forth. This allows the use of
9 // Scintilla without polluting the namespace with all the
10 // classes and itentifiers from Scintilla.
14 // Created: 13-Jan-2000
16 // Copyright: (c) 2000 by Total Control Software
17 // Licence: wxWindows license
18 /////////////////////////////////////////////////////////////////////////////
27 //----------------------------------------------------------------------
29 // Should a wxPopupWindow be used for the call tips and autocomplete windows?
30 #ifndef wxSTC_USE_POPUP
31 #define wxSTC_USE_POPUP 1
34 //----------------------------------------------------------------------
35 // BEGIN generated section. The following code is automatically generated
36 // by gen_iface.py. Do not edit this file. Edit stc.h.in instead
39 #define wxSTC_INVALID_POSITION -1
41 // Define start of Scintilla messages to be greater than all edit (EM_*) messages
42 // as many EM_ messages can be used although that use is deprecated.
43 #define wxSTC_START 2000
44 #define wxSTC_OPTIONAL_START 3000
45 #define wxSTC_LEXER_START 4000
47 // Redoes the next action on the undo history
48 #define wxSTC_CMD_REDO 2011
50 // Select all the text in the document.
51 #define wxSTC_CMD_SELECTALL 2013
52 #define wxSTC_WS_INVISIBLE 0
53 #define wxSTC_WS_VISIBLEALWAYS 1
54 #define wxSTC_WS_VISIBLEAFTERINDENT 2
55 #define wxSTC_EOL_CRLF 0
56 #define wxSTC_EOL_CR 1
57 #define wxSTC_EOL_LF 2
59 // The SC_CP_UTF8 value can be used to enter Unicode mode.
60 // This is the same value as CP_UTF8 in Windows
61 #define wxSTC_CP_UTF8 65001
62 #define wxSTC_MARKER_MAX 31
63 #define wxSTC_MARK_CIRCLE 0
64 #define wxSTC_MARK_ROUNDRECT 1
65 #define wxSTC_MARK_ARROW 2
66 #define wxSTC_MARK_SMALLRECT 3
67 #define wxSTC_MARK_SHORTARROW 4
68 #define wxSTC_MARK_EMPTY 5
69 #define wxSTC_MARK_ARROWDOWN 6
70 #define wxSTC_MARK_MINUS 7
71 #define wxSTC_MARK_PLUS 8
73 // Shapes used for outlining column
74 #define wxSTC_MARK_VLINE 9
75 #define wxSTC_MARK_LCORNER 10
76 #define wxSTC_MARK_TCORNER 11
77 #define wxSTC_MARK_BOXPLUS 12
78 #define wxSTC_MARK_BOXPLUSCONNECTED 13
79 #define wxSTC_MARK_BOXMINUS 14
80 #define wxSTC_MARK_BOXMINUSCONNECTED 15
81 #define wxSTC_MARK_LCORNERCURVE 16
82 #define wxSTC_MARK_TCORNERCURVE 17
83 #define wxSTC_MARK_CIRCLEPLUS 18
84 #define wxSTC_MARK_CIRCLEPLUSCONNECTED 19
85 #define wxSTC_MARK_CIRCLEMINUS 20
86 #define wxSTC_MARK_CIRCLEMINUSCONNECTED 21
88 // Invisible mark that only sets the line background color
89 #define wxSTC_MARK_BACKGROUND 22
90 #define wxSTC_MARK_CHARACTER 10000
92 // Markers used for outlining column
93 #define wxSTC_MARKNUM_FOLDEREND 25
94 #define wxSTC_MARKNUM_FOLDEROPENMID 26
95 #define wxSTC_MARKNUM_FOLDERMIDTAIL 27
96 #define wxSTC_MARKNUM_FOLDERTAIL 28
97 #define wxSTC_MARKNUM_FOLDERSUB 29
98 #define wxSTC_MARKNUM_FOLDER 30
99 #define wxSTC_MARKNUM_FOLDEROPEN 31
100 #define wxSTC_MASK_FOLDERS 0xFE000000
101 #define wxSTC_MARGIN_SYMBOL 0
102 #define wxSTC_MARGIN_NUMBER 1
104 // Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
105 // Styles 38 and 39 are for future use.
106 #define wxSTC_STYLE_DEFAULT 32
107 #define wxSTC_STYLE_LINENUMBER 33
108 #define wxSTC_STYLE_BRACELIGHT 34
109 #define wxSTC_STYLE_BRACEBAD 35
110 #define wxSTC_STYLE_CONTROLCHAR 36
111 #define wxSTC_STYLE_INDENTGUIDE 37
112 #define wxSTC_STYLE_LASTPREDEFINED 39
113 #define wxSTC_STYLE_MAX 127
115 // Character set identifiers are used in StyleSetCharacterSet.
116 // The values are the same as the Windows *_CHARSET values.
117 #define wxSTC_CHARSET_ANSI 0
118 #define wxSTC_CHARSET_DEFAULT 1
119 #define wxSTC_CHARSET_BALTIC 186
120 #define wxSTC_CHARSET_CHINESEBIG5 136
121 #define wxSTC_CHARSET_EASTEUROPE 238
122 #define wxSTC_CHARSET_GB2312 134
123 #define wxSTC_CHARSET_GREEK 161
124 #define wxSTC_CHARSET_HANGUL 129
125 #define wxSTC_CHARSET_MAC 77
126 #define wxSTC_CHARSET_OEM 255
127 #define wxSTC_CHARSET_RUSSIAN 204
128 #define wxSTC_CHARSET_SHIFTJIS 128
129 #define wxSTC_CHARSET_SYMBOL 2
130 #define wxSTC_CHARSET_TURKISH 162
131 #define wxSTC_CHARSET_JOHAB 130
132 #define wxSTC_CHARSET_HEBREW 177
133 #define wxSTC_CHARSET_ARABIC 178
134 #define wxSTC_CHARSET_VIETNAMESE 163
135 #define wxSTC_CHARSET_THAI 222
136 #define wxSTC_CASE_MIXED 0
137 #define wxSTC_CASE_UPPER 1
138 #define wxSTC_CASE_LOWER 2
139 #define wxSTC_INDIC_MAX 7
140 #define wxSTC_INDIC_PLAIN 0
141 #define wxSTC_INDIC_SQUIGGLE 1
142 #define wxSTC_INDIC_TT 2
143 #define wxSTC_INDIC_DIAGONAL 3
144 #define wxSTC_INDIC_STRIKE 4
145 #define wxSTC_INDIC0_MASK 0x20
146 #define wxSTC_INDIC1_MASK 0x40
147 #define wxSTC_INDIC2_MASK 0x80
148 #define wxSTC_INDICS_MASK 0xE0
150 // PrintColourMode - use same colours as screen.
151 #define wxSTC_PRINT_NORMAL 0
153 // PrintColourMode - invert the light value of each style for printing.
154 #define wxSTC_PRINT_INVERTLIGHT 1
156 // PrintColourMode - force black text on white background for printing.
157 #define wxSTC_PRINT_BLACKONWHITE 2
159 // PrintColourMode - text stays coloured, but all background is forced to be white for printing.
160 #define wxSTC_PRINT_COLOURONWHITE 3
162 // PrintColourMode - only the default-background is forced to be white for printing.
163 #define wxSTC_PRINT_COLOURONWHITEDEFAULTBG 4
164 #define wxSTC_FIND_WHOLEWORD 2
165 #define wxSTC_FIND_MATCHCASE 4
166 #define wxSTC_FIND_WORDSTART 0x00100000
167 #define wxSTC_FIND_REGEXP 0x00200000
169 // Undo one action in the undo history.
170 #define wxSTC_CMD_UNDO 2176
172 // Cut the selection to the clipboard.
173 #define wxSTC_CMD_CUT 2177
175 // Copy the selection to the clipboard.
176 #define wxSTC_CMD_COPY 2178
178 // Paste the contents of the clipboard into the document replacing the selection.
179 #define wxSTC_CMD_PASTE 2179
180 #define wxSTC_FOLDLEVELBASE 0x400
181 #define wxSTC_FOLDLEVELWHITEFLAG 0x1000
182 #define wxSTC_FOLDLEVELHEADERFLAG 0x2000
183 #define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF
184 #define wxSTC_TIME_FOREVER 10000000
185 #define wxSTC_WRAP_NONE 0
186 #define wxSTC_WRAP_WORD 1
187 #define wxSTC_CACHE_NONE 0
188 #define wxSTC_CACHE_CARET 1
189 #define wxSTC_CACHE_PAGE 2
190 #define wxSTC_CACHE_DOCUMENT 3
192 // Move caret down one line.
193 #define wxSTC_CMD_LINEDOWN 2300
195 // Move caret down one line extending selection to new caret position.
196 #define wxSTC_CMD_LINEDOWNEXTEND 2301
198 // Move caret up one line.
199 #define wxSTC_CMD_LINEUP 2302
201 // Move caret up one line extending selection to new caret position.
202 #define wxSTC_CMD_LINEUPEXTEND 2303
204 // Move caret left one character.
205 #define wxSTC_CMD_CHARLEFT 2304
207 // Move caret left one character extending selection to new caret position.
208 #define wxSTC_CMD_CHARLEFTEXTEND 2305
210 // Move caret right one character.
211 #define wxSTC_CMD_CHARRIGHT 2306
213 // Move caret right one character extending selection to new caret position.
214 #define wxSTC_CMD_CHARRIGHTEXTEND 2307
216 // Move caret left one word.
217 #define wxSTC_CMD_WORDLEFT 2308
219 // Move caret left one word extending selection to new caret position.
220 #define wxSTC_CMD_WORDLEFTEXTEND 2309
222 // Move caret right one word.
223 #define wxSTC_CMD_WORDRIGHT 2310
225 // Move caret right one word extending selection to new caret position.
226 #define wxSTC_CMD_WORDRIGHTEXTEND 2311
228 // Move caret to first position on line.
229 #define wxSTC_CMD_HOME 2312
231 // Move caret to first position on line extending selection to new caret position.
232 #define wxSTC_CMD_HOMEEXTEND 2313
234 // Move caret to last position on line.
235 #define wxSTC_CMD_LINEEND 2314
237 // Move caret to last position on line extending selection to new caret position.
238 #define wxSTC_CMD_LINEENDEXTEND 2315
240 // Move caret to first position in document.
241 #define wxSTC_CMD_DOCUMENTSTART 2316
243 // Move caret to first position in document extending selection to new caret position.
244 #define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317
246 // Move caret to last position in document.
247 #define wxSTC_CMD_DOCUMENTEND 2318
249 // Move caret to last position in document extending selection to new caret position.
250 #define wxSTC_CMD_DOCUMENTENDEXTEND 2319
252 // Move caret one page up.
253 #define wxSTC_CMD_PAGEUP 2320
255 // Move caret one page up extending selection to new caret position.
256 #define wxSTC_CMD_PAGEUPEXTEND 2321
258 // Move caret one page down.
259 #define wxSTC_CMD_PAGEDOWN 2322
261 // Move caret one page down extending selection to new caret position.
262 #define wxSTC_CMD_PAGEDOWNEXTEND 2323
264 // Switch from insert to overtype mode or the reverse.
265 #define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324
267 // Cancel any modes such as call tip or auto-completion list display.
268 #define wxSTC_CMD_CANCEL 2325
270 // Delete the selection or if no selection, the character before the caret.
271 #define wxSTC_CMD_DELETEBACK 2326
273 // If selection is empty or all on one line replace the selection with a tab
275 // If more than one line selected, indent the lines.
276 #define wxSTC_CMD_TAB 2327
278 // Dedent the selected lines.
279 #define wxSTC_CMD_BACKTAB 2328
281 // Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
282 #define wxSTC_CMD_NEWLINE 2329
284 // Insert a Form Feed character.
285 #define wxSTC_CMD_FORMFEED 2330
287 // Move caret to before first visible character on line.
288 // If already there move to first character on line.
289 #define wxSTC_CMD_VCHOME 2331
291 // Like VCHome but extending selection to new caret position.
292 #define wxSTC_CMD_VCHOMEEXTEND 2332
294 // Magnify the displayed text by increasing the sizes by 1 point.
295 #define wxSTC_CMD_ZOOMIN 2333
297 // Make the displayed text smaller by decreasing the sizes by 1 point.
298 #define wxSTC_CMD_ZOOMOUT 2334
300 // Delete the word to the left of the caret.
301 #define wxSTC_CMD_DELWORDLEFT 2335
303 // Delete the word to the right of the caret.
304 #define wxSTC_CMD_DELWORDRIGHT 2336
306 // Cut the line containing the caret.
307 #define wxSTC_CMD_LINECUT 2337
309 // Delete the line containing the caret.
310 #define wxSTC_CMD_LINEDELETE 2338
312 // Switch the current line with the previous.
313 #define wxSTC_CMD_LINETRANSPOSE 2339
315 // Transform the selection to lower case.
316 #define wxSTC_CMD_LOWERCASE 2340
318 // Transform the selection to upper case.
319 #define wxSTC_CMD_UPPERCASE 2341
321 // Scroll the document down, keeping the caret visible.
322 #define wxSTC_CMD_LINESCROLLDOWN 2342
324 // Scroll the document up, keeping the caret visible.
325 #define wxSTC_CMD_LINESCROLLUP 2343
327 // Delete the selection or if no selection, the character before the caret.
328 // Will not delete the chraacter before at the start of a line.
329 #define wxSTC_CMD_DELETEBACKNOTLINE 2344
330 #define wxSTC_EDGE_NONE 0
331 #define wxSTC_EDGE_LINE 1
332 #define wxSTC_EDGE_BACKGROUND 2
334 // Show caret within N lines of edge when it's scrolled to view
335 // If CARET_SLOP not set then centre caret on screen when it's
337 #define wxSTC_CARET_SLOP 0x01
340 #define wxSTC_CARET_CENTER 0x02
342 // If CARET_SLOP also set then reposition whenever outside slop border
343 // If CARET_SLOP not set then recentre even when visible
344 #define wxSTC_CARET_STRICT 0x04
346 // If CARET_XEVEN set then both left and right margins are given equal weight
347 // rather than favouring left following behaviour.
348 #define wxSTC_CARET_XEVEN 0x08
350 // If CARET_XJUMPS set then when caret reaches the margin the display jumps
351 // enough to leave the caret solidly within the display.
352 #define wxSTC_CARET_XJUMPS 0x10
353 #define wxSTC_CURSORNORMAL -1
354 #define wxSTC_CURSORWAIT 3
356 // Constants for use with SetVisiblePolicy, similar to SetCaretPolicy
357 #define wxSTC_VISIBLE_SLOP 0x01
358 #define wxSTC_VISIBLE_STRICT 0x04
361 // Type of modification and the action which caused the modification
362 // These are defined as a bit mask to make it easy to specify which notifications are wanted.
363 // One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
364 #define wxSTC_MOD_INSERTTEXT 0x1
365 #define wxSTC_MOD_DELETETEXT 0x2
366 #define wxSTC_MOD_CHANGESTYLE 0x4
367 #define wxSTC_MOD_CHANGEFOLD 0x8
368 #define wxSTC_PERFORMED_USER 0x10
369 #define wxSTC_PERFORMED_UNDO 0x20
370 #define wxSTC_PERFORMED_REDO 0x40
371 #define wxSTC_LASTSTEPINUNDOREDO 0x100
372 #define wxSTC_MOD_CHANGEMARKER 0x200
373 #define wxSTC_MOD_BEFOREINSERT 0x400
374 #define wxSTC_MOD_BEFOREDELETE 0x800
375 #define wxSTC_MODEVENTMASKALL 0xF77
377 // Symbolic key codes and modifier flags
378 // ASCII and other printable characters below 256
379 // Extended keys above 300
380 #define wxSTC_KEY_DOWN 300
381 #define wxSTC_KEY_UP 301
382 #define wxSTC_KEY_LEFT 302
383 #define wxSTC_KEY_RIGHT 303
384 #define wxSTC_KEY_HOME 304
385 #define wxSTC_KEY_END 305
386 #define wxSTC_KEY_PRIOR 306
387 #define wxSTC_KEY_NEXT 307
388 #define wxSTC_KEY_DELETE 308
389 #define wxSTC_KEY_INSERT 309
390 #define wxSTC_KEY_ESCAPE 7
391 #define wxSTC_KEY_BACK 8
392 #define wxSTC_KEY_TAB 9
393 #define wxSTC_KEY_RETURN 13
394 #define wxSTC_KEY_ADD 310
395 #define wxSTC_KEY_SUBTRACT 311
396 #define wxSTC_KEY_DIVIDE 312
397 #define wxSTC_SCMOD_SHIFT 1
398 #define wxSTC_SCMOD_CTRL 2
399 #define wxSTC_SCMOD_ALT 4
402 #define wxSTC_LEX_CONTAINER 0
403 #define wxSTC_LEX_NULL 1
404 #define wxSTC_LEX_PYTHON 2
405 #define wxSTC_LEX_CPP 3
406 #define wxSTC_LEX_HTML 4
407 #define wxSTC_LEX_XML 5
408 #define wxSTC_LEX_PERL 6
409 #define wxSTC_LEX_SQL 7
410 #define wxSTC_LEX_VB 8
411 #define wxSTC_LEX_PROPERTIES 9
412 #define wxSTC_LEX_ERRORLIST 10
413 #define wxSTC_LEX_MAKEFILE 11
414 #define wxSTC_LEX_BATCH 12
415 #define wxSTC_LEX_XCODE 13
416 #define wxSTC_LEX_LATEX 14
417 #define wxSTC_LEX_LUA 15
418 #define wxSTC_LEX_DIFF 16
419 #define wxSTC_LEX_CONF 17
420 #define wxSTC_LEX_PASCAL 18
421 #define wxSTC_LEX_AVE 19
422 #define wxSTC_LEX_ADA 20
423 #define wxSTC_LEX_LISP 21
424 #define wxSTC_LEX_RUBY 22
425 #define wxSTC_LEX_EIFFEL 23
426 #define wxSTC_LEX_EIFFELKW 24
427 #define wxSTC_LEX_TCL 25
428 #define wxSTC_LEX_NNCRONTAB 26
429 #define wxSTC_LEX_BULLANT 27
430 #define wxSTC_LEX_VBSCRIPT 28
431 #define wxSTC_LEX_ASP 29
432 #define wxSTC_LEX_PHP 30
433 #define wxSTC_LEX_BAAN 31
434 #define wxSTC_LEX_MATLAB 32
436 // When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
437 // value assigned in sequence from SCLEX_AUTOMATIC+1.
438 #define wxSTC_LEX_AUTOMATIC 1000
440 // Lexical states for SCLEX_PYTHON
441 #define wxSTC_P_DEFAULT 0
442 #define wxSTC_P_COMMENTLINE 1
443 #define wxSTC_P_NUMBER 2
444 #define wxSTC_P_STRING 3
445 #define wxSTC_P_CHARACTER 4
446 #define wxSTC_P_WORD 5
447 #define wxSTC_P_TRIPLE 6
448 #define wxSTC_P_TRIPLEDOUBLE 7
449 #define wxSTC_P_CLASSNAME 8
450 #define wxSTC_P_DEFNAME 9
451 #define wxSTC_P_OPERATOR 10
452 #define wxSTC_P_IDENTIFIER 11
453 #define wxSTC_P_COMMENTBLOCK 12
454 #define wxSTC_P_STRINGEOL 13
456 // Lexical states for SCLEX_CPP
457 #define wxSTC_C_DEFAULT 0
458 #define wxSTC_C_COMMENT 1
459 #define wxSTC_C_COMMENTLINE 2
460 #define wxSTC_C_COMMENTDOC 3
461 #define wxSTC_C_NUMBER 4
462 #define wxSTC_C_WORD 5
463 #define wxSTC_C_STRING 6
464 #define wxSTC_C_CHARACTER 7
465 #define wxSTC_C_UUID 8
466 #define wxSTC_C_PREPROCESSOR 9
467 #define wxSTC_C_OPERATOR 10
468 #define wxSTC_C_IDENTIFIER 11
469 #define wxSTC_C_STRINGEOL 12
470 #define wxSTC_C_VERBATIM 13
471 #define wxSTC_C_REGEX 14
472 #define wxSTC_C_COMMENTLINEDOC 15
473 #define wxSTC_C_WORD2 16
474 #define wxSTC_C_COMMENTDOCKEYWORD 17
475 #define wxSTC_C_COMMENTDOCKEYWORDERROR 18
477 // Lexical states for SCLEX_VB, SCLEX_VBSCRIPT
478 #define wxSTC_B_DEFAULT 0
479 #define wxSTC_B_COMMENT 1
480 #define wxSTC_B_NUMBER 2
481 #define wxSTC_B_KEYWORD 3
482 #define wxSTC_B_STRING 4
483 #define wxSTC_B_PREPROCESSOR 5
484 #define wxSTC_B_OPERATOR 6
485 #define wxSTC_B_IDENTIFIER 7
486 #define wxSTC_B_DATE 8
488 // Lexical states for SCLEX_HTML, SCLEX_XML
489 #define wxSTC_H_DEFAULT 0
490 #define wxSTC_H_TAG 1
491 #define wxSTC_H_TAGUNKNOWN 2
492 #define wxSTC_H_ATTRIBUTE 3
493 #define wxSTC_H_ATTRIBUTEUNKNOWN 4
494 #define wxSTC_H_NUMBER 5
495 #define wxSTC_H_DOUBLESTRING 6
496 #define wxSTC_H_SINGLESTRING 7
497 #define wxSTC_H_OTHER 8
498 #define wxSTC_H_COMMENT 9
499 #define wxSTC_H_ENTITY 10
502 #define wxSTC_H_TAGEND 11
503 #define wxSTC_H_XMLSTART 12
504 #define wxSTC_H_XMLEND 13
505 #define wxSTC_H_SCRIPT 14
506 #define wxSTC_H_ASP 15
507 #define wxSTC_H_ASPAT 16
508 #define wxSTC_H_CDATA 17
509 #define wxSTC_H_QUESTION 18
512 #define wxSTC_H_VALUE 19
515 #define wxSTC_H_XCCOMMENT 20
518 #define wxSTC_H_SGML_DEFAULT 21
519 #define wxSTC_H_SGML_COMMAND 22
520 #define wxSTC_H_SGML_1ST_PARAM 23
521 #define wxSTC_H_SGML_DOUBLESTRING 24
522 #define wxSTC_H_SGML_SIMPLESTRING 25
523 #define wxSTC_H_SGML_ERROR 26
524 #define wxSTC_H_SGML_SPECIAL 27
525 #define wxSTC_H_SGML_ENTITY 28
526 #define wxSTC_H_SGML_COMMENT 29
527 #define wxSTC_H_SGML_1ST_PARAM_COMMENT 30
528 #define wxSTC_H_SGML_BLOCK_DEFAULT 31
530 // Embedded Javascript
531 #define wxSTC_HJ_START 40
532 #define wxSTC_HJ_DEFAULT 41
533 #define wxSTC_HJ_COMMENT 42
534 #define wxSTC_HJ_COMMENTLINE 43
535 #define wxSTC_HJ_COMMENTDOC 44
536 #define wxSTC_HJ_NUMBER 45
537 #define wxSTC_HJ_WORD 46
538 #define wxSTC_HJ_KEYWORD 47
539 #define wxSTC_HJ_DOUBLESTRING 48
540 #define wxSTC_HJ_SINGLESTRING 49
541 #define wxSTC_HJ_SYMBOLS 50
542 #define wxSTC_HJ_STRINGEOL 51
543 #define wxSTC_HJ_REGEX 52
546 #define wxSTC_HJA_START 55
547 #define wxSTC_HJA_DEFAULT 56
548 #define wxSTC_HJA_COMMENT 57
549 #define wxSTC_HJA_COMMENTLINE 58
550 #define wxSTC_HJA_COMMENTDOC 59
551 #define wxSTC_HJA_NUMBER 60
552 #define wxSTC_HJA_WORD 61
553 #define wxSTC_HJA_KEYWORD 62
554 #define wxSTC_HJA_DOUBLESTRING 63
555 #define wxSTC_HJA_SINGLESTRING 64
556 #define wxSTC_HJA_SYMBOLS 65
557 #define wxSTC_HJA_STRINGEOL 66
558 #define wxSTC_HJA_REGEX 67
561 #define wxSTC_HB_START 70
562 #define wxSTC_HB_DEFAULT 71
563 #define wxSTC_HB_COMMENTLINE 72
564 #define wxSTC_HB_NUMBER 73
565 #define wxSTC_HB_WORD 74
566 #define wxSTC_HB_STRING 75
567 #define wxSTC_HB_IDENTIFIER 76
568 #define wxSTC_HB_STRINGEOL 77
571 #define wxSTC_HBA_START 80
572 #define wxSTC_HBA_DEFAULT 81
573 #define wxSTC_HBA_COMMENTLINE 82
574 #define wxSTC_HBA_NUMBER 83
575 #define wxSTC_HBA_WORD 84
576 #define wxSTC_HBA_STRING 85
577 #define wxSTC_HBA_IDENTIFIER 86
578 #define wxSTC_HBA_STRINGEOL 87
581 #define wxSTC_HP_START 90
582 #define wxSTC_HP_DEFAULT 91
583 #define wxSTC_HP_COMMENTLINE 92
584 #define wxSTC_HP_NUMBER 93
585 #define wxSTC_HP_STRING 94
586 #define wxSTC_HP_CHARACTER 95
587 #define wxSTC_HP_WORD 96
588 #define wxSTC_HP_TRIPLE 97
589 #define wxSTC_HP_TRIPLEDOUBLE 98
590 #define wxSTC_HP_CLASSNAME 99
591 #define wxSTC_HP_DEFNAME 100
592 #define wxSTC_HP_OPERATOR 101
593 #define wxSTC_HP_IDENTIFIER 102
596 #define wxSTC_HPA_START 105
597 #define wxSTC_HPA_DEFAULT 106
598 #define wxSTC_HPA_COMMENTLINE 107
599 #define wxSTC_HPA_NUMBER 108
600 #define wxSTC_HPA_STRING 109
601 #define wxSTC_HPA_CHARACTER 110
602 #define wxSTC_HPA_WORD 111
603 #define wxSTC_HPA_TRIPLE 112
604 #define wxSTC_HPA_TRIPLEDOUBLE 113
605 #define wxSTC_HPA_CLASSNAME 114
606 #define wxSTC_HPA_DEFNAME 115
607 #define wxSTC_HPA_OPERATOR 116
608 #define wxSTC_HPA_IDENTIFIER 117
611 #define wxSTC_HPHP_DEFAULT 118
612 #define wxSTC_HPHP_HSTRING 119
613 #define wxSTC_HPHP_SIMPLESTRING 120
614 #define wxSTC_HPHP_WORD 121
615 #define wxSTC_HPHP_NUMBER 122
616 #define wxSTC_HPHP_VARIABLE 123
617 #define wxSTC_HPHP_COMMENT 124
618 #define wxSTC_HPHP_COMMENTLINE 125
619 #define wxSTC_HPHP_HSTRING_VARIABLE 126
620 #define wxSTC_HPHP_OPERATOR 127
622 // Lexical states for SCLEX_PERL
623 #define wxSTC_PL_DEFAULT 0
624 #define wxSTC_PL_ERROR 1
625 #define wxSTC_PL_COMMENTLINE 2
626 #define wxSTC_PL_POD 3
627 #define wxSTC_PL_NUMBER 4
628 #define wxSTC_PL_WORD 5
629 #define wxSTC_PL_STRING 6
630 #define wxSTC_PL_CHARACTER 7
631 #define wxSTC_PL_PUNCTUATION 8
632 #define wxSTC_PL_PREPROCESSOR 9
633 #define wxSTC_PL_OPERATOR 10
634 #define wxSTC_PL_IDENTIFIER 11
635 #define wxSTC_PL_SCALAR 12
636 #define wxSTC_PL_ARRAY 13
637 #define wxSTC_PL_HASH 14
638 #define wxSTC_PL_SYMBOLTABLE 15
639 #define wxSTC_PL_REGEX 17
640 #define wxSTC_PL_REGSUBST 18
641 #define wxSTC_PL_LONGQUOTE 19
642 #define wxSTC_PL_BACKTICKS 20
643 #define wxSTC_PL_DATASECTION 21
644 #define wxSTC_PL_HERE_DELIM 22
645 #define wxSTC_PL_HERE_Q 23
646 #define wxSTC_PL_HERE_QQ 24
647 #define wxSTC_PL_HERE_QX 25
648 #define wxSTC_PL_STRING_Q 26
649 #define wxSTC_PL_STRING_QQ 27
650 #define wxSTC_PL_STRING_QX 28
651 #define wxSTC_PL_STRING_QR 29
652 #define wxSTC_PL_STRING_QW 30
654 // Lexical states for SCLEX_LATEX
655 #define wxSTC_L_DEFAULT 0
656 #define wxSTC_L_COMMAND 1
657 #define wxSTC_L_TAG 2
658 #define wxSTC_L_MATH 3
659 #define wxSTC_L_COMMENT 4
661 // Lexical states for SCLEX_LUA
662 #define wxSTC_LUA_DEFAULT 0
663 #define wxSTC_LUA_COMMENT 1
664 #define wxSTC_LUA_COMMENTLINE 2
665 #define wxSTC_LUA_COMMENTDOC 3
666 #define wxSTC_LUA_NUMBER 4
667 #define wxSTC_LUA_WORD 5
668 #define wxSTC_LUA_STRING 6
669 #define wxSTC_LUA_CHARACTER 7
670 #define wxSTC_LUA_LITERALSTRING 8
671 #define wxSTC_LUA_PREPROCESSOR 9
672 #define wxSTC_LUA_OPERATOR 10
673 #define wxSTC_LUA_IDENTIFIER 11
674 #define wxSTC_LUA_STRINGEOL 12
675 #define wxSTC_LUA_WORD2 13
676 #define wxSTC_LUA_WORD3 14
677 #define wxSTC_LUA_WORD4 15
678 #define wxSTC_LUA_WORD5 16
679 #define wxSTC_LUA_WORD6 17
681 // Lexical states for SCLEX_ERRORLIST
682 #define wxSTC_ERR_DEFAULT 0
683 #define wxSTC_ERR_PYTHON 1
684 #define wxSTC_ERR_GCC 2
685 #define wxSTC_ERR_MS 3
686 #define wxSTC_ERR_CMD 4
687 #define wxSTC_ERR_BORLAND 5
688 #define wxSTC_ERR_PERL 6
689 #define wxSTC_ERR_NET 7
690 #define wxSTC_ERR_LUA 8
691 #define wxSTC_ERR_DIFF_CHANGED 10
692 #define wxSTC_ERR_DIFF_ADDITION 11
693 #define wxSTC_ERR_DIFF_DELETION 12
694 #define wxSTC_ERR_DIFF_MESSAGE 13
696 // Lexical states for SCLEX_BATCH
697 #define wxSTC_BAT_DEFAULT 0
698 #define wxSTC_BAT_COMMENT 1
699 #define wxSTC_BAT_WORD 2
700 #define wxSTC_BAT_LABEL 3
701 #define wxSTC_BAT_HIDE 4
702 #define wxSTC_BAT_COMMAND 5
703 #define wxSTC_BAT_IDENTIFIER 6
704 #define wxSTC_BAT_OPERATOR 7
706 // Lexical states for SCLEX_MAKEFILE
707 #define wxSTC_MAKE_DEFAULT 0
708 #define wxSTC_MAKE_COMMENT 1
709 #define wxSTC_MAKE_PREPROCESSOR 2
710 #define wxSTC_MAKE_IDENTIFIER 3
711 #define wxSTC_MAKE_OPERATOR 4
712 #define wxSTC_MAKE_TARGET 5
713 #define wxSTC_MAKE_IDEOL 9
715 // Lexical states for the SCLEX_CONF (Apache Configuration Files Lexer)
716 #define wxSTC_CONF_DEFAULT 0
717 #define wxSTC_CONF_COMMENT 1
718 #define wxSTC_CONF_NUMBER 2
719 #define wxSTC_CONF_IDENTIFIER 3
720 #define wxSTC_CONF_EXTENSION 4
721 #define wxSTC_CONF_PARAMETER 5
722 #define wxSTC_CONF_STRING 6
723 #define wxSTC_CONF_OPERATOR 7
724 #define wxSTC_CONF_IP 8
725 #define wxSTC_CONF_DIRECTIVE 9
728 #define wxSTC_AVE_DEFAULT 0
729 #define wxSTC_AVE_COMMENT 1
730 #define wxSTC_AVE_NUMBER 2
731 #define wxSTC_AVE_WORD 3
732 #define wxSTC_AVE_KEYWORD 4
733 #define wxSTC_AVE_STATEMENT 5
734 #define wxSTC_AVE_STRING 6
735 #define wxSTC_AVE_ENUM 7
736 #define wxSTC_AVE_STRINGEOL 8
737 #define wxSTC_AVE_IDENTIFIER 9
738 #define wxSTC_AVE_OPERATOR 10
740 // Lexical states for SCLEX_ADA
741 #define wxSTC_ADA_DEFAULT 0
742 #define wxSTC_ADA_COMMENT 1
743 #define wxSTC_ADA_NUMBER 2
744 #define wxSTC_ADA_WORD 3
745 #define wxSTC_ADA_STRING 4
746 #define wxSTC_ADA_CHARACTER 5
747 #define wxSTC_ADA_OPERATOR 6
748 #define wxSTC_ADA_IDENTIFIER 7
749 #define wxSTC_ADA_STRINGEOL 8
751 // Lexical states for SCLEX_BAAN
752 #define wxSTC_BAAN_DEFAULT 0
753 #define wxSTC_BAAN_COMMENT 1
754 #define wxSTC_BAAN_COMMENTDOC 2
755 #define wxSTC_BAAN_NUMBER 3
756 #define wxSTC_BAAN_WORD 4
757 #define wxSTC_BAAN_STRING 5
758 #define wxSTC_BAAN_PREPROCESSOR 6
759 #define wxSTC_BAAN_OPERATOR 7
760 #define wxSTC_BAAN_IDENTIFIER 8
761 #define wxSTC_BAAN_STRINGEOL 9
762 #define wxSTC_BAAN_WORD2 10
764 // Lexical states for SCLEX_LISP
765 #define wxSTC_LISP_DEFAULT 0
766 #define wxSTC_LISP_COMMENT 1
767 #define wxSTC_LISP_NUMBER 2
768 #define wxSTC_LISP_KEYWORD 3
769 #define wxSTC_LISP_STRING 6
770 #define wxSTC_LISP_STRINGEOL 8
771 #define wxSTC_LISP_IDENTIFIER 9
772 #define wxSTC_LISP_OPERATOR 10
774 // Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
775 #define wxSTC_EIFFEL_DEFAULT 0
776 #define wxSTC_EIFFEL_COMMENTLINE 1
777 #define wxSTC_EIFFEL_NUMBER 2
778 #define wxSTC_EIFFEL_WORD 3
779 #define wxSTC_EIFFEL_STRING 4
780 #define wxSTC_EIFFEL_CHARACTER 5
781 #define wxSTC_EIFFEL_OPERATOR 6
782 #define wxSTC_EIFFEL_IDENTIFIER 7
783 #define wxSTC_EIFFEL_STRINGEOL 8
785 // Lexical states for the SCLEX_NNCRONTAB (nnCron crontab Lexer)
786 #define wxSTC_NNCRONTAB_DEFAULT 0
787 #define wxSTC_NNCRONTAB_COMMENT 1
788 #define wxSTC_NNCRONTAB_TASK 2
789 #define wxSTC_NNCRONTAB_SECTION 3
790 #define wxSTC_NNCRONTAB_KEYWORD 4
791 #define wxSTC_NNCRONTAB_MODIFIER 5
792 #define wxSTC_NNCRONTAB_ASTERISK 6
793 #define wxSTC_NNCRONTAB_NUMBER 7
794 #define wxSTC_NNCRONTAB_STRING 8
795 #define wxSTC_NNCRONTAB_ENVIRONMENT 9
796 #define wxSTC_NNCRONTAB_IDENTIFIER 10
798 // Lexical states for SCLEX_MATLAB
799 #define wxSTC_MATLAB_DEFAULT 0
800 #define wxSTC_MATLAB_COMMENT 1
801 #define wxSTC_MATLAB_COMMAND 2
802 #define wxSTC_MATLAB_NUMBER 3
803 #define wxSTC_MATLAB_KEYWORD 4
804 #define wxSTC_MATLAB_STRING 5
805 #define wxSTC_MATLAB_OPERATOR 6
806 #define wxSTC_MATLAB_IDENTIFIER 7
808 // END of generated section
809 //----------------------------------------------------------------------
811 class ScintillaWX
; // forward declare
813 struct SCNotification
;
816 extern const wxChar
* wxSTCNameStr
;
818 //----------------------------------------------------------------------
820 class wxStyledTextCtrl
: public wxControl
{
824 wxStyledTextCtrl(wxWindow
*parent
, wxWindowID id
,
825 const wxPoint
& pos
= wxDefaultPosition
,
826 const wxSize
& size
= wxDefaultSize
, long style
= 0,
827 const wxString
& name
= wxPySTCNameStr
);
828 %pragma
(python
) addtomethod
= "__init__:self._setOORInfo(self)"
831 wxStyledTextCtrl(wxWindow
*parent
, wxWindowID id
,
832 const wxPoint
& pos
= wxDefaultPosition
,
833 const wxSize
& size
= wxDefaultSize
, long style
= 0,
834 const wxString
& name
= wxSTCNameStr
);
842 //----------------------------------------------------------------------
843 // BEGIN generated section. The following code is automatically generated
844 // by gen_iface.py. Do not edit this file. Edit stc.h.in instead
848 // Add text to the document
849 void AddText(const wxString
& text
);
851 // Add array of cells to document
852 void AddStyledText(const wxMemoryBuffer
& data
);
854 // Insert string at a position
855 void InsertText(int pos
, const wxString
& text
);
857 // Delete all text in the document
860 // Set all style bytes to 0, remove all folding information
861 void ClearDocumentStyle();
863 // The number of characters in the document
866 // Returns the character byte at the position
867 int GetCharAt(int pos
);
869 // Returns the position of the caret
872 // Returns the position of the opposite end of the selection to the caret
875 // Returns the style byte at the position
876 int GetStyleAt(int pos
);
878 // Redoes the next action on the undo history
881 // Choose between collecting actions into the undo
882 // history and discarding them.
883 void SetUndoCollection(bool collectUndo
);
885 // Select all the text in the document.
888 // Remember the current position in the undo history as the position
889 // at which the document was saved.
892 // Retrieve a buffer of cells.
893 wxMemoryBuffer
GetStyledText(int startPos
, int endPos
);
895 // Are there any redoable actions in the undo history.
898 // Retrieve the line number at which a particular marker is located
899 int MarkerLineFromHandle(int handle
);
902 void MarkerDeleteHandle(int handle
);
904 // Is undo history being collected?
905 bool GetUndoCollection();
907 // Are white space characters currently visible?
908 // Returns one of SCWS_* constants.
909 int GetViewWhiteSpace();
911 // Make white space characters invisible, always visible or visible outside indentation.
912 void SetViewWhiteSpace(int viewWS
);
914 // Find the position from a point within the window.
915 int PositionFromPoint(wxPoint pt
);
917 // Find the position from a point within the window but return
918 // INVALID_POSITION if not close to text.
919 int PositionFromPointClose(int x
, int y
);
921 // Set caret to start of a line and ensure it is visible.
922 void GotoLine(int line
);
924 // Set caret to a position and ensure it is visible.
925 void GotoPos(int pos
);
927 // Set the selection anchor to a position. The anchor is the opposite
928 // end of the selection from the caret.
929 void SetAnchor(int posAnchor
);
931 // Retrieve the text of the line containing the caret.
932 // Returns the index of the caret on the line.
934 wxString
GetCurLine(int* OUTPUT
);
936 wxString
GetCurLine(int* linePos
=NULL
);
939 // Retrieve the position of the last correctly styled character.
942 // Convert all line endings in the document to one mode.
943 void ConvertEOLs(int eolMode
);
945 // Retrieve the current end of line mode - one of CRLF, CR, or LF.
948 // Set the current end of line mode.
949 void SetEOLMode(int eolMode
);
951 // Set the current styling position to pos and the styling mask to mask.
952 // The styling mask can be used to protect some bits in each styling byte from
954 void StartStyling(int pos
, int mask
);
956 // Change style from current styling position for length characters to a style
957 // and move the current styling position to after this newly styled segment.
958 void SetStyling(int length
, int style
);
960 // Is drawing done first into a buffer or direct to the screen.
961 bool GetBufferedDraw();
963 // If drawing is buffered then each line of text is drawn into a bitmap buffer
964 // before drawing it to the screen to avoid flicker.
965 void SetBufferedDraw(bool buffered
);
967 // Change the visible size of a tab to be a multiple of the width of a space
969 void SetTabWidth(int tabWidth
);
971 // Retrieve the visible size of a tab.
974 // Set the code page used to interpret the bytes of the document as characters.
975 void SetCodePage(int codePage
);
977 // Set the symbol used for a particular marker number,
978 // and optionally the fore and background colours.
979 void MarkerDefine(int markerNumber
, int markerSymbol
,
980 const wxColour
& foreground
= wxNullColour
,
981 const wxColour
& background
= wxNullColour
);
983 // Set the foreground colour used for a particular marker number.
984 void MarkerSetForeground(int markerNumber
, const wxColour
& fore
);
986 // Set the background colour used for a particular marker number.
987 void MarkerSetBackground(int markerNumber
, const wxColour
& back
);
989 // Add a marker to a line, returning an ID which can be used to find or delete the marker.
990 int MarkerAdd(int line
, int markerNumber
);
992 // Delete a marker from a line
993 void MarkerDelete(int line
, int markerNumber
);
995 // Delete all markers with a particular number from all lines
996 void MarkerDeleteAll(int markerNumber
);
998 // Get a bit mask of all the markers set on a line.
999 int MarkerGet(int line
);
1001 // Find the next line after lineStart that includes a marker in mask.
1002 int MarkerNext(int lineStart
, int markerMask
);
1004 // Find the previous line before lineStart that includes a marker in mask.
1005 int MarkerPrevious(int lineStart
, int markerMask
);
1007 // Set a margin to be either numeric or symbolic.
1008 void SetMarginType(int margin
, int marginType
);
1010 // Retrieve the type of a margin.
1011 int GetMarginType(int margin
);
1013 // Set the width of a margin to a width expressed in pixels.
1014 void SetMarginWidth(int margin
, int pixelWidth
);
1016 // Retrieve the width of a margin in pixels.
1017 int GetMarginWidth(int margin
);
1019 // Set a mask that determines which markers are displayed in a margin.
1020 void SetMarginMask(int margin
, int mask
);
1022 // Retrieve the marker mask of a margin.
1023 int GetMarginMask(int margin
);
1025 // Make a margin sensitive or insensitive to mouse clicks.
1026 void SetMarginSensitive(int margin
, bool sensitive
);
1028 // Retrieve the mouse click sensitivity of a margin.
1029 bool GetMarginSensitive(int margin
);
1031 // Clear all the styles and make equivalent to the global default style.
1032 void StyleClearAll();
1034 // Set the foreground colour of a style.
1035 void StyleSetForeground(int style
, const wxColour
& fore
);
1037 // Set the background colour of a style.
1038 void StyleSetBackground(int style
, const wxColour
& back
);
1040 // Set a style to be bold or not.
1041 void StyleSetBold(int style
, bool bold
);
1043 // Set a style to be italic or not.
1044 void StyleSetItalic(int style
, bool italic
);
1046 // Set the size of characters of a style.
1047 void StyleSetSize(int style
, int sizePoints
);
1049 // Set the font of a style.
1050 void StyleSetFaceName(int style
, const wxString
& fontName
);
1052 // Set a style to have its end of line filled or not.
1053 void StyleSetEOLFilled(int style
, bool filled
);
1055 // Reset the default style to its state at startup
1056 void StyleResetDefault();
1058 // Set a style to be underlined or not.
1059 void StyleSetUnderline(int style
, bool underline
);
1061 // Set a style to be mixed case, or to force upper or lower case.
1062 void StyleSetCase(int style
, int caseForce
);
1064 // Set the character set of the font in a style.
1065 void StyleSetCharacterSet(int style
, int characterSet
);
1067 // Set the foreground colour of the selection and whether to use this setting.
1068 void SetSelForeground(bool useSetting
, const wxColour
& fore
);
1070 // Set the background colour of the selection and whether to use this setting.
1071 void SetSelBackground(bool useSetting
, const wxColour
& back
);
1073 // Set the foreground colour of the caret.
1074 void SetCaretForeground(const wxColour
& fore
);
1076 // When key+modifier combination km is pressed perform msg.
1077 void CmdKeyAssign(int key
, int modifiers
, int cmd
);
1079 // When key+modifier combination km do nothing.
1080 void CmdKeyClear(int key
, int modifiers
);
1082 // Drop all key mappings.
1083 void CmdKeyClearAll();
1085 // Set the styles for a segment of the document.
1086 void SetStyleBytes(int length
, char* styleBytes
);
1088 // Set a style to be visible or not.
1089 void StyleSetVisible(int style
, bool visible
);
1091 // Get the time in milliseconds that the caret is on and off.
1092 int GetCaretPeriod();
1094 // Get the time in milliseconds that the caret is on and off. 0 = steady on.
1095 void SetCaretPeriod(int periodMilliseconds
);
1097 // Set the set of characters making up words for when moving or selecting
1099 void SetWordChars(const wxString
& characters
);
1101 // Start a sequence of actions that is undone and redone as a unit.
1103 void BeginUndoAction();
1105 // End a sequence of actions that is undone and redone as a unit.
1106 void EndUndoAction();
1108 // Set an indicator to plain, squiggle or TT.
1109 void IndicatorSetStyle(int indic
, int style
);
1111 // Retrieve the style of an indicator.
1112 int IndicatorGetStyle(int indic
);
1114 // Set the foreground colour of an indicator.
1115 void IndicatorSetForeground(int indic
, const wxColour
& fore
);
1117 // Retrieve the foreground colour of an indicator.
1118 wxColour
IndicatorGetForeground(int indic
);
1120 // Divide each styling byte into lexical class bits (default:5) and indicator
1121 // bits (default:3). If a lexer requires more than 32 lexical states, then this
1122 // is used to expand the possible states.
1123 void SetStyleBits(int bits
);
1125 // Retrieve number of bits in style bytes used to hold the lexical state.
1128 // Used to hold extra styling information for each line.
1129 void SetLineState(int line
, int state
);
1131 // Retrieve the extra styling information for a line.
1132 int GetLineState(int line
);
1134 // Retrieve the last line number that has line state.
1135 int GetMaxLineState();
1137 // Is the background of the line containing the caret in a different colour?
1138 bool GetCaretLineVisible();
1140 // Dsplay the background of the line containing the caret in a different colour.
1141 void SetCaretLineVisible(bool show
);
1143 // Get the colour of the background of the line containing the caret.
1144 wxColour
GetCaretLineBack();
1146 // Set the colour of the background of the line containing the caret.
1147 void SetCaretLineBack(const wxColour
& back
);
1149 // Set a style to be changeable or not (read only).
1150 // Experimental feature, currently buggy.
1151 void StyleSetChangeable(int style
, bool changeable
);
1153 // Display a auto-completion list.
1154 // The lenEntered parameter indicates how many characters before
1155 // the caret should be used to provide context.
1156 void AutoCompShow(int lenEntered
, const wxString
& itemList
);
1158 // Remove the auto-completion list from the screen.
1159 void AutoCompCancel();
1161 // Is there an auto-completion list visible?
1162 bool AutoCompActive();
1164 // Retrieve the position of the caret when the auto-completion list was
1166 int AutoCompPosStart();
1168 // User has selected an item so remove the list and insert the selection.
1169 void AutoCompComplete();
1171 // Define a set of character that when typed cancel the auto-completion list.
1172 void AutoCompStops(const wxString
& characterSet
);
1174 // Change the separator character in the string setting up an auto-completion
1175 // list. Default is space but can be changed if items contain space.
1176 void AutoCompSetSeparator(int separatorCharacter
);
1178 // Retrieve the auto-completion list separator character.
1179 int AutoCompGetSeparator();
1181 // Select the item in the auto-completion list that starts with a string.
1182 void AutoCompSelect(const wxString
& text
);
1184 // Should the auto-completion list be cancelled if the user backspaces to a
1185 // position before where the box was created.
1186 void AutoCompSetCancelAtStart(bool cancel
);
1188 // Retrieve whether auto-completion cancelled by backspacing before start.
1189 bool AutoCompGetCancelAtStart();
1191 // Define a set of characters that when typed will cause the autocompletion to
1192 // choose the selected item.
1193 void AutoCompSetFillUps(const wxString
& characterSet
);
1195 // Should a single item auto-completion list automatically choose the item.
1196 void AutoCompSetChooseSingle(bool chooseSingle
);
1198 // Retrieve whether a single item auto-completion list automatically choose the item.
1199 bool AutoCompGetChooseSingle();
1201 // Set whether case is significant when performing auto-completion searches.
1202 void AutoCompSetIgnoreCase(bool ignoreCase
);
1204 // Retrieve state of ignore case flag.
1205 bool AutoCompGetIgnoreCase();
1207 // Display a list of strings and send notification when user chooses one.
1208 void UserListShow(int listType
, const wxString
& itemList
);
1210 // Set whether or not autocompletion is hidden automatically when nothing matches
1211 void AutoCompSetAutoHide(bool autoHide
);
1213 // Retrieve whether or not autocompletion is hidden automatically when nothing matches
1214 bool AutoCompGetAutoHide();
1216 // Set whether or not autocompletion deletes any word characters after the inserted text upon completion
1217 void AutoCompSetDropRestOfWord(bool dropRestOfWord
);
1219 // Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion
1220 bool AutoCompGetDropRestOfWord();
1222 // Set the number of spaces used for one level of indentation.
1223 void SetIndent(int indentSize
);
1225 // Retrieve indentation size.
1228 // Indentation will only use space characters if useTabs is false, otherwise
1229 // it will use a combination of tabs and spaces.
1230 void SetUseTabs(bool useTabs
);
1232 // Retrieve whether tabs will be used in indentation.
1235 // Change the indentation of a line to a number of columns.
1236 void SetLineIndentation(int line
, int indentSize
);
1238 // Retrieve the number of columns that a line is indented.
1239 int GetLineIndentation(int line
);
1241 // Retrieve the position before the first non indentation character on a line.
1242 int GetLineIndentPosition(int line
);
1244 // Retrieve the column number of a position, taking tab width into account.
1245 int GetColumn(int pos
);
1247 // Show or hide the horizontal scroll bar.
1248 void SetUseHorizontalScrollBar(bool show
);
1250 // Is the horizontal scroll bar visible?
1251 bool GetUseHorizontalScrollBar();
1253 // Show or hide indentation guides.
1254 void SetIndentationGuides(bool show
);
1256 // Are the indentation guides visible?
1257 bool GetIndentationGuides();
1259 // Set the highlighted indentation guide column.
1260 // 0 = no highlighted guide.
1261 void SetHighlightGuide(int column
);
1263 // Get the highlighted indentation guide column.
1264 int GetHighlightGuide();
1266 // Get the position after the last visible characters on a line.
1267 int GetLineEndPosition(int line
);
1269 // Get the code page used to interpret the bytes of the document as characters.
1272 // Get the foreground colour of the caret.
1273 wxColour
GetCaretForeground();
1275 // In read-only mode?
1278 // Sets the position of the caret.
1279 void SetCurrentPos(int pos
);
1281 // Sets the position that starts the selection - this becomes the anchor.
1282 void SetSelectionStart(int pos
);
1284 // Returns the position at the start of the selection.
1285 int GetSelectionStart();
1287 // Sets the position that ends the selection - this becomes the currentPosition.
1288 void SetSelectionEnd(int pos
);
1290 // Returns the position at the end of the selection.
1291 int GetSelectionEnd();
1293 // Sets the print magnification added to the point size of each style for printing.
1294 void SetPrintMagnification(int magnification
);
1296 // Returns the print magnification.
1297 int GetPrintMagnification();
1299 // Modify colours when printing for clearer printed text.
1300 void SetPrintColourMode(int mode
);
1302 // Returns the print colour mode.
1303 int GetPrintColourMode();
1305 // Find some text in the document.
1306 int FindText(int minPos
, int maxPos
, const wxString
& text
, int flags
=0);
1308 // On Windows will draw the document into a display context such as a printer.
1309 int FormatRange(bool doDraw
,
1313 wxDC
* target
, // Why does it use two? Can they be the same?
1317 // Retrieve the line at the top of the display.
1318 int GetFirstVisibleLine();
1320 // Retrieve the contents of a line.
1321 wxString
GetLine(int line
);
1323 // Returns the number of lines in the document. There is always at least one.
1326 // Sets the size in pixels of the left margin.
1327 void SetMarginLeft(int pixelWidth
);
1329 // Returns the size in pixels of the left margin.
1330 int GetMarginLeft();
1332 // Sets the size in pixels of the right margin.
1333 void SetMarginRight(int pixelWidth
);
1335 // Returns the size in pixels of the right margin.
1336 int GetMarginRight();
1338 // Is the document different from when it was last saved?
1341 // Select a range of text.
1342 void SetSelection(int start
, int end
);
1344 // Retrieve the selected text.
1345 wxString
GetSelectedText();
1347 // Retrieve a range of text.
1348 wxString
GetTextRange(int startPos
, int endPos
);
1350 // Draw the selection in normal style or with selection highlighted.
1351 void HideSelection(bool normal
);
1353 // Retrieve the line containing a position.
1354 int LineFromPosition(int pos
);
1356 // Retrieve the position at the start of a line.
1357 int PositionFromLine(int line
);
1359 // Scroll horizontally and vertically.
1360 void LineScroll(int columns
, int lines
);
1362 // Ensure the caret is visible.
1363 void EnsureCaretVisible();
1365 // Replace the selected text with the argument text.
1366 void ReplaceSelection(const wxString
& text
);
1368 // Set to read only or read write.
1369 void SetReadOnly(bool readOnly
);
1371 // Will a paste succeed?
1374 // Are there any undoable actions in the undo history.
1377 // Delete the undo history.
1378 void EmptyUndoBuffer();
1380 // Undo one action in the undo history.
1383 // Cut the selection to the clipboard.
1386 // Copy the selection to the clipboard.
1389 // Paste the contents of the clipboard into the document replacing the selection.
1392 // Clear the selection.
1395 // Replace the contents of the document with the argument text.
1396 void SetText(const wxString
& text
);
1398 // Retrieve all the text in the document.
1401 // Retrieve the number of characters in the document.
1402 int GetTextLength();
1404 // Set to overtype (true) or insert mode
1405 void SetOvertype(bool overtype
);
1407 // Returns true if overtype mode is active otherwise false is returned.
1410 // Set the width of the insert mode caret
1411 void SetCaretWidth(int pixelWidth
);
1413 // Returns the width of the insert mode caret
1414 int GetCaretWidth();
1416 // Sets the position that starts the target which is used for updating the
1417 // document without affecting the scroll position.
1418 void SetTargetStart(int pos
);
1420 // Get the position that starts the target.
1421 int GetTargetStart();
1423 // Sets the position that ends the target which is used for updating the
1424 // document without affecting the scroll position.
1425 void SetTargetEnd(int pos
);
1427 // Get the position that ends the target.
1430 // Replace the target text with the argument text.
1431 // Text is counted so it can contain nulls.
1432 // Returns the length of the replacement text.
1433 int ReplaceTarget(const wxString
& text
);
1435 // Replace the target text with the argument text after \d processing.
1436 // Text is counted so it can contain nulls.
1437 // Looks for \d where d is between 1 and 9 and replaces these with the strings
1438 // matched in the last search operation which were surrounded by \( and \).
1439 // Returns the length of the replacement text including any change
1440 // caused by processing the \d patterns.
1441 int ReplaceTargetRE(const wxString
& text
);
1443 // Search for a counted string in the target and set the target to the found
1444 // range. Text is counted so it can contain nulls.
1445 // Returns length of range or -1 for failure in which case target is not moved.
1446 int SearchInTarget(const wxString
& text
);
1448 // Set the search flags used by SearchInTarget
1449 void SetSearchFlags(int flags
);
1451 // Get the search flags used by SearchInTarget
1452 int GetSearchFlags();
1454 // Show a call tip containing a definition near position pos.
1455 void CallTipShow(int pos
, const wxString
& definition
);
1457 // Remove the call tip from the screen.
1458 void CallTipCancel();
1460 // Is there an active call tip?
1461 bool CallTipActive();
1463 // Retrieve the position where the caret was before displaying the call tip.
1464 int CallTipPosAtStart();
1466 // Highlight a segment of the definition.
1467 void CallTipSetHighlight(int start
, int end
);
1469 // Set the background colour for the call tip.
1470 void CallTipSetBackground(const wxColour
& back
);
1472 // Find the display line of a document line taking hidden lines into account.
1473 int VisibleFromDocLine(int line
);
1475 // Find the document line of a display line taking hidden lines into account.
1476 int DocLineFromVisible(int lineDisplay
);
1478 // Set the fold level of a line.
1479 // This encodes an integer level along with flags indicating whether the
1480 // line is a header and whether it is effectively white space.
1481 void SetFoldLevel(int line
, int level
);
1483 // Retrieve the fold level of a line.
1484 int GetFoldLevel(int line
);
1486 // Find the last child line of a header line.
1487 int GetLastChild(int line
, int level
);
1489 // Find the parent line of a child line.
1490 int GetFoldParent(int line
);
1492 // Make a range of lines visible.
1493 void ShowLines(int lineStart
, int lineEnd
);
1495 // Make a range of lines invisible.
1496 void HideLines(int lineStart
, int lineEnd
);
1498 // Is a line visible?
1499 bool GetLineVisible(int line
);
1501 // Show the children of a header line.
1502 void SetFoldExpanded(int line
, bool expanded
);
1504 // Is a header line expanded?
1505 bool GetFoldExpanded(int line
);
1507 // Switch a header line between expanded and contracted.
1508 void ToggleFold(int line
);
1510 // Ensure a particular line is visible by expanding any header line hiding it.
1511 void EnsureVisible(int line
);
1513 // Set some debugging options for folding
1514 void SetFoldFlags(int flags
);
1516 // Ensure a particular line is visible by expanding any header line hiding it.
1517 // Use the currently set visibility policy to determine which range to display.
1518 void EnsureVisibleEnforcePolicy(int line
);
1520 // Sets whether a tab pressed when caret is within indentation indents
1521 void SetTabIndents(bool tabIndents
);
1523 // Does a tab pressed when caret is within indentation indent?
1524 bool GetTabIndents();
1526 // Sets whether a backspace pressed when caret is within indentation unindents
1527 void SetBackSpaceUnIndents(bool bsUnIndents
);
1529 // Does a backspace pressed when caret is within indentation unindent?
1530 bool GetBackSpaceUnIndents();
1532 // Sets the time the mouse must sit still to generate a mouse dwell event
1533 void SetMouseDwellTime(int periodMilliseconds
);
1535 // Retrieve the time the mouse must sit still to generate a mouse dwell event
1536 int GetMouseDwellTime();
1538 // Get position of start of word
1539 int WordStartPosition(int pos
, bool onlyWordCharacters
);
1541 // Get position of end of word
1542 int WordEndPosition(int pos
, bool onlyWordCharacters
);
1544 // Sets whether text is word wrapped
1545 void SetWrapMode(int mode
);
1547 // Retrieve whether text is word wrapped
1550 // Sets the degree of caching of layout information
1551 void SetLayoutCache(int mode
);
1553 // Retrieve the degree of caching of layout information
1554 int GetLayoutCache();
1556 // Move the caret inside current view if it's not there already
1557 void MoveCaretInsideView();
1559 // How many characters are on a line, not including end of line characters.
1560 int LineLength(int line
);
1562 // Highlight the characters at two positions.
1563 void BraceHighlight(int pos1
, int pos2
);
1565 // Highlight the character at a position indicating there is no matching brace.
1566 void BraceBadLight(int pos
);
1568 // Find the position of a matching brace or INVALID_POSITION if no match.
1569 int BraceMatch(int pos
);
1571 // Are the end of line characters visible.
1574 // Make the end of line characters visible or invisible
1575 void SetViewEOL(bool visible
);
1577 // Retrieve a pointer to the document object.
1578 void* GetDocPointer();
1580 // Change the document object used.
1581 void SetDocPointer(void* docPointer
);
1583 // Set which document modification events are sent to the container.
1584 void SetModEventMask(int mask
);
1586 // Retrieve the column number which text should be kept within.
1587 int GetEdgeColumn();
1589 // Set the column number of the edge.
1590 // If text goes past the edge then it is highlighted.
1591 void SetEdgeColumn(int column
);
1593 // Retrieve the edge highlight mode.
1596 // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
1597 // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
1598 void SetEdgeMode(int mode
);
1600 // Retrieve the colour used in edge indication.
1601 wxColour
GetEdgeColour();
1603 // Change the colour used in edge indication.
1604 void SetEdgeColour(const wxColour
& edgeColour
);
1606 // Sets the current caret position to be the search anchor.
1607 void SearchAnchor();
1609 // Find some text starting at the search anchor.
1610 // Does not ensure the selection is visible.
1611 int SearchNext(int flags
, const wxString
& text
);
1613 // Find some text starting at the search anchor and moving backwards.
1614 // Does not ensure the selection is visible.
1615 int SearchPrev(int flags
, const wxString
& text
);
1617 // Set the way the line the caret is on is kept visible.
1618 void SetCaretPolicy(int caretPolicy
, int caretSlop
);
1620 // Retrieves the number of lines completely visible.
1621 int LinesOnScreen();
1623 // Set whether a pop up menu is displayed automatically when the user presses
1624 // the wrong mouse button.
1625 void UsePopUp(bool allowPopUp
);
1627 // Is the selection a rectangular. The alternative is the more common stream selection.
1628 bool SelectionIsRectangle();
1630 // Set the zoom level. This number of points is added to the size of all fonts.
1631 // It may be positive to magnify or negative to reduce.
1632 void SetZoom(int zoom
);
1634 // Retrieve the zoom level.
1637 // Create a new document object.
1638 // Starts with reference count of 1 and not selected into editor.
1639 void* CreateDocument();
1641 // Extend life of document.
1642 void AddRefDocument(void* docPointer
);
1644 // Release a reference to the document, deleting document if it fades to black.
1645 void ReleaseDocument(void* docPointer
);
1647 // Get which document modification events are sent to the container.
1648 int GetModEventMask();
1650 // Change internal focus flag
1651 void SetSTCFocus(bool focus
);
1653 // Get internal focus flag
1656 // Change error status - 0 = OK
1657 void SetStatus(int statusCode
);
1662 // Set whether the mouse is captured when its button is pressed
1663 void SetMouseDownCaptures(bool captures
);
1665 // Get whether mouse gets captured
1666 bool GetMouseDownCaptures();
1668 // Sets the cursor to one of the SC_CURSOR* values
1669 void SetCursor(int cursorType
);
1674 // Change the way control characters are displayed:
1675 // If symbol is < 32, keep the drawn way, else, use the given character
1676 void SetControlCharSymbol(int symbol
);
1678 // Get the way control characters are displayed
1679 int GetControlCharSymbol();
1681 // Move to the previous change in capitalistion
1682 void WordPartLeft();
1684 // Move to the previous change in capitalistion extending selection to new caret position.
1685 void WordPartLeftExtend();
1687 // Move to the change next in capitalistion
1688 void WordPartRight();
1690 // Move to the next change in capitalistion extending selection to new caret position.
1691 void WordPartRightExtend();
1693 // Set the way the display area is determined when a particular line is to be moved to.
1694 void SetVisiblePolicy(int visiblePolicy
, int visibleSlop
);
1696 // Delete back from the current position to the start of the line
1699 // Delete forwards from the current position to the end of the line
1700 void DelLineRight();
1702 // Get and Set the xOffset (ie, horizonal scroll position)
1703 void SetXOffset(int newOffset
);
1706 // Start notifying the container of all key presses and commands.
1709 // Stop notifying the container of all key presses and commands.
1712 // Set the lexing language of the document.
1713 void SetLexer(int lexer
);
1715 // Retrieve the lexing language of the document.
1718 // Colourise a segment of the document using the current lexing language.
1719 void Colourise(int start
, int end
);
1721 // Set up a value that may be used by a lexer for some optional feature.
1722 void SetProperty(const wxString
& key
, const wxString
& value
);
1724 // Set up the key words used by the lexer.
1725 void SetKeyWords(int keywordSet
, const wxString
& keyWords
);
1727 // Set the lexing language of the document based on string name.
1728 void SetLexerLanguage(const wxString
& language
);
1730 // END of generated section
1731 //----------------------------------------------------------------------
1735 // Returns the line number of the line with the caret.
1736 int GetCurrentLine();
1738 // Extract style settings from a spec-string which is composed of one or
1739 // more of the following comma separated elements:
1741 // bold turns on bold
1742 // italic turns on italics
1743 // fore:#RRGGBB sets the foreground colour
1744 // back:#RRGGBB sets the background colour
1745 // face:[facename] sets the font face name to use
1746 // size:[num] sets the font size in points
1747 // eol turns on eol filling
1748 // underline turns on underlining
1750 void StyleSetSpec(int styleNum
, const wxString
& spec
);
1754 // Set style size, face, bold, italic, and underline attributes from
1755 // a wxFont's attributes.
1756 void StyleSetFont(int styleNum
, wxFont
& font
);
1760 // Set all font style attributes at once.
1761 void StyleSetFontAttr(int styleNum
, int size
,
1762 const wxString
& faceName
,
1763 bool bold
, bool italic
,
1768 // Perform one of the operations defined by the wxSTC_CMD_* constants.
1769 void CmdKeyExecute(int cmd
);
1773 // Set the left and right margin in the edit area, measured in pixels.
1774 void SetMargins(int left
, int right
);
1777 // Retrieve the start and end positions of the current selection.
1779 void GetSelection(int* OUTPUT
, int* OUTPUT
);
1781 void GetSelection(int* startPos
, int* endPos
);
1784 // Retrieve the point in the window where a position is displayed.
1785 wxPoint
PointFromPosition(int pos
);
1788 // Scroll enough to make the given line visible
1789 void ScrollToLine(int line
);
1792 // Scroll enough to make the given column visible
1793 void ScrollToColumn(int column
);
1796 // Send a message to Scintilla
1797 long SendMsg(int msg
, long wp
=0, long lp
=0);
1800 // Set the vertical scrollbar to use instead of the ont that's built-in.
1801 void SetVScrollBar(wxScrollBar
* bar
) { m_vScrollBar
= bar
; }
1804 // Set the horizontal scrollbar to use instead of the ont that's built-in.
1805 void SetHScrollBar(wxScrollBar
* bar
) { m_hScrollBar
= bar
; }
1807 // Can be used to prevent the EVT_CHAR handler from adding the char
1808 bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed
; }
1809 void SetLastKeydownProcessed(bool val
) { m_lastKeyDownConsumed
= val
; }
1812 //----------------------------------------------------------------------
1818 void OnPaint(wxPaintEvent
& evt
);
1819 void OnScrollWin(wxScrollWinEvent
& evt
);
1820 void OnScroll(wxScrollEvent
& evt
);
1821 void OnSize(wxSizeEvent
& evt
);
1822 void OnMouseLeftDown(wxMouseEvent
& evt
);
1823 void OnMouseMove(wxMouseEvent
& evt
);
1824 void OnMouseLeftUp(wxMouseEvent
& evt
);
1825 void OnMouseRightUp(wxMouseEvent
& evt
);
1826 void OnContextMenu(wxContextMenuEvent
& evt
);
1827 void OnMouseWheel(wxMouseEvent
& evt
);
1828 void OnChar(wxKeyEvent
& evt
);
1829 void OnKeyDown(wxKeyEvent
& evt
);
1830 void OnLoseFocus(wxFocusEvent
& evt
);
1831 void OnGainFocus(wxFocusEvent
& evt
);
1832 void OnSysColourChanged(wxSysColourChangedEvent
& evt
);
1833 void OnEraseBackground(wxEraseEvent
& evt
);
1834 void OnMenu(wxCommandEvent
& evt
);
1835 void OnListBox(wxCommandEvent
& evt
);
1838 // Turn notifications from Scintilla into events
1839 void NotifyChange();
1840 void NotifyParent(SCNotification
* scn
);
1844 DECLARE_EVENT_TABLE()
1845 DECLARE_CLASS(wxStyledTextCtrl
)
1848 wxStopWatch m_stopWatch
;
1849 wxScrollBar
* m_vScrollBar
;
1850 wxScrollBar
* m_hScrollBar
;
1852 bool m_lastKeyDownConsumed
;
1854 friend class ScintillaWX
;
1855 friend class Platform
;
1859 //----------------------------------------------------------------------
1861 // SWIG can't handle "#if" type of conditionals, onlu "#ifdef"
1863 #define STC_USE_DND 1
1865 #if wxUSE_DRAG_AND_DROP
1866 #define STC_USE_DND 1
1870 class wxStyledTextEvent
: public wxCommandEvent
{
1872 wxStyledTextEvent(wxEventType commandType
=0, int id
=0);
1874 wxStyledTextEvent(const wxStyledTextEvent
& event
);
1876 ~wxStyledTextEvent() {}
1878 void SetPosition(int pos
) { m_position
= pos
; }
1879 void SetKey(int k
) { m_key
= k
; }
1880 void SetModifiers(int m
) { m_modifiers
= m
; }
1881 void SetModificationType(int t
) { m_modificationType
= t
; }
1882 void SetText(const wxString
& t
) { m_text
= t
; }
1883 void SetLength(int len
) { m_length
= len
; }
1884 void SetLinesAdded(int num
) { m_linesAdded
= num
; }
1885 void SetLine(int val
) { m_line
= val
; }
1886 void SetFoldLevelNow(int val
) { m_foldLevelNow
= val
; }
1887 void SetFoldLevelPrev(int val
) { m_foldLevelPrev
= val
; }
1888 void SetMargin(int val
) { m_margin
= val
; }
1889 void SetMessage(int val
) { m_message
= val
; }
1890 void SetWParam(int val
) { m_wParam
= val
; }
1891 void SetLParam(int val
) { m_lParam
= val
; }
1892 void SetListType(int val
) { m_listType
= val
; }
1893 void SetX(int val
) { m_x
= val
; }
1894 void SetY(int val
) { m_y
= val
; }
1895 void SetDragText(const wxString
& val
) { m_dragText
= val
; }
1896 void SetDragAllowMove(bool val
) { m_dragAllowMove
= val
; }
1898 void SetDragResult(wxDragResult val
) { m_dragResult
= val
; }
1901 int GetPosition() const { return m_position
; }
1902 int GetKey() const { return m_key
; }
1903 int GetModifiers() const { return m_modifiers
; }
1904 int GetModificationType() const { return m_modificationType
; }
1905 wxString
GetText() const { return m_text
; }
1906 int GetLength() const { return m_length
; }
1907 int GetLinesAdded() const { return m_linesAdded
; }
1908 int GetLine() const { return m_line
; }
1909 int GetFoldLevelNow() const { return m_foldLevelNow
; }
1910 int GetFoldLevelPrev() const { return m_foldLevelPrev
; }
1911 int GetMargin() const { return m_margin
; }
1912 int GetMessage() const { return m_message
; }
1913 int GetWParam() const { return m_wParam
; }
1914 int GetLParam() const { return m_lParam
; }
1915 int GetListType() const { return m_listType
; }
1916 int GetX() const { return m_x
; }
1917 int GetY() const { return m_y
; }
1918 wxString
GetDragText() { return m_dragText
; }
1919 bool GetDragAllowMove() { return m_dragAllowMove
; }
1921 wxDragResult
GetDragResult() { return m_dragResult
; }
1924 bool GetShift() const;
1925 bool GetControl() const;
1926 bool GetAlt() const;
1928 virtual wxEvent
* Clone() const { return new wxStyledTextEvent(*this); }
1932 DECLARE_DYNAMIC_CLASS(wxStyledTextEvent
)
1938 int m_modificationType
; // wxEVT_STC_MODIFIED
1944 int m_foldLevelPrev
;
1946 int m_margin
; // wxEVT_STC_MARGINCLICK
1948 int m_message
; // wxEVT_STC_MACRORECORD
1956 wxString m_dragText
; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
1957 bool m_dragAllowMove
; // wxEVT_STC_START_DRAG
1959 #if wxUSE_DRAG_AND_DROP
1960 wxDragResult m_dragResult
; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
1966 BEGIN_DECLARE_EVENT_TYPES()
1967 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE
, 1650)
1968 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED
, 1651)
1969 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED
, 1652)
1970 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED
, 1653)
1971 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT
, 1654)
1972 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT
, 1655)
1973 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY
, 1656)
1974 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK
, 1657)
1975 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI
, 1658)
1976 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED
, 1659)
1977 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD
, 1660)
1978 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK
, 1661)
1979 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN
, 1662)
1980 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED
, 1663)
1981 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_PAINTED
, 1664)
1982 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_USERLISTSELECTION
, 1665)
1983 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_URIDROPPED
, 1666)
1984 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLSTART
, 1667)
1985 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLEND
, 1668)
1986 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG
, 1669)
1987 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER
, 1670)
1988 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP
, 1671)
1989 END_DECLARE_EVENT_TYPES()
1993 wxEVT_STC_STYLENEEDED
,
1994 wxEVT_STC_CHARADDED
,
1995 wxEVT_STC_SAVEPOINTREACHED
,
1996 wxEVT_STC_SAVEPOINTLEFT
,
1997 wxEVT_STC_ROMODIFYATTEMPT
,
1999 wxEVT_STC_DOUBLECLICK
,
2002 wxEVT_STC_MACRORECORD
,
2003 wxEVT_STC_MARGINCLICK
,
2004 wxEVT_STC_NEEDSHOWN
,
2005 wxEVT_STC_POSCHANGED
,
2007 wxEVT_STC_USERLISTSELECTION
,
2008 wxEVT_STC_URIDROPPED
,
2009 wxEVT_STC_DWELLSTART
,
2011 wxEVT_STC_START_DRAG
,
2012 wxEVT_STC_DRAG_OVER
,
2020 typedef void (wxEvtHandler::*wxStyledTextEventFunction
)(wxStyledTextEvent
&);
2022 #define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2023 #define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2024 #define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2025 #define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2026 #define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2027 #define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2028 #define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2029 #define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2030 #define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2031 #define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2032 #define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2033 #define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2034 #define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2035 #define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2036 #define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2037 #define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2038 #define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2039 #define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2040 #define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2041 #define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2042 #define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2043 #define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
2046 //----------------------------------------------------------------------
2047 // Utility functions used within wxSTC
2051 inline wxString
stc2wx(const char* str
) {
2053 return wxString(str
, wxConvUTF8
);
2055 return wxString(str
);
2059 inline wxString
stc2wx(const char* str
, size_t len
) {
2061 return wxString(str
, wxConvUTF8
, len
);
2063 return wxString(str
, len
);
2068 inline const wxWX2MBbuf
wx2stc(const wxString
& str
) {
2069 return str
.mb_str(wxConvUTF8
);
2072 inline const wxWX2MBbuf
wx2stc(const wxString
& str
) {
2073 return str
.mbc_str();
2080 //----------------------------------------------------------------------