]> git.saurik.com Git - wxWidgets.git/blame - src/stc/scintilla/include/Scintilla.iface
fixed client area origin handling in wxGTK
[wxWidgets.git] / src / stc / scintilla / include / Scintilla.iface
CommitLineData
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.
d134f170 6## A line starting with #! is for future shbang use
d25f5fbb 7## A line starting with # followed by a space is a documentation comment and refers
bfabd11a
RD
8## to the next feature definition.
9
d134f170 10## Each feature is defined by a line starting with fun, get, set, val or evt.
bfabd11a
RD
11## cat -> start a category
12## fun -> a function
13## get -> a property get function
d134f170 14## set -> a property set function
bfabd11a 15## val -> definition of a constant
d134f170 16## evt -> an event
bfabd11a
RD
17## All other feature names should be ignored. They may be defined in the future.
18## A property may have a set function, a get function or both. Each will have
19## "Get" or "Set" in their names and the corresponding name will have the obvious switch.
20## A property may be subscripted, in which case the first parameter is the subscript.
21## fun, get, and set features have a strict syntax:
22## <featureType><ws><returnType><ws><name>[=<number](<param>,<param>)
23## param is <paramType><ws><paramName>[=<value>]
24## Additional white space is allowed between elements.
d134f170 25## The syntax for evt is <featureType><ws><returnType><ws><name>[=<number]([<param>[,<param>]*])
bfabd11a
RD
26## Feature names that contain an underscore are defined by Windows, so in these
27## cases, using the Windows definition is preferred where available.
28
29## Types:
30## void
31## int
32## bool -> integer, 1=true, 0=false
33## position -> integer position in a document
34## colour -> colour integer containing red, green and blue bytes.
35## string -> pointer to const character
36## stringresult -> pointer to character
37## cells -> pointer to array of cells, each cell containing a style byte and character byte
d134f170
RD
38## charrange -> range of a min and a max position
39## charrangeresult -> like charrange, but output param
40## textrange -> charrange + output string
bfabd11a 41## findtext -> searchrange, text -> foundposition
d134f170 42## findtextex -> searchrange
bfabd11a
RD
43## keymod -> integer containing key in low half and modifiers in high half
44## countedstring
45## formatrange
46## point -> x,y
d134f170
RD
47## pointresult -> like point, but output param
48## rectangle -> left,top,right,bottom
d25f5fbb 49## Client code should ignore definitions containing types it does not understand, except
bfabd11a
RD
50## for possibly #defining the constants
51
d25f5fbb 52cat Basics
bfabd11a
RD
53
54################################################
d134f170 55## For Scintilla.h
bfabd11a 56val INVALID_POSITION=-1
d134f170
RD
57# Define start of Scintilla messages to be greater than all edit (EM_*) messages
58# as many EM_ messages can be used although that use is deprecated.
bfabd11a
RD
59val SCI_START=2000
60val SCI_OPTIONAL_START=3000
61val SCI_LEXER_START=4000
62
63# Add text to the document
64fun void AddText=2001(int length, string text)
65
66# Add array of cells to document
67fun void AddStyledText=2002(int length, cells c)
68
69# Insert string at a position
70fun void InsertText=2003(position pos, string text)
71
72# Delete all text in the document
73fun void ClearAll=2004(,)
74
d134f170
RD
75# Set all style bytes to 0, remove all folding information
76fun void ClearDocumentStyle=2005(,)
77
bfabd11a
RD
78# The number of characters in the document
79get int GetLength=2006(,)
80
81# Returns the character byte at the position
82get int GetCharAt=2007(position pos,)
83
84# Returns the position of the caret
85get position GetCurrentPos=2008(,)
86
87# Returns the position of the opposite end of the selection to the caret
88get position GetAnchor=2009(,)
89
90# Returns the style byte at the position
91get int GetStyleAt=2010(position pos,)
92
93# Redoes the next action on the undo history
94fun void Redo=2011(,)
95
d25f5fbb 96# Choose between collecting actions into the undo
bfabd11a 97# history and discarding them.
d134f170 98set void SetUndoCollection=2012(bool collectUndo,)
bfabd11a
RD
99
100# Select all the text in the document.
101fun void SelectAll=2013(,)
102
d25f5fbb 103# Remember the current position in the undo history as the position
bfabd11a
RD
104# at which the document was saved.
105fun void SetSavePoint=2014(,)
106
107# Retrieve a buffer of cells.
108# Returns the number of bytes in the buffer not including terminating nulls.
109fun int GetStyledText=2015(, textrange tr)
110
111# Are there any redoable actions in the undo history.
112fun bool CanRedo=2016(,)
113
114# Retrieve the line number at which a particular marker is located
115fun int MarkerLineFromHandle=2017(int handle,)
116
117# Delete a marker.
118fun void MarkerDeleteHandle=2018(int handle,)
119
d134f170
RD
120# Is undo history being collected?
121get bool GetUndoCollection=2019(,)
122
123val SCWS_INVISIBLE=0
124val SCWS_VISIBLEALWAYS=1
125val SCWS_VISIBLEAFTERINDENT=2
126
bfabd11a 127# Are white space characters currently visible?
d134f170
RD
128# Returns one of SCWS_* constants.
129get int GetViewWS=2020(,)
bfabd11a 130
d134f170
RD
131# Make white space characters invisible, always visible or visible outside indentation.
132set void SetViewWS=2021(int viewWS,)
133
134# Find the position from a point within the window.
135fun int PositionFromPoint=2022(int x, int y)
bfabd11a 136
65ec6247
RD
137# Find the position from a point within the window but return
138# INVALID_POSITION if not close to text.
139fun int PositionFromPointClose=2023(int x, int y)
140
bfabd11a
RD
141# Set caret to start of a line and ensure it is visible.
142fun void GotoLine=2024(int line,)
143
144# Set caret to a position and ensure it is visible.
145fun void GotoPos=2025(position pos,)
146
147# Set the selection anchor to a position. The anchor is the opposite
148# end of the selection from the caret.
149set void SetAnchor=2026(position posAnchor,)
150
151# Retrieve the text of the line containing the caret.
152# Returns the index of the caret on the line.
153fun int GetCurLine=2027(int length, stringresult text)
154
155# Retrieve the position of the last correctly styled character.
156get position GetEndStyled=2028(,)
157
bfabd11a
RD
158val SC_EOL_CRLF=0
159val SC_EOL_CR=1
160val SC_EOL_LF=2
161
65ec6247
RD
162# Convert all line endings in the document to one mode.
163fun void ConvertEOLs=2029(int eolMode,)
164
bfabd11a
RD
165# Retrieve the current end of line mode - one of CRLF, CR, or LF.
166get int GetEOLMode=2030(,)
167
168# Set the current end of line mode.
169set void SetEOLMode=2031(int eolMode,)
170
171# Set the current styling position to pos and the styling mask to mask.
d25f5fbb 172# The styling mask can be used to protect some bits in each styling byte from
bfabd11a
RD
173# modification.
174fun void StartStyling=2032(position pos, int mask)
175
176# Change style from current styling position for length characters to a style
177# and move the current styling position to after this newly styled segment.
178fun void SetStyling=2033(int length, int style)
179
d134f170
RD
180# Is drawing done first into a buffer or direct to the screen.
181get bool GetBufferedDraw=2034(,)
182
bfabd11a
RD
183# If drawing is buffered then each line of text is drawn into a bitmap buffer
184# before drawing it to the screen to avoid flicker.
185set void SetBufferedDraw=2035(bool buffered,)
186
d25f5fbb 187# Change the visible size of a tab to be a multiple of the width of a space
bfabd11a
RD
188# character.
189set void SetTabWidth=2036(int tabWidth,)
190
d25f5fbb 191# Retrieve the visible size of a tab.
bfabd11a
RD
192get int GetTabWidth=2121(,)
193
d134f170
RD
194# The SC_CP_UTF8 value can be used to enter Unicode mode.
195# This is the same value as CP_UTF8 in Windows
bfabd11a
RD
196val SC_CP_UTF8=65001
197
198# Set the code page used to interpret the bytes of the document as characters.
199# The SC_CP_UTF8 value can be used to enter Unicode mode.
200set void SetCodePage=2037(int codePage,)
201
202# In palette mode, Scintilla uses the environments palette calls to display
203# more colours. This may lead to ugly displays.
204set void SetUsePalette=2039(bool usePalette,)
205
206val MARKER_MAX=31
207val SC_MARK_CIRCLE=0
208val SC_MARK_ROUNDRECT=1
209val SC_MARK_ARROW=2
210val SC_MARK_SMALLRECT=3
211val SC_MARK_SHORTARROW=4
212val SC_MARK_EMPTY=5
213val SC_MARK_ARROWDOWN=6
214val SC_MARK_MINUS=7
215val SC_MARK_PLUS=8
216
65ec6247
RD
217# Shapes used for outlining column
218val SC_MARK_VLINE=9
219val SC_MARK_LCORNER=10
220val SC_MARK_TCORNER=11
221val SC_MARK_BOXPLUS=12
222val SC_MARK_BOXPLUSCONNECTED=13
223val SC_MARK_BOXMINUS=14
224val SC_MARK_BOXMINUSCONNECTED=15
225val SC_MARK_LCORNERCURVE=16
226val SC_MARK_TCORNERCURVE=17
227val SC_MARK_CIRCLEPLUS=18
228val SC_MARK_CIRCLEPLUSCONNECTED=19
229val SC_MARK_CIRCLEMINUS=20
230val SC_MARK_CIRCLEMINUSCONNECTED=21
231
232# Markers used for outlining column
233val SC_MARKNUM_FOLDEREND=25
234val SC_MARKNUM_FOLDEROPENMID=26
235val SC_MARKNUM_FOLDERMIDTAIL=27
236val SC_MARKNUM_FOLDERTAIL=28
237val SC_MARKNUM_FOLDERSUB=29
bfabd11a
RD
238val SC_MARKNUM_FOLDER=30
239val SC_MARKNUM_FOLDEROPEN=31
bfabd11a
RD
240
241# Set the symbol used for a particular marker number.
242fun void MarkerDefine=2040(int markerNumber, int markerSymbol)
243
244# Set the foreground colour used for a particular marker number.
245fun void MarkerSetFore=2041(int markerNumber, colour fore)
246
247# Set the background colour used for a particular marker number.
248fun void MarkerSetBack=2042(int markerNumber, colour back)
249
250# Add a marker to a line.
251fun void MarkerAdd=2043(int line, int markerNumber)
252
253# Delete a marker from a line
254fun void MarkerDelete=2044(int line, int markerNumber)
255
256# Delete all markers with a particular number from all lines
257fun void MarkerDeleteAll=2045(int markerNumber,)
258
259# Get a bit mask of all the markers set on a line.
260fun int MarkerGet=2046(int line,)
261
262# Find the next line after lineStart that includes a marker in mask.
263fun int MarkerNext=2047(int lineStart, int markerMask)
264
265# Find the previous line before lineStart that includes a marker in mask.
266fun int MarkerPrevious=2048(int lineStart, int markerMask)
267
268val SC_MARGIN_SYMBOL=0
269val SC_MARGIN_NUMBER=1
270
271# Set a margin to be either numeric or symbolic.
272set void SetMarginTypeN=2240(int margin, int marginType)
273
274# Retrieve the type of a margin.
275get int GetMarginTypeN=2241(int margin,)
276
277# Set the width of a margin to a width expressed in pixels.
278set void SetMarginWidthN=2242(int margin, int pixelWidth)
279
280# Retrieve the width of a margin in pixels.
281get int GetMarginWidthN=2243(int margin,)
282
283# Set a mask that determines which markers are displayed in a margin.
284set void SetMarginMaskN=2244(int margin, int mask)
285
286# Retrieve the marker mask of a margin.
287get int GetMarginMaskN=2245(int margin,)
288
289# Make a margin sensitive or insensitive to mouse clicks.
290set void SetMarginSensitiveN=2246(int margin, bool sensitive)
291
292# Retrieve the mouse click sensitivity of a margin.
293get bool GetMarginSensitiveN=2247(int margin,)
294
295val STYLE_DEFAULT=32
296val STYLE_LINENUMBER=33
297val STYLE_BRACELIGHT=34
298val STYLE_BRACEBAD=35
299val STYLE_CONTROLCHAR=36
d134f170 300val STYLE_INDENTGUIDE=37
bfabd11a
RD
301val STYLE_MAX=127
302
d134f170
RD
303# Character set identifiers are used in StyleSetCharacterSet.
304# The values are the same as the Windows *_CHARSET values.
305val SC_CHARSET_ANSI=0
306val SC_CHARSET_DEFAULT=1
307val SC_CHARSET_BALTIC=186
308val SC_CHARSET_CHINESEBIG5=136
309val SC_CHARSET_EASTEUROPE=238
310val SC_CHARSET_GB2312=134
311val SC_CHARSET_GREEK=161
312val SC_CHARSET_HANGUL=129
313val SC_CHARSET_MAC=77
314val SC_CHARSET_OEM=255
315val SC_CHARSET_RUSSIAN=204
316val SC_CHARSET_SHIFTJIS=128
317val SC_CHARSET_SYMBOL=2
318val SC_CHARSET_TURKISH=162
319val SC_CHARSET_JOHAB=130
320val SC_CHARSET_HEBREW=177
321val SC_CHARSET_ARABIC=178
322val SC_CHARSET_VIETNAMESE=163
323val SC_CHARSET_THAI=222
324
bfabd11a
RD
325# Clear all the styles and make equivalent to the global default style.
326set void StyleClearAll=2050(,)
327
328# Set the foreground colour of a style.
329set void StyleSetFore=2051(int style, colour fore)
330
331# Set the background colour of a style.
332set void StyleSetBack=2052(int style, colour back)
333
334# Set a style to be bold or not.
335set void StyleSetBold=2053(int style, bool bold)
336
337# Set a style to be italic or not.
338set void StyleSetItalic=2054(int style, bool italic)
339
340# Set the size of characters of a style.
341set void StyleSetSize=2055(int style, int sizePoints)
342
343# Set the font of a style.
344set void StyleSetFont=2056(int style, string fontName)
345
346# Set a style to have its end of line filled or not.
347set void StyleSetEOLFilled=2057(int style, bool filled)
348
349# Reset the default style to its state at startup
350fun void StyleResetDefault=2058(,)
351
352# Set a style to be underlined or not.
353set void StyleSetUnderline=2059(int style, bool underline)
354
65ec6247
RD
355val SC_CASE_MIXED=0
356val SC_CASE_UPPER=1
357val SC_CASE_LOWER=2
358# Set a style to be mixed case, or to force upper or lower case.
359set void StyleSetCase=2060(int style, int caseForce)
360
bfabd11a
RD
361# Set the character set of the font in a style.
362set void StyleSetCharacterSet=2066(int style, int characterSet)
363
364# Set the foreground colour of the selection and whether to use this setting.
365fun void SetSelFore=2067(bool useSetting, colour fore)
366
367# Set the background colour of the selection and whether to use this setting.
368fun void SetSelBack=2068(bool useSetting, colour back)
369
370# Set the foreground colour of the caret.
d134f170 371set void SetCaretFore=2069(colour fore,)
bfabd11a
RD
372
373# When key+modifier combination km is pressed perform msg.
374fun void AssignCmdKey=2070(keymod km, int msg)
375
376# When key+modifier combination km do nothing.
377fun void ClearCmdKey=2071(keymod km,)
378
379# Drop all key mappings.
380fun void ClearAllCmdKeys=2072(,)
381
382# Set the styles for a segment of the document.
383fun void SetStylingEx=2073(int length, string styles)
384
d134f170
RD
385# Set a style to be visible or not.
386set void StyleSetVisible=2074(int style, bool visible)
387
d25f5fbb 388# Get the time in milliseconds that the caret is on and off.
bfabd11a
RD
389get int GetCaretPeriod=2075(,)
390
391# Get the time in milliseconds that the caret is on and off. 0 = steady on.
392set void SetCaretPeriod=2076(int periodMilliseconds,)
393
d25f5fbb 394# Set the set of characters making up words for when moving or selecting
bfabd11a
RD
395# by word.
396set void SetWordChars=2077(, string characters)
397
398# Start a sequence of actions that is undone and redone as a unit.
399# May be nested.
400fun void BeginUndoAction=2078(,)
401
402# End a sequence of actions that is undone and redone as a unit.
403fun void EndUndoAction=2079(,)
404
405val INDIC_MAX=7
406val INDIC_PLAIN=0
407val INDIC_SQUIGGLE=1
408val INDIC_TT=2
409val INDIC_DIAGONAL=3
410val INDIC_STRIKE=4
411val INDIC0_MASK=32
412val INDIC1_MASK=64
413val INDIC2_MASK=128
d25f5fbb
RD
414val INDICS_MASK=224
415##INDIC0_MASK | INDIC1_MASK | INDIC2_MASK
bfabd11a
RD
416
417# Set an indicator to plain, squiggle or TT.
418set void IndicSetStyle=2080(int indic, int style)
419
420# Retrieve the style of an indicator.
421get int IndicGetStyle=2081(int indic,)
422
423# Set the foreground colour of an indicator.
424set void IndicSetFore=2082(int indic, colour fore)
425
426# Retrieve the foreground colour of an indicator.
427get colour IndicGetFore=2083(int indic,)
428
429# Divide each styling byte into lexical class bits (default:5) and indicator
430# bits (default:3). If a lexer requires more than 32 lexical states, then this
431# is used to expand the possible states.
432set void SetStyleBits=2090(int bits,)
433
434# Retrieve number of bits in style bytes used to hold the lexical state.
435get int GetStyleBits=2091(,)
436
437# Used to hold extra styling information for each line.
438set void SetLineState=2092(int line, int state)
439
440# Retrieve the extra styling information for a line.
441get int GetLineState=2093(int line,)
442
d25f5fbb 443# Retrieve the last line number that has line state.
bfabd11a
RD
444get int GetMaxLineState=2094(,)
445
65ec6247
RD
446# Is the background of the line containing the caret in a different colour?
447get bool GetCaretLineVisible=2095(,)
448
449# Display the background of the line containing the caret in a different colour.
450set void SetCaretLineVisible=2096(bool show,)
451
452# Get the colour of the background of the line containing the caret.
453get colour GetCaretLineBack=2097(,)
454
455# Set the colour of the background of the line containing the caret.
456set void SetCaretLineBack=2098(colour back,)
457
bfabd11a
RD
458# Display a auto-completion list.
459# The lenEntered parameter indicates how many characters before
460# the caret should be used to provide context.
461fun void AutoCShow=2100(int lenEntered, string itemList)
462
463# Remove the auto-completion list from the screen.
464fun void AutoCCancel=2101(,)
465
466# Is there an auto-completion list visible?
467fun bool AutoCActive=2102(,)
468
d25f5fbb 469# Retrieve the position of the caret when the auto-completion list was
bfabd11a
RD
470# displayed.
471fun position AutoCPosStart=2103(,)
472
473# User has selected an item so remove the list and insert the selection.
474fun void AutoCComplete=2104(,)
475
476# Define a set of character that when typed cancel the auto-completion list.
477fun void AutoCStops=2105(, string characterSet)
478
d25f5fbb 479# Change the separator character in the string setting up an auto-completion
bfabd11a
RD
480# list. Default is space but can be changed if items contain space.
481set void AutoCSetSeparator=2106(int separatorCharacter,)
482
483# Retrieve the auto-completion list separator character.
484get int AutoCGetSeparator=2107(,)
485
486# Select the item in the auto-completion list that starts with a string.
487fun void AutoCSelect=2108(, string text)
488
d25f5fbb
RD
489# Should the auto-completion list be cancelled if the user backspaces to a
490# position before where the box was created.
d134f170
RD
491set void AutoCSetCancelAtStart=2110(bool cancel,)
492
493# Retrieve whether auto-completion cancelled by backspacing before start.
494get bool AutoCGetCancelAtStart=2111(,)
495
496# Define a set of character that when typed fills up the selected word.
497set void AutoCSetFillUps=2112(, string characterSet)
498
d25f5fbb 499# Should a single item auto-completion list automatically choose the item.
d134f170
RD
500set void AutoCSetChooseSingle=2113(bool chooseSingle,)
501
d25f5fbb 502# Retrieve whether a single item auto-completion list automatically choose the item.
d134f170
RD
503get bool AutoCGetChooseSingle=2114(,)
504
505# Set whether case is significant when performing auto-completion searches.
506set void AutoCSetIgnoreCase=2115(bool ignoreCase,)
507
d25f5fbb 508# Retrieve state of ignore case flag.
d134f170
RD
509get bool AutoCGetIgnoreCase=2116(,)
510
65ec6247
RD
511# Display a list of strings and send notification when user chooses one.
512fun void UserListShow=2117(int listType, string itemList)
513
514# Set whether or not autocompletion is hidden automatically when nothing matches
515set void AutoCSetAutoHide=2118(bool autoHide,)
516
517# Retrieve whether or not autocompletion is hidden automatically when nothing matches
518get bool AutoCGetAutoHide=2119(,)
519
bfabd11a
RD
520# Set the number of spaces used for one level of indentation.
521set void SetIndent=2122(int indentSize,)
522
523# Retrieve indentation size.
524get int GetIndent=2123(,)
525
526# Indentation will only use space characters if useTabs is false, otherwise
527# it will use a combination of tabs and spaces.
528set void SetUseTabs=2124(bool useTabs,)
529
530# Retrieve whether tabs will be used in indentation.
531get bool GetUseTabs=2125(,)
532
533# Change the indentation of a line to a number of columns.
534set void SetLineIndentation=2126(int line, int indentSize)
535
536# Retrieve the number of columns that a line is indented.
537get int GetLineIndentation=2127(int line,)
538
539# Retrieve the position before the first non indentation character on a line.
540get position GetLineIndentPosition=2128(int line,)
541
d134f170
RD
542# Retrieve the column number of a position, taking tab width into account.
543get int GetColumn=2129(position pos,)
544
545# Show or hide the horizontal scroll bar.
bfabd11a
RD
546set void SetHScrollBar=2130(bool show,)
547
d134f170 548# Is the horizontal scroll bar visible?
bfabd11a
RD
549get bool GetHScrollBar=2131(,)
550
d134f170
RD
551# Show or hide indentation guides.
552set void SetIndentationGuides=2132(bool show,)
553
554# Are the indentation guides visible?
555get bool GetIndentationGuides=2133(,)
556
557# Set the highlighted indentation guide column.
558# 0 = no highlighted guide.
559set void SetHighlightGuide=2134(int column,)
560
561# Get the highlighted indentation guide column.
562get int GetHighlightGuide=2135(,)
563
564# Get the position after the last visible characters on a line.
565get int GetLineEndPosition=2136(int line,)
566
567# Get the code page used to interpret the bytes of the document as characters.
568get int GetCodePage=2137(,)
569
570# Get the foreground colour of the caret.
571get colour GetCaretFore=2138(,)
572
573# In palette mode?
574get bool GetUsePalette=2139(,)
575
576# In read-only mode?
577get bool GetReadOnly=2140(,)
578
579# Sets the position of the caret.
580set void SetCurrentPos=2141(position pos,)
581
582# Sets the position that starts the selection - this becomes the anchor.
583set void SetSelectionStart=2142(position pos,)
584
585# Returns the position at the start of the selection.
586get position GetSelectionStart=2143(,)
587
588# Sets the position that ends the selection - this becomes the currentPosition.
589set void SetSelectionEnd=2144(position pos,)
590
591# Returns the position at the end of the selection.
592get position GetSelectionEnd=2145(,)
593
594# Sets the print magnification added to the point size of each style for printing.
595set void SetPrintMagnification=2146(int magnification,)
596
597# Returns the print magnification.
598get int GetPrintMagnification=2147(,)
599
600# PrintColourMode - use same colours as screen.
601val SC_PRINT_NORMAL=0
602# PrintColourMode - invert the light value of each style for printing.
603val SC_PRINT_INVERTLIGHT=1
604# PrintColourMode - force black text on white background for printing.
605val SC_PRINT_BLACKONWHITE=2
65ec6247
RD
606# PrintColourMode - text stays coloured, but all background is forced to be white for printing.
607val SC_PRINT_COLOURONWHITE=3
608# PrintColourMode - only the default-background is forced to be white for printing.
609val SC_PRINT_COLOURONWHITEDEFAULTBG=4
d134f170
RD
610
611# Modify colours when printing for clearer printed text.
612set void SetPrintColourMode=2148(int mode,)
613
614# Returns the print colour mode.
615get int GetPrintColourMode=2149(,)
616
d134f170
RD
617val SCFIND_WHOLEWORD=2
618val SCFIND_MATCHCASE=4
619val SCFIND_WORDSTART=0x00100000
d134f170
RD
620val SCFIND_REGEXP=0x00200000
621
622# Find some text in the document.
623fun position FindText=2150(int flags, findtext ft)
624
625# On Windows will draw the document into a display context such as a printer.
626fun void FormatRange=2151(bool draw, formatrange fr)
627
628# Retrieve the line at the top of the display.
629get int GetFirstVisibleLine=2152(,)
630
631# Retrieve the contents of a line.
632# Returns the length of the line.
633fun int GetLine=2153(int line, stringresult text)
634
635# Returns the number of lines in the document. There is always at least one.
636get int GetLineCount=2154(,)
637
638# Sets the size in pixels of the left margin.
65ec6247 639set void SetMarginLeft=2155(, int pixelWidth)
d134f170
RD
640
641# Returns the size in pixels of the left margin.
642get int GetMarginLeft=2156(,)
643
644# Sets the size in pixels of the right margin.
65ec6247 645set void SetMarginRight=2157(, int pixelWidth)
d134f170
RD
646
647# Returns the size in pixels of the right margin.
648get int GetMarginRight=2158(,)
649
650# Is the document different from when it was last saved?
651get bool GetModify=2159(,)
652
653# Select a range of text.
654fun void SetSel=2160(position start, position end)
655
656# Retrieve the selected text.
657# Return the length of the text.
658fun int GetSelText=2161(,stringresult text)
659
660# Retrieve a range of text.
661# Return the length of the text.
662fun int GetTextRange=2162(, textrange tr)
663
664# Draw the selection in normal style or with selection highlighted.
665fun void HideSelection=2163(bool normal,)
666
667# Retrieve the x value of the point in the window where a position is displayed.
668fun int PointXFromPosition=2164(, position pos)
669
670# Retrieve the y value of the point in the window where a position is displayed.
671fun int PointYFromPosition=2165(, position pos)
672
673# Retrieve the line containing a position.
674fun int LineFromPosition=2166(position pos,)
675
676# Retrieve the position at the start of a line.
677fun int PositionFromLine=2167(int line,)
678
679# Scroll horizontally and vertically.
680fun void LineScroll=2168(int columns, int lines)
681
682# Ensure the caret is visible.
683fun void ScrollCaret=2169(,)
684
685# Replace the selected text with the argument text.
686fun void ReplaceSel=2170(, string text)
687
688# Set to read only or read write.
689set void SetReadOnly=2171(bool readOnly,)
690
691# Null operation.
692fun void Null=2172(,)
693
694# Will a paste succeed?
695fun bool CanPaste=2173(,)
696
697# Are there any undoable actions in the undo history.
698fun bool CanUndo=2174(,)
699
700# Delete the undo history.
701fun void EmptyUndoBuffer=2175(,)
702
703# Undo one action in the undo history.
704fun void Undo=2176(,)
705
706# Cut the selection to the clipboard.
707fun void Cut=2177(,)
708
709# Copy the selection to the clipboard.
710fun void Copy=2178(,)
711
712# Paste the contents of the clipboard into the document replacing the selection.
713fun void Paste=2179(,)
714
715# Clear the selection.
716fun void Clear=2180(,)
717
718# Replace the contents of the document with the argument text.
719fun void SetText=2181(, string text)
720
721# Retrieve all the text in the document.
722# Returns number of characters retrieved.
723fun int GetText=2182(int length, stringresult text)
724
725# Retrieve the number of characters in the document.
726get int GetTextLength=2183(,)
727
728# Retrieve a pointer to a function that processes messages for this Scintilla.
729get int GetDirectFunction=2184(,)
730
731# Retrieve a pointer value to use as the first argument when calling
732# the function returned by GetDirectFunction.
733get int GetDirectPointer=2185(,)
734
735# Set to overtype (true) or insert mode
736set void SetOvertype=2186(bool overtype,)
737
738# Returns true if overtype mode is active otherwise false is returned.
739get bool GetOvertype=2187(,)
740
65ec6247
RD
741# Set the width of the insert mode caret
742set void SetCaretWidth=2188(int pixelWidth,)
743
744# Returns the width of the insert mode caret
745get int GetCaretWidth=2189(,)
746
747# Sets the position that starts the target which is used for updating the
748# document without affecting the scroll position.
749set void SetTargetStart=2190(position pos,)
750
751# Get the position that starts the target.
752get position GetTargetStart=2191(,)
753
754# Sets the position that ends the target which is used for updating the
755# document without affecting the scroll position.
756set void SetTargetEnd=2192(position pos,)
757
758# Get the position that ends the target.
759get position GetTargetEnd=2193(,)
760
761# Replace the target text with the argument text.
762# Returns the length of the replacement text.
763fun int ReplaceTarget=2194(int length, string text)
764
765# Replace the target text with the argument text after \d processing.
766# Looks for \d where d is between 1 and 9 and replaces these with the strings
767# matched in the last search operation which were surrounded by \( and \).
768# Returns the length of the replacement text including any change
769# caused by processing the \d patterns.
770fun int ReplaceTargetRE=2195(int length, string text)
771
772# Search for a counted string in the target and set the target to the found
773# range.
774# Returns length of range or -1 for failure in which case target is not moved.
775fun int SearchInTarget=2197(int length, string text)
776
777# Set the search flags used by SearchInTarget
778set void SetSearchFlags=2198(int flags,)
779
780# Get the search flags used by SearchInTarget
781get int GetSearchFlags=2199(,)
782
bfabd11a
RD
783# Show a call tip containing a definition near position pos.
784fun void CallTipShow=2200(position pos, string definition)
785
786# Remove the call tip from the screen.
787fun void CallTipCancel=2201(,)
788
789# Is there an active call tip?
790fun bool CallTipActive=2202(,)
791
792# Retrieve the position where the caret was before displaying the call tip.
793fun position CallTipPosStart=2203(,)
794
795# Highlight a segment of the definition.
796fun void CallTipSetHlt=2204(int start, int end)
797
798# Set the background colour for the call tip.
799set void CallTipSetBack=2205(colour back,)
800
801# Find the display line of a document line taking hidden lines into account.
802fun int VisibleFromDocLine=2220(int line,)
803
804# Find the document line of a display line taking hidden lines into account.
805fun int DocLineFromVisible=2221(int lineDisplay,)
806
807val SC_FOLDLEVELBASE=0x400
808val SC_FOLDLEVELWHITEFLAG=0x1000
809val SC_FOLDLEVELHEADERFLAG=0x2000
810val SC_FOLDLEVELNUMBERMASK=0x0FFF
811
812# Set the fold level of a line.
813# This encodes an integer level along with flags indicating whether the
814# line is a header and whether it is effectively white space.
815set void SetFoldLevel=2222(int line, int level)
816
817# Retrieve the fold level of a line.
818get int GetFoldLevel=2223(int line,)
819
820# Find the last child line of a header line.
d134f170 821get int GetLastChild=2224(int line, int level)
bfabd11a
RD
822
823# Find the parent line of a child line.
824get int GetFoldParent=2225(int line,)
825
826# Make a range of lines visible.
827fun void ShowLines=2226(int lineStart, int lineEnd)
828
829# Make a range of lines invisible.
830fun void HideLines=2227(int lineStart, int lineEnd)
831
832# Is a line visible?
833get bool GetLineVisible=2228(int line,)
834
835# Show the children of a header line.
836set void SetFoldExpanded=2229(int line, bool expanded)
837
838# Is a header line expanded?
839get bool GetFoldExpanded=2230(int line,)
840
841# Switch a header line between expanded and contracted.
842fun void ToggleFold=2231(int line,)
843
844# Ensure a particular line is visible by expanding any header line hiding it.
845fun void EnsureVisible=2232(int line,)
846
847# Set some debugging options for folding
848fun void SetFoldFlags=2233(int flags,)
849
65ec6247
RD
850# Ensure a particular line is visible by expanding any header line hiding it.
851# Use the currently set visibility policy to determine which range to display.
852fun void EnsureVisibleEnforcePolicy=2234(int line,)
853
854# Sets whether a tab pressed when caret is within indentation indents
855set void SetTabIndents=2260(bool tabIndents,)
856
857# Does a tab pressed when caret is within indentation indent?
858get bool GetTabIndents=2261(,)
859
860# Sets whether a backspace pressed when caret is within indentation unindents
861set void SetBackSpaceUnIndents=2262(bool bsUnIndents,)
862
863# Does a backspace pressed when caret is within indentation unindent?
864get bool GetBackSpaceUnIndents=2263(,)
865
866val SC_TIME_FOREVER=10000000
867
868# Sets the time the mouse must sit still to generate a mouse dwell event
869set void SetMouseDwellTime=2264(int periodMilliseconds,)
870
871# Retrieve the time the mouse must sit still to generate a mouse dwell event
872get int GetMouseDwellTime=2265(,)
873
d134f170 874## Start of key messages
bfabd11a
RD
875# Move caret down one line.
876fun void LineDown=2300(,)
877
878# Move caret down one line extending selection to new caret position.
879fun void LineDownExtend=2301(,)
880
881# Move caret up one line.
882fun void LineUp=2302(,)
883
884# Move caret up one line extending selection to new caret position.
885fun void LineUpExtend=2303(,)
886
887# Move caret left one character.
888fun void CharLeft=2304(,)
889
890# Move caret left one character extending selection to new caret position.
891fun void CharLeftExtend=2305(,)
892
893# Move caret right one character.
894fun void CharRight=2306(,)
895
896# Move caret right one character extending selection to new caret position.
897fun void CharRightExtend=2307(,)
898
899# Move caret left one word.
900fun void WordLeft=2308(,)
901
902# Move caret left one word extending selection to new caret position.
903fun void WordLeftExtend=2309(,)
904
905# Move caret right one word.
906fun void WordRight=2310(,)
907
908# Move caret right one word extending selection to new caret position.
909fun void WordRightExtend=2311(,)
910
911# Move caret to first position on line.
912fun void Home=2312(,)
913
914# Move caret to first position on line extending selection to new caret position.
915fun void HomeExtend=2313(,)
916
917# Move caret to last position on line.
918fun void LineEnd=2314(,)
919
920# Move caret to last position on line extending selection to new caret position.
921fun void LineEndExtend=2315(,)
922
923# Move caret to first position in document.
924fun void DocumentStart=2316(,)
925
926# Move caret to first position in document extending selection to new caret position.
927fun void DocumentStartExtend=2317(,)
928
929# Move caret to last position in document.
930fun void DocumentEnd=2318(,)
931
932# Move caret to last position in document extending selection to new caret position.
933fun void DocumentEndExtend=2319(,)
934
935# Move caret one page up.
936fun void PageUp=2320(,)
937
938# Move caret one page up extending selection to new caret position.
939fun void PageUpExtend=2321(,)
940
941# Move caret one page down.
942fun void PageDown=2322(,)
943
944# Move caret one page down extending selection to new caret position.
945fun void PageDownExtend=2323(,)
946
947# Switch from insert to overtype mode or the reverse.
948fun void EditToggleOvertype=2324(,)
949
950# Cancel any modes such as call tip or auto-completion list display.
951fun void Cancel=2325(,)
952
953# Delete the selection or if no selection, the character before the caret.
954fun void DeleteBack=2326(,)
955
d25f5fbb 956# If selection is empty or all on one line replace the selection with a tab
bfabd11a
RD
957# character.
958# If more than one line selected, indent the lines.
959fun void Tab=2327(,)
960
961# Dedent the selected lines.
962fun void BackTab=2328(,)
963
964# Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
965fun void NewLine=2329(,)
966
967# Insert a Form Feed character.
968fun void FormFeed=2330(,)
969
d25f5fbb 970# Move caret to before first visible character on line.
bfabd11a
RD
971# If already there move to first character on line.
972fun void VCHome=2331(,)
973
974# Like VCHome but extending selection to new caret position.
975fun void VCHomeExtend=2332(,)
976
977# Magnify the displayed text by increasing the sizes by 1 point.
978fun void ZoomIn=2333(,)
979
980# Make the displayed text smaller by decreasing the sizes by 1 point.
981fun void ZoomOut=2334(,)
982
983# Delete the word to the left of the caret.
984fun void DelWordLeft=2335(,)
985
986# Delete the word to the right of the caret.
987fun void DelWordRight=2336(,)
988
989# Cut the line containing the caret.
990fun void LineCut=2337(,)
991
992# Delete the line containing the caret.
993fun void LineDelete=2338(,)
994
995# Switch the current line with the previous.
996fun void LineTranspose=2339(,)
997
998# Transform the selection to lower case.
999fun void LowerCase=2340(,)
1000
1001# Transform the selection to upper case.
1002fun void UpperCase=2341(,)
1003
1004# Scroll the document down, keeping the caret visible.
1005fun void LineScrollDown=2342(,)
1006
1007# Scroll the document up, keeping the caret visible.
1008fun void LineScrollUp=2343(,)
1009
65ec6247
RD
1010# Move the caret inside current view if it's not there already
1011fun void MoveCaretInsideView=2401(,)
1012
bfabd11a
RD
1013# How many characters are on a line, not including end of line characters.
1014fun int LineLength=2350(int line,)
1015
1016# Highlight the characters at two positions.
1017fun void BraceHighlight=2351(position pos1,position pos2)
1018
1019# Highlight the character at a position indicating there is no matching brace.
1020fun void BraceBadLight=2352(position pos,)
1021
1022# Find the position of a matching brace or INVALID_POSITION if no match.
1023fun position BraceMatch=2353(position pos,)
1024
1025# Are the end of line characters visible.
1026get bool GetViewEOL=2355(,)
1027
1028# Make the end of line characters visible or invisible
1029set void SetViewEOL=2356(bool visible,)
1030
1031# Retrieve a pointer to the document object.
1032get int GetDocPointer=2357(,)
1033
1034# Change the document object used.
65ec6247 1035set void SetDocPointer=2358(,int pointer)
bfabd11a
RD
1036
1037# Set which document modification events are sent to the container.
1038set void SetModEventMask=2359(int mask,)
1039
1040val EDGE_NONE=0
1041val EDGE_LINE=1
1042val EDGE_BACKGROUND=2
1043
1044# Retrieve the column number which text should be kept within.
1045get int GetEdgeColumn=2360(,)
1046
d25f5fbb
RD
1047# Set the column number of the edge.
1048# If text goes past the edge then it is highlighted.
bfabd11a
RD
1049set void SetEdgeColumn=2361(int column,)
1050
1051# Retrieve the edge highlight mode.
1052get int GetEdgeMode=2362(,)
1053
1054# The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
1055# goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
1056set void SetEdgeMode=2363(int mode,)
1057
1058# Retrieve the colour used in edge indication.
1059get colour GetEdgeColour=2364(,)
1060
1061# Change the colour used in edge indication.
1062set void SetEdgeColour=2365(colour edgeColour,)
1063
1064# Sets the current caret position to be the search anchor.
1065fun void SearchAnchor=2366(,)
1066
1067# Find some text starting at the search anchor.
65ec6247 1068# Does not ensure the selection is visible.
bfabd11a
RD
1069fun int SearchNext=2367(int flags, string text)
1070
1071# Find some text starting at the search anchor and moving backwards.
65ec6247 1072# Does not ensure the selection is visible.
bfabd11a
RD
1073fun int SearchPrev=2368(int flags, string text)
1074
d134f170 1075# Show caret within N lines of edge when it's scrolled to view
65ec6247
RD
1076# If CARET_SLOP not set then centre caret on screen when it's
1077# scrolled to view
bfabd11a 1078val CARET_SLOP=0x01
65ec6247 1079# Value not used
bfabd11a 1080val CARET_CENTER=0x02
65ec6247
RD
1081# If CARET_SLOP also set then reposition whenever outside slop border
1082# If CARET_SLOP not set then recentre even when visible
bfabd11a 1083val CARET_STRICT=0x04
65ec6247
RD
1084# If CARET_XEVEN set then both left and right margins are given equal weight
1085# rather than favouring left following behaviour.
1086val CARET_XEVEN=0x08
1087# If CARET_XJUMPS set then when caret reaches the margin the display jumps
1088# enough to leave the caret solidly within the display.
1089val CARET_XJUMPS=0x10
bfabd11a
RD
1090# Set the way the line the caret is on is kept visible.
1091fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop)
1092
1093# Retrieves the number of lines completely visible.
1094get int LinesOnScreen=2370(,)
1095
1096# Set whether a pop up menu is displayed automatically when the user presses
1097# the wrong mouse button.
1098fun void UsePopUp=2371(bool allowPopUp,)
1099
1100# Is the selection a rectangular. The alternative is the more common stream selection.
1101get bool SelectionIsRectangle=2372(,)
1102
d25f5fbb 1103# Set the zoom level. This number of points is added to the size of all fonts.
bfabd11a
RD
1104# It may be positive to magnify or negative to reduce.
1105set void SetZoom=2373(int zoom,)
1106# Retrieve the zoom level.
1107get int GetZoom=2374(,)
1108
d25f5fbb 1109# Create a new document object.
d134f170
RD
1110# Starts with reference count of 1 and not selected into editor.
1111fun int CreateDocument=2375(,)
bfabd11a 1112# Extend life of document.
d134f170 1113fun void AddRefDocument=2376(, int doc)
bfabd11a 1114# Release a reference to the document, deleting document if it fades to black.
d134f170
RD
1115fun void ReleaseDocument=2377(, int doc)
1116
1117# Get which document modification events are sent to the container.
1118get int GetModEventMask=2378(,)
bfabd11a 1119
65ec6247
RD
1120# Change internal focus flag
1121set void SetFocus=2380(bool focus,)
1122# Get internal focus flag
1123get bool GetFocus=2381(,)
1124
1125# Change error status - 0 = OK
1126set void SetStatus=2382(int statusCode,)
1127# Get error status
1128get int GetStatus=2383(,)
1129
1130# Set whether the mouse is captured when its button is pressed
1131set void SetMouseDownCaptures=2384(bool captures,)
1132# Get whether mouse gets captured
1133get bool GetMouseDownCaptures=2385(,)
1134
1135val SC_CURSORNORMAL=-1
1136val SC_CURSORWAIT=3
1137# Sets the cursor to one of the SC_CURSOR* values
1138set void SetCursor=2386(int cursorType,)
1139# Get cursor type
1140get int GetCursor=2387(,)
1141
1142# Move to the previous change in capitalistion
1143fun void WordPartLeft=2390(,)
1144# Move to the previous change in capitalistion extending selection to new caret position.
1145fun void WordPartLeftExtend=2391(,)
1146# Move to the change next in capitalistion
1147fun void WordPartRight=2392(,)
1148# Move to the next change in capitalistion extending selection to new caret position.
1149fun void WordPartRightExtend=2393(,)
1150
1151# Constants for use with SetVisiblePolicy, similar to SetCaretPolicy
1152val VISIBLE_SLOP=0x01
1153val VISIBLE_STRICT=0x04
1154# Set the way the display area is determined when a particular line is to be moved to.
1155fun void SetVisiblePolicy=2394(int visiblePolicy, int visibleSlop)
1156
1157# Delete back from the current position to the start of the line
1158fun void DelLineLeft=2395(,)
1159
1160# Delete forwards from the current position to the end of the line
1161fun void DelLineRight=2396(,)
1162
bfabd11a 1163# Set the focus to this Scintilla widget.
d134f170 1164# GTK+ Specific
bfabd11a
RD
1165fun void GrabFocus=2400(,)
1166
1167# Start notifying the container of all key presses and commands.
1168fun void StartRecord=3001(,)
1169
1170# Stop notifying the container of all key presses and commands.
1171fun void StopRecord=3002(,)
1172
d25f5fbb 1173# Set the lexing language of the document.
bfabd11a
RD
1174set void SetLexer=4001(int lexer,)
1175
d25f5fbb 1176# Retrieve the lexing language of the document.
bfabd11a
RD
1177get int GetLexer=4002(,)
1178
1179# Colourise a segment of the document using the current lexing language.
1180fun void Colourise=4003(position start, position end)
1181
1182# Set up a value that may be used by a lexer for some optional feature.
1183set void SetProperty=4004(string key, string value)
1184
1185# Set up the key words used by the lexer.
1186set void SetKeyWords=4005(int keywordSet, string keyWords)
1187
65ec6247
RD
1188# Set the lexing language of the document based on string name.
1189set void SetLexerLanguage=4006(, string language)
1190
d134f170
RD
1191# Notifications
1192# Type of modification and the action which caused the modification
1193# These are defined as a bit mask to make it easy to specify which notifications are wanted.
1194# One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
bfabd11a
RD
1195val SC_MOD_INSERTTEXT=0x1
1196val SC_MOD_DELETETEXT=0x2
1197val SC_MOD_CHANGESTYLE=0x4
1198val SC_MOD_CHANGEFOLD=0x8
1199val SC_PERFORMED_USER=0x10
1200val SC_PERFORMED_UNDO=0x20
1201val SC_PERFORMED_REDO=0x40
1202val SC_LASTSTEPINUNDOREDO=0x100
1203val SC_MOD_CHANGEMARKER=0x200
1204val SC_MOD_BEFOREINSERT=0x400
1205val SC_MOD_BEFOREDELETE=0x800
1206val SC_MODEVENTMASKALL=0xF77
d134f170
RD
1207
1208# For compatibility, these go through the COMMAND notification rather than NOTIFY
1209# and have exactly the same values as the EN_* constants.
1210val SCEN_CHANGE=768
1211val SCEN_SETFOCUS=512
1212val SCEN_KILLFOCUS=256
1213
1214# Symbolic key codes and modifier flags
1215# ASCII and other printable characters below 256
1216# Extended keys above 300
1217
1218val SCK_DOWN=300
1219val SCK_UP=301
1220val SCK_LEFT=302
1221val SCK_RIGHT=303
1222val SCK_HOME=304
1223val SCK_END=305
1224val SCK_PRIOR=306
1225val SCK_NEXT=307
1226val SCK_DELETE=308
1227val SCK_INSERT=309
1228val SCK_ESCAPE=7
1229val SCK_BACK=8
1230val SCK_TAB=9
1231val SCK_RETURN=13
1232val SCK_ADD=310
1233val SCK_SUBTRACT=311
1234val SCK_DIVIDE=312
1235
1236val SCMOD_SHIFT=1
1237val SCMOD_CTRL=2
1238val SCMOD_ALT=4
bfabd11a
RD
1239
1240################################################
d134f170 1241# For SciLexer.h
bfabd11a
RD
1242val SCLEX_CONTAINER=0
1243val SCLEX_NULL=1
1244val SCLEX_PYTHON=2
1245val SCLEX_CPP=3
1246val SCLEX_HTML=4
1247val SCLEX_XML=5
1248val SCLEX_PERL=6
1249val SCLEX_SQL=7
1250val SCLEX_VB=8
1251val SCLEX_PROPERTIES=9
1252val SCLEX_ERRORLIST=10
1253val SCLEX_MAKEFILE=11
1254val SCLEX_BATCH=12
1255val SCLEX_XCODE=13
1256val SCLEX_LATEX=14
d134f170
RD
1257val SCLEX_LUA=15
1258val SCLEX_DIFF=16
65ec6247
RD
1259val SCLEX_CONF=17
1260val SCLEX_PASCAL=18
1261val SCLEX_AVE=19
1262val SCLEX_ADA=20
1263val SCLEX_LISP=21
1264val SCLEX_RUBY=22
1265val SCLEX_EIFFEL=23
1266val SCLEX_EIFFELKW=24
1267val SCLEX_TCL=25
1268# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
1269# value assigned in sequence from SCLEX_AUTOMATIC+1.
1270val SCLEX_AUTOMATIC=1000
d134f170 1271# Lexical states for SCLEX_PYTHON
bfabd11a
RD
1272val SCE_P_DEFAULT=0
1273val SCE_P_COMMENTLINE=1
1274val SCE_P_NUMBER=2
1275val SCE_P_STRING=3
1276val SCE_P_CHARACTER=4
1277val SCE_P_WORD=5
1278val SCE_P_TRIPLE=6
1279val SCE_P_TRIPLEDOUBLE=7
1280val SCE_P_CLASSNAME=8
1281val SCE_P_DEFNAME=9
1282val SCE_P_OPERATOR=10
1283val SCE_P_IDENTIFIER=11
1284val SCE_P_COMMENTBLOCK=12
1285val SCE_P_STRINGEOL=13
d134f170 1286# Lexical states for SCLEX_CPP, SCLEX_VB
bfabd11a
RD
1287val SCE_C_DEFAULT=0
1288val SCE_C_COMMENT=1
1289val SCE_C_COMMENTLINE=2
1290val SCE_C_COMMENTDOC=3
1291val SCE_C_NUMBER=4
1292val SCE_C_WORD=5
1293val SCE_C_STRING=6
1294val SCE_C_CHARACTER=7
1295val SCE_C_UUID=8
1296val SCE_C_PREPROCESSOR=9
1297val SCE_C_OPERATOR=10
1298val SCE_C_IDENTIFIER=11
1299val SCE_C_STRINGEOL=12
d134f170 1300val SCE_C_VERBATIM=13
65ec6247
RD
1301val SCE_C_REGEX=14
1302val SCE_C_COMMENTLINEDOC=15
1303val SCE_C_WORD2=16
d134f170 1304# Lexical states for SCLEX_HTML, SCLEX_XML
bfabd11a
RD
1305val SCE_H_DEFAULT=0
1306val SCE_H_TAG=1
1307val SCE_H_TAGUNKNOWN=2
1308val SCE_H_ATTRIBUTE=3
1309val SCE_H_ATTRIBUTEUNKNOWN=4
1310val SCE_H_NUMBER=5
1311val SCE_H_DOUBLESTRING=6
1312val SCE_H_SINGLESTRING=7
1313val SCE_H_OTHER=8
1314val SCE_H_COMMENT=9
1315val SCE_H_ENTITY=10
d134f170 1316# XML and ASP
bfabd11a
RD
1317val SCE_H_TAGEND=11
1318val SCE_H_XMLSTART=12
1319val SCE_H_XMLEND=13
1320val SCE_H_SCRIPT=14
1321val SCE_H_ASP=15
1322val SCE_H_ASPAT=16
d134f170
RD
1323val SCE_H_CDATA=17
1324val SCE_H_QUESTION=18
1325# More HTML
1326val SCE_H_VALUE=19
65ec6247
RD
1327# X-Code
1328val SCE_H_XCCOMMENT=20
1329# SGML
1330val SCE_H_SGML=21
d134f170 1331# Embedded Javascript
bfabd11a
RD
1332val SCE_HJ_START=40
1333val SCE_HJ_DEFAULT=41
1334val SCE_HJ_COMMENT=42
1335val SCE_HJ_COMMENTLINE=43
1336val SCE_HJ_COMMENTDOC=44
1337val SCE_HJ_NUMBER=45
1338val SCE_HJ_WORD=46
1339val SCE_HJ_KEYWORD=47
1340val SCE_HJ_DOUBLESTRING=48
1341val SCE_HJ_SINGLESTRING=49
1342val SCE_HJ_SYMBOLS=50
1343val SCE_HJ_STRINGEOL=51
65ec6247 1344val SCE_HJ_REGEX=52
d134f170 1345# ASP Javascript
bfabd11a
RD
1346val SCE_HJA_START=55
1347val SCE_HJA_DEFAULT=56
1348val SCE_HJA_COMMENT=57
1349val SCE_HJA_COMMENTLINE=58
1350val SCE_HJA_COMMENTDOC=59
1351val SCE_HJA_NUMBER=60
1352val SCE_HJA_WORD=61
1353val SCE_HJA_KEYWORD=62
1354val SCE_HJA_DOUBLESTRING=63
1355val SCE_HJA_SINGLESTRING=64
1356val SCE_HJA_SYMBOLS=65
1357val SCE_HJA_STRINGEOL=66
65ec6247 1358val SCE_HJA_REGEX=67
d134f170 1359# Embedded VBScript
bfabd11a
RD
1360val SCE_HB_START=70
1361val SCE_HB_DEFAULT=71
1362val SCE_HB_COMMENTLINE=72
1363val SCE_HB_NUMBER=73
1364val SCE_HB_WORD=74
1365val SCE_HB_STRING=75
1366val SCE_HB_IDENTIFIER=76
1367val SCE_HB_STRINGEOL=77
d134f170 1368# ASP VBScript
bfabd11a
RD
1369val SCE_HBA_START=80
1370val SCE_HBA_DEFAULT=81
1371val SCE_HBA_COMMENTLINE=82
1372val SCE_HBA_NUMBER=83
1373val SCE_HBA_WORD=84
1374val SCE_HBA_STRING=85
1375val SCE_HBA_IDENTIFIER=86
1376val SCE_HBA_STRINGEOL=87
d134f170 1377# Embedded Python
bfabd11a
RD
1378val SCE_HP_START=90
1379val SCE_HP_DEFAULT=91
1380val SCE_HP_COMMENTLINE=92
1381val SCE_HP_NUMBER=93
1382val SCE_HP_STRING=94
1383val SCE_HP_CHARACTER=95
1384val SCE_HP_WORD=96
1385val SCE_HP_TRIPLE=97
1386val SCE_HP_TRIPLEDOUBLE=98
1387val SCE_HP_CLASSNAME=99
1388val SCE_HP_DEFNAME=100
1389val SCE_HP_OPERATOR=101
1390val SCE_HP_IDENTIFIER=102
d134f170 1391# ASP Python
bfabd11a
RD
1392val SCE_HPA_START=105
1393val SCE_HPA_DEFAULT=106
1394val SCE_HPA_COMMENTLINE=107
1395val SCE_HPA_NUMBER=108
1396val SCE_HPA_STRING=109
1397val SCE_HPA_CHARACTER=110
1398val SCE_HPA_WORD=111
1399val SCE_HPA_TRIPLE=112
1400val SCE_HPA_TRIPLEDOUBLE=113
1401val SCE_HPA_CLASSNAME=114
1402val SCE_HPA_DEFNAME=115
1403val SCE_HPA_OPERATOR=116
1404val SCE_HPA_IDENTIFIER=117
d134f170
RD
1405# PHP
1406val SCE_HPHP_DEFAULT=118
1407val SCE_HPHP_HSTRING=119
1408val SCE_HPHP_SIMPLESTRING=120
1409val SCE_HPHP_WORD=121
1410val SCE_HPHP_NUMBER=122
1411val SCE_HPHP_VARIABLE=123
1412val SCE_HPHP_COMMENT=124
1413val SCE_HPHP_COMMENTLINE=125
65ec6247
RD
1414val SCE_HPHP_HSTRING_VARIABLE=126
1415val SCE_HPHP_OPERATOR=127
d134f170 1416# Lexical states for SCLEX_PERL
bfabd11a 1417val SCE_PL_DEFAULT=0
65ec6247 1418val SCE_PL_ERROR=1
bfabd11a
RD
1419val SCE_PL_COMMENTLINE=2
1420val SCE_PL_POD=3
1421val SCE_PL_NUMBER=4
1422val SCE_PL_WORD=5
1423val SCE_PL_STRING=6
1424val SCE_PL_CHARACTER=7
1425val SCE_PL_PUNCTUATION=8
1426val SCE_PL_PREPROCESSOR=9
1427val SCE_PL_OPERATOR=10
1428val SCE_PL_IDENTIFIER=11
1429val SCE_PL_SCALAR=12
1430val SCE_PL_ARRAY=13
1431val SCE_PL_HASH=14
1432val SCE_PL_SYMBOLTABLE=15
bfabd11a
RD
1433val SCE_PL_REGEX=17
1434val SCE_PL_REGSUBST=18
1435val SCE_PL_LONGQUOTE=19
1436val SCE_PL_BACKTICKS=20
1437val SCE_PL_DATASECTION=21
65ec6247
RD
1438val SCE_PL_HERE_DELIM=22
1439val SCE_PL_HERE_Q=23
1440val SCE_PL_HERE_QQ=24
1441val SCE_PL_HERE_QX=25
1442val SCE_PL_STRING_Q=26
1443val SCE_PL_STRING_QQ=27
1444val SCE_PL_STRING_QX=28
1445val SCE_PL_STRING_QR=29
1446val SCE_PL_STRING_QW=30
d134f170 1447# Lexical states for SCLEX_LATEX
bfabd11a
RD
1448val SCE_L_DEFAULT=0
1449val SCE_L_COMMAND=1
1450val SCE_L_TAG=2
1451val SCE_L_MATH=3
1452val SCE_L_COMMENT=4
d134f170
RD
1453# Lexical states for SCLEX_LUA
1454val SCE_LUA_DEFAULT=0
1455val SCE_LUA_COMMENT=1
1456val SCE_LUA_COMMENTLINE=2
1457val SCE_LUA_COMMENTDOC=3
1458val SCE_LUA_NUMBER=4
1459val SCE_LUA_WORD=5
1460val SCE_LUA_STRING=6
1461val SCE_LUA_CHARACTER=7
1462val SCE_LUA_LITERALSTRING=8
1463val SCE_LUA_PREPROCESSOR=9
1464val SCE_LUA_OPERATOR=10
1465val SCE_LUA_IDENTIFIER=11
1466val SCE_LUA_STRINGEOL=12
65ec6247 1467# Lexical states for SCLEX_ERRORLIST
d134f170
RD
1468val SCE_ERR_DEFAULT=0
1469val SCE_ERR_PYTHON=1
1470val SCE_ERR_GCC=2
1471val SCE_ERR_MS=3
1472val SCE_ERR_CMD=4
1473val SCE_ERR_BORLAND=5
1474val SCE_ERR_PERL=6
65ec6247
RD
1475val SCE_ERR_NET=7
1476val SCE_ERR_LUA=8
1477val SCE_ERR_DIFF_CHANGED=10
1478val SCE_ERR_DIFF_ADDITION=11
1479val SCE_ERR_DIFF_DELETION=12
1480val SCE_ERR_DIFF_MESSAGE=13
1481# Lexical states for SCLEX_BATCH
1482val SCE_BAT_DEFAULT=0
1483val SCE_BAT_COMMENT=1
1484val SCE_BAT_WORD=2
1485val SCE_BAT_LABEL=3
1486val SCE_BAT_HIDE=4
1487val SCE_BAT_COMMAND=5
1488val SCE_BAT_IDENTIFIER=6
1489val SCE_BAT_OPERATOR=7
1490# Lexical states for SCLEX_MAKEFILE
1491val SCE_MAKE_DEFAULT=0
1492val SCE_MAKE_COMMENT=1
1493val SCE_MAKE_PREPROCESSOR=2
1494val SCE_MAKE_IDENTIFIER=3
1495val SCE_MAKE_OPERATOR=4
1496val SCE_MAKE_TARGET=5
1497val SCE_MAKE_IDEOL=9
1498# Lexical states for the SCLEX_CONF (Apache Configuration Files Lexer)
1499val SCE_CONF_DEFAULT=0
1500val SCE_CONF_COMMENT=1
1501val SCE_CONF_NUMBER=2
1502val SCE_CONF_IDENTIFIER=3
1503val SCE_CONF_EXTENSION=4
1504val SCE_CONF_PARAMETER=5
1505val SCE_CONF_STRING=6
1506val SCE_CONF_OPERATOR=7
1507val SCE_CONF_IP=8
1508val SCE_CONF_DIRECTIVE=9
1509# Avenue
1510val SCE_AVE_DEFAULT=0
1511val SCE_AVE_COMMENT=1
1512val SCE_AVE_NUMBER=2
1513val SCE_AVE_WORD=3
1514val SCE_AVE_KEYWORD=4
1515val SCE_AVE_STATEMENT=5
1516val SCE_AVE_STRING=6
1517val SCE_AVE_ENUM=7
1518val SCE_AVE_STRINGEOL=8
1519val SCE_AVE_IDENTIFIER=9
1520val SCE_AVE_OPERATOR=10
1521# Lexical states for SCLEX_ADA
1522val SCE_ADA_DEFAULT=0
1523val SCE_ADA_COMMENT=1
1524val SCE_ADA_NUMBER=2
1525val SCE_ADA_WORD=3
1526val SCE_ADA_STRING=4
1527val SCE_ADA_CHARACTER=5
1528val SCE_ADA_OPERATOR=6
1529val SCE_ADA_IDENTIFIER=7
1530val SCE_ADA_STRINGEOL=8
1531# Lexical states for SCLEX_LISP
1532val SCE_LISP_DEFAULT=0
1533val SCE_LISP_COMMENT=1
1534val SCE_LISP_NUMBER=2
1535val SCE_LISP_KEYWORD=3
1536val SCE_LISP_STRING=6
1537val SCE_LISP_STRINGEOL=8
1538val SCE_LISP_IDENTIFIER=9
1539val SCE_LISP_OPERATOR=10
1540# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
1541val SCE_EIFFEL_DEFAULT=0
1542val SCE_EIFFEL_COMMENTLINE=1
1543val SCE_EIFFEL_NUMBER=2
1544val SCE_EIFFEL_WORD=3
1545val SCE_EIFFEL_STRING=4
1546val SCE_EIFFEL_CHARACTER=5
1547val SCE_EIFFEL_OPERATOR=6
1548val SCE_EIFFEL_IDENTIFIER=7
1549val SCE_EIFFEL_STRINGEOL=8
d134f170
RD
1550
1551# Events
1552
1553evt void StyleNeeded=2000(int position)
1554evt void CharAdded=2001(int ch)
1555evt void SavePointReached=2002(void)
1556evt void SavePointLeft=2003(void)
1557evt void ModifyAttemptRO=2004(void)
1558# GTK+ Specific to work around focus and accelerator problems:
1559evt void Key=2005(int ch, int modifiers)
1560evt void DoubleClick=2006(void)
1561evt void UpdateUI=2007(void)
1562# The old name for SCN_UPDATEUI
1563val SCN_CHECKBRACE=2007
1564evt void Modified=2008(int position, int modificationType, string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev)
1565# Optional module for macro recording
1566evt void MacroRecord=2009(int message, int wParam, int lParam)
1567evt void MarginClick=2010(int modifiers, int position, int margin)
1568evt void NeedShown=2011(int position, int length)
1569evt void PosChanged=2012(int position)
65ec6247
RD
1570evt void Painted=2013(void)
1571evt void UserListSelection=2014(int listType, string text)
1572evt void URIDropped=2015(string text)
1573evt void DwellStart=2016(int position)
1574evt void DwellEnd=2017(int position)
d134f170 1575
d25f5fbb 1576cat Deprecated
bfabd11a 1577
65ec6247
RD
1578val SCFIND_DOWN=1
1579
bfabd11a
RD
1580################################################
1581# From WinDefs.h
1582
d134f170
RD
1583# ***** DEPRECATED from here to end of file ******
1584
bfabd11a
RD
1585# Will a paste succeed?
1586fun bool EM_CanPaste=1074(,)
1587
1588# Are there any undoable actions in the undo history.
1589fun bool EM_CanUndo=198(,)
1590
1591# Find the position and line from a point within the window.
1592fun int EM_CharFromPos=215(,point pt)
1593
1594# Delete the undo history.
1595fun void EM_EmptyUndoBuffer=205(,)
1596
1597# Retrieve the selection range.
d134f170 1598fun void EM_ExGetSel=1076(,charrangeresult cr)
bfabd11a
RD
1599
1600# Retrieve the line number of a position in the document.
1601get int EM_ExLineFromChar=1078(,position pos)
1602
1603# Select a range of text.
1604fun void EM_ExSetSel=1079(,charrange cr)
1605
1606# Find some text in the document.
1607fun position EM_FindText=1080(int flags, findtext ft)
1608
1609# Find some text in the document. Returns range of found text in ft argument.
d134f170 1610fun position EM_FindTextEx=1103(int flags, findtextex ft)
bfabd11a
RD
1611
1612# On Windows will draw the document into a display context such as a printer.
1613fun void EM_FormatRange=1081(bool draw, formatrange fr)
1614
1615# Retrieve the line at the top of the display.
1616get int EM_GetFirstVisibleLine=206(,)
1617
1618# Retrieve the contents of a line.
1619# Returns the length of the line.
1620fun int EM_GetLine=196(int line, countedstring text)
1621
1622# Returns the number of lines in the document. There is always at least one.
1623fun int EM_GetLineCount=186(,)
1624
1625# Returns the size in pixels of left and right margins packed into one integer.
1626# The left margin is in the low half and the right margin in the high half.
1627fun int EM_GetMargins=212(,)
1628
1629# Is the document different from when it was last saved?
1630get bool EM_GetModify=184(,)
1631
1632# Get the area used to display the document.
1633fun void EM_GetRect=178(,rectangle r)
1634
1635# Return the selection packed into one integer with the start of the selection
1636# in the low half and the end in the high half.
1637fun int EM_GetSel=176(,)
1638
1639# Retrieve the selected text.
1640# Return the length of the text.
1641fun int EM_GetSelText=1086(,stringresult text)
1642
1643# Retrieve a range of text.
1644# Return the length of the text.
1645fun int EM_GetTextRange=1099(, textrange tr)
1646
1647# Draw the selection in normal style or with selection highlighted.
1648fun void EM_HideSelection=1087(bool normal,)
1649
1650# Retrieve the line of a position.
1651fun int EM_LineFromChar=201(position pos,)
1652
1653# Retrieve the position at the start of a line.
1654fun position EM_LineIndex=187(int line,)
1655
1656# Retrieve the number of characters on a line not including end of line characters.
1657fun int EM_LineLength=193(int line,)
1658
1659# Scroll horizontally and vertically.
1660fun void EM_LineScroll=182(int columns, int lines)
1661
1662# Retrieve the point in the window where a position is displayed.
d134f170 1663fun void EM_PosFromChar=214(pointresult pt, position pos)
bfabd11a
RD
1664
1665# Replace the selected text with the argument text.
1666fun void EM_ReplaceSel=194(, string text)
1667
1668# Ensure the caret is visible.
1669fun void EM_ScrollCaret=183(,)
1670
1671# Returns SEL_EMPTY if selection contains no characters, otherwise SEL_TEXT.
1672fun void EM_SelectionType=1090(,)
1673
1674# Set the width of the left and right margins
1675fun void EM_SetMargins=211(int flags, int values)
1676
1677# Set to read only or read write.
1678set void EM_SetReadOnly=207(bool readOnly,)
1679
1680# Select the range of text from start to end.
1681fun void EM_SetSel=177(position start, position end)
1682
1683# Undo one action in the undo history.
1684fun void EM_Undo=199(,)
1685
1686# Null operation.
1687fun void WM_Null=0(,)
1688
1689# Clear the selection.
1690fun void WM_Clear=771(,)
1691
1692fun void WM_Command=273(,)
1693
1694# Copy the selection to the clipboard.
1695fun void WM_Copy=769(,)
1696
1697# Cut the selection to the clipboard.
1698fun void WM_Cut=768(,)
1699
1700# Retrieve all the text in the document.
1701# Returns number of characters retrieved.
1702fun int WM_GetText=13(int length, stringresult text)
1703
1704# Retrieve the number of characters in the document.
1705fun int WM_GetTextLength=14(,)
1706
1707# Notification back to container
1708fun void WM_Notify=78(int id, int stuff)
1709
1710# Paste the contents of the clipboard into the document replacing the selection.
1711fun void WM_Paste=770(,)
1712
1713# Replace the contents of the document with the argument text.
1714fun void WM_SetText=12(, string text)
1715
1716# Undo one action in the undo history.
1717fun void WM_Undo=772(,)
1718
1719# Notification codes
d25f5fbb
RD
1720val EN_CHANGE=768
1721val EN_KILLFOCUS=512
1722val EN_SETFOCUS=256
bfabd11a
RD
1723
1724# Flags for setting margins.
1725val EC_LEFTMARGIN=1
1726val EC_RIGHTMARGIN=2
1727val EC_USEFONTINFO=0xffff
1728
1729# Selection type.
d25f5fbb
RD
1730val SEL_EMPTY=0
1731val SEL_TEXT=1
bfabd11a
RD
1732
1733# Find replace mask constants
d25f5fbb
RD
1734val FR_MATCHCASE=0x4
1735val FR_WHOLEWORD=0x2
1736val FR_DOWN=0x1
bfabd11a
RD
1737
1738# Key modifier flag.
1739val SHIFT_PRESSED=1
1740val LEFT_CTRL_PRESSED=2
1741val LEFT_ALT_PRESSED=4
1742
d134f170
RD
1743#events
1744evt void EN_Change=768(void)