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