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