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