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