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