📄 scintilla.iface
字号:
## First line may be used for shbang## This file defines the interface to Scintilla## Copyright 2000-2003 by Neil Hodgson <neilh@scintilla.org>## The License.txt file describes the conditions under which this software may be distributed.## A line starting with ## is a pure comment and should be stripped by readers.## A line starting with #! is for future shbang use## A line starting with # followed by a space is a documentation comment and refers## to the next feature definition.## Each feature is defined by a line starting with fun, get, set, val or evt.## cat -> start a category## fun -> a function## get -> a property get function## set -> a property set function## val -> definition of a constant## evt -> an event## enu -> associate an enumeration with a set of vals with a prefix## lex -> associate a lexer with the lexical classes it produces#### All other feature names should be ignored. They may be defined in the future.## A property may have a set function, a get function or both. Each will have## "Get" or "Set" in their names and the corresponding name will have the obvious switch.## A property may be subscripted, in which case the first parameter is the subscript.## fun, get, and set features have a strict syntax:## <featureType><ws><returnType><ws><name>[=<number](<param>,<param>)## where <ws> stands for white space.## param may be empty (null value) or is <paramType><ws><paramName>[=<value>]## Additional white space is allowed between elements.## The syntax for evt is <featureType><ws><returnType><ws><name>[=<number]([<param>[,<param>]*])## Feature names that contain an underscore are defined by Windows, so in these## cases, using the Windows definition is preferred where available.## The feature numbers are stable so features will not be renumbered.## Features may be removed but they will go through a period of deprecation## before removal which is signalled by moving them into the Deprecated category.#### enu has the syntax enu<ws><enumeration>=<prefix>[<ws><prefix>]* where all the val## features in this file starting with a given <prefix> are considered part of the## enumeration.#### lex has the syntax lex<ws><name>=<lexerVal><ws><prefix>[<ws><prefix>]*## where name is a reasonably capitalised (Python, XML) identifier or UI name,## lexerVal is the val used to specify the lexer, and the list of prefixes is similar## to enu. The name may not be the same as that used within the lexer so the lexerVal## should be used to tie these entities together.## Types:## void## int## bool -> integer, 1=true, 0=false## position -> integer position in a document## colour -> colour integer containing red, green and blue bytes.## string -> pointer to const character## stringresult -> pointer to character, NULL-> return size of result## cells -> pointer to array of cells, each cell containing a style byte and character byte## textrange -> range of a min and a max position with an output string## findtext -> searchrange, text -> foundposition## keymod -> integer containing key in low half and modifiers in high half## formatrange## Types no longer used:## findtextex -> searchrange## charrange -> range of a min and a max position## charrangeresult -> like charrange, but output param## countedstring## point -> x,y## pointresult -> like point, but output param## rectangle -> left,top,right,bottom## Client code should ignore definitions containing types it does not understand, except## for possibly #defining the constants## Line numbers and positions start at 0.## String arguments may contain NUL ('\0') characters where the calls provide a length## argument and retrieve NUL characters. All retrieved strings except for those retrieved## by GetLine also have a NUL appended but client code should calculate the size that## will be returned rather than relying upon the NUL whenever possible. Allow for the## extra NUL character when allocating buffers. The size to allocate for a stringresult## can be determined by calling with a NULL (0) pointer.cat Basics################################################## For Scintilla.hval INVALID_POSITION=-1# Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages# as many EM_ messages can be used although that use is deprecated.val SCI_START=2000val SCI_OPTIONAL_START=3000val SCI_LEXER_START=4000# Add text to the document at current position.fun void AddText=2001(int length, string text)# Add array of cells to document.fun void AddStyledText=2002(int length, cells c)# Insert string at a position.fun void InsertText=2003(position pos, string text)# Delete all text in the document.fun void ClearAll=2004(,)# Set all style bytes to 0, remove all folding information.fun void ClearDocumentStyle=2005(,)# Returns the number of characters in the document.get int GetLength=2006(,)# Returns the character byte at the position.get int GetCharAt=2007(position pos,)# Returns the position of the caret.get position GetCurrentPos=2008(,)# Returns the position of the opposite end of the selection to the caret.get position GetAnchor=2009(,)# Returns the style byte at the position.get int GetStyleAt=2010(position pos,)# Redoes the next action on the undo history.fun void Redo=2011(,)# Choose between collecting actions into the undo# history and discarding them.set void SetUndoCollection=2012(bool collectUndo,)# Select all the text in the document.fun void SelectAll=2013(,)# Remember the current position in the undo history as the position# at which the document was saved.fun void SetSavePoint=2014(,)# Retrieve a buffer of cells.# Returns the number of bytes in the buffer not including terminating NULs.fun int GetStyledText=2015(, textrange tr)# Are there any redoable actions in the undo history?fun bool CanRedo=2016(,)# Retrieve the line number at which a particular marker is located.fun int MarkerLineFromHandle=2017(int handle,)# Delete a marker.fun void MarkerDeleteHandle=2018(int handle,)# Is undo history being collected?get bool GetUndoCollection=2019(,)enu WhiteSpace=SCWS_val SCWS_INVISIBLE=0val SCWS_VISIBLEALWAYS=1val SCWS_VISIBLEAFTERINDENT=2# Are white space characters currently visible?# Returns one of SCWS_* constants.get int GetViewWS=2020(,)# Make white space characters invisible, always visible or visible outside indentation.set void SetViewWS=2021(int viewWS,)# Find the position from a point within the window.fun position PositionFromPoint=2022(int x, int y)# Find the position from a point within the window but return# INVALID_POSITION if not close to text.fun position PositionFromPointClose=2023(int x, int y)# Set caret to start of a line and ensure it is visible.fun void GotoLine=2024(int line,)# Set caret to a position and ensure it is visible.fun void GotoPos=2025(position pos,)# Set the selection anchor to a position. The anchor is the opposite# end of the selection from the caret.set void SetAnchor=2026(position posAnchor,)# Retrieve the text of the line containing the caret.# Returns the index of the caret on the line.fun int GetCurLine=2027(int length, stringresult text)# Retrieve the position of the last correctly styled character.get position GetEndStyled=2028(,)enu EndOfLine=SC_EOL_val SC_EOL_CRLF=0val SC_EOL_CR=1val SC_EOL_LF=2# Convert all line endings in the document to one mode.fun void ConvertEOLs=2029(int eolMode,)# Retrieve the current end of line mode - one of CRLF, CR, or LF.get int GetEOLMode=2030(,)# Set the current end of line mode.set void SetEOLMode=2031(int eolMode,)# Set the current styling position to pos and the styling mask to mask.# The styling mask can be used to protect some bits in each styling byte from modification.fun void StartStyling=2032(position pos, int mask)# Change style from current styling position for length characters to a style# and move the current styling position to after this newly styled segment.fun void SetStyling=2033(int length, int style)# Is drawing done first into a buffer or direct to the screen?get bool GetBufferedDraw=2034(,)# If drawing is buffered then each line of text is drawn into a bitmap buffer# before drawing it to the screen to avoid flicker.set void SetBufferedDraw=2035(bool buffered,)# Change the visible size of a tab to be a multiple of the width of a space character.set void SetTabWidth=2036(int tabWidth,)# Retrieve the visible size of a tab.get int GetTabWidth=2121(,)# The SC_CP_UTF8 value can be used to enter Unicode mode.# This is the same value as CP_UTF8 in Windowsval SC_CP_UTF8=65001# The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+.val SC_CP_DBCS=1# Set the code page used to interpret the bytes of the document as characters.# The SC_CP_UTF8 value can be used to enter Unicode mode.set void SetCodePage=2037(int codePage,)# In palette mode, Scintilla uses the environment's palette calls to display# more colours. This may lead to ugly displays.set void SetUsePalette=2039(bool usePalette,)enu MarkerSymbol=SC_MARK_val MARKER_MAX=31val SC_MARK_CIRCLE=0val SC_MARK_ROUNDRECT=1val SC_MARK_ARROW=2val SC_MARK_SMALLRECT=3val SC_MARK_SHORTARROW=4val SC_MARK_EMPTY=5val SC_MARK_ARROWDOWN=6val SC_MARK_MINUS=7val SC_MARK_PLUS=8# Shapes used for outlining column.val SC_MARK_VLINE=9val SC_MARK_LCORNER=10val SC_MARK_TCORNER=11val SC_MARK_BOXPLUS=12val SC_MARK_BOXPLUSCONNECTED=13val SC_MARK_BOXMINUS=14val SC_MARK_BOXMINUSCONNECTED=15val SC_MARK_LCORNERCURVE=16val SC_MARK_TCORNERCURVE=17val SC_MARK_CIRCLEPLUS=18val SC_MARK_CIRCLEPLUSCONNECTED=19val SC_MARK_CIRCLEMINUS=20val SC_MARK_CIRCLEMINUSCONNECTED=21# Invisible mark that only sets the line background color.val SC_MARK_BACKGROUND=22val SC_MARK_DOTDOTDOT=23val SC_MARK_ARROWS=24val SC_MARK_PIXMAP=25val SC_MARK_FULLRECT=26val SC_MARK_LEFTRECT=27val SC_MARK_CHARACTER=10000enu MarkerOutline=SC_MARKNUM_# Markers used for outlining column.val SC_MARKNUM_FOLDEREND=25val SC_MARKNUM_FOLDEROPENMID=26val SC_MARKNUM_FOLDERMIDTAIL=27val SC_MARKNUM_FOLDERTAIL=28val SC_MARKNUM_FOLDERSUB=29val SC_MARKNUM_FOLDER=30val SC_MARKNUM_FOLDEROPEN=31val SC_MASK_FOLDERS=0xFE000000# Set the symbol used for a particular marker number.fun void MarkerDefine=2040(int markerNumber, int markerSymbol)# Set the foreground colour used for a particular marker number.fun void MarkerSetFore=2041(int markerNumber, colour fore)# Set the background colour used for a particular marker number.fun void MarkerSetBack=2042(int markerNumber, colour back)# Add a marker to a line, returning an ID which can be used to find or delete the marker.fun int MarkerAdd=2043(int line, int markerNumber)# Delete a marker from a line.fun void MarkerDelete=2044(int line, int markerNumber)# Delete all markers with a particular number from all lines.fun void MarkerDeleteAll=2045(int markerNumber,)# Get a bit mask of all the markers set on a line.fun int MarkerGet=2046(int line,)# Find the next line after lineStart that includes a marker in mask.fun int MarkerNext=2047(int lineStart, int markerMask)# Find the previous line before lineStart that includes a marker in mask.fun int MarkerPrevious=2048(int lineStart, int markerMask)# Define a marker from a pixmap.fun void MarkerDefinePixmap=2049(int markerNumber, string pixmap)# Add a set of markers to a line.fun void MarkerAddSet=2466(int line, int set)# Set the alpha used for a marker that is drawn in the text area, not the margin.fun void MarkerSetAlpha=2476(int markerNumber, int alpha)enu MarginType=SC_MARGIN_val SC_MARGIN_SYMBOL=0val SC_MARGIN_NUMBER=1val SC_MARGIN_BACK=2val SC_MARGIN_FORE=3# Set a margin to be either numeric or symbolic.set void SetMarginTypeN=2240(int margin, int marginType)# Retrieve the type of a margin.get int GetMarginTypeN=2241(int margin,)# Set the width of a margin to a width expressed in pixels.set void SetMarginWidthN=2242(int margin, int pixelWidth)# Retrieve the width of a margin in pixels.get int GetMarginWidthN=2243(int margin,)# Set a mask that determines which markers are displayed in a margin.set void SetMarginMaskN=2244(int margin, int mask)# Retrieve the marker mask of a margin.get int GetMarginMaskN=2245(int margin,)# Make a margin sensitive or insensitive to mouse clicks.set void SetMarginSensitiveN=2246(int margin, bool sensitive)# Retrieve the mouse click sensitivity of a margin.get bool GetMarginSensitiveN=2247(int margin,)# Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles.# Style 39 is for future use.enu StylesCommon=STYLE_val STYLE_DEFAULT=32val STYLE_LINENUMBER=33val STYLE_BRACELIGHT=34val STYLE_BRACEBAD=35val STYLE_CONTROLCHAR=36val STYLE_INDENTGUIDE=37val STYLE_CALLTIP=38val STYLE_LASTPREDEFINED=39val STYLE_MAX=255# Character set identifiers are used in StyleSetCharacterSet.# The values are the same as the Windows *_CHARSET values.enu CharacterSet=SC_CHARSET_val SC_CHARSET_ANSI=0val SC_CHARSET_DEFAULT=1val SC_CHARSET_BALTIC=186val SC_CHARSET_CHINESEBIG5=136val SC_CHARSET_EASTEUROPE=238val SC_CHARSET_GB2312=134val SC_CHARSET_GREEK=161val SC_CHARSET_HANGUL=129val SC_CHARSET_MAC=77val SC_CHARSET_OEM=255val SC_CHARSET_RUSSIAN=204val SC_CHARSET_CYRILLIC=1251val SC_CHARSET_SHIFTJIS=128val SC_CHARSET_SYMBOL=2val SC_CHARSET_TURKISH=162val SC_CHARSET_JOHAB=130val SC_CHARSET_HEBREW=177val SC_CHARSET_ARABIC=178val SC_CHARSET_VIETNAMESE=163val SC_CHARSET_THAI=222val SC_CHARSET_8859_15=1000# Clear all the styles and make equivalent to the global default style.set void StyleClearAll=2050(,)# Set the foreground colour of a style.set void StyleSetFore=2051(int style, colour fore)# Set the background colour of a style.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -