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