## First line may be used for shbang ## This file defines the interface to Scintilla ## 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 or val. ## cat -> start a category ## fun -> a function ## get -> a property get function ## get -> a property set function ## val -> definition of a constant ## 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: ## [=,) ## param is [=] ## Additional white space is allowed between elements. ## Feature names that contain an underscore are defined by Windows, so in these ## cases, using the Windows definition is preferred where available. ## 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 ## cells -> pointer to array of cells, each cell containing a style byte and character byte ## textrange -> complex structure ## findtext -> searchrange, text -> foundposition ## keymod -> integer containing key in low half and modifiers in high half ## countedstring ## formatrange ## point -> x,y ## Client code should ignore definitions containing types it does not understand, except ## for possibly #defining the constants cat Basics ################################################ ## From Scintilla.h val INVALID_POSITION=-1 val SCI_START=2000 val SCI_OPTIONAL_START=3000 val SCI_LEXER_START=4000 # Add text to the document 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(,) # 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(,) val SC_UNDOCOLLECT_NONE=0 val SC_UNDOCOLLECT_AUTOSTART=1 # Choose between collecting actions into the undo # history and discarding them. set void SetUndoCollection=2012(int 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 nulls. 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,) # Are white space characters currently visible? get bool GetViewWS=2020(,) # Make white space characters visible or invisible. set void SetViewWS=2021(bool viewWS,) # 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(,) # Convert all line endings in the document to use the current mode. fun void ConvertEOLs=2029(,) val SC_EOL_CRLF=0 val SC_EOL_CR=1 val SC_EOL_LF=2 # 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) # 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(,) val SC_CP_UTF8=65001 # 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 environments palette calls to display # more colours. This may lead to ugly displays. set void SetUsePalette=2039(bool usePalette,) val MARKER_MAX=31 val SC_MARK_CIRCLE=0 val SC_MARK_ROUNDRECT=1 val SC_MARK_ARROW=2 val SC_MARK_SMALLRECT=3 val SC_MARK_SHORTARROW=4 val SC_MARK_EMPTY=5 val SC_MARK_ARROWDOWN=6 val SC_MARK_MINUS=7 val SC_MARK_PLUS=8 val SC_MARKNUM_FOLDER=30 val SC_MARKNUM_FOLDEROPEN=31 ##val SC_MASK_FOLDERS=1<