]>
Commit | Line | Data |
---|---|---|
bfabd11a RD |
1 | ## First line may be used for shbang |
2 | ||
3 | ## This file defines the interface to Scintilla | |
4 | ||
5 | ## A line starting with ## is a pure comment and should be stripped by readers. | |
6 | ## A line starting with #!! is for future shbang use | |
7 | ## A line starting with # followed by a space is a documentation comment and refers | |
8 | ## to the next feature definition. | |
9 | ||
10 | ## Each feature is defined by a line starting with fun, get, set or val. | |
11 | ## cat -> start a category | |
12 | ## fun -> a function | |
13 | ## get -> a property get function | |
14 | ## get -> a property set function | |
15 | ## val -> definition of a constant | |
16 | ## All other feature names should be ignored. They may be defined in the future. | |
17 | ## A property may have a set function, a get function or both. Each will have | |
18 | ## "Get" or "Set" in their names and the corresponding name will have the obvious switch. | |
19 | ## A property may be subscripted, in which case the first parameter is the subscript. | |
20 | ## fun, get, and set features have a strict syntax: | |
21 | ## <featureType><ws><returnType><ws><name>[=<number](<param>,<param>) | |
22 | ## param is <paramType><ws><paramName>[=<value>] | |
23 | ## Additional white space is allowed between elements. | |
24 | ## Feature names that contain an underscore are defined by Windows, so in these | |
25 | ## cases, using the Windows definition is preferred where available. | |
26 | ||
27 | ## Types: | |
28 | ## void | |
29 | ## int | |
30 | ## bool -> integer, 1=true, 0=false | |
31 | ## position -> integer position in a document | |
32 | ## colour -> colour integer containing red, green and blue bytes. | |
33 | ## string -> pointer to const character | |
34 | ## stringresult -> pointer to character | |
35 | ## cells -> pointer to array of cells, each cell containing a style byte and character byte | |
36 | ## textrange -> complex structure | |
37 | ## findtext -> searchrange, text -> foundposition | |
38 | ## keymod -> integer containing key in low half and modifiers in high half | |
39 | ## countedstring | |
40 | ## formatrange | |
41 | ## point -> x,y | |
42 | ## Client code should ignore definitions containing types it does not understand, except | |
43 | ## for possibly #defining the constants | |
44 | ||
45 | cat Basics | |
46 | ||
47 | ################################################ | |
48 | ## From Scintilla.h | |
49 | val INVALID_POSITION=-1 | |
50 | val SCI_START=2000 | |
51 | val SCI_OPTIONAL_START=3000 | |
52 | val SCI_LEXER_START=4000 | |
53 | ||
54 | # Add text to the document | |
55 | fun void AddText=2001(int length, string text) | |
56 | ||
57 | # Add array of cells to document | |
58 | fun void AddStyledText=2002(int length, cells c) | |
59 | ||
60 | # Insert string at a position | |
61 | fun void InsertText=2003(position pos, string text) | |
62 | ||
63 | # Delete all text in the document | |
64 | fun void ClearAll=2004(,) | |
65 | ||
66 | # The number of characters in the document | |
67 | get int GetLength=2006(,) | |
68 | ||
69 | # Returns the character byte at the position | |
70 | get int GetCharAt=2007(position pos,) | |
71 | ||
72 | # Returns the position of the caret | |
73 | get position GetCurrentPos=2008(,) | |
74 | ||
75 | # Returns the position of the opposite end of the selection to the caret | |
76 | get position GetAnchor=2009(,) | |
77 | ||
78 | # Returns the style byte at the position | |
79 | get int GetStyleAt=2010(position pos,) | |
80 | ||
81 | # Redoes the next action on the undo history | |
82 | fun void Redo=2011(,) | |
83 | ||
84 | val SC_UNDOCOLLECT_NONE=0 | |
85 | val SC_UNDOCOLLECT_AUTOSTART=1 | |
86 | ||
87 | # Choose between collecting actions into the undo | |
88 | # history and discarding them. | |
89 | set void SetUndoCollection=2012(int collectUndo,) | |
90 | ||
91 | # Select all the text in the document. | |
92 | fun void SelectAll=2013(,) | |
93 | ||
94 | # Remember the current position in the undo history as the position | |
95 | # at which the document was saved. | |
96 | fun void SetSavePoint=2014(,) | |
97 | ||
98 | # Retrieve a buffer of cells. | |
99 | # Returns the number of bytes in the buffer not including terminating nulls. | |
100 | fun int GetStyledText=2015(, textrange tr) | |
101 | ||
102 | # Are there any redoable actions in the undo history. | |
103 | fun bool CanRedo=2016(,) | |
104 | ||
105 | # Retrieve the line number at which a particular marker is located | |
106 | fun int MarkerLineFromHandle=2017(int handle,) | |
107 | ||
108 | # Delete a marker. | |
109 | fun void MarkerDeleteHandle=2018(int handle,) | |
110 | ||
111 | # Are white space characters currently visible? | |
112 | get bool GetViewWS=2020(,) | |
113 | ||
114 | # Make white space characters visible or invisible. | |
115 | set void SetViewWS=2021(bool viewWS,) | |
116 | ||
117 | # Set caret to start of a line and ensure it is visible. | |
118 | fun void GotoLine=2024(int line,) | |
119 | ||
120 | # Set caret to a position and ensure it is visible. | |
121 | fun void GotoPos=2025(position pos,) | |
122 | ||
123 | # Set the selection anchor to a position. The anchor is the opposite | |
124 | # end of the selection from the caret. | |
125 | set void SetAnchor=2026(position posAnchor,) | |
126 | ||
127 | # Retrieve the text of the line containing the caret. | |
128 | # Returns the index of the caret on the line. | |
129 | fun int GetCurLine=2027(int length, stringresult text) | |
130 | ||
131 | # Retrieve the position of the last correctly styled character. | |
132 | get position GetEndStyled=2028(,) | |
133 | ||
134 | # Convert all line endings in the document to use the current mode. | |
135 | fun void ConvertEOLs=2029(,) | |
136 | ||
137 | val SC_EOL_CRLF=0 | |
138 | val SC_EOL_CR=1 | |
139 | val SC_EOL_LF=2 | |
140 | ||
141 | # Retrieve the current end of line mode - one of CRLF, CR, or LF. | |
142 | get int GetEOLMode=2030(,) | |
143 | ||
144 | # Set the current end of line mode. | |
145 | set void SetEOLMode=2031(int eolMode,) | |
146 | ||
147 | # Set the current styling position to pos and the styling mask to mask. | |
148 | # The styling mask can be used to protect some bits in each styling byte from | |
149 | # modification. | |
150 | fun void StartStyling=2032(position pos, int mask) | |
151 | ||
152 | # Change style from current styling position for length characters to a style | |
153 | # and move the current styling position to after this newly styled segment. | |
154 | fun void SetStyling=2033(int length, int style) | |
155 | ||
156 | # If drawing is buffered then each line of text is drawn into a bitmap buffer | |
157 | # before drawing it to the screen to avoid flicker. | |
158 | set void SetBufferedDraw=2035(bool buffered,) | |
159 | ||
160 | # Change the visible size of a tab to be a multiple of the width of a space | |
161 | # character. | |
162 | set void SetTabWidth=2036(int tabWidth,) | |
163 | ||
164 | # Retrieve the visible size of a tab. | |
165 | get int GetTabWidth=2121(,) | |
166 | ||
167 | val SC_CP_UTF8=65001 | |
168 | ||
169 | # Set the code page used to interpret the bytes of the document as characters. | |
170 | # The SC_CP_UTF8 value can be used to enter Unicode mode. | |
171 | set void SetCodePage=2037(int codePage,) | |
172 | ||
173 | # In palette mode, Scintilla uses the environments palette calls to display | |
174 | # more colours. This may lead to ugly displays. | |
175 | set void SetUsePalette=2039(bool usePalette,) | |
176 | ||
177 | val MARKER_MAX=31 | |
178 | val SC_MARK_CIRCLE=0 | |
179 | val SC_MARK_ROUNDRECT=1 | |
180 | val SC_MARK_ARROW=2 | |
181 | val SC_MARK_SMALLRECT=3 | |
182 | val SC_MARK_SHORTARROW=4 | |
183 | val SC_MARK_EMPTY=5 | |
184 | val SC_MARK_ARROWDOWN=6 | |
185 | val SC_MARK_MINUS=7 | |
186 | val SC_MARK_PLUS=8 | |
187 | ||
188 | val SC_MARKNUM_FOLDER=30 | |
189 | val SC_MARKNUM_FOLDEROPEN=31 | |
190 | ##val SC_MASK_FOLDERS=1<<SC_MARKNUM_FOLDER | 1<<SC_MARKNUM_FOLDEROPEN | |
191 | ||
192 | # Set the symbol used for a particular marker number. | |
193 | fun void MarkerDefine=2040(int markerNumber, int markerSymbol) | |
194 | ||
195 | # Set the foreground colour used for a particular marker number. | |
196 | fun void MarkerSetFore=2041(int markerNumber, colour fore) | |
197 | ||
198 | # Set the background colour used for a particular marker number. | |
199 | fun void MarkerSetBack=2042(int markerNumber, colour back) | |
200 | ||
201 | # Add a marker to a line. | |
202 | fun void MarkerAdd=2043(int line, int markerNumber) | |
203 | ||
204 | # Delete a marker from a line | |
205 | fun void MarkerDelete=2044(int line, int markerNumber) | |
206 | ||
207 | # Delete all markers with a particular number from all lines | |
208 | fun void MarkerDeleteAll=2045(int markerNumber,) | |
209 | ||
210 | # Get a bit mask of all the markers set on a line. | |
211 | fun int MarkerGet=2046(int line,) | |
212 | ||
213 | # Find the next line after lineStart that includes a marker in mask. | |
214 | fun int MarkerNext=2047(int lineStart, int markerMask) | |
215 | ||
216 | # Find the previous line before lineStart that includes a marker in mask. | |
217 | fun int MarkerPrevious=2048(int lineStart, int markerMask) | |
218 | ||
219 | val SC_MARGIN_SYMBOL=0 | |
220 | val SC_MARGIN_NUMBER=1 | |
221 | ||
222 | # Set a margin to be either numeric or symbolic. | |
223 | set void SetMarginTypeN=2240(int margin, int marginType) | |
224 | ||
225 | # Retrieve the type of a margin. | |
226 | get int GetMarginTypeN=2241(int margin,) | |
227 | ||
228 | # Set the width of a margin to a width expressed in pixels. | |
229 | set void SetMarginWidthN=2242(int margin, int pixelWidth) | |
230 | ||
231 | # Retrieve the width of a margin in pixels. | |
232 | get int GetMarginWidthN=2243(int margin,) | |
233 | ||
234 | # Set a mask that determines which markers are displayed in a margin. | |
235 | set void SetMarginMaskN=2244(int margin, int mask) | |
236 | ||
237 | # Retrieve the marker mask of a margin. | |
238 | get int GetMarginMaskN=2245(int margin,) | |
239 | ||
240 | # Make a margin sensitive or insensitive to mouse clicks. | |
241 | set void SetMarginSensitiveN=2246(int margin, bool sensitive) | |
242 | ||
243 | # Retrieve the mouse click sensitivity of a margin. | |
244 | get bool GetMarginSensitiveN=2247(int margin,) | |
245 | ||
246 | val STYLE_DEFAULT=32 | |
247 | val STYLE_LINENUMBER=33 | |
248 | val STYLE_BRACELIGHT=34 | |
249 | val STYLE_BRACEBAD=35 | |
250 | val STYLE_CONTROLCHAR=36 | |
251 | val STYLE_MAX=127 | |
252 | ||
253 | # Clear all the styles and make equivalent to the global default style. | |
254 | set void StyleClearAll=2050(,) | |
255 | ||
256 | # Set the foreground colour of a style. | |
257 | set void StyleSetFore=2051(int style, colour fore) | |
258 | ||
259 | # Set the background colour of a style. | |
260 | set void StyleSetBack=2052(int style, colour back) | |
261 | ||
262 | # Set a style to be bold or not. | |
263 | set void StyleSetBold=2053(int style, bool bold) | |
264 | ||
265 | # Set a style to be italic or not. | |
266 | set void StyleSetItalic=2054(int style, bool italic) | |
267 | ||
268 | # Set the size of characters of a style. | |
269 | set void StyleSetSize=2055(int style, int sizePoints) | |
270 | ||
271 | # Set the font of a style. | |
272 | set void StyleSetFont=2056(int style, string fontName) | |
273 | ||
274 | # Set a style to have its end of line filled or not. | |
275 | set void StyleSetEOLFilled=2057(int style, bool filled) | |
276 | ||
277 | # Reset the default style to its state at startup | |
278 | fun void StyleResetDefault=2058(,) | |
279 | ||
280 | # Set a style to be underlined or not. | |
281 | set void StyleSetUnderline=2059(int style, bool underline) | |
282 | ||
283 | # Set the character set of the font in a style. | |
284 | set void StyleSetCharacterSet=2066(int style, int characterSet) | |
285 | ||
286 | # Set the foreground colour of the selection and whether to use this setting. | |
287 | fun void SetSelFore=2067(bool useSetting, colour fore) | |
288 | ||
289 | # Set the background colour of the selection and whether to use this setting. | |
290 | fun void SetSelBack=2068(bool useSetting, colour back) | |
291 | ||
292 | # Set the foreground colour of the caret. | |
293 | fun void SetCaretFore=2069(colour fore,) | |
294 | ||
295 | # When key+modifier combination km is pressed perform msg. | |
296 | fun void AssignCmdKey=2070(keymod km, int msg) | |
297 | ||
298 | # When key+modifier combination km do nothing. | |
299 | fun void ClearCmdKey=2071(keymod km,) | |
300 | ||
301 | # Drop all key mappings. | |
302 | fun void ClearAllCmdKeys=2072(,) | |
303 | ||
304 | # Set the styles for a segment of the document. | |
305 | fun void SetStylingEx=2073(int length, string styles) | |
306 | ||
307 | # Get the time in milliseconds that the caret is on and off. | |
308 | get int GetCaretPeriod=2075(,) | |
309 | ||
310 | # Get the time in milliseconds that the caret is on and off. 0 = steady on. | |
311 | set void SetCaretPeriod=2076(int periodMilliseconds,) | |
312 | ||
313 | # Set the set of characters making up words for when moving or selecting | |
314 | # by word. | |
315 | set void SetWordChars=2077(, string characters) | |
316 | ||
317 | # Start a sequence of actions that is undone and redone as a unit. | |
318 | # May be nested. | |
319 | fun void BeginUndoAction=2078(,) | |
320 | ||
321 | # End a sequence of actions that is undone and redone as a unit. | |
322 | fun void EndUndoAction=2079(,) | |
323 | ||
324 | val INDIC_MAX=7 | |
325 | val INDIC_PLAIN=0 | |
326 | val INDIC_SQUIGGLE=1 | |
327 | val INDIC_TT=2 | |
328 | val INDIC_DIAGONAL=3 | |
329 | val INDIC_STRIKE=4 | |
330 | val INDIC0_MASK=32 | |
331 | val INDIC1_MASK=64 | |
332 | val INDIC2_MASK=128 | |
333 | val INDICS_MASK=INDIC0_MASK | INDIC1_MASK | INDIC2_MASK | |
334 | ||
335 | # Set an indicator to plain, squiggle or TT. | |
336 | set void IndicSetStyle=2080(int indic, int style) | |
337 | ||
338 | # Retrieve the style of an indicator. | |
339 | get int IndicGetStyle=2081(int indic,) | |
340 | ||
341 | # Set the foreground colour of an indicator. | |
342 | set void IndicSetFore=2082(int indic, colour fore) | |
343 | ||
344 | # Retrieve the foreground colour of an indicator. | |
345 | get colour IndicGetFore=2083(int indic,) | |
346 | ||
347 | # Divide each styling byte into lexical class bits (default:5) and indicator | |
348 | # bits (default:3). If a lexer requires more than 32 lexical states, then this | |
349 | # is used to expand the possible states. | |
350 | set void SetStyleBits=2090(int bits,) | |
351 | ||
352 | # Retrieve number of bits in style bytes used to hold the lexical state. | |
353 | get int GetStyleBits=2091(,) | |
354 | ||
355 | # Used to hold extra styling information for each line. | |
356 | set void SetLineState=2092(int line, int state) | |
357 | ||
358 | # Retrieve the extra styling information for a line. | |
359 | get int GetLineState=2093(int line,) | |
360 | ||
361 | # Retrieve the last line number that has line state. | |
362 | get int GetMaxLineState=2094(,) | |
363 | ||
364 | # Display a auto-completion list. | |
365 | # The lenEntered parameter indicates how many characters before | |
366 | # the caret should be used to provide context. | |
367 | fun void AutoCShow=2100(int lenEntered, string itemList) | |
368 | ||
369 | # Remove the auto-completion list from the screen. | |
370 | fun void AutoCCancel=2101(,) | |
371 | ||
372 | # Is there an auto-completion list visible? | |
373 | fun bool AutoCActive=2102(,) | |
374 | ||
375 | # Retrieve the position of the caret when the auto-completion list was | |
376 | # displayed. | |
377 | fun position AutoCPosStart=2103(,) | |
378 | ||
379 | # User has selected an item so remove the list and insert the selection. | |
380 | fun void AutoCComplete=2104(,) | |
381 | ||
382 | # Define a set of character that when typed cancel the auto-completion list. | |
383 | fun void AutoCStops=2105(, string characterSet) | |
384 | ||
385 | # Change the separator character in the string setting up an auto-completion | |
386 | # list. Default is space but can be changed if items contain space. | |
387 | set void AutoCSetSeparator=2106(int separatorCharacter,) | |
388 | ||
389 | # Retrieve the auto-completion list separator character. | |
390 | get int AutoCGetSeparator=2107(,) | |
391 | ||
392 | # Select the item in the auto-completion list that starts with a string. | |
393 | fun void AutoCSelect=2108(, string text) | |
394 | ||
395 | # Set the number of spaces used for one level of indentation. | |
396 | set void SetIndent=2122(int indentSize,) | |
397 | ||
398 | # Retrieve indentation size. | |
399 | get int GetIndent=2123(,) | |
400 | ||
401 | # Indentation will only use space characters if useTabs is false, otherwise | |
402 | # it will use a combination of tabs and spaces. | |
403 | set void SetUseTabs=2124(bool useTabs,) | |
404 | ||
405 | # Retrieve whether tabs will be used in indentation. | |
406 | get bool GetUseTabs=2125(,) | |
407 | ||
408 | # Change the indentation of a line to a number of columns. | |
409 | set void SetLineIndentation=2126(int line, int indentSize) | |
410 | ||
411 | # Retrieve the number of columns that a line is indented. | |
412 | get int GetLineIndentation=2127(int line,) | |
413 | ||
414 | # Retrieve the position before the first non indentation character on a line. | |
415 | get position GetLineIndentPosition=2128(int line,) | |
416 | ||
417 | # Show or hide the horizontal scroll bar | |
418 | set void SetHScrollBar=2130(bool show,) | |
419 | ||
420 | # Is the horizontal scroll bar visible. | |
421 | get bool GetHScrollBar=2131(,) | |
422 | ||
423 | # Show a call tip containing a definition near position pos. | |
424 | fun void CallTipShow=2200(position pos, string definition) | |
425 | ||
426 | # Remove the call tip from the screen. | |
427 | fun void CallTipCancel=2201(,) | |
428 | ||
429 | # Is there an active call tip? | |
430 | fun bool CallTipActive=2202(,) | |
431 | ||
432 | # Retrieve the position where the caret was before displaying the call tip. | |
433 | fun position CallTipPosStart=2203(,) | |
434 | ||
435 | # Highlight a segment of the definition. | |
436 | fun void CallTipSetHlt=2204(int start, int end) | |
437 | ||
438 | # Set the background colour for the call tip. | |
439 | set void CallTipSetBack=2205(colour back,) | |
440 | ||
441 | # Find the display line of a document line taking hidden lines into account. | |
442 | fun int VisibleFromDocLine=2220(int line,) | |
443 | ||
444 | # Find the document line of a display line taking hidden lines into account. | |
445 | fun int DocLineFromVisible=2221(int lineDisplay,) | |
446 | ||
447 | val SC_FOLDLEVELBASE=0x400 | |
448 | val SC_FOLDLEVELWHITEFLAG=0x1000 | |
449 | val SC_FOLDLEVELHEADERFLAG=0x2000 | |
450 | val SC_FOLDLEVELNUMBERMASK=0x0FFF | |
451 | ||
452 | # Set the fold level of a line. | |
453 | # This encodes an integer level along with flags indicating whether the | |
454 | # line is a header and whether it is effectively white space. | |
455 | set void SetFoldLevel=2222(int line, int level) | |
456 | ||
457 | # Retrieve the fold level of a line. | |
458 | get int GetFoldLevel=2223(int line,) | |
459 | ||
460 | # Find the last child line of a header line. | |
461 | get int GetLastChild=2224(int line,) | |
462 | ||
463 | # Find the parent line of a child line. | |
464 | get int GetFoldParent=2225(int line,) | |
465 | ||
466 | # Make a range of lines visible. | |
467 | fun void ShowLines=2226(int lineStart, int lineEnd) | |
468 | ||
469 | # Make a range of lines invisible. | |
470 | fun void HideLines=2227(int lineStart, int lineEnd) | |
471 | ||
472 | # Is a line visible? | |
473 | get bool GetLineVisible=2228(int line,) | |
474 | ||
475 | # Show the children of a header line. | |
476 | set void SetFoldExpanded=2229(int line, bool expanded) | |
477 | ||
478 | # Is a header line expanded? | |
479 | get bool GetFoldExpanded=2230(int line,) | |
480 | ||
481 | # Switch a header line between expanded and contracted. | |
482 | fun void ToggleFold=2231(int line,) | |
483 | ||
484 | # Ensure a particular line is visible by expanding any header line hiding it. | |
485 | fun void EnsureVisible=2232(int line,) | |
486 | ||
487 | # Set some debugging options for folding | |
488 | fun void SetFoldFlags=2233(int flags,) | |
489 | ||
490 | # Move caret down one line. | |
491 | fun void LineDown=2300(,) | |
492 | ||
493 | # Move caret down one line extending selection to new caret position. | |
494 | fun void LineDownExtend=2301(,) | |
495 | ||
496 | # Move caret up one line. | |
497 | fun void LineUp=2302(,) | |
498 | ||
499 | # Move caret up one line extending selection to new caret position. | |
500 | fun void LineUpExtend=2303(,) | |
501 | ||
502 | # Move caret left one character. | |
503 | fun void CharLeft=2304(,) | |
504 | ||
505 | # Move caret left one character extending selection to new caret position. | |
506 | fun void CharLeftExtend=2305(,) | |
507 | ||
508 | # Move caret right one character. | |
509 | fun void CharRight=2306(,) | |
510 | ||
511 | # Move caret right one character extending selection to new caret position. | |
512 | fun void CharRightExtend=2307(,) | |
513 | ||
514 | # Move caret left one word. | |
515 | fun void WordLeft=2308(,) | |
516 | ||
517 | # Move caret left one word extending selection to new caret position. | |
518 | fun void WordLeftExtend=2309(,) | |
519 | ||
520 | # Move caret right one word. | |
521 | fun void WordRight=2310(,) | |
522 | ||
523 | # Move caret right one word extending selection to new caret position. | |
524 | fun void WordRightExtend=2311(,) | |
525 | ||
526 | # Move caret to first position on line. | |
527 | fun void Home=2312(,) | |
528 | ||
529 | # Move caret to first position on line extending selection to new caret position. | |
530 | fun void HomeExtend=2313(,) | |
531 | ||
532 | # Move caret to last position on line. | |
533 | fun void LineEnd=2314(,) | |
534 | ||
535 | # Move caret to last position on line extending selection to new caret position. | |
536 | fun void LineEndExtend=2315(,) | |
537 | ||
538 | # Move caret to first position in document. | |
539 | fun void DocumentStart=2316(,) | |
540 | ||
541 | # Move caret to first position in document extending selection to new caret position. | |
542 | fun void DocumentStartExtend=2317(,) | |
543 | ||
544 | # Move caret to last position in document. | |
545 | fun void DocumentEnd=2318(,) | |
546 | ||
547 | # Move caret to last position in document extending selection to new caret position. | |
548 | fun void DocumentEndExtend=2319(,) | |
549 | ||
550 | # Move caret one page up. | |
551 | fun void PageUp=2320(,) | |
552 | ||
553 | # Move caret one page up extending selection to new caret position. | |
554 | fun void PageUpExtend=2321(,) | |
555 | ||
556 | # Move caret one page down. | |
557 | fun void PageDown=2322(,) | |
558 | ||
559 | # Move caret one page down extending selection to new caret position. | |
560 | fun void PageDownExtend=2323(,) | |
561 | ||
562 | # Switch from insert to overtype mode or the reverse. | |
563 | fun void EditToggleOvertype=2324(,) | |
564 | ||
565 | # Cancel any modes such as call tip or auto-completion list display. | |
566 | fun void Cancel=2325(,) | |
567 | ||
568 | # Delete the selection or if no selection, the character before the caret. | |
569 | fun void DeleteBack=2326(,) | |
570 | ||
571 | # If selection is empty or all on one line replace the selection with a tab | |
572 | # character. | |
573 | # If more than one line selected, indent the lines. | |
574 | fun void Tab=2327(,) | |
575 | ||
576 | # Dedent the selected lines. | |
577 | fun void BackTab=2328(,) | |
578 | ||
579 | # Insert a new line, may use a CRLF, CR or LF depending on EOL mode. | |
580 | fun void NewLine=2329(,) | |
581 | ||
582 | # Insert a Form Feed character. | |
583 | fun void FormFeed=2330(,) | |
584 | ||
585 | # Move caret to before first visible character on line. | |
586 | # If already there move to first character on line. | |
587 | fun void VCHome=2331(,) | |
588 | ||
589 | # Like VCHome but extending selection to new caret position. | |
590 | fun void VCHomeExtend=2332(,) | |
591 | ||
592 | # Magnify the displayed text by increasing the sizes by 1 point. | |
593 | fun void ZoomIn=2333(,) | |
594 | ||
595 | # Make the displayed text smaller by decreasing the sizes by 1 point. | |
596 | fun void ZoomOut=2334(,) | |
597 | ||
598 | # Delete the word to the left of the caret. | |
599 | fun void DelWordLeft=2335(,) | |
600 | ||
601 | # Delete the word to the right of the caret. | |
602 | fun void DelWordRight=2336(,) | |
603 | ||
604 | # Cut the line containing the caret. | |
605 | fun void LineCut=2337(,) | |
606 | ||
607 | # Delete the line containing the caret. | |
608 | fun void LineDelete=2338(,) | |
609 | ||
610 | # Switch the current line with the previous. | |
611 | fun void LineTranspose=2339(,) | |
612 | ||
613 | # Transform the selection to lower case. | |
614 | fun void LowerCase=2340(,) | |
615 | ||
616 | # Transform the selection to upper case. | |
617 | fun void UpperCase=2341(,) | |
618 | ||
619 | # Scroll the document down, keeping the caret visible. | |
620 | fun void LineScrollDown=2342(,) | |
621 | ||
622 | # Scroll the document up, keeping the caret visible. | |
623 | fun void LineScrollUp=2343(,) | |
624 | ||
625 | # How many characters are on a line, not including end of line characters. | |
626 | fun int LineLength=2350(int line,) | |
627 | ||
628 | # Highlight the characters at two positions. | |
629 | fun void BraceHighlight=2351(position pos1,position pos2) | |
630 | ||
631 | # Highlight the character at a position indicating there is no matching brace. | |
632 | fun void BraceBadLight=2352(position pos,) | |
633 | ||
634 | # Find the position of a matching brace or INVALID_POSITION if no match. | |
635 | fun position BraceMatch=2353(position pos,) | |
636 | ||
637 | # Are the end of line characters visible. | |
638 | get bool GetViewEOL=2355(,) | |
639 | ||
640 | # Make the end of line characters visible or invisible | |
641 | set void SetViewEOL=2356(bool visible,) | |
642 | ||
643 | # Retrieve a pointer to the document object. | |
644 | get int GetDocPointer=2357(,) | |
645 | ||
646 | # Change the document object used. | |
647 | set void SetDocPointer=2358(int pointer,) | |
648 | ||
649 | # Set which document modification events are sent to the container. | |
650 | set void SetModEventMask=2359(int mask,) | |
651 | ||
652 | val EDGE_NONE=0 | |
653 | val EDGE_LINE=1 | |
654 | val EDGE_BACKGROUND=2 | |
655 | ||
656 | # Retrieve the column number which text should be kept within. | |
657 | get int GetEdgeColumn=2360(,) | |
658 | ||
659 | # Set the column number of the edge. | |
660 | # If text goes past the edge then it is highlighted. | |
661 | set void SetEdgeColumn=2361(int column,) | |
662 | ||
663 | # Retrieve the edge highlight mode. | |
664 | get int GetEdgeMode=2362(,) | |
665 | ||
666 | # The edge may be displayed by a line (EDGE_LINE) or by highlighting text that | |
667 | # goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). | |
668 | set void SetEdgeMode=2363(int mode,) | |
669 | ||
670 | # Retrieve the colour used in edge indication. | |
671 | get colour GetEdgeColour=2364(,) | |
672 | ||
673 | # Change the colour used in edge indication. | |
674 | set void SetEdgeColour=2365(colour edgeColour,) | |
675 | ||
676 | # Sets the current caret position to be the search anchor. | |
677 | fun void SearchAnchor=2366(,) | |
678 | ||
679 | # Find some text starting at the search anchor. | |
680 | fun int SearchNext=2367(int flags, string text) | |
681 | ||
682 | # Find some text starting at the search anchor and moving backwards. | |
683 | fun int SearchPrev=2368(int flags, string text) | |
684 | ||
685 | val CARET_SLOP=0x01 | |
686 | val CARET_CENTER=0x02 | |
687 | val CARET_STRICT=0x04 | |
688 | # Set the way the line the caret is on is kept visible. | |
689 | fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop) | |
690 | ||
691 | # Retrieves the number of lines completely visible. | |
692 | get int LinesOnScreen=2370(,) | |
693 | ||
694 | # Set whether a pop up menu is displayed automatically when the user presses | |
695 | # the wrong mouse button. | |
696 | fun void UsePopUp=2371(bool allowPopUp,) | |
697 | ||
698 | # Is the selection a rectangular. The alternative is the more common stream selection. | |
699 | get bool SelectionIsRectangle=2372(,) | |
700 | ||
701 | # Set the zoom level. This number of points is added to the size of all fonts. | |
702 | # It may be positive to magnify or negative to reduce. | |
703 | set void SetZoom=2373(int zoom,) | |
704 | # Retrieve the zoom level. | |
705 | get int GetZoom=2374(,) | |
706 | ||
707 | # Extend life of document. | |
708 | fun void AddRefDoc=2375(, int doc) | |
709 | # Release a reference to the document, deleting document if it fades to black. | |
710 | fun void ReleaseDoc=2376(, int doc) | |
711 | ||
712 | # Set the focus to this Scintilla widget. | |
713 | fun void GrabFocus=2400(,) | |
714 | ||
715 | # Start notifying the container of all key presses and commands. | |
716 | fun void StartRecord=3001(,) | |
717 | ||
718 | # Stop notifying the container of all key presses and commands. | |
719 | fun void StopRecord=3002(,) | |
720 | ||
721 | # Set the lexing language of the document. | |
722 | set void SetLexer=4001(int lexer,) | |
723 | ||
724 | # Retrieve the lexing language of the document. | |
725 | get int GetLexer=4002(,) | |
726 | ||
727 | # Colourise a segment of the document using the current lexing language. | |
728 | fun void Colourise=4003(position start, position end) | |
729 | ||
730 | # Set up a value that may be used by a lexer for some optional feature. | |
731 | set void SetProperty=4004(string key, string value) | |
732 | ||
733 | # Set up the key words used by the lexer. | |
734 | set void SetKeyWords=4005(int keywordSet, string keyWords) | |
735 | ||
736 | val SC_MOD_INSERTTEXT=0x1 | |
737 | val SC_MOD_DELETETEXT=0x2 | |
738 | val SC_MOD_CHANGESTYLE=0x4 | |
739 | val SC_MOD_CHANGEFOLD=0x8 | |
740 | val SC_PERFORMED_USER=0x10 | |
741 | val SC_PERFORMED_UNDO=0x20 | |
742 | val SC_PERFORMED_REDO=0x40 | |
743 | val SC_LASTSTEPINUNDOREDO=0x100 | |
744 | val SC_MOD_CHANGEMARKER=0x200 | |
745 | val SC_MOD_BEFOREINSERT=0x400 | |
746 | val SC_MOD_BEFOREDELETE=0x800 | |
747 | val SC_MODEVENTMASKALL=0xF77 | |
748 | val SCN_STYLENEEDED=2000 | |
749 | val SCN_CHARADDED=2001 | |
750 | val SCN_SAVEPOINTREACHED=2002 | |
751 | val SCN_SAVEPOINTLEFT=2003 | |
752 | val SCN_MODIFYATTEMPTRO=2004 | |
753 | val SCN_KEY=2005 | |
754 | val SCN_DOUBLECLICK=2006 | |
755 | val SCN_UPDATEUI=2007 | |
756 | val SCN_CHECKBRACE=2007 | |
757 | val SCN_MODIFIED=2008 | |
758 | val SCN_MACRORECORD=2009 | |
759 | val SCN_MARGINCLICK=2010 | |
760 | val SCN_NEEDSHOWN=2011 | |
761 | ||
762 | ################################################ | |
763 | # From SciLexer.h | |
764 | val SCLEX_CONTAINER=0 | |
765 | val SCLEX_NULL=1 | |
766 | val SCLEX_PYTHON=2 | |
767 | val SCLEX_CPP=3 | |
768 | val SCLEX_HTML=4 | |
769 | val SCLEX_XML=5 | |
770 | val SCLEX_PERL=6 | |
771 | val SCLEX_SQL=7 | |
772 | val SCLEX_VB=8 | |
773 | val SCLEX_PROPERTIES=9 | |
774 | val SCLEX_ERRORLIST=10 | |
775 | val SCLEX_MAKEFILE=11 | |
776 | val SCLEX_BATCH=12 | |
777 | val SCLEX_XCODE=13 | |
778 | val SCLEX_LATEX=14 | |
779 | val SCE_P_DEFAULT=0 | |
780 | val SCE_P_COMMENTLINE=1 | |
781 | val SCE_P_NUMBER=2 | |
782 | val SCE_P_STRING=3 | |
783 | val SCE_P_CHARACTER=4 | |
784 | val SCE_P_WORD=5 | |
785 | val SCE_P_TRIPLE=6 | |
786 | val SCE_P_TRIPLEDOUBLE=7 | |
787 | val SCE_P_CLASSNAME=8 | |
788 | val SCE_P_DEFNAME=9 | |
789 | val SCE_P_OPERATOR=10 | |
790 | val SCE_P_IDENTIFIER=11 | |
791 | val SCE_P_COMMENTBLOCK=12 | |
792 | val SCE_P_STRINGEOL=13 | |
793 | val SCE_C_DEFAULT=0 | |
794 | val SCE_C_COMMENT=1 | |
795 | val SCE_C_COMMENTLINE=2 | |
796 | val SCE_C_COMMENTDOC=3 | |
797 | val SCE_C_NUMBER=4 | |
798 | val SCE_C_WORD=5 | |
799 | val SCE_C_STRING=6 | |
800 | val SCE_C_CHARACTER=7 | |
801 | val SCE_C_UUID=8 | |
802 | val SCE_C_PREPROCESSOR=9 | |
803 | val SCE_C_OPERATOR=10 | |
804 | val SCE_C_IDENTIFIER=11 | |
805 | val SCE_C_STRINGEOL=12 | |
806 | val SCE_H_DEFAULT=0 | |
807 | val SCE_H_TAG=1 | |
808 | val SCE_H_TAGUNKNOWN=2 | |
809 | val SCE_H_ATTRIBUTE=3 | |
810 | val SCE_H_ATTRIBUTEUNKNOWN=4 | |
811 | val SCE_H_NUMBER=5 | |
812 | val SCE_H_DOUBLESTRING=6 | |
813 | val SCE_H_SINGLESTRING=7 | |
814 | val SCE_H_OTHER=8 | |
815 | val SCE_H_COMMENT=9 | |
816 | val SCE_H_ENTITY=10 | |
817 | val SCE_H_TAGEND=11 | |
818 | val SCE_H_XMLSTART=12 | |
819 | val SCE_H_XMLEND=13 | |
820 | val SCE_H_SCRIPT=14 | |
821 | val SCE_H_ASP=15 | |
822 | val SCE_H_ASPAT=16 | |
823 | val SCE_HJ_START=40 | |
824 | val SCE_HJ_DEFAULT=41 | |
825 | val SCE_HJ_COMMENT=42 | |
826 | val SCE_HJ_COMMENTLINE=43 | |
827 | val SCE_HJ_COMMENTDOC=44 | |
828 | val SCE_HJ_NUMBER=45 | |
829 | val SCE_HJ_WORD=46 | |
830 | val SCE_HJ_KEYWORD=47 | |
831 | val SCE_HJ_DOUBLESTRING=48 | |
832 | val SCE_HJ_SINGLESTRING=49 | |
833 | val SCE_HJ_SYMBOLS=50 | |
834 | val SCE_HJ_STRINGEOL=51 | |
835 | val SCE_HJA_START=55 | |
836 | val SCE_HJA_DEFAULT=56 | |
837 | val SCE_HJA_COMMENT=57 | |
838 | val SCE_HJA_COMMENTLINE=58 | |
839 | val SCE_HJA_COMMENTDOC=59 | |
840 | val SCE_HJA_NUMBER=60 | |
841 | val SCE_HJA_WORD=61 | |
842 | val SCE_HJA_KEYWORD=62 | |
843 | val SCE_HJA_DOUBLESTRING=63 | |
844 | val SCE_HJA_SINGLESTRING=64 | |
845 | val SCE_HJA_SYMBOLS=65 | |
846 | val SCE_HJA_STRINGEOL=66 | |
847 | val SCE_HB_START=70 | |
848 | val SCE_HB_DEFAULT=71 | |
849 | val SCE_HB_COMMENTLINE=72 | |
850 | val SCE_HB_NUMBER=73 | |
851 | val SCE_HB_WORD=74 | |
852 | val SCE_HB_STRING=75 | |
853 | val SCE_HB_IDENTIFIER=76 | |
854 | val SCE_HB_STRINGEOL=77 | |
855 | val SCE_HBA_START=80 | |
856 | val SCE_HBA_DEFAULT=81 | |
857 | val SCE_HBA_COMMENTLINE=82 | |
858 | val SCE_HBA_NUMBER=83 | |
859 | val SCE_HBA_WORD=84 | |
860 | val SCE_HBA_STRING=85 | |
861 | val SCE_HBA_IDENTIFIER=86 | |
862 | val SCE_HBA_STRINGEOL=87 | |
863 | val SCE_HP_START=90 | |
864 | val SCE_HP_DEFAULT=91 | |
865 | val SCE_HP_COMMENTLINE=92 | |
866 | val SCE_HP_NUMBER=93 | |
867 | val SCE_HP_STRING=94 | |
868 | val SCE_HP_CHARACTER=95 | |
869 | val SCE_HP_WORD=96 | |
870 | val SCE_HP_TRIPLE=97 | |
871 | val SCE_HP_TRIPLEDOUBLE=98 | |
872 | val SCE_HP_CLASSNAME=99 | |
873 | val SCE_HP_DEFNAME=100 | |
874 | val SCE_HP_OPERATOR=101 | |
875 | val SCE_HP_IDENTIFIER=102 | |
876 | val SCE_HPA_START=105 | |
877 | val SCE_HPA_DEFAULT=106 | |
878 | val SCE_HPA_COMMENTLINE=107 | |
879 | val SCE_HPA_NUMBER=108 | |
880 | val SCE_HPA_STRING=109 | |
881 | val SCE_HPA_CHARACTER=110 | |
882 | val SCE_HPA_WORD=111 | |
883 | val SCE_HPA_TRIPLE=112 | |
884 | val SCE_HPA_TRIPLEDOUBLE=113 | |
885 | val SCE_HPA_CLASSNAME=114 | |
886 | val SCE_HPA_DEFNAME=115 | |
887 | val SCE_HPA_OPERATOR=116 | |
888 | val SCE_HPA_IDENTIFIER=117 | |
889 | val SCE_PL_DEFAULT=0 | |
890 | val SCE_PL_HERE=1 | |
891 | val SCE_PL_COMMENTLINE=2 | |
892 | val SCE_PL_POD=3 | |
893 | val SCE_PL_NUMBER=4 | |
894 | val SCE_PL_WORD=5 | |
895 | val SCE_PL_STRING=6 | |
896 | val SCE_PL_CHARACTER=7 | |
897 | val SCE_PL_PUNCTUATION=8 | |
898 | val SCE_PL_PREPROCESSOR=9 | |
899 | val SCE_PL_OPERATOR=10 | |
900 | val SCE_PL_IDENTIFIER=11 | |
901 | val SCE_PL_SCALAR=12 | |
902 | val SCE_PL_ARRAY=13 | |
903 | val SCE_PL_HASH=14 | |
904 | val SCE_PL_SYMBOLTABLE=15 | |
905 | val SCE_PL_REF=16 | |
906 | val SCE_PL_REGEX=17 | |
907 | val SCE_PL_REGSUBST=18 | |
908 | val SCE_PL_LONGQUOTE=19 | |
909 | val SCE_PL_BACKTICKS=20 | |
910 | val SCE_PL_DATASECTION=21 | |
911 | val SCE_L_DEFAULT=0 | |
912 | val SCE_L_COMMAND=1 | |
913 | val SCE_L_TAG=2 | |
914 | val SCE_L_MATH=3 | |
915 | val SCE_L_COMMENT=4 | |
916 | ||
917 | ################################################ | |
918 | # From WinDefs.h | |
919 | ||
920 | # Will a paste succeed? | |
921 | fun bool EM_CanPaste=1074(,) | |
922 | ||
923 | # Are there any undoable actions in the undo history. | |
924 | fun bool EM_CanUndo=198(,) | |
925 | ||
926 | # Find the position and line from a point within the window. | |
927 | fun int EM_CharFromPos=215(,point pt) | |
928 | ||
929 | # Delete the undo history. | |
930 | fun void EM_EmptyUndoBuffer=205(,) | |
931 | ||
932 | # Retrieve the selection range. | |
933 | fun void EM_ExGetSel=1076(,charrange cr) | |
934 | ||
935 | # Retrieve the line number of a position in the document. | |
936 | get int EM_ExLineFromChar=1078(,position pos) | |
937 | ||
938 | # Select a range of text. | |
939 | fun void EM_ExSetSel=1079(,charrange cr) | |
940 | ||
941 | # Find some text in the document. | |
942 | fun position EM_FindText=1080(int flags, findtext ft) | |
943 | ||
944 | # Find some text in the document. Returns range of found text in ft argument. | |
945 | fun position EM_FindTextEx=1103(int flags, findtext ft) | |
946 | ||
947 | # On Windows will draw the document into a display context such as a printer. | |
948 | fun void EM_FormatRange=1081(bool draw, formatrange fr) | |
949 | ||
950 | # Retrieve the line at the top of the display. | |
951 | get int EM_GetFirstVisibleLine=206(,) | |
952 | ||
953 | # Retrieve the contents of a line. | |
954 | # Returns the length of the line. | |
955 | fun int EM_GetLine=196(int line, countedstring text) | |
956 | ||
957 | # Returns the number of lines in the document. There is always at least one. | |
958 | fun int EM_GetLineCount=186(,) | |
959 | ||
960 | # Returns the size in pixels of left and right margins packed into one integer. | |
961 | # The left margin is in the low half and the right margin in the high half. | |
962 | fun int EM_GetMargins=212(,) | |
963 | ||
964 | # Is the document different from when it was last saved? | |
965 | get bool EM_GetModify=184(,) | |
966 | ||
967 | # Get the area used to display the document. | |
968 | fun void EM_GetRect=178(,rectangle r) | |
969 | ||
970 | # Return the selection packed into one integer with the start of the selection | |
971 | # in the low half and the end in the high half. | |
972 | fun int EM_GetSel=176(,) | |
973 | ||
974 | # Retrieve the selected text. | |
975 | # Return the length of the text. | |
976 | fun int EM_GetSelText=1086(,stringresult text) | |
977 | ||
978 | # Retrieve a range of text. | |
979 | # Return the length of the text. | |
980 | fun int EM_GetTextRange=1099(, textrange tr) | |
981 | ||
982 | # Draw the selection in normal style or with selection highlighted. | |
983 | fun void EM_HideSelection=1087(bool normal,) | |
984 | ||
985 | # Retrieve the line of a position. | |
986 | fun int EM_LineFromChar=201(position pos,) | |
987 | ||
988 | # Retrieve the position at the start of a line. | |
989 | fun position EM_LineIndex=187(int line,) | |
990 | ||
991 | # Retrieve the number of characters on a line not including end of line characters. | |
992 | fun int EM_LineLength=193(int line,) | |
993 | ||
994 | # Scroll horizontally and vertically. | |
995 | fun void EM_LineScroll=182(int columns, int lines) | |
996 | ||
997 | # Retrieve the point in the window where a position is displayed. | |
998 | fun void EM_PosFromChar=214(point pt, position pos) | |
999 | ||
1000 | # Replace the selected text with the argument text. | |
1001 | fun void EM_ReplaceSel=194(, string text) | |
1002 | ||
1003 | # Ensure the caret is visible. | |
1004 | fun void EM_ScrollCaret=183(,) | |
1005 | ||
1006 | # Returns SEL_EMPTY if selection contains no characters, otherwise SEL_TEXT. | |
1007 | fun void EM_SelectionType=1090(,) | |
1008 | ||
1009 | # Set the width of the left and right margins | |
1010 | fun void EM_SetMargins=211(int flags, int values) | |
1011 | ||
1012 | # Set to read only or read write. | |
1013 | set void EM_SetReadOnly=207(bool readOnly,) | |
1014 | ||
1015 | # Select the range of text from start to end. | |
1016 | fun void EM_SetSel=177(position start, position end) | |
1017 | ||
1018 | # Undo one action in the undo history. | |
1019 | fun void EM_Undo=199(,) | |
1020 | ||
1021 | # Null operation. | |
1022 | fun void WM_Null=0(,) | |
1023 | ||
1024 | # Clear the selection. | |
1025 | fun void WM_Clear=771(,) | |
1026 | ||
1027 | fun void WM_Command=273(,) | |
1028 | ||
1029 | # Copy the selection to the clipboard. | |
1030 | fun void WM_Copy=769(,) | |
1031 | ||
1032 | # Cut the selection to the clipboard. | |
1033 | fun void WM_Cut=768(,) | |
1034 | ||
1035 | # Retrieve all the text in the document. | |
1036 | # Returns number of characters retrieved. | |
1037 | fun int WM_GetText=13(int length, stringresult text) | |
1038 | ||
1039 | # Retrieve the number of characters in the document. | |
1040 | fun int WM_GetTextLength=14(,) | |
1041 | ||
1042 | # Notification back to container | |
1043 | fun void WM_Notify=78(int id, int stuff) | |
1044 | ||
1045 | # Paste the contents of the clipboard into the document replacing the selection. | |
1046 | fun void WM_Paste=770(,) | |
1047 | ||
1048 | # Replace the contents of the document with the argument text. | |
1049 | fun void WM_SetText=12(, string text) | |
1050 | ||
1051 | # Undo one action in the undo history. | |
1052 | fun void WM_Undo=772(,) | |
1053 | ||
1054 | # Notification codes | |
1055 | val EN_CHANGE=768 | |
1056 | val EN_KILLFOCUS=512 | |
1057 | val EN_SETFOCUS=256 | |
1058 | ||
1059 | # Flags for setting margins. | |
1060 | val EC_LEFTMARGIN=1 | |
1061 | val EC_RIGHTMARGIN=2 | |
1062 | val EC_USEFONTINFO=0xffff | |
1063 | ||
1064 | # Selection type. | |
1065 | val SEL_EMPTY=0 | |
1066 | val SEL_TEXT=1 | |
1067 | ||
1068 | # Find replace mask constants | |
1069 | val FR_MATCHCASE=0x4 | |
1070 | val FR_WHOLEWORD=0x2 | |
1071 | val FR_DOWN=0x1 | |
1072 | ||
1073 | # Key modifier flag. | |
1074 | val SHIFT_PRESSED=1 | |
1075 | val LEFT_CTRL_PRESSED=2 | |
1076 | val LEFT_ALT_PRESSED=4 | |
1077 |