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