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