]> git.saurik.com Git - wxWidgets.git/blame - include/wx/stc/stc.h
added length argument to wxString::wxString(wchar_t*), just like in case of wxChar...
[wxWidgets.git] / include / wx / stc / stc.h
CommitLineData
9ce192d4
RD
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>
a29a241f 25#include <wx/dnd.h>
9ce192d4
RD
26
27//----------------------------------------------------------------------
4370573a
RD
28// BEGIN generated section. The following code is automatically generated
29// by gen_iface.py. Do not edit this file. Edit stc.h.in instead
30// and regenerate
31
32#define wxSTC_INVALID_POSITION -1
d25f5fbb
RD
33
34// Define start of Scintilla messages to be greater than all edit (EM_*) messages
35// as many EM_ messages can be used although that use is deprecated.
4370573a
RD
36#define wxSTC_START 2000
37#define wxSTC_OPTIONAL_START 3000
38#define wxSTC_LEXER_START 4000
39#define wxSTC_CMD_REDO 2011
40#define wxSTC_CMD_SELECTALL 2013
41#define wxSTC_WS_INVISIBLE 0
42#define wxSTC_WS_VISIBLEALWAYS 1
43#define wxSTC_WS_VISIBLEAFTERINDENT 2
44#define wxSTC_EOL_CRLF 0
45#define wxSTC_EOL_CR 1
46#define wxSTC_EOL_LF 2
47
48// The SC_CP_UTF8 value can be used to enter Unicode mode.
49// This is the same value as CP_UTF8 in Windows
50#define wxSTC_CP_UTF8 65001
51#define wxSTC_MARKER_MAX 31
52#define wxSTC_MARK_CIRCLE 0
53#define wxSTC_MARK_ROUNDRECT 1
54#define wxSTC_MARK_ARROW 2
55#define wxSTC_MARK_SMALLRECT 3
56#define wxSTC_MARK_SHORTARROW 4
57#define wxSTC_MARK_EMPTY 5
58#define wxSTC_MARK_ARROWDOWN 6
59#define wxSTC_MARK_MINUS 7
60#define wxSTC_MARK_PLUS 8
65ec6247
RD
61
62// Shapes used for outlining column
63#define wxSTC_MARK_VLINE 9
64#define wxSTC_MARK_LCORNER 10
65#define wxSTC_MARK_TCORNER 11
66#define wxSTC_MARK_BOXPLUS 12
67#define wxSTC_MARK_BOXPLUSCONNECTED 13
68#define wxSTC_MARK_BOXMINUS 14
69#define wxSTC_MARK_BOXMINUSCONNECTED 15
70#define wxSTC_MARK_LCORNERCURVE 16
71#define wxSTC_MARK_TCORNERCURVE 17
72#define wxSTC_MARK_CIRCLEPLUS 18
73#define wxSTC_MARK_CIRCLEPLUSCONNECTED 19
74#define wxSTC_MARK_CIRCLEMINUS 20
75#define wxSTC_MARK_CIRCLEMINUSCONNECTED 21
b8b0e402 76#define wxSTC_MARK_CHARACTER 10000
65ec6247
RD
77
78// Markers used for outlining column
79#define wxSTC_MARKNUM_FOLDEREND 25
80#define wxSTC_MARKNUM_FOLDEROPENMID 26
81#define wxSTC_MARKNUM_FOLDERMIDTAIL 27
82#define wxSTC_MARKNUM_FOLDERTAIL 28
83#define wxSTC_MARKNUM_FOLDERSUB 29
4370573a
RD
84#define wxSTC_MARKNUM_FOLDER 30
85#define wxSTC_MARKNUM_FOLDEROPEN 31
86#define wxSTC_MARGIN_SYMBOL 0
87#define wxSTC_MARGIN_NUMBER 1
b8b0e402
RD
88
89// Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
90// Styles 38 and 39 are for future use.
4370573a
RD
91#define wxSTC_STYLE_DEFAULT 32
92#define wxSTC_STYLE_LINENUMBER 33
93#define wxSTC_STYLE_BRACELIGHT 34
94#define wxSTC_STYLE_BRACEBAD 35
95#define wxSTC_STYLE_CONTROLCHAR 36
96#define wxSTC_STYLE_INDENTGUIDE 37
b8b0e402 97#define wxSTC_STYLE_LASTPREDEFINED 39
4370573a
RD
98#define wxSTC_STYLE_MAX 127
99
100// Character set identifiers are used in StyleSetCharacterSet.
101// The values are the same as the Windows *_CHARSET values.
102#define wxSTC_CHARSET_ANSI 0
103#define wxSTC_CHARSET_DEFAULT 1
104#define wxSTC_CHARSET_BALTIC 186
105#define wxSTC_CHARSET_CHINESEBIG5 136
106#define wxSTC_CHARSET_EASTEUROPE 238
107#define wxSTC_CHARSET_GB2312 134
108#define wxSTC_CHARSET_GREEK 161
109#define wxSTC_CHARSET_HANGUL 129
110#define wxSTC_CHARSET_MAC 77
111#define wxSTC_CHARSET_OEM 255
112#define wxSTC_CHARSET_RUSSIAN 204
113#define wxSTC_CHARSET_SHIFTJIS 128
114#define wxSTC_CHARSET_SYMBOL 2
115#define wxSTC_CHARSET_TURKISH 162
116#define wxSTC_CHARSET_JOHAB 130
117#define wxSTC_CHARSET_HEBREW 177
118#define wxSTC_CHARSET_ARABIC 178
119#define wxSTC_CHARSET_VIETNAMESE 163
120#define wxSTC_CHARSET_THAI 222
65ec6247
RD
121#define wxSTC_CASE_MIXED 0
122#define wxSTC_CASE_UPPER 1
123#define wxSTC_CASE_LOWER 2
4370573a
RD
124#define wxSTC_INDIC_MAX 7
125#define wxSTC_INDIC_PLAIN 0
126#define wxSTC_INDIC_SQUIGGLE 1
127#define wxSTC_INDIC_TT 2
128#define wxSTC_INDIC_DIAGONAL 3
129#define wxSTC_INDIC_STRIKE 4
130#define wxSTC_INDIC0_MASK 32
131#define wxSTC_INDIC1_MASK 64
132#define wxSTC_INDIC2_MASK 128
d25f5fbb 133#define wxSTC_INDICS_MASK 224
4370573a
RD
134
135// PrintColourMode - use same colours as screen.
136#define wxSTC_PRINT_NORMAL 0
137
138// PrintColourMode - invert the light value of each style for printing.
139#define wxSTC_PRINT_INVERTLIGHT 1
140
141// PrintColourMode - force black text on white background for printing.
142#define wxSTC_PRINT_BLACKONWHITE 2
65ec6247
RD
143
144// PrintColourMode - text stays coloured, but all background is forced to be white for printing.
145#define wxSTC_PRINT_COLOURONWHITE 3
146
147// PrintColourMode - only the default-background is forced to be white for printing.
148#define wxSTC_PRINT_COLOURONWHITEDEFAULTBG 4
4370573a
RD
149#define wxSTC_FIND_WHOLEWORD 2
150#define wxSTC_FIND_MATCHCASE 4
151#define wxSTC_FIND_WORDSTART 0x00100000
4370573a
RD
152#define wxSTC_FIND_REGEXP 0x00200000
153#define wxSTC_CMD_UNDO 2176
154#define wxSTC_CMD_CUT 2177
155#define wxSTC_CMD_COPY 2178
156#define wxSTC_CMD_PASTE 2179
157#define wxSTC_FOLDLEVELBASE 0x400
158#define wxSTC_FOLDLEVELWHITEFLAG 0x1000
159#define wxSTC_FOLDLEVELHEADERFLAG 0x2000
160#define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF
65ec6247 161#define wxSTC_TIME_FOREVER 10000000
4370573a
RD
162#define wxSTC_CMD_LINEDOWN 2300
163#define wxSTC_CMD_LINEDOWNEXTEND 2301
164#define wxSTC_CMD_LINEUP 2302
165#define wxSTC_CMD_LINEUPEXTEND 2303
166#define wxSTC_CMD_CHARLEFT 2304
167#define wxSTC_CMD_CHARLEFTEXTEND 2305
168#define wxSTC_CMD_CHARRIGHT 2306
169#define wxSTC_CMD_CHARRIGHTEXTEND 2307
170#define wxSTC_CMD_WORDLEFT 2308
171#define wxSTC_CMD_WORDLEFTEXTEND 2309
172#define wxSTC_CMD_WORDRIGHT 2310
173#define wxSTC_CMD_WORDRIGHTEXTEND 2311
174#define wxSTC_CMD_HOME 2312
175#define wxSTC_CMD_HOMEEXTEND 2313
176#define wxSTC_CMD_LINEEND 2314
177#define wxSTC_CMD_LINEENDEXTEND 2315
178#define wxSTC_CMD_DOCUMENTSTART 2316
179#define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317
180#define wxSTC_CMD_DOCUMENTEND 2318
181#define wxSTC_CMD_DOCUMENTENDEXTEND 2319
182#define wxSTC_CMD_PAGEUP 2320
183#define wxSTC_CMD_PAGEUPEXTEND 2321
184#define wxSTC_CMD_PAGEDOWN 2322
185#define wxSTC_CMD_PAGEDOWNEXTEND 2323
186#define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324
187#define wxSTC_CMD_CANCEL 2325
188#define wxSTC_CMD_DELETEBACK 2326
189#define wxSTC_CMD_TAB 2327
190#define wxSTC_CMD_BACKTAB 2328
191#define wxSTC_CMD_NEWLINE 2329
192#define wxSTC_CMD_FORMFEED 2330
193#define wxSTC_CMD_VCHOME 2331
194#define wxSTC_CMD_VCHOMEEXTEND 2332
195#define wxSTC_CMD_ZOOMIN 2333
196#define wxSTC_CMD_ZOOMOUT 2334
197#define wxSTC_CMD_DELWORDLEFT 2335
198#define wxSTC_CMD_DELWORDRIGHT 2336
199#define wxSTC_CMD_LINECUT 2337
200#define wxSTC_CMD_LINEDELETE 2338
201#define wxSTC_CMD_LINETRANSPOSE 2339
202#define wxSTC_CMD_LOWERCASE 2340
203#define wxSTC_CMD_UPPERCASE 2341
204#define wxSTC_CMD_LINESCROLLDOWN 2342
205#define wxSTC_CMD_LINESCROLLUP 2343
206#define wxSTC_EDGE_NONE 0
207#define wxSTC_EDGE_LINE 1
208#define wxSTC_EDGE_BACKGROUND 2
209
210// Show caret within N lines of edge when it's scrolled to view
65ec6247
RD
211// If CARET_SLOP not set then centre caret on screen when it's
212// scrolled to view
4370573a
RD
213#define wxSTC_CARET_SLOP 0x01
214
65ec6247 215// Value not used
4370573a
RD
216#define wxSTC_CARET_CENTER 0x02
217
65ec6247
RD
218// If CARET_SLOP also set then reposition whenever outside slop border
219// If CARET_SLOP not set then recentre even when visible
4370573a
RD
220#define wxSTC_CARET_STRICT 0x04
221
65ec6247
RD
222// If CARET_XEVEN set then both left and right margins are given equal weight
223// rather than favouring left following behaviour.
224#define wxSTC_CARET_XEVEN 0x08
225
226// If CARET_XJUMPS set then when caret reaches the margin the display jumps
227// enough to leave the caret solidly within the display.
228#define wxSTC_CARET_XJUMPS 0x10
229#define wxSTC_CURSORNORMAL -1
230#define wxSTC_CURSORWAIT 3
231
232// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy
233#define wxSTC_VISIBLE_SLOP 0x01
234#define wxSTC_VISIBLE_STRICT 0x04
235
4370573a
RD
236// Notifications
237// Type of modification and the action which caused the modification
238// These are defined as a bit mask to make it easy to specify which notifications are wanted.
239// One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
240#define wxSTC_MOD_INSERTTEXT 0x1
241#define wxSTC_MOD_DELETETEXT 0x2
242#define wxSTC_MOD_CHANGESTYLE 0x4
243#define wxSTC_MOD_CHANGEFOLD 0x8
244#define wxSTC_PERFORMED_USER 0x10
245#define wxSTC_PERFORMED_UNDO 0x20
246#define wxSTC_PERFORMED_REDO 0x40
247#define wxSTC_LASTSTEPINUNDOREDO 0x100
248#define wxSTC_MOD_CHANGEMARKER 0x200
249#define wxSTC_MOD_BEFOREINSERT 0x400
250#define wxSTC_MOD_BEFOREDELETE 0x800
251#define wxSTC_MODEVENTMASKALL 0xF77
252
253// Symbolic key codes and modifier flags
254// ASCII and other printable characters below 256
255// Extended keys above 300
256#define wxSTC_KEY_DOWN 300
257#define wxSTC_KEY_UP 301
258#define wxSTC_KEY_LEFT 302
259#define wxSTC_KEY_RIGHT 303
260#define wxSTC_KEY_HOME 304
261#define wxSTC_KEY_END 305
262#define wxSTC_KEY_PRIOR 306
263#define wxSTC_KEY_NEXT 307
264#define wxSTC_KEY_DELETE 308
265#define wxSTC_KEY_INSERT 309
266#define wxSTC_KEY_ESCAPE 7
267#define wxSTC_KEY_BACK 8
268#define wxSTC_KEY_TAB 9
269#define wxSTC_KEY_RETURN 13
270#define wxSTC_KEY_ADD 310
271#define wxSTC_KEY_SUBTRACT 311
272#define wxSTC_KEY_DIVIDE 312
273#define wxSTC_SCMOD_SHIFT 1
274#define wxSTC_SCMOD_CTRL 2
275#define wxSTC_SCMOD_ALT 4
276
277// For SciLexer.h
278#define wxSTC_LEX_CONTAINER 0
279#define wxSTC_LEX_NULL 1
280#define wxSTC_LEX_PYTHON 2
281#define wxSTC_LEX_CPP 3
282#define wxSTC_LEX_HTML 4
283#define wxSTC_LEX_XML 5
284#define wxSTC_LEX_PERL 6
285#define wxSTC_LEX_SQL 7
286#define wxSTC_LEX_VB 8
287#define wxSTC_LEX_PROPERTIES 9
288#define wxSTC_LEX_ERRORLIST 10
289#define wxSTC_LEX_MAKEFILE 11
290#define wxSTC_LEX_BATCH 12
291#define wxSTC_LEX_XCODE 13
292#define wxSTC_LEX_LATEX 14
293#define wxSTC_LEX_LUA 15
294#define wxSTC_LEX_DIFF 16
65ec6247
RD
295#define wxSTC_LEX_CONF 17
296#define wxSTC_LEX_PASCAL 18
297#define wxSTC_LEX_AVE 19
298#define wxSTC_LEX_ADA 20
299#define wxSTC_LEX_LISP 21
300#define wxSTC_LEX_RUBY 22
301#define wxSTC_LEX_EIFFEL 23
302#define wxSTC_LEX_EIFFELKW 24
303#define wxSTC_LEX_TCL 25
b8b0e402 304#define wxSTC_LEX_NNCRONTAB 26
65ec6247
RD
305
306// When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
307// value assigned in sequence from SCLEX_AUTOMATIC+1.
308#define wxSTC_LEX_AUTOMATIC 1000
4370573a
RD
309
310// Lexical states for SCLEX_PYTHON
311#define wxSTC_P_DEFAULT 0
312#define wxSTC_P_COMMENTLINE 1
313#define wxSTC_P_NUMBER 2
314#define wxSTC_P_STRING 3
315#define wxSTC_P_CHARACTER 4
316#define wxSTC_P_WORD 5
317#define wxSTC_P_TRIPLE 6
318#define wxSTC_P_TRIPLEDOUBLE 7
319#define wxSTC_P_CLASSNAME 8
320#define wxSTC_P_DEFNAME 9
321#define wxSTC_P_OPERATOR 10
322#define wxSTC_P_IDENTIFIER 11
323#define wxSTC_P_COMMENTBLOCK 12
324#define wxSTC_P_STRINGEOL 13
325
326// Lexical states for SCLEX_CPP, SCLEX_VB
327#define wxSTC_C_DEFAULT 0
328#define wxSTC_C_COMMENT 1
329#define wxSTC_C_COMMENTLINE 2
330#define wxSTC_C_COMMENTDOC 3
331#define wxSTC_C_NUMBER 4
332#define wxSTC_C_WORD 5
333#define wxSTC_C_STRING 6
334#define wxSTC_C_CHARACTER 7
335#define wxSTC_C_UUID 8
336#define wxSTC_C_PREPROCESSOR 9
337#define wxSTC_C_OPERATOR 10
338#define wxSTC_C_IDENTIFIER 11
339#define wxSTC_C_STRINGEOL 12
340#define wxSTC_C_VERBATIM 13
65ec6247
RD
341#define wxSTC_C_REGEX 14
342#define wxSTC_C_COMMENTLINEDOC 15
343#define wxSTC_C_WORD2 16
b8b0e402
RD
344#define wxSTC_C_COMMENTDOCKEYWORD 17
345#define wxSTC_C_COMMENTDOCKEYWORDERROR 18
4370573a
RD
346
347// Lexical states for SCLEX_HTML, SCLEX_XML
348#define wxSTC_H_DEFAULT 0
349#define wxSTC_H_TAG 1
350#define wxSTC_H_TAGUNKNOWN 2
351#define wxSTC_H_ATTRIBUTE 3
352#define wxSTC_H_ATTRIBUTEUNKNOWN 4
353#define wxSTC_H_NUMBER 5
354#define wxSTC_H_DOUBLESTRING 6
355#define wxSTC_H_SINGLESTRING 7
356#define wxSTC_H_OTHER 8
357#define wxSTC_H_COMMENT 9
358#define wxSTC_H_ENTITY 10
359
360// XML and ASP
361#define wxSTC_H_TAGEND 11
362#define wxSTC_H_XMLSTART 12
363#define wxSTC_H_XMLEND 13
364#define wxSTC_H_SCRIPT 14
365#define wxSTC_H_ASP 15
366#define wxSTC_H_ASPAT 16
367#define wxSTC_H_CDATA 17
368#define wxSTC_H_QUESTION 18
369
370// More HTML
371#define wxSTC_H_VALUE 19
372
65ec6247
RD
373// X-Code
374#define wxSTC_H_XCCOMMENT 20
375
376// SGML
b8b0e402
RD
377#define wxSTC_H_SGML_DEFAULT 21
378#define wxSTC_H_SGML_COMMAND 22
379#define wxSTC_H_SGML_1ST_PARAM 23
380#define wxSTC_H_SGML_DOUBLESTRING 24
381#define wxSTC_H_SGML_SIMPLESTRING 25
382#define wxSTC_H_SGML_ERROR 26
383#define wxSTC_H_SGML_SPECIAL 27
384#define wxSTC_H_SGML_ENTITY 28
385#define wxSTC_H_SGML_COMMENT 29
386#define wxSTC_H_SGML_1ST_PARAM_COMMENT 30
387#define wxSTC_H_SGML_BLOCK_DEFAULT 31
65ec6247 388
4370573a
RD
389// Embedded Javascript
390#define wxSTC_HJ_START 40
391#define wxSTC_HJ_DEFAULT 41
392#define wxSTC_HJ_COMMENT 42
393#define wxSTC_HJ_COMMENTLINE 43
394#define wxSTC_HJ_COMMENTDOC 44
395#define wxSTC_HJ_NUMBER 45
396#define wxSTC_HJ_WORD 46
397#define wxSTC_HJ_KEYWORD 47
398#define wxSTC_HJ_DOUBLESTRING 48
399#define wxSTC_HJ_SINGLESTRING 49
400#define wxSTC_HJ_SYMBOLS 50
401#define wxSTC_HJ_STRINGEOL 51
65ec6247 402#define wxSTC_HJ_REGEX 52
4370573a
RD
403
404// ASP Javascript
405#define wxSTC_HJA_START 55
406#define wxSTC_HJA_DEFAULT 56
407#define wxSTC_HJA_COMMENT 57
408#define wxSTC_HJA_COMMENTLINE 58
409#define wxSTC_HJA_COMMENTDOC 59
410#define wxSTC_HJA_NUMBER 60
411#define wxSTC_HJA_WORD 61
412#define wxSTC_HJA_KEYWORD 62
413#define wxSTC_HJA_DOUBLESTRING 63
414#define wxSTC_HJA_SINGLESTRING 64
415#define wxSTC_HJA_SYMBOLS 65
416#define wxSTC_HJA_STRINGEOL 66
65ec6247 417#define wxSTC_HJA_REGEX 67
4370573a
RD
418
419// Embedded VBScript
420#define wxSTC_HB_START 70
421#define wxSTC_HB_DEFAULT 71
422#define wxSTC_HB_COMMENTLINE 72
423#define wxSTC_HB_NUMBER 73
424#define wxSTC_HB_WORD 74
425#define wxSTC_HB_STRING 75
426#define wxSTC_HB_IDENTIFIER 76
427#define wxSTC_HB_STRINGEOL 77
428
429// ASP VBScript
430#define wxSTC_HBA_START 80
431#define wxSTC_HBA_DEFAULT 81
432#define wxSTC_HBA_COMMENTLINE 82
433#define wxSTC_HBA_NUMBER 83
434#define wxSTC_HBA_WORD 84
435#define wxSTC_HBA_STRING 85
436#define wxSTC_HBA_IDENTIFIER 86
437#define wxSTC_HBA_STRINGEOL 87
438
439// Embedded Python
440#define wxSTC_HP_START 90
441#define wxSTC_HP_DEFAULT 91
442#define wxSTC_HP_COMMENTLINE 92
443#define wxSTC_HP_NUMBER 93
444#define wxSTC_HP_STRING 94
445#define wxSTC_HP_CHARACTER 95
446#define wxSTC_HP_WORD 96
447#define wxSTC_HP_TRIPLE 97
448#define wxSTC_HP_TRIPLEDOUBLE 98
449#define wxSTC_HP_CLASSNAME 99
450#define wxSTC_HP_DEFNAME 100
451#define wxSTC_HP_OPERATOR 101
452#define wxSTC_HP_IDENTIFIER 102
453
454// ASP Python
455#define wxSTC_HPA_START 105
456#define wxSTC_HPA_DEFAULT 106
457#define wxSTC_HPA_COMMENTLINE 107
458#define wxSTC_HPA_NUMBER 108
459#define wxSTC_HPA_STRING 109
460#define wxSTC_HPA_CHARACTER 110
461#define wxSTC_HPA_WORD 111
462#define wxSTC_HPA_TRIPLE 112
463#define wxSTC_HPA_TRIPLEDOUBLE 113
464#define wxSTC_HPA_CLASSNAME 114
465#define wxSTC_HPA_DEFNAME 115
466#define wxSTC_HPA_OPERATOR 116
467#define wxSTC_HPA_IDENTIFIER 117
468
469// PHP
470#define wxSTC_HPHP_DEFAULT 118
471#define wxSTC_HPHP_HSTRING 119
472#define wxSTC_HPHP_SIMPLESTRING 120
473#define wxSTC_HPHP_WORD 121
474#define wxSTC_HPHP_NUMBER 122
475#define wxSTC_HPHP_VARIABLE 123
476#define wxSTC_HPHP_COMMENT 124
477#define wxSTC_HPHP_COMMENTLINE 125
65ec6247
RD
478#define wxSTC_HPHP_HSTRING_VARIABLE 126
479#define wxSTC_HPHP_OPERATOR 127
4370573a
RD
480
481// Lexical states for SCLEX_PERL
482#define wxSTC_PL_DEFAULT 0
65ec6247 483#define wxSTC_PL_ERROR 1
4370573a
RD
484#define wxSTC_PL_COMMENTLINE 2
485#define wxSTC_PL_POD 3
486#define wxSTC_PL_NUMBER 4
487#define wxSTC_PL_WORD 5
488#define wxSTC_PL_STRING 6
489#define wxSTC_PL_CHARACTER 7
490#define wxSTC_PL_PUNCTUATION 8
491#define wxSTC_PL_PREPROCESSOR 9
492#define wxSTC_PL_OPERATOR 10
493#define wxSTC_PL_IDENTIFIER 11
494#define wxSTC_PL_SCALAR 12
495#define wxSTC_PL_ARRAY 13
496#define wxSTC_PL_HASH 14
497#define wxSTC_PL_SYMBOLTABLE 15
4370573a
RD
498#define wxSTC_PL_REGEX 17
499#define wxSTC_PL_REGSUBST 18
500#define wxSTC_PL_LONGQUOTE 19
501#define wxSTC_PL_BACKTICKS 20
502#define wxSTC_PL_DATASECTION 21
65ec6247
RD
503#define wxSTC_PL_HERE_DELIM 22
504#define wxSTC_PL_HERE_Q 23
505#define wxSTC_PL_HERE_QQ 24
506#define wxSTC_PL_HERE_QX 25
507#define wxSTC_PL_STRING_Q 26
508#define wxSTC_PL_STRING_QQ 27
509#define wxSTC_PL_STRING_QX 28
510#define wxSTC_PL_STRING_QR 29
511#define wxSTC_PL_STRING_QW 30
4370573a
RD
512
513// Lexical states for SCLEX_LATEX
514#define wxSTC_L_DEFAULT 0
515#define wxSTC_L_COMMAND 1
516#define wxSTC_L_TAG 2
517#define wxSTC_L_MATH 3
518#define wxSTC_L_COMMENT 4
519
520// Lexical states for SCLEX_LUA
521#define wxSTC_LUA_DEFAULT 0
522#define wxSTC_LUA_COMMENT 1
523#define wxSTC_LUA_COMMENTLINE 2
524#define wxSTC_LUA_COMMENTDOC 3
525#define wxSTC_LUA_NUMBER 4
526#define wxSTC_LUA_WORD 5
527#define wxSTC_LUA_STRING 6
528#define wxSTC_LUA_CHARACTER 7
529#define wxSTC_LUA_LITERALSTRING 8
530#define wxSTC_LUA_PREPROCESSOR 9
531#define wxSTC_LUA_OPERATOR 10
532#define wxSTC_LUA_IDENTIFIER 11
533#define wxSTC_LUA_STRINGEOL 12
65ec6247
RD
534
535// Lexical states for SCLEX_ERRORLIST
4370573a
RD
536#define wxSTC_ERR_DEFAULT 0
537#define wxSTC_ERR_PYTHON 1
538#define wxSTC_ERR_GCC 2
539#define wxSTC_ERR_MS 3
540#define wxSTC_ERR_CMD 4
541#define wxSTC_ERR_BORLAND 5
542#define wxSTC_ERR_PERL 6
65ec6247
RD
543#define wxSTC_ERR_NET 7
544#define wxSTC_ERR_LUA 8
545#define wxSTC_ERR_DIFF_CHANGED 10
546#define wxSTC_ERR_DIFF_ADDITION 11
547#define wxSTC_ERR_DIFF_DELETION 12
548#define wxSTC_ERR_DIFF_MESSAGE 13
549
550// Lexical states for SCLEX_BATCH
551#define wxSTC_BAT_DEFAULT 0
552#define wxSTC_BAT_COMMENT 1
553#define wxSTC_BAT_WORD 2
554#define wxSTC_BAT_LABEL 3
555#define wxSTC_BAT_HIDE 4
556#define wxSTC_BAT_COMMAND 5
557#define wxSTC_BAT_IDENTIFIER 6
558#define wxSTC_BAT_OPERATOR 7
559
560// Lexical states for SCLEX_MAKEFILE
561#define wxSTC_MAKE_DEFAULT 0
562#define wxSTC_MAKE_COMMENT 1
563#define wxSTC_MAKE_PREPROCESSOR 2
564#define wxSTC_MAKE_IDENTIFIER 3
565#define wxSTC_MAKE_OPERATOR 4
566#define wxSTC_MAKE_TARGET 5
567#define wxSTC_MAKE_IDEOL 9
568
569// Lexical states for the SCLEX_CONF (Apache Configuration Files Lexer)
570#define wxSTC_CONF_DEFAULT 0
571#define wxSTC_CONF_COMMENT 1
572#define wxSTC_CONF_NUMBER 2
573#define wxSTC_CONF_IDENTIFIER 3
574#define wxSTC_CONF_EXTENSION 4
575#define wxSTC_CONF_PARAMETER 5
576#define wxSTC_CONF_STRING 6
577#define wxSTC_CONF_OPERATOR 7
578#define wxSTC_CONF_IP 8
579#define wxSTC_CONF_DIRECTIVE 9
580
581// Avenue
582#define wxSTC_AVE_DEFAULT 0
583#define wxSTC_AVE_COMMENT 1
584#define wxSTC_AVE_NUMBER 2
585#define wxSTC_AVE_WORD 3
586#define wxSTC_AVE_KEYWORD 4
587#define wxSTC_AVE_STATEMENT 5
588#define wxSTC_AVE_STRING 6
589#define wxSTC_AVE_ENUM 7
590#define wxSTC_AVE_STRINGEOL 8
591#define wxSTC_AVE_IDENTIFIER 9
592#define wxSTC_AVE_OPERATOR 10
593
594// Lexical states for SCLEX_ADA
595#define wxSTC_ADA_DEFAULT 0
596#define wxSTC_ADA_COMMENT 1
597#define wxSTC_ADA_NUMBER 2
598#define wxSTC_ADA_WORD 3
599#define wxSTC_ADA_STRING 4
600#define wxSTC_ADA_CHARACTER 5
601#define wxSTC_ADA_OPERATOR 6
602#define wxSTC_ADA_IDENTIFIER 7
603#define wxSTC_ADA_STRINGEOL 8
604
605// Lexical states for SCLEX_LISP
606#define wxSTC_LISP_DEFAULT 0
607#define wxSTC_LISP_COMMENT 1
608#define wxSTC_LISP_NUMBER 2
609#define wxSTC_LISP_KEYWORD 3
610#define wxSTC_LISP_STRING 6
611#define wxSTC_LISP_STRINGEOL 8
612#define wxSTC_LISP_IDENTIFIER 9
613#define wxSTC_LISP_OPERATOR 10
614
615// Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
616#define wxSTC_EIFFEL_DEFAULT 0
617#define wxSTC_EIFFEL_COMMENTLINE 1
618#define wxSTC_EIFFEL_NUMBER 2
619#define wxSTC_EIFFEL_WORD 3
620#define wxSTC_EIFFEL_STRING 4
621#define wxSTC_EIFFEL_CHARACTER 5
622#define wxSTC_EIFFEL_OPERATOR 6
623#define wxSTC_EIFFEL_IDENTIFIER 7
624#define wxSTC_EIFFEL_STRINGEOL 8
4370573a 625
b8b0e402
RD
626// Lexical states for the SCLEX_NNCRONTAB (nnCron crontab Lexer)
627#define wxSTC_NNCRONTAB_DEFAULT 0
628#define wxSTC_NNCRONTAB_COMMENT 1
629#define wxSTC_NNCRONTAB_TASK 2
630#define wxSTC_NNCRONTAB_SECTION 3
631#define wxSTC_NNCRONTAB_KEYWORD 4
632#define wxSTC_NNCRONTAB_MODIFIER 5
633#define wxSTC_NNCRONTAB_ASTERISK 6
634#define wxSTC_NNCRONTAB_NUMBER 7
635#define wxSTC_NNCRONTAB_STRING 8
636#define wxSTC_NNCRONTAB_ENVIRONMENT 9
637#define wxSTC_NNCRONTAB_IDENTIFIER 10
638
4370573a
RD
639// END of generated section
640//----------------------------------------------------------------------
641// Others
9ce192d4 642
623ba2e1
RD
643#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | \
644 (1 << wxSTC_MARKNUM_FOLDEROPEN) | \
645 (1 << wxSTC_MARKNUM_FOLDERSUB) | \
646 (1 << wxSTC_MARKNUM_FOLDERTAIL) | \
647 (1 << wxSTC_MARKNUM_FOLDERMIDTAIL) | \
648 (1 << wxSTC_MARKNUM_FOLDEROPENMID) | \
649 (1 << wxSTC_MARKNUM_FOLDEREND))
650
9ce192d4 651
9ce192d4 652
9ce192d4 653
4370573a 654//----------------------------------------------------------------------
9ce192d4
RD
655
656class ScintillaWX; // forward declare
657class WordList;
658struct SCNotification;
659
660
661extern const wxChar* wxSTCNameStr;
662
663//----------------------------------------------------------------------
664
665class wxStyledTextCtrl : public wxControl {
666public:
667
f6bcfd97
BP
668#ifdef SWIG
669 wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
670 const wxPoint& pos = wxDefaultPosition,
671 const wxSize& size = wxDefaultSize, long style = 0,
672 const char* name = "styledtext");
0122b7e3
RD
673 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
674
f6bcfd97 675#else
9ce192d4
RD
676 wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
677 const wxPoint& pos = wxDefaultPosition,
678 const wxSize& size = wxDefaultSize, long style = 0,
679 const wxString& name = wxSTCNameStr);
f6bcfd97
BP
680#endif
681
9ce192d4 682
f6bcfd97
BP
683#ifndef SWIG
684 ~wxStyledTextCtrl();
685#endif
9ce192d4 686
4370573a
RD
687//----------------------------------------------------------------------
688// BEGIN generated section. The following code is automatically generated
689// by gen_iface.py. Do not edit this file. Edit stc.h.in instead
690// and regenerate
9ce192d4 691
4370573a
RD
692
693 // Add text to the document
694 void AddText(const wxString& text);
695
696 // Add array of cells to document
697 void AddStyledText(const wxString& text);
698
699 // Insert string at a position
700 void InsertText(int pos, const wxString& text);
701
702 // Delete all text in the document
703 void ClearAll();
704
705 // Set all style bytes to 0, remove all folding information
706 void ClearDocumentStyle();
707
708 // The number of characters in the document
709 int GetLength();
710
711 // Returns the character byte at the position
712 int GetCharAt(int pos);
713
714 // Returns the position of the caret
715 int GetCurrentPos();
716
717 // Returns the position of the opposite end of the selection to the caret
718 int GetAnchor();
719
720 // Returns the style byte at the position
721 int GetStyleAt(int pos);
722
723 // Redoes the next action on the undo history
724 void Redo();
725
726 // Choose between collecting actions into the undo
727 // history and discarding them.
728 void SetUndoCollection(bool collectUndo);
729
730 // Select all the text in the document.
731 void SelectAll();
732
733 // Remember the current position in the undo history as the position
734 // at which the document was saved.
735 void SetSavePoint();
736
737 // Retrieve a buffer of cells.
738 wxString GetStyledText(int startPos, int endPos);
739
740 // Are there any redoable actions in the undo history.
741 bool CanRedo();
742
743 // Retrieve the line number at which a particular marker is located
744 int MarkerLineFromHandle(int handle);
745
746 // Delete a marker.
747 void MarkerDeleteHandle(int handle);
748
749 // Is undo history being collected?
750 bool GetUndoCollection();
751
752 // Are white space characters currently visible?
753 // Returns one of SCWS_* constants.
754 int GetViewWhiteSpace();
755
756 // Make white space characters invisible, always visible or visible outside indentation.
757 void SetViewWhiteSpace(int viewWS);
758
759 // Find the position from a point within the window.
760 int PositionFromPoint(wxPoint pt);
761
65ec6247
RD
762 // Find the position from a point within the window but return
763 // INVALID_POSITION if not close to text.
764 int PositionFromPointClose(int x, int y);
765
4370573a
RD
766 // Set caret to start of a line and ensure it is visible.
767 void GotoLine(int line);
768
769 // Set caret to a position and ensure it is visible.
770 void GotoPos(int pos);
771
772 // Set the selection anchor to a position. The anchor is the opposite
773 // end of the selection from the caret.
774 void SetAnchor(int posAnchor);
775
776 // Retrieve the text of the line containing the caret.
777 // Returns the index of the caret on the line.
8de28db9
RD
778 #ifdef SWIG
779 wxString GetCurLine(int* OUTPUT);
780#else
781 wxString GetCurLine(int* linePos=NULL);
782#endif
4370573a
RD
783
784 // Retrieve the position of the last correctly styled character.
785 int GetEndStyled();
786
65ec6247
RD
787 // Convert all line endings in the document to one mode.
788 void ConvertEOLs(int eolMode);
4370573a
RD
789
790 // Retrieve the current end of line mode - one of CRLF, CR, or LF.
791 int GetEOLMode();
792
793 // Set the current end of line mode.
794 void SetEOLMode(int eolMode);
795
796 // Set the current styling position to pos and the styling mask to mask.
797 // The styling mask can be used to protect some bits in each styling byte from
798 // modification.
799 void StartStyling(int pos, int mask);
800
801 // Change style from current styling position for length characters to a style
802 // and move the current styling position to after this newly styled segment.
803 void SetStyling(int length, int style);
804
805 // Is drawing done first into a buffer or direct to the screen.
806 bool GetBufferedDraw();
807
808 // If drawing is buffered then each line of text is drawn into a bitmap buffer
809 // before drawing it to the screen to avoid flicker.
810 void SetBufferedDraw(bool buffered);
811
812 // Change the visible size of a tab to be a multiple of the width of a space
813 // character.
814 void SetTabWidth(int tabWidth);
815
816 // Retrieve the visible size of a tab.
817 int GetTabWidth();
818
819 // Set the code page used to interpret the bytes of the document as characters.
820 // The SC_CP_UTF8 value can be used to enter Unicode mode.
821 void SetCodePage(int codePage);
822
823 // Set the symbol used for a particular marker number,
824 // and optionally the for and background colours.
825 void MarkerDefine(int markerNumber, int markerSymbol,
826 const wxColour& foreground = wxNullColour,
827 const wxColour& background = wxNullColour);
828
829 // Set the foreground colour used for a particular marker number.
830 void MarkerSetForeground(int markerNumber, const wxColour& fore);
831
832 // Set the background colour used for a particular marker number.
833 void MarkerSetBackground(int markerNumber, const wxColour& back);
834
835 // Add a marker to a line.
836 void MarkerAdd(int line, int markerNumber);
837
838 // Delete a marker from a line
839 void MarkerDelete(int line, int markerNumber);
840
841 // Delete all markers with a particular number from all lines
842 void MarkerDeleteAll(int markerNumber);
843
844 // Get a bit mask of all the markers set on a line.
845 int MarkerGet(int line);
846
847 // Find the next line after lineStart that includes a marker in mask.
848 int MarkerNext(int lineStart, int markerMask);
849
850 // Find the previous line before lineStart that includes a marker in mask.
851 int MarkerPrevious(int lineStart, int markerMask);
852
853 // Set a margin to be either numeric or symbolic.
854 void SetMarginType(int margin, int marginType);
855
856 // Retrieve the type of a margin.
857 int GetMarginType(int margin);
858
859 // Set the width of a margin to a width expressed in pixels.
9ce192d4 860 void SetMarginWidth(int margin, int pixelWidth);
4370573a
RD
861
862 // Retrieve the width of a margin in pixels.
863 int GetMarginWidth(int margin);
864
865 // Set a mask that determines which markers are displayed in a margin.
9ce192d4 866 void SetMarginMask(int margin, int mask);
4370573a
RD
867
868 // Retrieve the marker mask of a margin.
869 int GetMarginMask(int margin);
870
871 // Make a margin sensitive or insensitive to mouse clicks.
9ce192d4 872 void SetMarginSensitive(int margin, bool sensitive);
4370573a
RD
873
874 // Retrieve the mouse click sensitivity of a margin.
9ce192d4
RD
875 bool GetMarginSensitive(int margin);
876
4370573a
RD
877 // Clear all the styles and make equivalent to the global default style.
878 void StyleClearAll();
879
880 // Set the foreground colour of a style.
881 void StyleSetForeground(int style, const wxColour& fore);
882
883 // Set the background colour of a style.
884 void StyleSetBackground(int style, const wxColour& back);
885
886 // Set a style to be bold or not.
887 void StyleSetBold(int style, bool bold);
888
889 // Set a style to be italic or not.
890 void StyleSetItalic(int style, bool italic);
891
892 // Set the size of characters of a style.
893 void StyleSetSize(int style, int sizePoints);
894
895 // Set the font of a style.
896 void StyleSetFaceName(int style, const wxString& fontName);
897
898 // Set a style to have its end of line filled or not.
899 void StyleSetEOLFilled(int style, bool filled);
900
901 // Reset the default style to its state at startup
902 void StyleResetDefault();
903
904 // Set a style to be underlined or not.
905 void StyleSetUnderline(int style, bool underline);
906
65ec6247
RD
907 // Set a style to be mixed case, or to force upper or lower case.
908 void StyleSetCase(int style, int caseForce);
909
4370573a
RD
910 // Set the foreground colour of the selection and whether to use this setting.
911 void SetSelForeground(bool useSetting, const wxColour& fore);
912
913 // Set the background colour of the selection and whether to use this setting.
914 void SetSelBackground(bool useSetting, const wxColour& back);
915
916 // Set the foreground colour of the caret.
917 void SetCaretForeground(const wxColour& fore);
918
919 // When key+modifier combination km is pressed perform msg.
920 void CmdKeyAssign(int key, int modifiers, int cmd);
921
922 // When key+modifier combination km do nothing.
923 void CmdKeyClear(int key, int modifiers);
924
925 // Drop all key mappings.
926 void CmdKeyClearAll();
927
928 // Set the styles for a segment of the document.
929 void SetStyleBytes(int length, char* styleBytes);
930
931 // Set a style to be visible or not.
932 void StyleSetVisible(int style, bool visible);
933
934 // Get the time in milliseconds that the caret is on and off.
935 int GetCaretPeriod();
936
937 // Get the time in milliseconds that the caret is on and off. 0 = steady on.
938 void SetCaretPeriod(int periodMilliseconds);
939
940 // Set the set of characters making up words for when moving or selecting
941 // by word.
942 void SetWordChars(const wxString& characters);
943
944 // Start a sequence of actions that is undone and redone as a unit.
945 // May be nested.
946 void BeginUndoAction();
947
948 // End a sequence of actions that is undone and redone as a unit.
949 void EndUndoAction();
950
951 // Set an indicator to plain, squiggle or TT.
952 void IndicatorSetStyle(int indic, int style);
953
954 // Retrieve the style of an indicator.
955 int IndicatorGetStyle(int indic);
956
957 // Set the foreground colour of an indicator.
958 void IndicatorSetForeground(int indic, const wxColour& fore);
959
960 // Retrieve the foreground colour of an indicator.
961 wxColour IndicatorGetForeground(int indic);
962
963 // Divide each styling byte into lexical class bits (default:5) and indicator
964 // bits (default:3). If a lexer requires more than 32 lexical states, then this
965 // is used to expand the possible states.
966 void SetStyleBits(int bits);
967
968 // Retrieve number of bits in style bytes used to hold the lexical state.
969 int GetStyleBits();
970
971 // Used to hold extra styling information for each line.
972 void SetLineState(int line, int state);
973
974 // Retrieve the extra styling information for a line.
975 int GetLineState(int line);
976
977 // Retrieve the last line number that has line state.
978 int GetMaxLineState();
979
65ec6247
RD
980 // Is the background of the line containing the caret in a different colour?
981 bool GetCaretLineVisible();
982
983 // Display the background of the line containing the caret in a different colour.
984 void SetCaretLineVisible(bool show);
985
986 // Get the colour of the background of the line containing the caret.
987 wxColour GetCaretLineBack();
988
989 // Set the colour of the background of the line containing the caret.
990 void SetCaretLineBack(const wxColour& back);
991
4370573a
RD
992 // Display a auto-completion list.
993 // The lenEntered parameter indicates how many characters before
994 // the caret should be used to provide context.
995 void AutoCompShow(int lenEntered, const wxString& itemList);
996
997 // Remove the auto-completion list from the screen.
998 void AutoCompCancel();
999
1000 // Is there an auto-completion list visible?
1001 bool AutoCompActive();
1002
1003 // Retrieve the position of the caret when the auto-completion list was
1004 // displayed.
1005 int AutoCompPosStart();
1006
1007 // User has selected an item so remove the list and insert the selection.
1008 void AutoCompComplete();
1009
1010 // Define a set of character that when typed cancel the auto-completion list.
1011 void AutoCompStops(const wxString& characterSet);
1012
1013 // Change the separator character in the string setting up an auto-completion
1014 // list. Default is space but can be changed if items contain space.
1015 void AutoCompSetSeparator(int separatorCharacter);
1016
1017 // Retrieve the auto-completion list separator character.
1018 int AutoCompGetSeparator();
1019
1020 // Select the item in the auto-completion list that starts with a string.
1021 void AutoCompSelect(const wxString& text);
1022
1023 // Should the auto-completion list be cancelled if the user backspaces to a
1024 // position before where the box was created.
1025 void AutoCompSetCancelAtStart(bool cancel);
1026
1027 // Retrieve whether auto-completion cancelled by backspacing before start.
1028 bool AutoCompGetCancelAtStart();
1029
1030 // Define a set of character that when typed fills up the selected word.
1031 void AutoCompSetFillUps(const wxString& characterSet);
1032
1033 // Should a single item auto-completion list automatically choose the item.
1034 void AutoCompSetChooseSingle(bool chooseSingle);
1035
1036 // Retrieve whether a single item auto-completion list automatically choose the item.
1037 bool AutoCompGetChooseSingle();
1038
1039 // Set whether case is significant when performing auto-completion searches.
1040 void AutoCompSetIgnoreCase(bool ignoreCase);
1041
1042 // Retrieve state of ignore case flag.
1043 bool AutoCompGetIgnoreCase();
1044
65ec6247
RD
1045 // Display a list of strings and send notification when user chooses one.
1046 void UserListShow(int listType, const wxString& itemList);
1047
1048 // Set whether or not autocompletion is hidden automatically when nothing matches
1049 void AutoCompSetAutoHide(bool autoHide);
1050
1051 // Retrieve whether or not autocompletion is hidden automatically when nothing matches
1052 bool AutoCompGetAutoHide();
1053
4370573a
RD
1054 // Set the number of spaces used for one level of indentation.
1055 void SetIndent(int indentSize);
1056
1057 // Retrieve indentation size.
1058 int GetIndent();
1059
1060 // Indentation will only use space characters if useTabs is false, otherwise
1061 // it will use a combination of tabs and spaces.
1062 void SetUseTabs(bool useTabs);
1063
1064 // Retrieve whether tabs will be used in indentation.
1065 bool GetUseTabs();
1066
1067 // Change the indentation of a line to a number of columns.
1068 void SetLineIndentation(int line, int indentSize);
9ce192d4 1069
4370573a
RD
1070 // Retrieve the number of columns that a line is indented.
1071 int GetLineIndentation(int line);
1072
1073 // Retrieve the position before the first non indentation character on a line.
1074 int GetLineIndentPosition(int line);
1075
1076 // Retrieve the column number of a position, taking tab width into account.
1077 int GetColumn(int pos);
1078
1079 // Show or hide the horizontal scroll bar.
1080 void SetUseHorizontalScrollBar(bool show);
1081
1082 // Is the horizontal scroll bar visible?
1083 bool GetUseHorizontalScrollBar();
1084
1085 // Show or hide indentation guides.
1086 void SetIndentationGuides(bool show);
1087
1088 // Are the indentation guides visible?
1089 bool GetIndentationGuides();
1090
1091 // Set the highlighted indentation guide column.
1092 // 0 = no highlighted guide.
1093 void SetHighlightGuide(int column);
1094
1095 // Get the highlighted indentation guide column.
1096 int GetHighlightGuide();
1097
1098 // Get the position after the last visible characters on a line.
1099 int GetLineEndPosition(int line);
1100
1101 // Get the code page used to interpret the bytes of the document as characters.
1102 int GetCodePage();
1103
1104 // Get the foreground colour of the caret.
1105 wxColour GetCaretForeground();
1106
1107 // In read-only mode?
1108 bool GetReadOnly();
1109
1110 // Sets the position of the caret.
1111 void SetCurrentPos(int pos);
1112
1113 // Sets the position that starts the selection - this becomes the anchor.
1114 void SetSelectionStart(int pos);
1115
1116 // Returns the position at the start of the selection.
1117 int GetSelectionStart();
1118
1119 // Sets the position that ends the selection - this becomes the currentPosition.
1120 void SetSelectionEnd(int pos);
1121
1122 // Returns the position at the end of the selection.
1123 int GetSelectionEnd();
1124
1125 // Sets the print magnification added to the point size of each style for printing.
1126 void SetPrintMagnification(int magnification);
1127
1128 // Returns the print magnification.
1129 int GetPrintMagnification();
1130
1131 // Modify colours when printing for clearer printed text.
1132 void SetPrintColourMode(int mode);
1133
1134 // Returns the print colour mode.
1135 int GetPrintColourMode();
1136
1137 // Find some text in the document.
1138 int FindText(int minPos, int maxPos,
1139 const wxString& text,
1140 bool caseSensitive, bool wholeWord);
1141
1142 // On Windows will draw the document into a display context such as a printer.
1143 int FormatRange(bool doDraw,
1144 int startPos,
1145 int endPos,
1146 wxDC* draw,
1147 wxDC* target, // Why does it use two? Can they be the same?
1148 wxRect renderRect,
1149 wxRect pageRect);
1150
1151 // Retrieve the line at the top of the display.
1152 int GetFirstVisibleLine();
1153
1154 // Retrieve the contents of a line.
1155 wxString GetLine(int line);
1156
1157 // Returns the number of lines in the document. There is always at least one.
1158 int GetLineCount();
1159
1160 // Sets the size in pixels of the left margin.
65ec6247 1161 void SetMarginLeft(int pixelWidth);
4370573a
RD
1162
1163 // Returns the size in pixels of the left margin.
1164 int GetMarginLeft();
1165
1166 // Sets the size in pixels of the right margin.
65ec6247 1167 void SetMarginRight(int pixelWidth);
4370573a
RD
1168
1169 // Returns the size in pixels of the right margin.
1170 int GetMarginRight();
1171
1172 // Is the document different from when it was last saved?
1173 bool GetModify();
1174
1175 // Select a range of text.
1176 void SetSelection(int start, int end);
1177
1178 // Retrieve the selected text.
1179 wxString GetSelectedText();
1180
1181 // Retrieve a range of text.
1182 wxString GetTextRange(int startPos, int endPos);
1183
1184 // Draw the selection in normal style or with selection highlighted.
1185 void HideSelection(bool normal);
1186
1187 // Retrieve the line containing a position.
1188 int LineFromPosition(int pos);
1189
1190 // Retrieve the position at the start of a line.
1191 int PositionFromLine(int line);
1192
1193 // Scroll horizontally and vertically.
1194 void LineScroll(int columns, int lines);
1195
1196 // Ensure the caret is visible.
1197 void EnsureCaretVisible();
1198
1199 // Replace the selected text with the argument text.
1200 void ReplaceSelection(const wxString& text);
1201
1202 // Set to read only or read write.
1203 void SetReadOnly(bool readOnly);
1204
1205 // Will a paste succeed?
1206 bool CanPaste();
1207
1208 // Are there any undoable actions in the undo history.
1209 bool CanUndo();
1210
1211 // Delete the undo history.
1212 void EmptyUndoBuffer();
1213
1214 // Undo one action in the undo history.
1215 void Undo();
1216
1217 // Cut the selection to the clipboard.
1218 void Cut();
1219
1220 // Copy the selection to the clipboard.
1221 void Copy();
1222
1223 // Paste the contents of the clipboard into the document replacing the selection.
1224 void Paste();
1225
1226 // Clear the selection.
1227 void Clear();
1228
1229 // Replace the contents of the document with the argument text.
1230 void SetText(const wxString& text);
1231
1232 // Retrieve all the text in the document.
1233 wxString GetText();
1234
1235 // Retrieve the number of characters in the document.
1236 int GetTextLength();
1237
1238 // Set to overtype (true) or insert mode
1239 void SetOvertype(bool overtype);
1240
1241 // Returns true if overtype mode is active otherwise false is returned.
1242 bool GetOvertype();
1243
65ec6247
RD
1244 // Set the width of the insert mode caret
1245 void SetCaretWidth(int pixelWidth);
1246
1247 // Returns the width of the insert mode caret
1248 int GetCaretWidth();
1249
1250 // Sets the position that starts the target which is used for updating the
1251 // document without affecting the scroll position.
1252 void SetTargetStart(int pos);
1253
1254 // Get the position that starts the target.
1255 int GetTargetStart();
1256
1257 // Sets the position that ends the target which is used for updating the
1258 // document without affecting the scroll position.
1259 void SetTargetEnd(int pos);
1260
1261 // Get the position that ends the target.
1262 int GetTargetEnd();
1263
1264 // Replace the target text with the argument text.
b8b0e402 1265 // Text is counted so it can contain nulls.
65ec6247
RD
1266 // Returns the length of the replacement text.
1267 int ReplaceTarget(const wxString& text);
1268
1269 // Replace the target text with the argument text after \d processing.
b8b0e402 1270 // Text is counted so it can contain nulls.
65ec6247
RD
1271 // Looks for \d where d is between 1 and 9 and replaces these with the strings
1272 // matched in the last search operation which were surrounded by \( and \).
1273 // Returns the length of the replacement text including any change
1274 // caused by processing the \d patterns.
1275 int ReplaceTargetRE(const wxString& text);
1276
1277 // Search for a counted string in the target and set the target to the found
b8b0e402 1278 // range. Text is counted so it can contain nulls.
65ec6247
RD
1279 // Returns length of range or -1 for failure in which case target is not moved.
1280 int SearchInTarget(const wxString& text);
1281
1282 // Set the search flags used by SearchInTarget
1283 void SetSearchFlags(int flags);
1284
1285 // Get the search flags used by SearchInTarget
1286 int GetSearchFlags();
1287
4370573a
RD
1288 // Show a call tip containing a definition near position pos.
1289 void CallTipShow(int pos, const wxString& definition);
1290
1291 // Remove the call tip from the screen.
1292 void CallTipCancel();
1293
1294 // Is there an active call tip?
1295 bool CallTipActive();
1296
1297 // Retrieve the position where the caret was before displaying the call tip.
1298 int CallTipPosAtStart();
1299
1300 // Highlight a segment of the definition.
1301 void CallTipSetHighlight(int start, int end);
1302
1303 // Set the background colour for the call tip.
1304 void CallTipSetBackground(const wxColour& back);
1305
1306 // Find the display line of a document line taking hidden lines into account.
1307 int VisibleFromDocLine(int line);
1308
1309 // Find the document line of a display line taking hidden lines into account.
1310 int DocLineFromVisible(int lineDisplay);
1311
1312 // Set the fold level of a line.
1313 // This encodes an integer level along with flags indicating whether the
1314 // line is a header and whether it is effectively white space.
1315 void SetFoldLevel(int line, int level);
1316
1317 // Retrieve the fold level of a line.
1318 int GetFoldLevel(int line);
1319
1320 // Find the last child line of a header line.
1321 int GetLastChild(int line, int level);
1322
1323 // Find the parent line of a child line.
1324 int GetFoldParent(int line);
1325
1326 // Make a range of lines visible.
1327 void ShowLines(int lineStart, int lineEnd);
1328
1329 // Make a range of lines invisible.
1330 void HideLines(int lineStart, int lineEnd);
1331
1332 // Is a line visible?
1333 bool GetLineVisible(int line);
1334
1335 // Show the children of a header line.
1336 void SetFoldExpanded(int line, bool expanded);
1337
1338 // Is a header line expanded?
1339 bool GetFoldExpanded(int line);
1340
1341 // Switch a header line between expanded and contracted.
1342 void ToggleFold(int line);
1343
1344 // Ensure a particular line is visible by expanding any header line hiding it.
1345 void EnsureVisible(int line);
1346
1347 // Set some debugging options for folding
1348 void SetFoldFlags(int flags);
1349
65ec6247
RD
1350 // Ensure a particular line is visible by expanding any header line hiding it.
1351 // Use the currently set visibility policy to determine which range to display.
1352 void EnsureVisibleEnforcePolicy(int line);
1353
1354 // Sets whether a tab pressed when caret is within indentation indents
1355 void SetTabIndents(bool tabIndents);
1356
1357 // Does a tab pressed when caret is within indentation indent?
1358 bool GetTabIndents();
1359
1360 // Sets whether a backspace pressed when caret is within indentation unindents
1361 void SetBackSpaceUnIndents(bool bsUnIndents);
1362
1363 // Does a backspace pressed when caret is within indentation unindent?
1364 bool GetBackSpaceUnIndents();
1365
1366 // Sets the time the mouse must sit still to generate a mouse dwell event
1367 void SetMouseDwellTime(int periodMilliseconds);
1368
1369 // Retrieve the time the mouse must sit still to generate a mouse dwell event
1370 int GetMouseDwellTime();
1371
1372 // Move the caret inside current view if it's not there already
1373 void MoveCaretInsideView();
1374
4370573a
RD
1375 // How many characters are on a line, not including end of line characters.
1376 int LineLength(int line);
1377
1378 // Highlight the characters at two positions.
1379 void BraceHighlight(int pos1, int pos2);
1380
1381 // Highlight the character at a position indicating there is no matching brace.
1382 void BraceBadLight(int pos);
1383
1384 // Find the position of a matching brace or INVALID_POSITION if no match.
1385 int BraceMatch(int pos);
1386
1387 // Are the end of line characters visible.
1388 bool GetViewEOL();
1389
1390 // Make the end of line characters visible or invisible
1391 void SetViewEOL(bool visible);
1392
1393 // Retrieve a pointer to the document object.
1394 void* GetDocPointer();
1395
1396 // Change the document object used.
1397 void SetDocPointer(void* docPointer);
1398
1399 // Set which document modification events are sent to the container.
1400 void SetModEventMask(int mask);
1401
1402 // Retrieve the column number which text should be kept within.
1403 int GetEdgeColumn();
1404
1405 // Set the column number of the edge.
1406 // If text goes past the edge then it is highlighted.
1407 void SetEdgeColumn(int column);
1408
1409 // Retrieve the edge highlight mode.
1410 int GetEdgeMode();
1411
1412 // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
1413 // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
1414 void SetEdgeMode(int mode);
1415
1416 // Retrieve the colour used in edge indication.
9ce192d4 1417 wxColour GetEdgeColour();
9ce192d4 1418
4370573a
RD
1419 // Change the colour used in edge indication.
1420 void SetEdgeColour(const wxColour& edgeColour);
1421
1422 // Sets the current caret position to be the search anchor.
1423 void SearchAnchor();
1424
1425 // Find some text starting at the search anchor.
65ec6247 1426 // Does not ensure the selection is visible.
4370573a
RD
1427 int SearchNext(int flags, const wxString& text);
1428
1429 // Find some text starting at the search anchor and moving backwards.
65ec6247 1430 // Does not ensure the selection is visible.
4370573a
RD
1431 int SearchPrev(int flags, const wxString& text);
1432
1433 // Set the way the line the caret is on is kept visible.
1434 void SetCaretPolicy(int caretPolicy, int caretSlop);
1435
1436 // Retrieves the number of lines completely visible.
1437 int LinesOnScreen();
1438
1439 // Set whether a pop up menu is displayed automatically when the user presses
1440 // the wrong mouse button.
1441 void UsePopUp(bool allowPopUp);
1442
1443 // Is the selection a rectangular. The alternative is the more common stream selection.
1444 bool SelectionIsRectangle();
1445
1446 // Set the zoom level. This number of points is added to the size of all fonts.
1447 // It may be positive to magnify or negative to reduce.
1448 void SetZoom(int zoom);
1449
1450 // Retrieve the zoom level.
1451 int GetZoom();
1452
1453 // Create a new document object.
1454 // Starts with reference count of 1 and not selected into editor.
1455 void* CreateDocument();
9ce192d4 1456
4370573a
RD
1457 // Extend life of document.
1458 void AddRefDocument(void* docPointer);
9ce192d4 1459
4370573a
RD
1460 // Release a reference to the document, deleting document if it fades to black.
1461 void ReleaseDocument(void* docPointer);
1462
1463 // Get which document modification events are sent to the container.
1464 int GetModEventMask();
1465
65ec6247 1466 // Change internal focus flag
8de28db9 1467 void SetSTCFocus(bool focus);
65ec6247
RD
1468
1469 // Get internal focus flag
8de28db9 1470 bool GetSTCFocus();
65ec6247
RD
1471
1472 // Change error status - 0 = OK
1473 void SetStatus(int statusCode);
1474
1475 // Get error status
1476 int GetStatus();
1477
1478 // Set whether the mouse is captured when its button is pressed
1479 void SetMouseDownCaptures(bool captures);
1480
1481 // Get whether mouse gets captured
1482 bool GetMouseDownCaptures();
1483
1484 // Sets the cursor to one of the SC_CURSOR* values
1485 void SetCursor(int cursorType);
1486
1487 // Get cursor type
1488 int GetCursor();
1489
1490 // Move to the previous change in capitalistion
1491 void WordPartLeft();
1492
1493 // Move to the previous change in capitalistion extending selection to new caret position.
1494 void WordPartLeftExtend();
1495
1496 // Move to the change next in capitalistion
1497 void WordPartRight();
1498
1499 // Move to the next change in capitalistion extending selection to new caret position.
1500 void WordPartRightExtend();
1501
1502 // Set the way the display area is determined when a particular line is to be moved to.
1503 void SetVisiblePolicy(int visiblePolicy, int visibleSlop);
1504
1505 // Delete back from the current position to the start of the line
1506 void DelLineLeft();
1507
1508 // Delete forwards from the current position to the end of the line
1509 void DelLineRight();
1510
4370573a
RD
1511 // Start notifying the container of all key presses and commands.
1512 void StartRecord();
1513
1514 // Stop notifying the container of all key presses and commands.
1515 void StopRecord();
1516
1517 // Set the lexing language of the document.
1518 void SetLexer(int lexer);
1519
1520 // Retrieve the lexing language of the document.
1521 int GetLexer();
1522
1523 // Colourise a segment of the document using the current lexing language.
1524 void Colourise(int start, int end);
1525
1526 // Set up a value that may be used by a lexer for some optional feature.
1527 void SetProperty(const wxString& key, const wxString& value);
1528
1529 // Set up the key words used by the lexer.
1530 void SetKeyWords(int keywordSet, const wxString& keyWords);
1531
65ec6247
RD
1532 // Set the lexing language of the document based on string name.
1533 void SetLexerLanguage(const wxString& language);
1534
4370573a
RD
1535// END of generated section
1536//----------------------------------------------------------------------
1537// Others...
1538
1539
1540 // Returns the line number of the line with the caret.
1541 int GetCurrentLine();
1542
1543 // Extract style settings from a spec-string which is composed of one or
1544 // more of the following comma separated elements:
1545 //
1546 // bold turns on bold
1547 // italic turns on italics
1548 // fore:#RRGGBB sets the foreground colour
1549 // back:#RRGGBB sets the background colour
1550 // face:[facename] sets the font face name to use
1551 // size:[num] sets the font size in points
1552 // eol turns on eol filling
1553 // underline turns on underlining
1554 //
1555 void StyleSetSpec(int styleNum, const wxString& spec);
1556
1557
1558
1559 // Set style size, face, bold, italic, and underline attributes from
1560 // a wxFont's attributes.
1561 void StyleSetFont(int styleNum, wxFont& font);
1562
1563
1564
1565 // Set all font style attributes at once.
1566 void StyleSetFontAttr(int styleNum, int size,
1567 const wxString& faceName,
1568 bool bold, bool italic,
1569 bool underline);
1570
1571
1572
1573 // Perform one of the operations defined by the wxSTC_CMD_* constants.
1574 void CmdKeyExecute(int cmd);
1575
1576
1577
1578 // Set the left and right margin in the edit area, measured in pixels.
1579 void SetMargins(int left, int right);
1580
1581
1582 // Retrieve the start and end positions of the current selection.
1583#ifdef SWIG
1584 void GetSelection(int* OUTPUT, int* OUTPUT);
1585#else
1586 void GetSelection(int* startPos, int* endPos);
1587#endif
1588
1589 // Retrieve the point in the window where a position is displayed.
1590 wxPoint PointFromPosition(int pos);
1591
f97d84a6
RD
1592
1593 // Scroll enough to make the given line visible
1594 void ScrollToLine(int line);
1595
1596
1597 // Scroll enough to make the given column visible
1598 void ScrollToColumn(int column);
1599
65ec6247
RD
1600
1601 // Send a message to Scintilla
1602 long SendMsg(int msg, long wp=0, long lp=0);
1603
5fa4613c
RD
1604
1605 // Set the vertical scrollbar to use instead of the ont that's built-in.
1606 void SetVScrollBar(wxScrollBar* bar) { m_vScrollBar = bar; }
1607
1608
1609 // Set the horizontal scrollbar to use instead of the ont that's built-in.
1610 void SetHScrollBar(wxScrollBar* bar) { m_hScrollBar = bar; }
1611
4370573a 1612//----------------------------------------------------------------------
9ce192d4
RD
1613
1614
f6bcfd97 1615#ifndef SWIG
9ce192d4
RD
1616private:
1617 // Event handlers
1618 void OnPaint(wxPaintEvent& evt);
1619 void OnScrollWin(wxScrollWinEvent& evt);
5fa4613c 1620 void OnScroll(wxScrollEvent& evt);
9ce192d4
RD
1621 void OnSize(wxSizeEvent& evt);
1622 void OnMouseLeftDown(wxMouseEvent& evt);
1623 void OnMouseMove(wxMouseEvent& evt);
1624 void OnMouseLeftUp(wxMouseEvent& evt);
ddf2da08 1625 void OnMouseRightUp(wxMouseEvent& evt);
65ec6247 1626 void OnContextMenu(wxContextMenuEvent& evt);
37d62433 1627 void OnMouseWheel(wxMouseEvent& evt);
9ce192d4 1628 void OnChar(wxKeyEvent& evt);
f6bcfd97 1629 void OnKeyDown(wxKeyEvent& evt);
9ce192d4
RD
1630 void OnLoseFocus(wxFocusEvent& evt);
1631 void OnGainFocus(wxFocusEvent& evt);
1632 void OnSysColourChanged(wxSysColourChangedEvent& evt);
1633 void OnEraseBackground(wxEraseEvent& evt);
1634 void OnMenu(wxCommandEvent& evt);
f6bcfd97 1635 void OnListBox(wxCommandEvent& evt);
9ce192d4
RD
1636
1637
1638 // Turn notifications from Scintilla into events
1639 void NotifyChange();
1640 void NotifyParent(SCNotification* scn);
1641
a29a241f 1642
9ce192d4
RD
1643private:
1644 DECLARE_EVENT_TABLE()
f6bcfd97 1645 DECLARE_CLASS(wxStyledTextCtrl)
9ce192d4
RD
1646
1647 ScintillaWX* m_swx;
1648 wxStopWatch m_stopWatch;
5fa4613c
RD
1649 wxScrollBar* m_vScrollBar;
1650 wxScrollBar* m_hScrollBar;
9ce192d4 1651
d6582821 1652 bool m_lastKeyDownConsumed;
9ce192d4
RD
1653
1654 friend class ScintillaWX;
1655 friend class Platform;
f6bcfd97 1656#endif
9ce192d4
RD
1657};
1658
1659//----------------------------------------------------------------------
1660
1661class wxStyledTextEvent : public wxCommandEvent {
1662public:
f6bcfd97 1663 wxStyledTextEvent(wxEventType commandType=0, int id=0);
4161723f
RD
1664#ifndef SWIG
1665 wxStyledTextEvent(const wxStyledTextEvent& event);
1666#endif
9ce192d4
RD
1667 ~wxStyledTextEvent() {}
1668
a29a241f
RD
1669 void SetPosition(int pos) { m_position = pos; }
1670 void SetKey(int k) { m_key = k; }
1671 void SetModifiers(int m) { m_modifiers = m; }
1672 void SetModificationType(int t) { m_modificationType = t; }
1673 void SetText(const char* t) { m_text = t; }
1674 void SetLength(int len) { m_length = len; }
1675 void SetLinesAdded(int num) { m_linesAdded = num; }
1676 void SetLine(int val) { m_line = val; }
1677 void SetFoldLevelNow(int val) { m_foldLevelNow = val; }
1678 void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; }
1679 void SetMargin(int val) { m_margin = val; }
1680 void SetMessage(int val) { m_message = val; }
1681 void SetWParam(int val) { m_wParam = val; }
1682 void SetLParam(int val) { m_lParam = val; }
1683 void SetListType(int val) { m_listType = val; }
1684 void SetX(int val) { m_x = val; }
1685 void SetY(int val) { m_y = val; }
1686 void SetDragText(const wxString& val) { m_dragText = val; }
1687 void SetDragAllowMove(bool val) { m_dragAllowMove = val; }
1688 void SetDragResult(wxDragResult val) { m_dragResult = val; }
9ce192d4
RD
1689
1690 int GetPosition() const { return m_position; }
1691 int GetKey() const { return m_key; }
1692 int GetModifiers() const { return m_modifiers; }
1693 int GetModificationType() const { return m_modificationType; }
1694 wxString GetText() const { return m_text; }
1695 int GetLength() const { return m_length; }
1696 int GetLinesAdded() const { return m_linesAdded; }
1697 int GetLine() const { return m_line; }
1698 int GetFoldLevelNow() const { return m_foldLevelNow; }
1699 int GetFoldLevelPrev() const { return m_foldLevelPrev; }
1700 int GetMargin() const { return m_margin; }
1701 int GetMessage() const { return m_message; }
1702 int GetWParam() const { return m_wParam; }
1703 int GetLParam() const { return m_lParam; }
65ec6247
RD
1704 int GetListType() const { return m_listType; }
1705 int GetX() const { return m_x; }
1706 int GetY() const { return m_y; }
a29a241f
RD
1707 wxString GetDragText() { return m_dragText; }
1708 bool GetDragAllowMove() { return m_dragAllowMove; }
1709 wxDragResult GetDragResult() { return m_dragResult; }
9ce192d4
RD
1710
1711 bool GetShift() const;
1712 bool GetControl() const;
1713 bool GetAlt() const;
1714
41286fd1 1715 virtual wxEvent* Clone() const { return new wxStyledTextEvent(*this); }
9ce192d4 1716
f6bcfd97 1717#ifndef SWIG
9ce192d4 1718private:
f6bcfd97
BP
1719 DECLARE_DYNAMIC_CLASS(wxStyledTextEvent)
1720
9ce192d4
RD
1721 int m_position;
1722 int m_key;
1723 int m_modifiers;
1724
1725 int m_modificationType; // wxEVT_STC_MODIFIED
1726 wxString m_text;
1727 int m_length;
1728 int m_linesAdded;
1729 int m_line;
1730 int m_foldLevelNow;
1731 int m_foldLevelPrev;
1732
1733 int m_margin; // wxEVT_STC_MARGINCLICK
1734
1735 int m_message; // wxEVT_STC_MACRORECORD
1736 int m_wParam;
1737 int m_lParam;
65ec6247
RD
1738
1739 int m_listType;
1740 int m_x;
1741 int m_y;
a29a241f
RD
1742
1743 wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
1744 bool m_dragAllowMove; // wxEVT_STC_START_DRAG
1745
1746 wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
f6bcfd97 1747#endif
9ce192d4
RD
1748};
1749
d25f5fbb
RD
1750#ifndef SWIG
1751BEGIN_DECLARE_EVENT_TYPES()
65ec6247
RD
1752 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650)
1753 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED, 1651)
1754 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED, 1652)
1755 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED, 1653)
1756 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1654)
1757 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1655)
1758 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1656)
1759 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657)
1760 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1658)
1761 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 1659)
1762 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD, 1660)
1763 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK, 1661)
1764 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN, 1662)
1765 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED, 1663)
1766 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_PAINTED, 1664)
1767 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_USERLISTSELECTION, 1665)
1768 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_URIDROPPED, 1666)
1769 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLSTART, 1667)
1770 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLEND, 1668)
a29a241f
RD
1771 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669)
1772 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670)
1773 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671)
d25f5fbb
RD
1774END_DECLARE_EVENT_TYPES()
1775#else
1776 enum {
1777 wxEVT_STC_CHANGE,
1778 wxEVT_STC_STYLENEEDED,
1779 wxEVT_STC_CHARADDED,
d25f5fbb
RD
1780 wxEVT_STC_SAVEPOINTREACHED,
1781 wxEVT_STC_SAVEPOINTLEFT,
1782 wxEVT_STC_ROMODIFYATTEMPT,
65ec6247 1783 wxEVT_STC_KEY,
d25f5fbb 1784 wxEVT_STC_DOUBLECLICK,
65ec6247 1785 wxEVT_STC_UPDATEUI,
d25f5fbb 1786 wxEVT_STC_MODIFIED,
d25f5fbb
RD
1787 wxEVT_STC_MACRORECORD,
1788 wxEVT_STC_MARGINCLICK,
1789 wxEVT_STC_NEEDSHOWN,
65ec6247
RD
1790 wxEVT_STC_POSCHANGED,
1791 wxEVT_STC_PAINTED,
1792 wxEVT_STC_USERLISTSELECTION,
1793 wxEVT_STC_URIDROPPED,
1794 wxEVT_STC_DWELLSTART,
1795 wxEVT_STC_DWELLEND,
a29a241f
RD
1796 wxEVT_STC_START_DRAG,
1797 wxEVT_STC_DRAG_OVER,
1798 wxEVT_STC_DO_DROP,
d25f5fbb
RD
1799 };
1800#endif
9ce192d4 1801
9ce192d4 1802
f6bcfd97
BP
1803
1804#ifndef SWIG
9ce192d4
RD
1805typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
1806
65ec6247
RD
1807#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1808#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1809#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1810#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1811#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1812#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1813#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1814#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1815#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1816#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1817#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1818#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1819#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1820#define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1821#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1822#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1823#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1824#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1825#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
a29a241f
RD
1826#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1827#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1828#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1bc32508 1829#endif
9ce192d4
RD
1830
1831//----------------------------------------------------------------------
1832//----------------------------------------------------------------------
1833#endif
1834
1835