]> git.saurik.com Git - wxWidgets.git/blame - include/wx/stc/stc.h
First pass at wxPython for Mac (darwin only so far). It
[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
4370573a 643#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN))
9ce192d4 644
9ce192d4 645
9ce192d4 646
4370573a 647//----------------------------------------------------------------------
9ce192d4
RD
648
649class ScintillaWX; // forward declare
650class WordList;
651struct SCNotification;
652
653
654extern const wxChar* wxSTCNameStr;
655
656//----------------------------------------------------------------------
657
658class wxStyledTextCtrl : public wxControl {
659public:
660
f6bcfd97
BP
661#ifdef SWIG
662 wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
663 const wxPoint& pos = wxDefaultPosition,
664 const wxSize& size = wxDefaultSize, long style = 0,
665 const char* name = "styledtext");
0122b7e3
RD
666 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
667
f6bcfd97 668#else
9ce192d4
RD
669 wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
670 const wxPoint& pos = wxDefaultPosition,
671 const wxSize& size = wxDefaultSize, long style = 0,
672 const wxString& name = wxSTCNameStr);
f6bcfd97
BP
673#endif
674
9ce192d4 675
f6bcfd97
BP
676#ifndef SWIG
677 ~wxStyledTextCtrl();
678#endif
9ce192d4 679
4370573a
RD
680//----------------------------------------------------------------------
681// BEGIN generated section. The following code is automatically generated
682// by gen_iface.py. Do not edit this file. Edit stc.h.in instead
683// and regenerate
9ce192d4 684
4370573a
RD
685
686 // Add text to the document
687 void AddText(const wxString& text);
688
689 // Add array of cells to document
690 void AddStyledText(const wxString& text);
691
692 // Insert string at a position
693 void InsertText(int pos, const wxString& text);
694
695 // Delete all text in the document
696 void ClearAll();
697
698 // Set all style bytes to 0, remove all folding information
699 void ClearDocumentStyle();
700
701 // The number of characters in the document
702 int GetLength();
703
704 // Returns the character byte at the position
705 int GetCharAt(int pos);
706
707 // Returns the position of the caret
708 int GetCurrentPos();
709
710 // Returns the position of the opposite end of the selection to the caret
711 int GetAnchor();
712
713 // Returns the style byte at the position
714 int GetStyleAt(int pos);
715
716 // Redoes the next action on the undo history
717 void Redo();
718
719 // Choose between collecting actions into the undo
720 // history and discarding them.
721 void SetUndoCollection(bool collectUndo);
722
723 // Select all the text in the document.
724 void SelectAll();
725
726 // Remember the current position in the undo history as the position
727 // at which the document was saved.
728 void SetSavePoint();
729
730 // Retrieve a buffer of cells.
731 wxString GetStyledText(int startPos, int endPos);
732
733 // Are there any redoable actions in the undo history.
734 bool CanRedo();
735
736 // Retrieve the line number at which a particular marker is located
737 int MarkerLineFromHandle(int handle);
738
739 // Delete a marker.
740 void MarkerDeleteHandle(int handle);
741
742 // Is undo history being collected?
743 bool GetUndoCollection();
744
745 // Are white space characters currently visible?
746 // Returns one of SCWS_* constants.
747 int GetViewWhiteSpace();
748
749 // Make white space characters invisible, always visible or visible outside indentation.
750 void SetViewWhiteSpace(int viewWS);
751
752 // Find the position from a point within the window.
753 int PositionFromPoint(wxPoint pt);
754
65ec6247
RD
755 // Find the position from a point within the window but return
756 // INVALID_POSITION if not close to text.
757 int PositionFromPointClose(int x, int y);
758
4370573a
RD
759 // Set caret to start of a line and ensure it is visible.
760 void GotoLine(int line);
761
762 // Set caret to a position and ensure it is visible.
763 void GotoPos(int pos);
764
765 // Set the selection anchor to a position. The anchor is the opposite
766 // end of the selection from the caret.
767 void SetAnchor(int posAnchor);
768
769 // Retrieve the text of the line containing the caret.
770 // Returns the index of the caret on the line.
8de28db9
RD
771 #ifdef SWIG
772 wxString GetCurLine(int* OUTPUT);
773#else
774 wxString GetCurLine(int* linePos=NULL);
775#endif
4370573a
RD
776
777 // Retrieve the position of the last correctly styled character.
778 int GetEndStyled();
779
65ec6247
RD
780 // Convert all line endings in the document to one mode.
781 void ConvertEOLs(int eolMode);
4370573a
RD
782
783 // Retrieve the current end of line mode - one of CRLF, CR, or LF.
784 int GetEOLMode();
785
786 // Set the current end of line mode.
787 void SetEOLMode(int eolMode);
788
789 // Set the current styling position to pos and the styling mask to mask.
790 // The styling mask can be used to protect some bits in each styling byte from
791 // modification.
792 void StartStyling(int pos, int mask);
793
794 // Change style from current styling position for length characters to a style
795 // and move the current styling position to after this newly styled segment.
796 void SetStyling(int length, int style);
797
798 // Is drawing done first into a buffer or direct to the screen.
799 bool GetBufferedDraw();
800
801 // If drawing is buffered then each line of text is drawn into a bitmap buffer
802 // before drawing it to the screen to avoid flicker.
803 void SetBufferedDraw(bool buffered);
804
805 // Change the visible size of a tab to be a multiple of the width of a space
806 // character.
807 void SetTabWidth(int tabWidth);
808
809 // Retrieve the visible size of a tab.
810 int GetTabWidth();
811
812 // Set the code page used to interpret the bytes of the document as characters.
813 // The SC_CP_UTF8 value can be used to enter Unicode mode.
814 void SetCodePage(int codePage);
815
816 // Set the symbol used for a particular marker number,
817 // and optionally the for and background colours.
818 void MarkerDefine(int markerNumber, int markerSymbol,
819 const wxColour& foreground = wxNullColour,
820 const wxColour& background = wxNullColour);
821
822 // Set the foreground colour used for a particular marker number.
823 void MarkerSetForeground(int markerNumber, const wxColour& fore);
824
825 // Set the background colour used for a particular marker number.
826 void MarkerSetBackground(int markerNumber, const wxColour& back);
827
828 // Add a marker to a line.
829 void MarkerAdd(int line, int markerNumber);
830
831 // Delete a marker from a line
832 void MarkerDelete(int line, int markerNumber);
833
834 // Delete all markers with a particular number from all lines
835 void MarkerDeleteAll(int markerNumber);
836
837 // Get a bit mask of all the markers set on a line.
838 int MarkerGet(int line);
839
840 // Find the next line after lineStart that includes a marker in mask.
841 int MarkerNext(int lineStart, int markerMask);
842
843 // Find the previous line before lineStart that includes a marker in mask.
844 int MarkerPrevious(int lineStart, int markerMask);
845
846 // Set a margin to be either numeric or symbolic.
847 void SetMarginType(int margin, int marginType);
848
849 // Retrieve the type of a margin.
850 int GetMarginType(int margin);
851
852 // Set the width of a margin to a width expressed in pixels.
9ce192d4 853 void SetMarginWidth(int margin, int pixelWidth);
4370573a
RD
854
855 // Retrieve the width of a margin in pixels.
856 int GetMarginWidth(int margin);
857
858 // Set a mask that determines which markers are displayed in a margin.
9ce192d4 859 void SetMarginMask(int margin, int mask);
4370573a
RD
860
861 // Retrieve the marker mask of a margin.
862 int GetMarginMask(int margin);
863
864 // Make a margin sensitive or insensitive to mouse clicks.
9ce192d4 865 void SetMarginSensitive(int margin, bool sensitive);
4370573a
RD
866
867 // Retrieve the mouse click sensitivity of a margin.
9ce192d4
RD
868 bool GetMarginSensitive(int margin);
869
4370573a
RD
870 // Clear all the styles and make equivalent to the global default style.
871 void StyleClearAll();
872
873 // Set the foreground colour of a style.
874 void StyleSetForeground(int style, const wxColour& fore);
875
876 // Set the background colour of a style.
877 void StyleSetBackground(int style, const wxColour& back);
878
879 // Set a style to be bold or not.
880 void StyleSetBold(int style, bool bold);
881
882 // Set a style to be italic or not.
883 void StyleSetItalic(int style, bool italic);
884
885 // Set the size of characters of a style.
886 void StyleSetSize(int style, int sizePoints);
887
888 // Set the font of a style.
889 void StyleSetFaceName(int style, const wxString& fontName);
890
891 // Set a style to have its end of line filled or not.
892 void StyleSetEOLFilled(int style, bool filled);
893
894 // Reset the default style to its state at startup
895 void StyleResetDefault();
896
897 // Set a style to be underlined or not.
898 void StyleSetUnderline(int style, bool underline);
899
65ec6247
RD
900 // Set a style to be mixed case, or to force upper or lower case.
901 void StyleSetCase(int style, int caseForce);
902
4370573a
RD
903 // Set the foreground colour of the selection and whether to use this setting.
904 void SetSelForeground(bool useSetting, const wxColour& fore);
905
906 // Set the background colour of the selection and whether to use this setting.
907 void SetSelBackground(bool useSetting, const wxColour& back);
908
909 // Set the foreground colour of the caret.
910 void SetCaretForeground(const wxColour& fore);
911
912 // When key+modifier combination km is pressed perform msg.
913 void CmdKeyAssign(int key, int modifiers, int cmd);
914
915 // When key+modifier combination km do nothing.
916 void CmdKeyClear(int key, int modifiers);
917
918 // Drop all key mappings.
919 void CmdKeyClearAll();
920
921 // Set the styles for a segment of the document.
922 void SetStyleBytes(int length, char* styleBytes);
923
924 // Set a style to be visible or not.
925 void StyleSetVisible(int style, bool visible);
926
927 // Get the time in milliseconds that the caret is on and off.
928 int GetCaretPeriod();
929
930 // Get the time in milliseconds that the caret is on and off. 0 = steady on.
931 void SetCaretPeriod(int periodMilliseconds);
932
933 // Set the set of characters making up words for when moving or selecting
934 // by word.
935 void SetWordChars(const wxString& characters);
936
937 // Start a sequence of actions that is undone and redone as a unit.
938 // May be nested.
939 void BeginUndoAction();
940
941 // End a sequence of actions that is undone and redone as a unit.
942 void EndUndoAction();
943
944 // Set an indicator to plain, squiggle or TT.
945 void IndicatorSetStyle(int indic, int style);
946
947 // Retrieve the style of an indicator.
948 int IndicatorGetStyle(int indic);
949
950 // Set the foreground colour of an indicator.
951 void IndicatorSetForeground(int indic, const wxColour& fore);
952
953 // Retrieve the foreground colour of an indicator.
954 wxColour IndicatorGetForeground(int indic);
955
956 // Divide each styling byte into lexical class bits (default:5) and indicator
957 // bits (default:3). If a lexer requires more than 32 lexical states, then this
958 // is used to expand the possible states.
959 void SetStyleBits(int bits);
960
961 // Retrieve number of bits in style bytes used to hold the lexical state.
962 int GetStyleBits();
963
964 // Used to hold extra styling information for each line.
965 void SetLineState(int line, int state);
966
967 // Retrieve the extra styling information for a line.
968 int GetLineState(int line);
969
970 // Retrieve the last line number that has line state.
971 int GetMaxLineState();
972
65ec6247
RD
973 // Is the background of the line containing the caret in a different colour?
974 bool GetCaretLineVisible();
975
976 // Display the background of the line containing the caret in a different colour.
977 void SetCaretLineVisible(bool show);
978
979 // Get the colour of the background of the line containing the caret.
980 wxColour GetCaretLineBack();
981
982 // Set the colour of the background of the line containing the caret.
983 void SetCaretLineBack(const wxColour& back);
984
4370573a
RD
985 // Display a auto-completion list.
986 // The lenEntered parameter indicates how many characters before
987 // the caret should be used to provide context.
988 void AutoCompShow(int lenEntered, const wxString& itemList);
989
990 // Remove the auto-completion list from the screen.
991 void AutoCompCancel();
992
993 // Is there an auto-completion list visible?
994 bool AutoCompActive();
995
996 // Retrieve the position of the caret when the auto-completion list was
997 // displayed.
998 int AutoCompPosStart();
999
1000 // User has selected an item so remove the list and insert the selection.
1001 void AutoCompComplete();
1002
1003 // Define a set of character that when typed cancel the auto-completion list.
1004 void AutoCompStops(const wxString& characterSet);
1005
1006 // Change the separator character in the string setting up an auto-completion
1007 // list. Default is space but can be changed if items contain space.
1008 void AutoCompSetSeparator(int separatorCharacter);
1009
1010 // Retrieve the auto-completion list separator character.
1011 int AutoCompGetSeparator();
1012
1013 // Select the item in the auto-completion list that starts with a string.
1014 void AutoCompSelect(const wxString& text);
1015
1016 // Should the auto-completion list be cancelled if the user backspaces to a
1017 // position before where the box was created.
1018 void AutoCompSetCancelAtStart(bool cancel);
1019
1020 // Retrieve whether auto-completion cancelled by backspacing before start.
1021 bool AutoCompGetCancelAtStart();
1022
1023 // Define a set of character that when typed fills up the selected word.
1024 void AutoCompSetFillUps(const wxString& characterSet);
1025
1026 // Should a single item auto-completion list automatically choose the item.
1027 void AutoCompSetChooseSingle(bool chooseSingle);
1028
1029 // Retrieve whether a single item auto-completion list automatically choose the item.
1030 bool AutoCompGetChooseSingle();
1031
1032 // Set whether case is significant when performing auto-completion searches.
1033 void AutoCompSetIgnoreCase(bool ignoreCase);
1034
1035 // Retrieve state of ignore case flag.
1036 bool AutoCompGetIgnoreCase();
1037
65ec6247
RD
1038 // Display a list of strings and send notification when user chooses one.
1039 void UserListShow(int listType, const wxString& itemList);
1040
1041 // Set whether or not autocompletion is hidden automatically when nothing matches
1042 void AutoCompSetAutoHide(bool autoHide);
1043
1044 // Retrieve whether or not autocompletion is hidden automatically when nothing matches
1045 bool AutoCompGetAutoHide();
1046
4370573a
RD
1047 // Set the number of spaces used for one level of indentation.
1048 void SetIndent(int indentSize);
1049
1050 // Retrieve indentation size.
1051 int GetIndent();
1052
1053 // Indentation will only use space characters if useTabs is false, otherwise
1054 // it will use a combination of tabs and spaces.
1055 void SetUseTabs(bool useTabs);
1056
1057 // Retrieve whether tabs will be used in indentation.
1058 bool GetUseTabs();
1059
1060 // Change the indentation of a line to a number of columns.
1061 void SetLineIndentation(int line, int indentSize);
9ce192d4 1062
4370573a
RD
1063 // Retrieve the number of columns that a line is indented.
1064 int GetLineIndentation(int line);
1065
1066 // Retrieve the position before the first non indentation character on a line.
1067 int GetLineIndentPosition(int line);
1068
1069 // Retrieve the column number of a position, taking tab width into account.
1070 int GetColumn(int pos);
1071
1072 // Show or hide the horizontal scroll bar.
1073 void SetUseHorizontalScrollBar(bool show);
1074
1075 // Is the horizontal scroll bar visible?
1076 bool GetUseHorizontalScrollBar();
1077
1078 // Show or hide indentation guides.
1079 void SetIndentationGuides(bool show);
1080
1081 // Are the indentation guides visible?
1082 bool GetIndentationGuides();
1083
1084 // Set the highlighted indentation guide column.
1085 // 0 = no highlighted guide.
1086 void SetHighlightGuide(int column);
1087
1088 // Get the highlighted indentation guide column.
1089 int GetHighlightGuide();
1090
1091 // Get the position after the last visible characters on a line.
1092 int GetLineEndPosition(int line);
1093
1094 // Get the code page used to interpret the bytes of the document as characters.
1095 int GetCodePage();
1096
1097 // Get the foreground colour of the caret.
1098 wxColour GetCaretForeground();
1099
1100 // In read-only mode?
1101 bool GetReadOnly();
1102
1103 // Sets the position of the caret.
1104 void SetCurrentPos(int pos);
1105
1106 // Sets the position that starts the selection - this becomes the anchor.
1107 void SetSelectionStart(int pos);
1108
1109 // Returns the position at the start of the selection.
1110 int GetSelectionStart();
1111
1112 // Sets the position that ends the selection - this becomes the currentPosition.
1113 void SetSelectionEnd(int pos);
1114
1115 // Returns the position at the end of the selection.
1116 int GetSelectionEnd();
1117
1118 // Sets the print magnification added to the point size of each style for printing.
1119 void SetPrintMagnification(int magnification);
1120
1121 // Returns the print magnification.
1122 int GetPrintMagnification();
1123
1124 // Modify colours when printing for clearer printed text.
1125 void SetPrintColourMode(int mode);
1126
1127 // Returns the print colour mode.
1128 int GetPrintColourMode();
1129
1130 // Find some text in the document.
1131 int FindText(int minPos, int maxPos,
1132 const wxString& text,
1133 bool caseSensitive, bool wholeWord);
1134
1135 // On Windows will draw the document into a display context such as a printer.
1136 int FormatRange(bool doDraw,
1137 int startPos,
1138 int endPos,
1139 wxDC* draw,
1140 wxDC* target, // Why does it use two? Can they be the same?
1141 wxRect renderRect,
1142 wxRect pageRect);
1143
1144 // Retrieve the line at the top of the display.
1145 int GetFirstVisibleLine();
1146
1147 // Retrieve the contents of a line.
1148 wxString GetLine(int line);
1149
1150 // Returns the number of lines in the document. There is always at least one.
1151 int GetLineCount();
1152
1153 // Sets the size in pixels of the left margin.
65ec6247 1154 void SetMarginLeft(int pixelWidth);
4370573a
RD
1155
1156 // Returns the size in pixels of the left margin.
1157 int GetMarginLeft();
1158
1159 // Sets the size in pixels of the right margin.
65ec6247 1160 void SetMarginRight(int pixelWidth);
4370573a
RD
1161
1162 // Returns the size in pixels of the right margin.
1163 int GetMarginRight();
1164
1165 // Is the document different from when it was last saved?
1166 bool GetModify();
1167
1168 // Select a range of text.
1169 void SetSelection(int start, int end);
1170
1171 // Retrieve the selected text.
1172 wxString GetSelectedText();
1173
1174 // Retrieve a range of text.
1175 wxString GetTextRange(int startPos, int endPos);
1176
1177 // Draw the selection in normal style or with selection highlighted.
1178 void HideSelection(bool normal);
1179
1180 // Retrieve the line containing a position.
1181 int LineFromPosition(int pos);
1182
1183 // Retrieve the position at the start of a line.
1184 int PositionFromLine(int line);
1185
1186 // Scroll horizontally and vertically.
1187 void LineScroll(int columns, int lines);
1188
1189 // Ensure the caret is visible.
1190 void EnsureCaretVisible();
1191
1192 // Replace the selected text with the argument text.
1193 void ReplaceSelection(const wxString& text);
1194
1195 // Set to read only or read write.
1196 void SetReadOnly(bool readOnly);
1197
1198 // Will a paste succeed?
1199 bool CanPaste();
1200
1201 // Are there any undoable actions in the undo history.
1202 bool CanUndo();
1203
1204 // Delete the undo history.
1205 void EmptyUndoBuffer();
1206
1207 // Undo one action in the undo history.
1208 void Undo();
1209
1210 // Cut the selection to the clipboard.
1211 void Cut();
1212
1213 // Copy the selection to the clipboard.
1214 void Copy();
1215
1216 // Paste the contents of the clipboard into the document replacing the selection.
1217 void Paste();
1218
1219 // Clear the selection.
1220 void Clear();
1221
1222 // Replace the contents of the document with the argument text.
1223 void SetText(const wxString& text);
1224
1225 // Retrieve all the text in the document.
1226 wxString GetText();
1227
1228 // Retrieve the number of characters in the document.
1229 int GetTextLength();
1230
1231 // Set to overtype (true) or insert mode
1232 void SetOvertype(bool overtype);
1233
1234 // Returns true if overtype mode is active otherwise false is returned.
1235 bool GetOvertype();
1236
65ec6247
RD
1237 // Set the width of the insert mode caret
1238 void SetCaretWidth(int pixelWidth);
1239
1240 // Returns the width of the insert mode caret
1241 int GetCaretWidth();
1242
1243 // Sets the position that starts the target which is used for updating the
1244 // document without affecting the scroll position.
1245 void SetTargetStart(int pos);
1246
1247 // Get the position that starts the target.
1248 int GetTargetStart();
1249
1250 // Sets the position that ends the target which is used for updating the
1251 // document without affecting the scroll position.
1252 void SetTargetEnd(int pos);
1253
1254 // Get the position that ends the target.
1255 int GetTargetEnd();
1256
1257 // Replace the target text with the argument text.
b8b0e402 1258 // Text is counted so it can contain nulls.
65ec6247
RD
1259 // Returns the length of the replacement text.
1260 int ReplaceTarget(const wxString& text);
1261
1262 // Replace the target text with the argument text after \d processing.
b8b0e402 1263 // Text is counted so it can contain nulls.
65ec6247
RD
1264 // Looks for \d where d is between 1 and 9 and replaces these with the strings
1265 // matched in the last search operation which were surrounded by \( and \).
1266 // Returns the length of the replacement text including any change
1267 // caused by processing the \d patterns.
1268 int ReplaceTargetRE(const wxString& text);
1269
1270 // Search for a counted string in the target and set the target to the found
b8b0e402 1271 // range. Text is counted so it can contain nulls.
65ec6247
RD
1272 // Returns length of range or -1 for failure in which case target is not moved.
1273 int SearchInTarget(const wxString& text);
1274
1275 // Set the search flags used by SearchInTarget
1276 void SetSearchFlags(int flags);
1277
1278 // Get the search flags used by SearchInTarget
1279 int GetSearchFlags();
1280
4370573a
RD
1281 // Show a call tip containing a definition near position pos.
1282 void CallTipShow(int pos, const wxString& definition);
1283
1284 // Remove the call tip from the screen.
1285 void CallTipCancel();
1286
1287 // Is there an active call tip?
1288 bool CallTipActive();
1289
1290 // Retrieve the position where the caret was before displaying the call tip.
1291 int CallTipPosAtStart();
1292
1293 // Highlight a segment of the definition.
1294 void CallTipSetHighlight(int start, int end);
1295
1296 // Set the background colour for the call tip.
1297 void CallTipSetBackground(const wxColour& back);
1298
1299 // Find the display line of a document line taking hidden lines into account.
1300 int VisibleFromDocLine(int line);
1301
1302 // Find the document line of a display line taking hidden lines into account.
1303 int DocLineFromVisible(int lineDisplay);
1304
1305 // Set the fold level of a line.
1306 // This encodes an integer level along with flags indicating whether the
1307 // line is a header and whether it is effectively white space.
1308 void SetFoldLevel(int line, int level);
1309
1310 // Retrieve the fold level of a line.
1311 int GetFoldLevel(int line);
1312
1313 // Find the last child line of a header line.
1314 int GetLastChild(int line, int level);
1315
1316 // Find the parent line of a child line.
1317 int GetFoldParent(int line);
1318
1319 // Make a range of lines visible.
1320 void ShowLines(int lineStart, int lineEnd);
1321
1322 // Make a range of lines invisible.
1323 void HideLines(int lineStart, int lineEnd);
1324
1325 // Is a line visible?
1326 bool GetLineVisible(int line);
1327
1328 // Show the children of a header line.
1329 void SetFoldExpanded(int line, bool expanded);
1330
1331 // Is a header line expanded?
1332 bool GetFoldExpanded(int line);
1333
1334 // Switch a header line between expanded and contracted.
1335 void ToggleFold(int line);
1336
1337 // Ensure a particular line is visible by expanding any header line hiding it.
1338 void EnsureVisible(int line);
1339
1340 // Set some debugging options for folding
1341 void SetFoldFlags(int flags);
1342
65ec6247
RD
1343 // Ensure a particular line is visible by expanding any header line hiding it.
1344 // Use the currently set visibility policy to determine which range to display.
1345 void EnsureVisibleEnforcePolicy(int line);
1346
1347 // Sets whether a tab pressed when caret is within indentation indents
1348 void SetTabIndents(bool tabIndents);
1349
1350 // Does a tab pressed when caret is within indentation indent?
1351 bool GetTabIndents();
1352
1353 // Sets whether a backspace pressed when caret is within indentation unindents
1354 void SetBackSpaceUnIndents(bool bsUnIndents);
1355
1356 // Does a backspace pressed when caret is within indentation unindent?
1357 bool GetBackSpaceUnIndents();
1358
1359 // Sets the time the mouse must sit still to generate a mouse dwell event
1360 void SetMouseDwellTime(int periodMilliseconds);
1361
1362 // Retrieve the time the mouse must sit still to generate a mouse dwell event
1363 int GetMouseDwellTime();
1364
1365 // Move the caret inside current view if it's not there already
1366 void MoveCaretInsideView();
1367
4370573a
RD
1368 // How many characters are on a line, not including end of line characters.
1369 int LineLength(int line);
1370
1371 // Highlight the characters at two positions.
1372 void BraceHighlight(int pos1, int pos2);
1373
1374 // Highlight the character at a position indicating there is no matching brace.
1375 void BraceBadLight(int pos);
1376
1377 // Find the position of a matching brace or INVALID_POSITION if no match.
1378 int BraceMatch(int pos);
1379
1380 // Are the end of line characters visible.
1381 bool GetViewEOL();
1382
1383 // Make the end of line characters visible or invisible
1384 void SetViewEOL(bool visible);
1385
1386 // Retrieve a pointer to the document object.
1387 void* GetDocPointer();
1388
1389 // Change the document object used.
1390 void SetDocPointer(void* docPointer);
1391
1392 // Set which document modification events are sent to the container.
1393 void SetModEventMask(int mask);
1394
1395 // Retrieve the column number which text should be kept within.
1396 int GetEdgeColumn();
1397
1398 // Set the column number of the edge.
1399 // If text goes past the edge then it is highlighted.
1400 void SetEdgeColumn(int column);
1401
1402 // Retrieve the edge highlight mode.
1403 int GetEdgeMode();
1404
1405 // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
1406 // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
1407 void SetEdgeMode(int mode);
1408
1409 // Retrieve the colour used in edge indication.
9ce192d4 1410 wxColour GetEdgeColour();
9ce192d4 1411
4370573a
RD
1412 // Change the colour used in edge indication.
1413 void SetEdgeColour(const wxColour& edgeColour);
1414
1415 // Sets the current caret position to be the search anchor.
1416 void SearchAnchor();
1417
1418 // Find some text starting at the search anchor.
65ec6247 1419 // Does not ensure the selection is visible.
4370573a
RD
1420 int SearchNext(int flags, const wxString& text);
1421
1422 // Find some text starting at the search anchor and moving backwards.
65ec6247 1423 // Does not ensure the selection is visible.
4370573a
RD
1424 int SearchPrev(int flags, const wxString& text);
1425
1426 // Set the way the line the caret is on is kept visible.
1427 void SetCaretPolicy(int caretPolicy, int caretSlop);
1428
1429 // Retrieves the number of lines completely visible.
1430 int LinesOnScreen();
1431
1432 // Set whether a pop up menu is displayed automatically when the user presses
1433 // the wrong mouse button.
1434 void UsePopUp(bool allowPopUp);
1435
1436 // Is the selection a rectangular. The alternative is the more common stream selection.
1437 bool SelectionIsRectangle();
1438
1439 // Set the zoom level. This number of points is added to the size of all fonts.
1440 // It may be positive to magnify or negative to reduce.
1441 void SetZoom(int zoom);
1442
1443 // Retrieve the zoom level.
1444 int GetZoom();
1445
1446 // Create a new document object.
1447 // Starts with reference count of 1 and not selected into editor.
1448 void* CreateDocument();
9ce192d4 1449
4370573a
RD
1450 // Extend life of document.
1451 void AddRefDocument(void* docPointer);
9ce192d4 1452
4370573a
RD
1453 // Release a reference to the document, deleting document if it fades to black.
1454 void ReleaseDocument(void* docPointer);
1455
1456 // Get which document modification events are sent to the container.
1457 int GetModEventMask();
1458
65ec6247 1459 // Change internal focus flag
8de28db9 1460 void SetSTCFocus(bool focus);
65ec6247
RD
1461
1462 // Get internal focus flag
8de28db9 1463 bool GetSTCFocus();
65ec6247
RD
1464
1465 // Change error status - 0 = OK
1466 void SetStatus(int statusCode);
1467
1468 // Get error status
1469 int GetStatus();
1470
1471 // Set whether the mouse is captured when its button is pressed
1472 void SetMouseDownCaptures(bool captures);
1473
1474 // Get whether mouse gets captured
1475 bool GetMouseDownCaptures();
1476
1477 // Sets the cursor to one of the SC_CURSOR* values
1478 void SetCursor(int cursorType);
1479
1480 // Get cursor type
1481 int GetCursor();
1482
1483 // Move to the previous change in capitalistion
1484 void WordPartLeft();
1485
1486 // Move to the previous change in capitalistion extending selection to new caret position.
1487 void WordPartLeftExtend();
1488
1489 // Move to the change next in capitalistion
1490 void WordPartRight();
1491
1492 // Move to the next change in capitalistion extending selection to new caret position.
1493 void WordPartRightExtend();
1494
1495 // Set the way the display area is determined when a particular line is to be moved to.
1496 void SetVisiblePolicy(int visiblePolicy, int visibleSlop);
1497
1498 // Delete back from the current position to the start of the line
1499 void DelLineLeft();
1500
1501 // Delete forwards from the current position to the end of the line
1502 void DelLineRight();
1503
4370573a
RD
1504 // Start notifying the container of all key presses and commands.
1505 void StartRecord();
1506
1507 // Stop notifying the container of all key presses and commands.
1508 void StopRecord();
1509
1510 // Set the lexing language of the document.
1511 void SetLexer(int lexer);
1512
1513 // Retrieve the lexing language of the document.
1514 int GetLexer();
1515
1516 // Colourise a segment of the document using the current lexing language.
1517 void Colourise(int start, int end);
1518
1519 // Set up a value that may be used by a lexer for some optional feature.
1520 void SetProperty(const wxString& key, const wxString& value);
1521
1522 // Set up the key words used by the lexer.
1523 void SetKeyWords(int keywordSet, const wxString& keyWords);
1524
65ec6247
RD
1525 // Set the lexing language of the document based on string name.
1526 void SetLexerLanguage(const wxString& language);
1527
4370573a
RD
1528// END of generated section
1529//----------------------------------------------------------------------
1530// Others...
1531
1532
1533 // Returns the line number of the line with the caret.
1534 int GetCurrentLine();
1535
1536 // Extract style settings from a spec-string which is composed of one or
1537 // more of the following comma separated elements:
1538 //
1539 // bold turns on bold
1540 // italic turns on italics
1541 // fore:#RRGGBB sets the foreground colour
1542 // back:#RRGGBB sets the background colour
1543 // face:[facename] sets the font face name to use
1544 // size:[num] sets the font size in points
1545 // eol turns on eol filling
1546 // underline turns on underlining
1547 //
1548 void StyleSetSpec(int styleNum, const wxString& spec);
1549
1550
1551
1552 // Set style size, face, bold, italic, and underline attributes from
1553 // a wxFont's attributes.
1554 void StyleSetFont(int styleNum, wxFont& font);
1555
1556
1557
1558 // Set all font style attributes at once.
1559 void StyleSetFontAttr(int styleNum, int size,
1560 const wxString& faceName,
1561 bool bold, bool italic,
1562 bool underline);
1563
1564
1565
1566 // Perform one of the operations defined by the wxSTC_CMD_* constants.
1567 void CmdKeyExecute(int cmd);
1568
1569
1570
1571 // Set the left and right margin in the edit area, measured in pixels.
1572 void SetMargins(int left, int right);
1573
1574
1575 // Retrieve the start and end positions of the current selection.
1576#ifdef SWIG
1577 void GetSelection(int* OUTPUT, int* OUTPUT);
1578#else
1579 void GetSelection(int* startPos, int* endPos);
1580#endif
1581
1582 // Retrieve the point in the window where a position is displayed.
1583 wxPoint PointFromPosition(int pos);
1584
f97d84a6
RD
1585
1586 // Scroll enough to make the given line visible
1587 void ScrollToLine(int line);
1588
1589
1590 // Scroll enough to make the given column visible
1591 void ScrollToColumn(int column);
1592
65ec6247
RD
1593
1594 // Send a message to Scintilla
1595 long SendMsg(int msg, long wp=0, long lp=0);
1596
4370573a 1597//----------------------------------------------------------------------
9ce192d4
RD
1598
1599
f6bcfd97 1600#ifndef SWIG
9ce192d4
RD
1601private:
1602 // Event handlers
1603 void OnPaint(wxPaintEvent& evt);
1604 void OnScrollWin(wxScrollWinEvent& evt);
1605 void OnSize(wxSizeEvent& evt);
1606 void OnMouseLeftDown(wxMouseEvent& evt);
1607 void OnMouseMove(wxMouseEvent& evt);
1608 void OnMouseLeftUp(wxMouseEvent& evt);
65ec6247 1609 void OnContextMenu(wxContextMenuEvent& evt);
37d62433 1610 void OnMouseWheel(wxMouseEvent& evt);
9ce192d4 1611 void OnChar(wxKeyEvent& evt);
f6bcfd97 1612 void OnKeyDown(wxKeyEvent& evt);
9ce192d4
RD
1613 void OnLoseFocus(wxFocusEvent& evt);
1614 void OnGainFocus(wxFocusEvent& evt);
1615 void OnSysColourChanged(wxSysColourChangedEvent& evt);
1616 void OnEraseBackground(wxEraseEvent& evt);
1617 void OnMenu(wxCommandEvent& evt);
f6bcfd97 1618 void OnListBox(wxCommandEvent& evt);
9ce192d4
RD
1619
1620
1621 // Turn notifications from Scintilla into events
1622 void NotifyChange();
1623 void NotifyParent(SCNotification* scn);
1624
a29a241f 1625
9ce192d4
RD
1626private:
1627 DECLARE_EVENT_TABLE()
f6bcfd97 1628 DECLARE_CLASS(wxStyledTextCtrl)
9ce192d4
RD
1629
1630 ScintillaWX* m_swx;
1631 wxStopWatch m_stopWatch;
9ce192d4 1632
d6582821 1633 bool m_lastKeyDownConsumed;
9ce192d4
RD
1634
1635 friend class ScintillaWX;
1636 friend class Platform;
f6bcfd97 1637#endif
9ce192d4
RD
1638};
1639
1640//----------------------------------------------------------------------
1641
1642class wxStyledTextEvent : public wxCommandEvent {
1643public:
f6bcfd97 1644 wxStyledTextEvent(wxEventType commandType=0, int id=0);
9ce192d4
RD
1645 ~wxStyledTextEvent() {}
1646
a29a241f
RD
1647 void SetPosition(int pos) { m_position = pos; }
1648 void SetKey(int k) { m_key = k; }
1649 void SetModifiers(int m) { m_modifiers = m; }
1650 void SetModificationType(int t) { m_modificationType = t; }
1651 void SetText(const char* t) { m_text = t; }
1652 void SetLength(int len) { m_length = len; }
1653 void SetLinesAdded(int num) { m_linesAdded = num; }
1654 void SetLine(int val) { m_line = val; }
1655 void SetFoldLevelNow(int val) { m_foldLevelNow = val; }
1656 void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; }
1657 void SetMargin(int val) { m_margin = val; }
1658 void SetMessage(int val) { m_message = val; }
1659 void SetWParam(int val) { m_wParam = val; }
1660 void SetLParam(int val) { m_lParam = val; }
1661 void SetListType(int val) { m_listType = val; }
1662 void SetX(int val) { m_x = val; }
1663 void SetY(int val) { m_y = val; }
1664 void SetDragText(const wxString& val) { m_dragText = val; }
1665 void SetDragAllowMove(bool val) { m_dragAllowMove = val; }
1666 void SetDragResult(wxDragResult val) { m_dragResult = val; }
9ce192d4
RD
1667
1668 int GetPosition() const { return m_position; }
1669 int GetKey() const { return m_key; }
1670 int GetModifiers() const { return m_modifiers; }
1671 int GetModificationType() const { return m_modificationType; }
1672 wxString GetText() const { return m_text; }
1673 int GetLength() const { return m_length; }
1674 int GetLinesAdded() const { return m_linesAdded; }
1675 int GetLine() const { return m_line; }
1676 int GetFoldLevelNow() const { return m_foldLevelNow; }
1677 int GetFoldLevelPrev() const { return m_foldLevelPrev; }
1678 int GetMargin() const { return m_margin; }
1679 int GetMessage() const { return m_message; }
1680 int GetWParam() const { return m_wParam; }
1681 int GetLParam() const { return m_lParam; }
65ec6247
RD
1682 int GetListType() const { return m_listType; }
1683 int GetX() const { return m_x; }
1684 int GetY() const { return m_y; }
a29a241f
RD
1685 wxString GetDragText() { return m_dragText; }
1686 bool GetDragAllowMove() { return m_dragAllowMove; }
1687 wxDragResult GetDragResult() { return m_dragResult; }
9ce192d4
RD
1688
1689 bool GetShift() const;
1690 bool GetControl() const;
1691 bool GetAlt() const;
1692
1693 void CopyObject(wxObject& obj) const;
1694
f6bcfd97 1695#ifndef SWIG
9ce192d4 1696private:
f6bcfd97
BP
1697 DECLARE_DYNAMIC_CLASS(wxStyledTextEvent)
1698
9ce192d4
RD
1699 int m_position;
1700 int m_key;
1701 int m_modifiers;
1702
1703 int m_modificationType; // wxEVT_STC_MODIFIED
1704 wxString m_text;
1705 int m_length;
1706 int m_linesAdded;
1707 int m_line;
1708 int m_foldLevelNow;
1709 int m_foldLevelPrev;
1710
1711 int m_margin; // wxEVT_STC_MARGINCLICK
1712
1713 int m_message; // wxEVT_STC_MACRORECORD
1714 int m_wParam;
1715 int m_lParam;
65ec6247
RD
1716
1717 int m_listType;
1718 int m_x;
1719 int m_y;
a29a241f
RD
1720
1721 wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
1722 bool m_dragAllowMove; // wxEVT_STC_START_DRAG
1723
1724 wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
f6bcfd97 1725#endif
9ce192d4
RD
1726};
1727
d25f5fbb
RD
1728#ifndef SWIG
1729BEGIN_DECLARE_EVENT_TYPES()
65ec6247
RD
1730 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650)
1731 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED, 1651)
1732 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED, 1652)
1733 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED, 1653)
1734 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1654)
1735 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1655)
1736 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1656)
1737 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657)
1738 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1658)
1739 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 1659)
1740 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD, 1660)
1741 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK, 1661)
1742 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN, 1662)
1743 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED, 1663)
1744 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_PAINTED, 1664)
1745 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_USERLISTSELECTION, 1665)
1746 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_URIDROPPED, 1666)
1747 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLSTART, 1667)
1748 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLEND, 1668)
a29a241f
RD
1749 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669)
1750 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670)
1751 DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671)
d25f5fbb
RD
1752END_DECLARE_EVENT_TYPES()
1753#else
1754 enum {
1755 wxEVT_STC_CHANGE,
1756 wxEVT_STC_STYLENEEDED,
1757 wxEVT_STC_CHARADDED,
d25f5fbb
RD
1758 wxEVT_STC_SAVEPOINTREACHED,
1759 wxEVT_STC_SAVEPOINTLEFT,
1760 wxEVT_STC_ROMODIFYATTEMPT,
65ec6247 1761 wxEVT_STC_KEY,
d25f5fbb 1762 wxEVT_STC_DOUBLECLICK,
65ec6247 1763 wxEVT_STC_UPDATEUI,
d25f5fbb 1764 wxEVT_STC_MODIFIED,
d25f5fbb
RD
1765 wxEVT_STC_MACRORECORD,
1766 wxEVT_STC_MARGINCLICK,
1767 wxEVT_STC_NEEDSHOWN,
65ec6247
RD
1768 wxEVT_STC_POSCHANGED,
1769 wxEVT_STC_PAINTED,
1770 wxEVT_STC_USERLISTSELECTION,
1771 wxEVT_STC_URIDROPPED,
1772 wxEVT_STC_DWELLSTART,
1773 wxEVT_STC_DWELLEND,
a29a241f
RD
1774 wxEVT_STC_START_DRAG,
1775 wxEVT_STC_DRAG_OVER,
1776 wxEVT_STC_DO_DROP,
d25f5fbb
RD
1777 };
1778#endif
9ce192d4 1779
9ce192d4 1780
f6bcfd97
BP
1781
1782#ifndef SWIG
9ce192d4
RD
1783typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
1784
65ec6247
RD
1785#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1786#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1787#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1788#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1789#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1790#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1791#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1792#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1793#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1794#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1795#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1796#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1797#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1798#define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1799#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1800#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1801#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1802#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1803#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
a29a241f
RD
1804#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1805#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
1806#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
9ce192d4 1807
f6bcfd97 1808#endif
9ce192d4
RD
1809
1810//----------------------------------------------------------------------
1811//----------------------------------------------------------------------
1812#endif
1813
1814