The Scintilla class is a library wrapper for the scintilla editor – this means that most of the methods below correspond to an equivalent Scintilla message. You can gain additional information from the Scintilla API.
| Scintilla : Methods |
__init__(self, doc) : None | |
AddRefDocument(self, int) : None | |
AddStyledText(self, length, styledText) : None | |
AddText(self, length, text) : None | Inserts text at the current position within the document. |
Allocate(self, size) : None | Allocate a document buffer large enough to store a given size. This will not shrink the document buffer smaller than its current contents requires. |
AppendText(self, length, text) : None | Appends text to the end of the document. |
AssignCmdKey(self, (int)key, (int)command) : None | Redefining the key bindings. |
AutoCActive(self) : bool | Returns true if there is an active auto-completion list and zero if there is not. |
AutoCCancel(self) : None | Cancels any auto-complete list displayed. |
AutoCComplete(self) : None | Auto-completion with current selection. This has the same effect as the tab key in the editor. |
AutoCGetCurrent(self) : int | |
AutoCPosStart(self) : int | |
AutoCSelect(self, str) : None | |
AutoCSetFillUps(self, str) : None | |
AutoCShow(self, int, str) : None | |
AutoCStops(self, str) : None | |
BackTab(self) : None | Same as user pressing Shift+Tab in the the document editor. Moves current pos backwards based upon tabsize. |
BeginUndoAction(self) : None | Mark an undo save point. Generally this comes in pairs with EndUndoAction() where everything done to the document between the BeginUndoAction() and EndUndoAction() can be undone. |
BraceBadLight(self, pos) : None | |
BraceHighlight(self, pos, (int)maxReStyle) : None | |
BraceMatch(self, int) : int | Will match braces on the following brace character: '(', ')', '[', ']', '{', '}', '<', and '>'. It will search forward if the brace at pos is an opening brace, backwards if it is a closing brace. The match will only occur if the style's match OR the matching brace is beyond the current styling. |
CallTipActive(self) : bool | Returns true if a call tip window is currently open. |
CallTipCancel(self) : None | Cancels any displayed call tip. |
CallTipPosStart(self) : int | returns the position at which CallTipShow() was called. |
CallTipSetBack(self, int) : None | |
CallTipSetFore(self, int) : None | |
CallTipSetForeHlt(self, int) : None | |
CallTipSetHlt(self, hlStart, hlEnd) : None | Selects a region of text to display in a highlighted style. Unhilighted text is drawn in gray. |
CallTipShow(self, pos, tipText) : None | Displays a call tip box at the position given. If a call tip box is already active this has no effect. |
CanPaste(self) : bool | Returns true is document is not read only. |
CanRedo(self) : bool | |
CanUndo(self) : bool | |
Cancel(self) : None | |
CharLeft(self) : None | Moves current pos left one character. |
CharLeftExtend(self) : None | Extends the current selection left one character. |
CharLeftRectExtend(self) : None | |
CharRight(self) : None | Moves current pos right one character. |
CharRightExtend(self) : None | Extends the current selection left one character. |
CharRightRectExtend(self) : None | |
ChooseCaretX(self) : None | |
Clear(self) : None | Clears the current selection. If nothing is selected it clears the current character under the cursor. |
ClearAll(self) : None | If document is not read-only that this will clear the contents of the current document. |
ClearAllCmdKeys(self) : None | |
ClearCmdKey(self, int) : None | |
ClearDocumentStyle(self) : None | Clears the document styles to 0. Not the same as turning off syntax highlighting. see Colourize() to reapply the styles. |
ClearRegisteredImages(self) : None | Clears the images registered with the Auto-completion lists. |
Colourise(self, start, end) : None | Requests the current lexer to colourize the current document between start and end. |
ConvertEOLs(self, (int)eolStyle) : None | Convert the End of Line styles to. (CRLF: 0, CR: 1, LF: 2). |
Copy(self) : None | Copies the current selection to the clipboard. |
CopyRange(self, start, end) : None | Copies the text between start:end into the clipboard. |
CopyText(self, length, text) : None | Copies length character from the string text into the clipboard. |
CreateDocument(self) : int | Creates a new empty document. The document is not attached to any editor window. |
Cut(self) : None | Cuts the current selection from the document and places the selected text into the clipboard. |
DelLineLeft(self) : None | Deletes the characters on the current line from the current position to the end of the line. |
DelLineRight(self) : None | Deletes the character on the current line from the current position to the beginning of the line. |
DelWordLeft(self) : None | Deletes the character from the current position to the end of the word. |
DelWordRight(self) : None | Deletes the character from the current position to the beginning of the word. |
DeleteBack(self) : None | Deletes the char just behind the current position. |
DeleteBackNotLine(self) : None | |
DocLineFromVisible(self, int) : int | |
DocumentEnd(self) : None | Sets current position to the end of the document. |
DocumentEndExtend(self) : None | Extends the current selection to the end of the document. |
DocumentStart(self) : None | Sets current position to the beginning of the document. |
DocumentStartExtend(self) : None | Extends the current selection to the beginning of the document. |
EditToggleOvertype(self) : None | Toggles overwrite mode. |
EmptyUndoBuffer(self) : None | Clears the undo buffer. |
EndUndoAction(self) : None | Mark the end of an |
EnsureVisible(self, int) : None | |
EnsureVisibleEnforcePolicy(self, int) : None | |
FindColumn(self, int, int) : int | |
FindText(self, int, int, str, int) : object | |
FormFeed(self) : None | |
FormatRange(self, bool, int) : int | |
GetCharAt(self, pos) : int | Get the character at the given position. |
GetCurLine(self) : tuple | |
GetLine(self, lineNum) : str | Get the line at lineNum. |
GetLineEndPosition(self, lineNum) : int | Return the position of the EOL for line number lineNum |
GetLineIndentPosition(self, int) : int | |
GetLineIndentation(self, int) : int | |
GetLineSelEndPosition(self, int) : int | Get the ending line number of the current selection. |
GetLineSelStartPosition(self, int) : int | Get the beginning line number of the current selection. |
GetLineState(self, int) : int | |
GetLineVisible(self, int) : bool | |
GetPropertyInt(self, str, int) : int | |
GetStyleAt(self, pos) : int | Get the style at the position given by pos. |
GetStyledText(self, object) : int | |
GetText(self, int) : str | |
GetTextRange(self, start, end) : str | Get the text between postions start and end |
GotoLine(self, lineNum) : None | Move the current position to the beginning of of line lineNum |
GotoPos(self, pos) : None | Move the current position to pos |
GrabFocus(self) : None | Make this document current focus. |
HideLines(self, int, int) : None | |
HideSelection(self, bool) : None | |
Home(self) : None | Goto the start of the current line (after indention) |
HomeDisplay(self) : None | |
HomeDisplayExtend(self) : None | |
HomeExtend(self) : None | Extend the selection to the start of the current line (after indention) |
HomeRectExtend(self) : None | |
HomeWrap(self) : None | |
HomeWrapExtend(self) : None | |
IndentLine(self, int, int) : None | |
IndicGetFore(self, int) : int | |
IndicGetStyle(self, int) : int | |
IndicSetFore(self, int, int) : None | |
IndicSetStyle(self, int, int) : None | |
InsertText(self, len, text) : None | Insert text into document at the current location. |
LineCopy(self) : None | |
LineCut(self) : None | |
LineDelete(self) : None | |
LineDown(self) : None | |
LineDownExtend(self) : None | |
LineDownRectExtend(self) : None | |
LineDuplicate(self) : None | |
LineEnd(self) : None | |
LineEndDisplay(self) : None | |
LineEndDisplayExtend(self) : None | |
LineEndExtend(self) : None | |
LineEndRectExtend(self) : None | |
LineEndWrap(self) : None | |
LineEndWrapExtend(self) : None | |
LineFromPosition(self, int) : int | |
LineLength(self, int) : int | |
LineScroll(self, int, int) : None | |
LineScrollDown(self) : None | |
LineScrollUp(self) : None | |
LineTranspose(self) : None | |
LineUp(self) : None | |
LineUpExtend(self) : None | |
LineUpRectExtend(self) : None | |
LinesJoin(self) : None | |
LinesSplit(self, int) : None | |
LoadLexerLibrary(self, str) : None | |
LowerCase(self) : None | Converts the current selection to lower case. |
MarkerAdd(self, line, number) : int | Adds a Marker to the left hand margin. The displayed marker number is 1 - number. Returns a handle to the marker or -1 if the marker was not net. |
MarkerDefine(self, markerNumber, symbol) : None | Defines a marker. For a description of the various symbols please see the scintilla documentation. |
MarkerDefinePixmap(self, int, str) : None | |
MarkerDelete(self, line, markerNumber) : None | Removes a marker. If markerNumber is set to -1 the all markers on that line are removed. |
MarkerDeleteAll(self, markerNumber) : None | Deletes all instances of a given markerNumber. |
MarkerDeleteHandle(self, markerHandle) : None | Deletes a marker based upon its handle. The handle is returned by MarkerAdd. |
MarkerGet(self, line) : int | Returns a 32bit number defining what markers are defined on a line. Marker 0 is bit 0, Marker 1 is bit 1 etc. |
MarkerLineFromHandle(self, markerHandle) : int | Returns the line number for a given marker handle. This will return the line number after operations that change the line orderings. |
MarkerNext(self, startLine, mask) : int | Finds the next line that has a marker defined in the mask. For the mask marker 0 is bit 0, marker 1 is bit 1 etc… There are 32 markers available. |
MarkerPrevious(self, startLine, mask) : int | Finds the previous (searching up) line that has a marker defined in the mask. For the mask marker 0 is bit 0, marker 1 is bit 1 etc… There are 32 markers available. |
MarkerSetBack(self, markerNumber, colour) : None | Sets the marker's background colour. |
MarkerSetFore(self, markerNumber, colour) : None | Sets the marker's foreground colour. |
MoveCaretInsideView(self) : None | |
NewLine(self) : None | Inserts a new lines as though the user pressed the enter key. |
PageDown(self) : None | Moves the current position down one page as though the user pressed the Page down key. |
PageDownExtend(self) : None | Extends the current selection down one page. Same as Shift+Page Down. |
PageDownRectExtend(self) : None | |
PageUp(self) : None | Moves the current position up one page as though the user had pressed the Page Up key. |
PageUpExtend(self) : None | Extends the current selection up one page as though the user had pressed shift+Page Up. |
PageUpRectExtend(self) : None | |
ParaDown(self) : None | Moves the current position down the beginning of the next paragraph. |
ParaDownExtend(self) : None | Extends the current selection down to the beginning of the next paragraph. |
ParaUp(self) : None | Moves the current position up to the beginning of the next paragraph. |
ParaUpExtend(self) : None | Extends the current selection up to the beginning of the next paragraph. |
Paste(self) : None | Pastes the textual content of the clipboard into the document at the current position |
PointXFromPosition(self, pos : int) : int | Returns the x-coordinate for the given position. |
PointYFromPosition(self, pos : int) : int | Returns the y-coordinate for the given position. |
PositionAfter(self, int) : int | |
PositionBefore(self, int) : int | |
PositionFromLine(self, int) : int | |
PositionFromPoint(self, int, int) : int | |
PositionFromPointClose(self, int, int) : int | |
Redo(self) : None | |
RegisterImage(self, int, str) : None | |
ReleaseDocument(self, int) : None | |
ReplaceSel(self, str) : None | |
ReplaceTarget(self, int, str) : int | |
ReplaceTargetRE(self, int, str) : int | |
ScrollCaret(self) : None | |
SearchAnchor(self) : None | |
SearchInTarget(self, int, str) : int | |
SearchNext(self, int, str) : int | |
SearchPrev(self, int, str) : int | |
SelectAll(self) : None | Sets the selection start to 0 and the selection end to the length of the document. |
SetCharsDefault(self) : None | |
SetFoldFlags(self, flags : int) : None | Sets visual markers in the document (as apposed to the margin) for folding. 1 = Experimental, Draw Boxes 2 = Draw line above if expanded 4 = Draw line above if collapsed 8 = Draw line below if expanded 16 = Draw line below if collapsed |
SetFoldMarginColour(self, bool, int) : None | |
SetFoldMarginHiColour(self, bool, int) : None | |
SetHotspotActiveBack(self, bool, int) : None | |
SetHotspotActiveFore(self, bool, int) : None | |
SetHotspotActiveUnderline(self, bool) : None | |
SetHotspotSingleLine(self, bool) : None | |
SetKeyWords(self, keyWordSet : int, keyWordList : str) : None | You can set up to 9 sets of keywords. keyWordSet integer from 0 to 8 indicating the keyword set you would like to set. keyWordList is a list of keywords separated by whitespace (\x20,\n,\r,\t). Words must be made of non-whitespace characters. How the keywords are used is entirely up to the lexer. |
SetLexerLanguage(self, str) : None | |
SetLineIndentation(self, int, int) : None | |
SetLineState(self, int, int) : None | |
SetProperty(self, str, str) : None | |
SetSavePoint(self) : None | Marks the document as unchanged. This would be called right after a save operation to let scintilla know the document is unmodified. [b]Can not undo[/b] from this point. |
SetSel(self, start, end) : None | Sets the current selection. |
SetSelBack(self, bool, int) : None | |
SetSelFore(self, bool, int) : None | |
SetStyling(self, int, int) : None | |
SetStylingEx(self, int, str) : None | |
SetText(self, str) : None | Sets the text of the current document. |
SetVisiblePolicy(self, int, int) : None | |
SetWhitespaceBack(self, bool, int) : None | |
SetWhitespaceChars(self, str) : None | Sets the whitespace characters. |
SetWhitespaceFore(self, bool, int) : None | |
SetWordChars(self, str) : None | Sets the word characters. Words are defined to be contiguous sequences of these characters. This definition is used in scintilla's movement and manipulation routines. |
SetXCaretPolicy(self, int, int) : None | |
SetYCaretPolicy(self, int, int) : None | |
ShowLines(self, int, int) : None | |
StartRecord(self) : None | |
StartStyling(self, int, int) : None | |
StopRecord(self) : None | |
StutteredPageDown(self) : None | |
StutteredPageDownExtend(self) : None | |
StutteredPageUp(self) : None | |
StutteredPageUpExtend(self) : None | |
StyleResetDefault(self) : None | |
StyleSetBack(self, int, int) : None | |
StyleSetBold(self, int, bool) : None | |
StyleSetCase(self, int, int) : None | |
StyleSetChangeable(self, int, bool) : None | |
StyleSetCharacter(self, int, int) : None | |
StyleSetClearAll(self) : None | |
StyleSetEOLFilled(self, int, bool) : None | |
StyleSetFont(self, int, str) : None | |
StyleSetFore(self, int, int) : None | |
StyleSetHotSpot(self, int, bool) : None | |
StyleSetItalic(self, int, bool) : None | |
StyleSetSize(self, int, int) : None | |
StyleSetUnderline(self, int, bool) : None | |
StyleSetVisible(self, int, bool) : None | |
Tab(self) : None | Same as user pressing the tab key. |
TargetAsUTF8(self, str) : int | |
TargetFromSelection(self) : None | |
TextHeight(self, int) : int | |
TextWidth(self, int, str) : int | |
ToggleCaretSticky(self) : None | |
ToggleFold(self, int) : None | |
Undo(self) : None | Undo. |
UpperCase(self) : None | |
UsePopUp(self, bool) : None | |
UserListShow(self, int, str) : None | |
VCHome(self) : None | |
VCHomeExtend(self) : None | |
VCHomeRectExtend(self) : None | |
VCHomeWrap(self) : None | |
VCHomeWrapExtend(self) : None | |
VisibleFromDocLine(self, int) : int | |
WordEndPosition(self, int, bool) : int | Moves the current position to the end of the current word. |
WordLeft(self) : None | Moves the current position to the beginning of the next word to the left. |
WordLeftEnd(self) : None | Moves the current position to the end of the next word to the left. |
WordLeftEndExtend(self) : None | Extends the current selection to the end of the next word to the left. |
WordLeftExtend(self) : None | Extends the current selection to the beginning of the next word to the left. |
WordPartLeft(self) : None | |
WordPartLeftExtend(self) : None | |
WordPartRight(self) : None | |
WordPartRightExtend(self) : None | |
WordRight(self) : None | Moves the current position to the beginning of the next word to the right. |
WordRightEnd(self) : None | Moves the current position to the end of the next word to the right. |
WordRightEndExtend(self) : None | Extends the current selection to the end of the next word to the right. |
WordRightExtend(self) : None | Extends the current selection to the beginning of the next word to the right. |
WordStartPosition(self, int, bool) : int | Find the position of the first char of the current word. |
ZoomIn(self) : None | Uniformly increases the size of the text in this document. |
ZoomOut(self) : None | Uniformly decreases the size of the text in this document. |