eric7.QScintilla.QsciScintillaCompat

Module implementing a compatability interface class to QsciScintilla.

Global Attributes

None

Classes

QsciScintillaCompat Class implementing a compatability interface to QsciScintilla.
QsciScintillaPrintColorMode Class defining the various print color modes.

Functions

None


QsciScintillaCompat

Class implementing a compatability interface to QsciScintilla.

This class implements all the functions, that were added to QsciScintilla incrementally. This class ensures compatibility to older versions of QsciScintilla.

Signals

zoomValueChanged(int)
emitted to signal a change of the zoom value

Derived from

QsciScintilla

Class Attributes

ArrowFoldStyle
ArrowTreeFoldStyle
IndicatorStyleMax
QFontWeightMapping
UserSeparator

Class Methods

None

Methods

QsciScintillaCompat Constructor
__doSearchTarget Private method to perform the search in target.
__modificationChanged Private slot to handle the modificationChanged signal.
__setFoldMarker Private method to define a fold marker.
__userListActivated Private slot to handle the selection from the completion list.
_encodeString Protected method to encode a string depending on the current mode.
addCursor Public method to add an additional cursor.
autoCompleteFromAPIs Public method to resize list box after creation.
autoCompleteFromAll Public method to resize list box after creation.
autoCompleteFromDocument Public method to resize list box after creation.
byteAt Public method to get the raw character (bytes) at a position in the text.
canPaste Public method to test, if the paste action is available (i.e.
cancelCallTips Public method to cancel displayed call tips.
charAt Public method to get the character at a position in the text observing multibyte characters.
clearAllIndicators Public method to clear all occurrences of an indicator.
clearAlternateKeys Public method to clear the alternate key commands.
clearIndicator Public method to clear an indicator for the given range.
clearIndicatorRange Public method to clear an indicator for the given range.
clearKeys Public method to clear the key commands.
clearStyles Public method to set the styles according the selected Qt style.
currentPosition Public method to get the current position.
currentStyle Public method to get the style at the current position.
delete Public method to delete the character to the right of the cursor.
deleteBack Public method to delete the character to the left of the cursor.
deleteLineLeft Public method to delete the line to the left of the cursor.
deleteLineRight Public method to delete the line to the right of the cursor.
deleteWordLeft Public method to delete the word to the left of the cursor.
deleteWordRight Public method to delete the word to the right of the cursor.
detectEolString Public method to determine the eol string used.
editorCommand Public method to perform a simple editor command.
enableMultiCursorSupport Public method to enable support for multi cursor editing.
event Public method to handle events.
extendSelectionLeft Public method to extend the selection one character to the left.
extendSelectionRight Public method to extend the selection one character to the right.
extendSelectionToBOL Public method to extend the selection to the beginning of the line.
extendSelectionToEOL Public method to extend the selection to the end of the line.
extendSelectionWordLeft Public method to extend the selection one word to the left.
extendSelectionWordRight Public method to extend the selection one word to the right.
findFirstTarget Public method to search in a specified range of text without setting the selection.
findNextTarget Public method to find the next occurrence in the target range.
flashFindIndicator Public method to flash the find indicator for the given range.
focusOutEvent Protected method called when the editor loses focus.
foldExpandedAt Public method to determine, if a fold is expanded.
foldFlagsAt Public method to get the fold flags of a line of the document.
foldHeaderAt Public method to determine, if a line of the document is a fold header line.
foldLevelAt Public method to get the fold level of a line of the document.
getCaretLineAlwaysVisible Public method to determine, if the caret line is visible even if the editor doesn't have the focus.
getCursorFlashTime Public method to get the flash (blink) time of the cursor in milliseconds.
getDocLineFromVisibleLine Public method to convert a visible line number to a document line number (i.e.
getEndStyled Public method to get the last styled position.
getEolIndicator Public method to get the eol indicator for the current eol mode.
getFileName Public method to return the name of the file being displayed.
getFoundTarget Public method to get the recently found target.
getGlobalCursorPosition Public method to determine the point of the cursor.
getIndicator Public method to get the start and end of the indicator at the given position.
getIndicatorEndPos Public method to get the end position of an indicator at a position.
getIndicatorRange Public method to get the range of the indicator at the given position.
getIndicatorStartPos Public method to get the start position of an indicator at a position.
getLineSeparator Public method to get the line separator for the current eol mode.
getRectangularSelection Public method to retrieve the start and end of a rectangular selection.
getSelectionCount Public method to get the number of active selections.
getSelectionN Public method to get the start and end of a selection given by its index.
getSelections Public method to get the start and end coordinates of all active selections.
getSubStyleRange Public method to get the sub style range for given style number.
getVisibleLineFromDocLine Public method to convert a document line number to a visible line number (i.e.
getZoom Public method used to retrieve the current zoom factor.
gotoNextIndicator Public method to move the cursor to the next position of an indicator.
gotoPreviousIndicator Public method to move the cursor to the previous position of an indicator.
hasIndicator Public method to test for the existence of an indicator.
hasSelectedText Public method to indicate the presence of selected text.
hasSelection Public method to check for a selection.
hideFindIndicator Public method to hide the find indicator.
indentationGuideView Public method to get the indentation guide view.
indicatorDefine Public method to define the appearance of an indicator.
isModified Public method to return the modification status.
lineAt Public method to calculate the line at a position.
lineEndPosition Public method to determine the line end position of the given line.
lineIndexFromPoint Public method to convert a point to line and index.
linesOnScreen Public method to get the amount of visible lines.
monospacedStyles Public method to set the current style to be monospaced.
moveCursorLeft Public method to move the cursor left.
moveCursorRight Public method to move the cursor right.
moveCursorToEOL Public method to move the cursor to the end of line.
moveCursorWordLeft Public method to move the cursor left one word.
moveCursorWordRight Public method to move the cursor right one word.
newLineBelow Public method to insert a new line below the current one.
positionAfter Public method to get the position after the given position taking into account multibyte characters.
positionBefore Public method to get the position before the given position taking into account multibyte characters.
positionFromPoint Public method to calculate the scintilla position from a point in the window.
replaceTarget Public method to replace the string found by the last search in target.
scrollVertical Public method to scroll the text area.
selectionIsRectangle Public method to check, if the current selection is rectangular.
setAutoCompletionWidgetSize Public method to set the size of completion and user lists.
setCaretLineAlwaysVisible Public method to set the caret line visible even if the editor doesn't have the focus.
setCurrentIndicator Public method to set the current indicator.
setCursorFlashTime Public method to set the flash (blink) time of the cursor in milliseconds.
setEolModeByEolString Public method to set the eol mode given the eol string.
setFoldMarkersColors Public method to set the foreground and background colors of the fold markers.
setFolding Public method to set the folding style and margin.
setIndentationGuideView Public method to set the view of the indentation guides.
setIndicator Public method to set an indicator for the given range.
setIndicatorRange Public method to set an indicator for the given range.
setLexer Public method to set the lexer.
setModified Public slot to set the modification status.
setPrintColorMode Public method to set the print color mode (i.e.
setRectangularSelection Public method to set a rectangular selection.
setRectangularSelectionModifier Public method to set the modifier key used to create a rectangular selection by doing a mouse drag.
setStyling Public method to style some text.
setVirtualSpaceOptions Public method to set the virtual space usage options.
setWrapStartIndent Public method to set a the amount of characters wrapped sublines shall be indented.
showFindIndicator Public method to show the find indicator for the given range.
showUserList Public method to show a user supplied list.
startStyling Public method to prepare styling.
styleAt Public method to get the style at a position in the text.
updateUserListSize Public method to resize the completion list to fit with contents.
updateVerticalScrollBar Public method to update the vertical scroll bar to reflect the additional lines added by annotations.
zoomIn Public method used to increase the zoom factor.
zoomOut Public method used to decrease the zoom factor.
zoomTo Public method used to zoom to a specific zoom factor.

Static Methods

None

QsciScintillaCompat (Constructor)

QsciScintillaCompat(parent=None)

Constructor

parent (QWidget)
parent widget

QsciScintillaCompat.__doSearchTarget

__doSearchTarget()

Private method to perform the search in target.

Return:
flag indicating a successful search
Return Type:
bool

QsciScintillaCompat.__modificationChanged

__modificationChanged(m)

Private slot to handle the modificationChanged signal.

m (bool)
modification status

QsciScintillaCompat.__setFoldMarker

__setFoldMarker(marknr, mark=QsciScintilla.SC_MARK_EMPTY)

Private method to define a fold marker.

marknr (int)
marker number to define
mark (int)
fold mark symbol to be used

QsciScintillaCompat.__userListActivated

__userListActivated(listId, txt)

Private slot to handle the selection from the completion list.

Note: This works around an issue of some window managers taking focus away from the application when clicked inside a completion list but not giving it back when an item is selected via a double-click.

listId (int)
the ID of the user list
txt (str)
the selected text

QsciScintillaCompat._encodeString

_encodeString(string)

Protected method to encode a string depending on the current mode.

string (str)
string to be encoded
Return:
encoded string
Return Type:
bytes

QsciScintillaCompat.addCursor

addCursor(line, index)

Public method to add an additional cursor.

line (int)
line number for the cursor
index (int)
index number for the cursor

QsciScintillaCompat.autoCompleteFromAPIs

autoCompleteFromAPIs()

Public method to resize list box after creation.

QsciScintillaCompat.autoCompleteFromAll

autoCompleteFromAll()

Public method to resize list box after creation.

QsciScintillaCompat.autoCompleteFromDocument

autoCompleteFromDocument()

Public method to resize list box after creation.

QsciScintillaCompat.byteAt

byteAt(pos)

Public method to get the raw character (bytes) at a position in the text.

pos (int)
position in the text
Return:
raw character at the requested position or empty bytes, if the position is negative or past the end of the document
Return Type:
bytes

QsciScintillaCompat.canPaste

canPaste()

Public method to test, if the paste action is available (i.e. if the clipboard contains some text).

Return:
flag indicating the availability of 'paste'
Return Type:
bool

QsciScintillaCompat.cancelCallTips

cancelCallTips()

Public method to cancel displayed call tips.

QsciScintillaCompat.charAt

charAt(pos)

Public method to get the character at a position in the text observing multibyte characters.

pos (int)
position in the text
Return:
character at the requested position or empty string, if the position is negative or past the end of the document
Return Type:
str

QsciScintillaCompat.clearAllIndicators

clearAllIndicators(indicator)

Public method to clear all occurrences of an indicator.

indicator (int)
number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)

QsciScintillaCompat.clearAlternateKeys

clearAlternateKeys()

Public method to clear the alternate key commands.

QsciScintillaCompat.clearIndicator

clearIndicator(indicator, sline, sindex, eline, eindex)

Public method to clear an indicator for the given range.

indicator (int)
number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)
sline (int)
line number of the indicator start
sindex (int)
index of the indicator start
eline (int)
line number of the indicator end
eindex (int)
index of the indicator end

QsciScintillaCompat.clearIndicatorRange

clearIndicatorRange(indicator, spos, length)

Public method to clear an indicator for the given range.

indicator (int)
number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)
spos (int)
position of the indicator start
length (int)
length of the indicator

QsciScintillaCompat.clearKeys

clearKeys()

Public method to clear the key commands.

QsciScintillaCompat.clearStyles

clearStyles()

Public method to set the styles according the selected Qt style.

QsciScintillaCompat.currentPosition

currentPosition()

Public method to get the current position.

Return:
absolute position of the cursor
Return Type:
int

QsciScintillaCompat.currentStyle

currentStyle()

Public method to get the style at the current position.

Return:
style at the current position
Return Type:
int

QsciScintillaCompat.delete

delete()

Public method to delete the character to the right of the cursor.

QsciScintillaCompat.deleteBack

deleteBack()

Public method to delete the character to the left of the cursor.

QsciScintillaCompat.deleteLineLeft

deleteLineLeft()

Public method to delete the line to the left of the cursor.

QsciScintillaCompat.deleteLineRight

deleteLineRight()

Public method to delete the line to the right of the cursor.

QsciScintillaCompat.deleteWordLeft

deleteWordLeft()

Public method to delete the word to the left of the cursor.

QsciScintillaCompat.deleteWordRight

deleteWordRight()

Public method to delete the word to the right of the cursor.

QsciScintillaCompat.detectEolString

detectEolString(txt)

Public method to determine the eol string used.

txt (str)
text from which to determine the eol string
Return:
eol string
Return Type:
str

QsciScintillaCompat.editorCommand

editorCommand(cmd)

Public method to perform a simple editor command.

cmd (int)
the scintilla command to be performed

QsciScintillaCompat.enableMultiCursorSupport

enableMultiCursorSupport()

Public method to enable support for multi cursor editing.

QsciScintillaCompat.event

event(evt)

Public method to handle events.

Note: We are not interested in the standard QsciScintilla event handling because we do it ourselves.

evt (QEvent)
event object to handle
Return:
result of the event handling
Return Type:
bool

QsciScintillaCompat.extendSelectionLeft

extendSelectionLeft()

Public method to extend the selection one character to the left.

QsciScintillaCompat.extendSelectionRight

extendSelectionRight()

Public method to extend the selection one character to the right.

QsciScintillaCompat.extendSelectionToBOL

extendSelectionToBOL()

Public method to extend the selection to the beginning of the line.

QsciScintillaCompat.extendSelectionToEOL

extendSelectionToEOL()

Public method to extend the selection to the end of the line.

QsciScintillaCompat.extendSelectionWordLeft

extendSelectionWordLeft()

Public method to extend the selection one word to the left.

QsciScintillaCompat.extendSelectionWordRight

extendSelectionWordRight()

Public method to extend the selection one word to the right.

QsciScintillaCompat.findFirstTarget

findFirstTarget(expr_, re_, cs_, wo_, begline=-1, begindex=-1, endline=-1, endindex=-1, ws_=False, posix=False, cxx11=False, )

Public method to search in a specified range of text without setting the selection.

expr_ (str)
search expression
re_ (bool)
flag indicating a regular expression
cs_ (bool)
flag indicating a case sensitive search
wo_ (bool)
flag indicating a word only search
begline (int)
line number to start from (-1 to indicate current position)
begindex (int)
index to start from (-1 to indicate current position)
endline (int)
line number to stop at (-1 to indicate end of document)
endindex (int)
index number to stop at (-1 to indicate end of document)
ws_ (bool)
flag indicating a word start search
posix (bool)
flag indicating a POSIX regular expression
cxx11 (bool)
flag indicating a CXX-11 regular expression
Return:
flag indicating a successful search
Return Type:
bool

QsciScintillaCompat.findNextTarget

findNextTarget()

Public method to find the next occurrence in the target range.

Return:
flag indicating a successful search
Return Type:
bool

QsciScintillaCompat.flashFindIndicator

flashFindIndicator(sline, sindex, eline, eindex)

Public method to flash the find indicator for the given range.

sline (int)
line number of the indicator start
sindex (int)
index of the indicator start
eline (int)
line number of the indicator end
eindex (int)
index of the indicator end

QsciScintillaCompat.focusOutEvent

focusOutEvent(event)

Protected method called when the editor loses focus.

event (QFocusEvent)
event object

QsciScintillaCompat.foldExpandedAt

foldExpandedAt(line)

Public method to determine, if a fold is expanded.

line (int)
line number
Return:
flag indicating the fold expansion state of the line
Return Type:
bool

QsciScintillaCompat.foldFlagsAt

foldFlagsAt(line)

Public method to get the fold flags of a line of the document.

line (int)
line number
Return:
fold flags of the given line
Return Type:
int

QsciScintillaCompat.foldHeaderAt

foldHeaderAt(line)

Public method to determine, if a line of the document is a fold header line.

line (int)
line number
Return:
flag indicating a fold header line
Return Type:
bool

QsciScintillaCompat.foldLevelAt

foldLevelAt(line)

Public method to get the fold level of a line of the document.

line (int)
line number
Return:
fold level of the given line
Return Type:
int

QsciScintillaCompat.getCaretLineAlwaysVisible

getCaretLineAlwaysVisible()

Public method to determine, if the caret line is visible even if the editor doesn't have the focus.

Return:
flag indicating an always visible caret line
Return Type:
bool

QsciScintillaCompat.getCursorFlashTime

getCursorFlashTime()

Public method to get the flash (blink) time of the cursor in milliseconds.

The flash time is the time required to display, invert and restore the caret display. Usually the text cursor is displayed for half the cursor flash time, then hidden for the same amount of time.

Return:
flash time of the cursor in milliseconds
Return Type:
int

QsciScintillaCompat.getDocLineFromVisibleLine

getDocLineFromVisibleLine(displayLine)

Public method to convert a visible line number to a document line number (i.e. respect folded lines and annotations).

displayLine (int)
display line number to be converted
Return:
document line number
Return Type:
int

QsciScintillaCompat.getEndStyled

getEndStyled()

Public method to get the last styled position.

Return:
end position of the last styling run
Return Type:
int

QsciScintillaCompat.getEolIndicator

getEolIndicator()

Public method to get the eol indicator for the current eol mode.

Return:
eol indicator
Return Type:
str

QsciScintillaCompat.getFileName

getFileName()

Public method to return the name of the file being displayed.

Return:
filename of the displayed file
Return Type:
str

QsciScintillaCompat.getFoundTarget

getFoundTarget()

Public method to get the recently found target.

Return:
found target as a tuple of starting position and target length
Return Type:
tuple of (int, int)

QsciScintillaCompat.getGlobalCursorPosition

getGlobalCursorPosition()

Public method to determine the point of the cursor.

Return:
point of the cursor
Return Type:
QPoint

QsciScintillaCompat.getIndicator

getIndicator(indicator, pos=None)

Public method to get the start and end of the indicator at the given position.

If the position is given as 'None', the current cursor position is used.

indicator (int)
ID of the indicator
pos (int (optional))
position within the indicator (defaults to None)
Return:
tuple containing the start line and index and the end line and index
Return Type:
tuple of (int, int, int, int)

QsciScintillaCompat.getIndicatorEndPos

getIndicatorEndPos(indicator, pos)

Public method to get the end position of an indicator at a position.

indicator (int)
ID of the indicator
pos (int)
position within the indicator
Return:
end position of the indicator
Return Type:
int

QsciScintillaCompat.getIndicatorRange

getIndicatorRange(indicator, pos=None)

Public method to get the range of the indicator at the given position.

If the position is given as 'None', the current cursor position is used.

indicator (int)
ID of the indicator
pos (int (optional))
position within the indicator (defaults to None)
Return:
start position and length of the indicator
Return Type:
tuple of (int, int)

QsciScintillaCompat.getIndicatorStartPos

getIndicatorStartPos(indicator, pos)

Public method to get the start position of an indicator at a position.

indicator (int)
ID of the indicator
pos (int)
position within the indicator
Return:
start position of the indicator
Return Type:
int

QsciScintillaCompat.getLineSeparator

getLineSeparator()

Public method to get the line separator for the current eol mode.

Return:
eol string
Return Type:
str

QsciScintillaCompat.getRectangularSelection

getRectangularSelection()

Public method to retrieve the start and end of a rectangular selection.

Return:
tuple with start line and index and end line and index
Return Type:
tuple of (int, int, int, int)

QsciScintillaCompat.getSelectionCount

getSelectionCount()

Public method to get the number of active selections.

Return:
number of active selection
Return Type:
int

QsciScintillaCompat.getSelectionN

getSelectionN(index)

Public method to get the start and end of a selection given by its index.

index (int)
index of the selection
Return:
tuple with start line and index and end line and index for the given selection
Return Type:
tuple of (int, int, int, int)

QsciScintillaCompat.getSelections

getSelections()

Public method to get the start and end coordinates of all active selections.

Return:
list of tuples with start line and index and end line and index of each active selection
Return Type:
list of [tuple of (int, int, int, int)]

QsciScintillaCompat.getSubStyleRange

getSubStyleRange(styleNr)

Public method to get the sub style range for given style number.

styleNr (int)
Number of the base style
Return:
start index of the sub style and their count
Return Type:
int, int

QsciScintillaCompat.getVisibleLineFromDocLine

getVisibleLineFromDocLine(docLine)

Public method to convert a document line number to a visible line number (i.e. respect folded lines and annotations).

docLine (int)
document line number to be converted
Return:
visible line number
Return Type:
int

QsciScintillaCompat.getZoom

getZoom()

Public method used to retrieve the current zoom factor.

Return:
zoom factor
Return Type:
int

QsciScintillaCompat.gotoNextIndicator

gotoNextIndicator(indicator, wrap)

Public method to move the cursor to the next position of an indicator.

This method ensures, that the position found is visible (i.e. unfolded and inside the visible range). The text containing the indicator is selected.

indicator (int)
ID of the indicator to search
wrap (bool)
flag indicating to wrap around at the beginning of the text
Return:
flag indicating if the indicator was found
Return Type:
bool

QsciScintillaCompat.gotoPreviousIndicator

gotoPreviousIndicator(indicator, wrap)

Public method to move the cursor to the previous position of an indicator.

This method ensures, that the position found is visible (i.e. unfolded and inside the visible range). The text containing the indicator is selected.

indicator (int)
ID of the indicator to search
wrap (bool)
flag indicating to wrap around at the beginning of the text
Return:
flag indicating if the indicator was found
Return Type:
bool

QsciScintillaCompat.hasIndicator

hasIndicator(indicator, pos)

Public method to test for the existence of an indicator.

indicator (int)
number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)
pos (int)
position to test
Return:
flag indicating the existence of the indicator
Return Type:
bool

QsciScintillaCompat.hasSelectedText

hasSelectedText()

Public method to indicate the presence of selected text.

This is an overriding method to cope with a bug in QsciScintilla.

Return:
flag indicating the presence of selected text
Return Type:
bool

QsciScintillaCompat.hasSelection

hasSelection()

Public method to check for a selection.

Return:
flag indicating the presence of a selection
Return Type:
bool

QsciScintillaCompat.hideFindIndicator

hideFindIndicator()

Public method to hide the find indicator.

QsciScintillaCompat.indentationGuideView

indentationGuideView()

Public method to get the indentation guide view.

Return:
indentation guide view (SC_IV_NONE, SC_IV_REAL, SC_IV_LOOKFORWARD or SC_IV_LOOKBOTH)
Return Type:
int

QsciScintillaCompat.indicatorDefine

indicatorDefine(indicator, style, color)

Public method to define the appearance of an indicator.

indicator (int)
number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)
style (int)
style to be used for the indicator (QsciScintilla.INDIC_PLAIN, QsciScintilla.INDIC_SQUIGGLE, QsciScintilla.INDIC_TT, QsciScintilla.INDIC_DIAGONAL, QsciScintilla.INDIC_STRIKE, QsciScintilla.INDIC_HIDDEN, QsciScintilla.INDIC_BOX, QsciScintilla.INDIC_ROUNDBOX, QsciScintilla.INDIC_STRAIGHTBOX, QsciScintilla.INDIC_FULLBOX, QsciScintilla.INDIC_DASH, QsciScintilla.INDIC_DOTS, QsciScintilla.INDIC_SQUIGGLELOW, QsciScintilla.INDIC_DOTBOX, QsciScintilla.INDIC_GRADIENT, QsciScintilla.INDIC_GRADIENTCENTRE, QsciScintilla.INDIC_SQUIGGLEPIXMAP, QsciScintilla.INDIC_COMPOSITIONTHICK, QsciScintilla.INDIC_COMPOSITIONTHIN, QsciScintilla.INDIC_TEXTFORE, QsciScintilla.INDIC_POINT, QsciScintilla.INDIC_POINTCHARACTER depending upon QScintilla version)
color (QColor)
color to be used by the indicator
Raises ValueError:
the indicator or style are not valid

QsciScintillaCompat.isModified

isModified()

Public method to return the modification status.

Return:
flag indicating the modification status
Return Type:
bool

QsciScintillaCompat.lineAt

lineAt(pos)

Public method to calculate the line at a position.

This variant is able to calculate the line for positions in the margins and for empty lines.

pos (int or QPoint)
position to calculate the line for
Return:
linenumber at position or -1, if there is no line at pos (zero based)
Return Type:
int

QsciScintillaCompat.lineEndPosition

lineEndPosition(line)

Public method to determine the line end position of the given line.

line (int)
line number
Return:
position of the line end disregarding line end characters
Return Type:
int

QsciScintillaCompat.lineIndexFromPoint

lineIndexFromPoint(point)

Public method to convert a point to line and index.

point (QPoint)
point to be converted
Return:
tuple containing the line number and index number
Return Type:
tuple of (int, int)

QsciScintillaCompat.linesOnScreen

linesOnScreen()

Public method to get the amount of visible lines.

Return:
amount of visible lines
Return Type:
int

QsciScintillaCompat.monospacedStyles

monospacedStyles(font)

Public method to set the current style to be monospaced.

font (QFont)
font to be used

QsciScintillaCompat.moveCursorLeft

moveCursorLeft()

Public method to move the cursor left.

QsciScintillaCompat.moveCursorRight

moveCursorRight()

Public method to move the cursor right.

QsciScintillaCompat.moveCursorToEOL

moveCursorToEOL()

Public method to move the cursor to the end of line.

QsciScintillaCompat.moveCursorWordLeft

moveCursorWordLeft()

Public method to move the cursor left one word.

QsciScintillaCompat.moveCursorWordRight

moveCursorWordRight()

Public method to move the cursor right one word.

QsciScintillaCompat.newLineBelow

newLineBelow()

Public method to insert a new line below the current one.

QsciScintillaCompat.positionAfter

positionAfter(pos)

Public method to get the position after the given position taking into account multibyte characters.

pos (int)
position
Return:
position after the given one
Return Type:
int

QsciScintillaCompat.positionBefore

positionBefore(pos)

Public method to get the position before the given position taking into account multibyte characters.

pos (int)
position
Return:
position before the given one
Return Type:
int

QsciScintillaCompat.positionFromPoint

positionFromPoint(point)

Public method to calculate the scintilla position from a point in the window.

point (QPoint)
point in the window
Return:
scintilla position or -1 to indicate, that the point is not near any character
Return Type:
int

QsciScintillaCompat.replaceTarget

replaceTarget(replaceStr)

Public method to replace the string found by the last search in target.

replaceStr (str)
replacement string or regexp

QsciScintillaCompat.scrollVertical

scrollVertical(lines)

Public method to scroll the text area.

lines (int)
number of lines to scroll (negative scrolls up, positive scrolls down)

QsciScintillaCompat.selectionIsRectangle

selectionIsRectangle()

Public method to check, if the current selection is rectangular.

Return:
flag indicating a rectangular selection
Return Type:
bool

QsciScintillaCompat.setAutoCompletionWidgetSize

setAutoCompletionWidgetSize(chars, lines)

Public method to set the size of completion and user lists.

chars (int)
max. number of chars to show
lines (int)
max. number of lines to show

QsciScintillaCompat.setCaretLineAlwaysVisible

setCaretLineAlwaysVisible(alwaysVisible)

Public method to set the caret line visible even if the editor doesn't have the focus.

alwaysVisible (bool)
flag indicating that the caret line shall be visible even if the editor doesn't have the focus

QsciScintillaCompat.setCurrentIndicator

setCurrentIndicator(indicator)

Public method to set the current indicator.

indicator (int)
number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)
Raises ValueError:
the indicator or style are not valid

QsciScintillaCompat.setCursorFlashTime

setCursorFlashTime(time)

Public method to set the flash (blink) time of the cursor in milliseconds.

The flash time is the time required to display, invert and restore the caret display. Usually the text cursor is displayed for half the cursor flash time, then hidden for the same amount of time.

time (int)
flash time of the cursor in milliseconds

QsciScintillaCompat.setEolModeByEolString

setEolModeByEolString(eolStr)

Public method to set the eol mode given the eol string.

eolStr (str)
eol string

QsciScintillaCompat.setFoldMarkersColors

setFoldMarkersColors(foreColor, backColor)

Public method to set the foreground and background colors of the fold markers.

foreColor (QColor)
foreground color
backColor (QColor)
background color

QsciScintillaCompat.setFolding

setFolding(style, margin=2)

Public method to set the folding style and margin.

style (int)
folding style to set
margin (int)
margin number

QsciScintillaCompat.setIndentationGuideView

setIndentationGuideView(view)

Public method to set the view of the indentation guides.

view (int)
view of the indentation guides (SC_IV_NONE, SC_IV_REAL, SC_IV_LOOKFORWARD or SC_IV_LOOKBOTH)

QsciScintillaCompat.setIndicator

setIndicator(indicator, sline, sindex, eline, eindex)

Public method to set an indicator for the given range.

indicator (int)
number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)
sline (int)
line number of the indicator start
sindex (int)
index of the indicator start
eline (int)
line number of the indicator end
eindex (int)
index of the indicator end

QsciScintillaCompat.setIndicatorRange

setIndicatorRange(indicator, spos, length)

Public method to set an indicator for the given range.

indicator (int)
number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)
spos (int)
position of the indicator start
length (int)
length of the indicator

QsciScintillaCompat.setLexer

setLexer(lex=None)

Public method to set the lexer.

lex (QsciScintilla.QLexer)
lexer to be set or None to reset it.

QsciScintillaCompat.setModified

setModified(m)

Public slot to set the modification status.

m (bool)
new modification status

QsciScintillaCompat.setPrintColorMode

setPrintColorMode(colorMode)

Public method to set the print color mode (i.e. background handling).

colorMode (QsciScintillaPrintColorMode)
color mode to be set

QsciScintillaCompat.setRectangularSelection

setRectangularSelection(startLine, startIndex, endLine, endIndex)

Public method to set a rectangular selection.

startLine (int)
line number of the start of the selection
startIndex (int)
index number of the start of the selection
endLine (int)
line number of the end of the selection
endIndex (int)
index number of the end of the selection

QsciScintillaCompat.setRectangularSelectionModifier

setRectangularSelectionModifier(modifier)

Public method to set the modifier key used to create a rectangular selection by doing a mouse drag.

modifier (Qt.KeyboardModifier)
modifier key to be used

QsciScintillaCompat.setStyling

setStyling(length, style)

Public method to style some text.

length (int)
length of text to style
style (int)
style to set for text

QsciScintillaCompat.setVirtualSpaceOptions

setVirtualSpaceOptions(options)

Public method to set the virtual space usage options.

options (int)
usage options to set (0 to 3)

QsciScintillaCompat.setWrapStartIndent

setWrapStartIndent(indent)

Public method to set a the amount of characters wrapped sublines shall be indented.

indent (int)
amount of characters to indent

QsciScintillaCompat.showFindIndicator

showFindIndicator(sline, sindex, eline, eindex)

Public method to show the find indicator for the given range.

sline (int)
line number of the indicator start
sindex (int)
index of the indicator start
eline (int)
line number of the indicator end
eindex (int)
index of the indicator end

QsciScintillaCompat.showUserList

showUserList(listId, lst)

Public method to show a user supplied list.

listId (int)
id of the list
lst (list of str)
list to be show

QsciScintillaCompat.startStyling

startStyling(pos, mask)

Public method to prepare styling.

pos (int)
styling positition to start at
mask (int)
mask of bits to use for styling

QsciScintillaCompat.styleAt

styleAt(pos)

Public method to get the style at a position in the text.

pos (int)
position in the text
Return:
style at the requested position or 0, if the position is negative or past the end of the document
Return Type:
int

QsciScintillaCompat.updateUserListSize

updateUserListSize()

Public method to resize the completion list to fit with contents.

QsciScintillaCompat.updateVerticalScrollBar

updateVerticalScrollBar()

Public method to update the vertical scroll bar to reflect the additional lines added by annotations.

QsciScintillaCompat.zoomIn

zoomIn(zoom=1)

Public method used to increase the zoom factor.

zoom (int)
zoom factor increment

QsciScintillaCompat.zoomOut

zoomOut(zoom=1)

Public method used to decrease the zoom factor.

zoom (int)
zoom factor decrement

QsciScintillaCompat.zoomTo

zoomTo(zoom)

Public method used to zoom to a specific zoom factor.

zoom (int)
zoom factor
Up


QsciScintillaPrintColorMode

Class defining the various print color modes.

Derived from

enum.IntEnum

Class Attributes

BlackOnWhite
ColorOnWhite
ColorOnWhiteDefaultBackground
InvertLight
Normal
ScreenColors

Class Methods

None

Methods

None

Static Methods

None
Up