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