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