# eric6.QScintilla.QsciScintillaCompat

Module implementing a compatability interface class to QsciScintilla.

### Global Attributes

None

### Classes

QsciScintillaCompat | Class implementing a compatability interface to QsciScintilla.

### Functions

QSCINTILLA_VERSION | Module function to return the QScintilla version.

## 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
UserSeparator

### Class Methods

None

### Methods

QsciScintillaCompat | Constructor
__completionListSelected | Private slot to handle the selection from the completion list.
__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.
_encodeString | Protected method to encode a string depending on the current mode.
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.
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.
contractedFolds | Public method to get a list of line numbers of collapsed folds.
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.
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.
findFirst | Public method to search in the current editor text.
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.
getIndicatorEndPos | Public method to get the end position of an indicator at a 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.
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.
inputMethodEvent | Protected method to cope with a glitch in some Qscintilla versions handling input events.
inputMethodQuery | Public method to cope with a glitch in some Qscintilla versions handling input events.
insert | Public method to insert text at the cursor position.
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.
lineIndexFromPosition | Public method to convert an absolute position 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.
positionFromLineIndex | Public method to convert line and index to an absolute position.
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.
setCaretLineAlwaysVisible | Public method to set the caret line visible even if the editor doesn't have the focus.
setContractedFolds | Public method to set a list of line numbers of collapsed folds.
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.
setRectangularSelection | Public method to set a rectangular selection.
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
  parent widget (QWidget)

#### QsciScintillaCompat.__completionListSelected

__completionListSelected(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
  the ID of the user list (integer)
txt
  the selected text (string)

#### QsciScintillaCompat.__doSearchTarget

__doSearchTarget()

Private method to perform the search in target.

Returns:
  flag indicating a successful search (boolean)

#### QsciScintillaCompat.__modificationChanged

__modificationChanged(m)

Private slot to handle the modificationChanged signal.

m
  modification status (boolean)

#### QsciScintillaCompat.__setFoldMarker

__setFoldMarker(marknr, mark=QsciScintilla.SC_MARK_EMPTY)

Private method to define a fold marker.

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

#### QsciScintillaCompat._encodeString

_encodeString(string)

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

string
  string to be encoded (str)

Returns:
  encoded string (bytes)

#### 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
  position in the text (integer)

Returns:
  raw character at the requested position or empty bytes, if the position is negative or past the end of the document (bytes)

#### QsciScintillaCompat.canPaste

canPaste()

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

Returns:
  flag indicating the availability of 'paste'

Return Type:
  bool

#### QsciScintillaCompat.charAt

charAt(pos)

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

pos
  position in the text (integer)

Returns:
  character at the requested position or empty string, if the position is negative or past the end of the document (string)

#### QsciScintillaCompat.clearAllIndicators

clearAllIndicators(indicator)

Public method to clear all occurrences of an indicator.

indicator
  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
  number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)
sline
  line number of the indicator start (integer)
sindex
  index of the indicator start (integer)
eline
  line number of the indicator end (integer)
eindex
  index of the indicator end (integer)

#### QsciScintillaCompat.clearIndicatorRange

clearIndicatorRange(indicator, spos, length)

Public method to clear an indicator for the given range.

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

#### 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.contractedFolds

contractedFolds()

Public method to get a list of line numbers of collapsed folds.

Returns:
  list of line numbers of folded lines (list of integer)

#### QsciScintillaCompat.currentPosition

currentPosition()

Public method to get the current position.

Returns:
  absolute position of the cursor (integer)

#### QsciScintillaCompat.currentStyle

currentStyle()

Public method to get the style at the current position.

Returns:
  style at the current position (integer)

#### 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
  text from which to determine the eol string (string)

Returns:
  eol string (string)

#### QsciScintillaCompat.editorCommand

editorCommand(cmd)

Public method to perform a simple editor command.

cmd
  the scintilla command to be performed (integer)

#### 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
  event object to handle (QEvent)

Returns:
  result of the event handling (boolean)

#### 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.findFirst

findFirst(expression, regexp, caseSensitive, word, wrap, forward=True, line=-1, index=-1, show=True, posix=False, cxx11=False)

Public method to search in the current editor text.

expression (str)
  search expression
regexp (bool)
  flag indicating a regular expression
caseSensitive (bool)
  flag indicating a case sensitive search
word (bool)
  flag indicating a word only search
wrap (bool)
  flag indicating to warp around
forward (bool)
  flag indicating the search direction
line (int)
  line to start the search on
index (int)
  index to start the search on
show (bool)
  flag indicating to set the selection to the found expression
posix (bool)
  flag indicating the POSIX regular expression search mode
cxx11 (bool)
  flag indicating the CXX11 regular expression search mode

Returns:
  flag indicating a successful search

Return Type:
  bool

#### 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 (boolean)
posix (bool)
cxx11 (bool)

Returns:
  flag indicating a successful search

Return Type:
  bool

#### QsciScintillaCompat.findNextTarget

findNextTarget()

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

Returns:
  flag indicating a successful search (boolean)

#### QsciScintillaCompat.flashFindIndicator

flashFindIndicator(sline, sindex, eline, eindex)

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

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

#### QsciScintillaCompat.focusOutEvent

focusOutEvent(event)

Protected method called when the editor loses focus.

event
  event object (QFocusEvent)

#### QsciScintillaCompat.foldExpandedAt

foldExpandedAt(line)

Public method to determine, if a fold is expanded.

line
  line number (integer)

Returns:
  flag indicating the fold expansion state of the line (boolean)

#### QsciScintillaCompat.foldFlagsAt

foldFlagsAt(line)

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

line
  line number (integer)

Returns:
  fold flags of the given line (integer)

#### QsciScintillaCompat.foldHeaderAt

foldHeaderAt(line)

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

line
  line number (integer)

Returns:
  flag indicating a fold header line (boolean)

#### QsciScintillaCompat.foldLevelAt

foldLevelAt(line)

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

line
  line number (integer)

Returns:
  fold level of the given line (integer)

#### QsciScintillaCompat.getCaretLineAlwaysVisible

getCaretLineAlwaysVisible()

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

Returns:
  flag indicating an always visible caret line (boolean)

#### 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.

Returns:
  flash time of the cursor in milliseconds (integer)

#### 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

Returns:
  document line number

Return Type:
  int

#### QsciScintillaCompat.getEndStyled

getEndStyled()

Public method to get the last styled position.

Returns:
  end position of the last styling run (integer)

#### QsciScintillaCompat.getEolIndicator

getEolIndicator()

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

Returns:
  eol indicator (string)

#### QsciScintillaCompat.getFileName

getFileName()

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

Returns:
  filename of the displayed file (string)

#### QsciScintillaCompat.getFoundTarget

getFoundTarget()

Public method to get the recently found target.

Returns:
  found target as a tuple of starting position and target length (integer, integer)

#### QsciScintillaCompat.getIndicatorEndPos

getIndicatorEndPos(indicator, pos)

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

indicator
  ID of the indicator (integer)
pos
  position within the indicator (integer)

Returns:
  end position of the indicator (integer)

#### QsciScintillaCompat.getIndicatorStartPos

getIndicatorStartPos(indicator, pos)

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

indicator
  ID of the indicator (integer)
pos
  position within the indicator (integer)

Returns:
  start position of the indicator (integer)

#### QsciScintillaCompat.getLineSeparator

getLineSeparator()

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

Returns:
  eol string (string)

#### QsciScintillaCompat.getRectangularSelection

getRectangularSelection()

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

Returns:
  tuple with start line and index and end line and index (tuple of four int)

#### QsciScintillaCompat.getSelectionCount

getSelectionCount()

Public method to get the number of active selections.

Returns:
  number of active selection (integer)

#### QsciScintillaCompat.getSelectionN

getSelectionN(index)

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

index
  index of the selection (integer)

Returns:
  tuple with start line and index and end line and index (tuple of four int) for the given selection

#### QsciScintillaCompat.getSelections

getSelections()

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

Returns:
  list of tuples with start line and index and end line and index of each active selection (list of tuples of four 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

Returns:
  visible line number

Return Type:
  int

#### QsciScintillaCompat.getZoom

getZoom()

Public method used to retrieve the current zoom factor.

Returns:
  zoom factor (integer)

#### 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
  ID of the indicator to search (integer)
wrap
  flag indicating to wrap around at the beginning of the text (boolean)

Returns:
  flag indicating if the indicator was found (boolean)

#### 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
  ID of the indicator to search (integer)
wrap
  flag indicating to wrap around at the beginning of the text (boolean)

Returns:
  flag indicating if the indicator was found (boolean)

#### QsciScintillaCompat.hasIndicator

hasIndicator(indicator, pos)

Public method to test for the existence of an indicator.

indicator
  number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)
pos
  position to test (integer)

Returns:
  flag indicating the existence of the indicator (boolean)

#### QsciScintillaCompat.hasSelectedText

hasSelectedText()

Public method to indicate the presence of selected text.

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

Returns:
  flag indicating the presence of selected text (boolean)

#### QsciScintillaCompat.hasSelection

hasSelection()

Public method to check for a selection.

Returns:
  flag indicating the presence of a selection (boolean)

#### QsciScintillaCompat.hideFindIndicator

hideFindIndicator()

Public method to hide the find indicator.

#### QsciScintillaCompat.indentationGuideView

indentationGuideView()

Public method to get the indentation guide view.

Returns:
  indentation guide view (SC_IV_NONE, SC_IV_REAL, SC_IV_LOOKFORWARD or SC_IV_LOOKBOTH)

#### QsciScintillaCompat.indicatorDefine

indicatorDefine(indicator, style, color)

Public method to define the appearance of an indicator.

indicator
  number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)
style
  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
  color to be used by the indicator (QColor)

Raises ValueError:
  the indicator or style are not valid

#### QsciScintillaCompat.inputMethodEvent

inputMethodEvent(evt)

Protected method to cope with a glitch in some Qscintilla versions handling input events.

Note: This simply disables the Qscintilla behavior.

evt
  reference to the input method event object (QInputMethodEvent)

#### QsciScintillaCompat.inputMethodQuery

inputMethodQuery(query)

Public method to cope with a glitch in some Qscintilla versions handling input events.

Note: This simply disables the Qscintilla behavior.

query
  reference to the input method query object (Qt.InputMethodQuery)

Returns:
  object containing the requested information

#### QsciScintillaCompat.insert

insert(txt)

Public method to insert text at the cursor position.

txt (str)
  text to be inserted

#### QsciScintillaCompat.isModified

isModified()

Public method to return the modification status.

Returns:
  flag indicating the modification status (boolean)

#### 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
  position to calculate the line for (integer or QPoint)

Returns:
  linenumber at position or -1, if there is no line at pos (integer, zero based)

#### QsciScintillaCompat.lineEndPosition

lineEndPosition(line)

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

line
  line number (integer)

Returns:
  position of the line end disregarding line end characters (integer)

#### QsciScintillaCompat.lineIndexFromPosition

lineIndexFromPosition(pos)

Public method to convert an absolute position to line and index.

pos
  absolute position in the editor (integer)

Returns:
  tuple of line number (integer) and index number (integer)

#### QsciScintillaCompat.linesOnScreen

linesOnScreen()

Public method to get the amount of visible lines.

Returns:
  amount of visible lines (integer)

#### QsciScintillaCompat.monospacedStyles

monospacedStyles(font)

Public method to set the current style to be monospaced.

font
  font to be used (QFont)

#### 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
  position (integer)

Returns:
  position after the given one (integer)

#### QsciScintillaCompat.positionBefore

positionBefore(pos)

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

pos
  position (integer)

Returns:
  position before the given one (integer)

#### QsciScintillaCompat.positionFromLineIndex

positionFromLineIndex(line, index)

Public method to convert line and index to an absolute position.

line
  line number (integer)
index
  index number (integer)

Returns:
  absolute position in the editor (integer)

#### QsciScintillaCompat.positionFromPoint

positionFromPoint(point)

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

point
  point in the window (QPoint)

Returns:
  scintilla position (integer) or -1 to indicate, that the point is not near any character

#### QsciScintillaCompat.replaceTarget

replaceTarget(replaceStr)

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

replaceStr
  replacement string or regexp (string)

#### QsciScintillaCompat.scrollVertical

scrollVertical(lines)

Public method to scroll the text area.

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

#### QsciScintillaCompat.selectionIsRectangle

selectionIsRectangle()

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

Returns:
  flag indicating a rectangular selection (boolean)

#### QsciScintillaCompat.setCaretLineAlwaysVisible

setCaretLineAlwaysVisible(alwaysVisible)

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

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

#### QsciScintillaCompat.setContractedFolds

setContractedFolds(folds)

Public method to set a list of line numbers of collapsed folds.

folds
  list of line numbers of folded lines (list of integer)

#### QsciScintillaCompat.setCurrentIndicator

setCurrentIndicator(indicator)

Public method to set the current indicator.

indicator
  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
  flash time of the cursor in milliseconds (integer)

#### QsciScintillaCompat.setEolModeByEolString

setEolModeByEolString(eolStr)

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

eolStr
  eol string (string)

#### QsciScintillaCompat.setFoldMarkersColors

setFoldMarkersColors(foreColor, backColor)

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

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

#### QsciScintillaCompat.setFolding

setFolding(style, margin=2)

Public method to set the folding style and margin.

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

#### QsciScintillaCompat.setIndentationGuideView

setIndentationGuideView(view)

Public method to set the view of the indentation guides.

view
  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
  number of the indicator (integer, QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX)
sline
  line number of the indicator start (integer)
sindex
  index of the indicator start (integer)
eline
  line number of the indicator end (integer)
eindex
  index of the indicator end (integer)

#### QsciScintillaCompat.setIndicatorRange

setIndicatorRange(indicator, spos, length)

Public method to set an indicator for the given range.

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

#### QsciScintillaCompat.setLexer

setLexer(lex=None)

Public method to set the lexer.

lex
  the lexer to be set or None to reset it.

#### QsciScintillaCompat.setModified

setModified(m)

Public slot to set the modification status.

m
  new modification status (boolean)

#### QsciScintillaCompat.setRectangularSelection

setRectangularSelection(startLine, startIndex, endLine, endIndex)

Public method to set a rectangular selection.

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

#### QsciScintillaCompat.setStyling

setStyling(length, style)

Public method to style some text.

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

#### QsciScintillaCompat.setVirtualSpaceOptions

setVirtualSpaceOptions(options)

Public method to set the virtual space usage options.

options
  usage options to set (integer, 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
  line number of the indicator start (integer)
sindex
  index of the indicator start (integer)
eline
  line number of the indicator end (integer)
eindex
  index of the indicator end (integer)

#### QsciScintillaCompat.showUserList

showUserList(listId, lst)

Public method to show a user supplied list.

listId
  id of the list (integer)
lst
  list to be show (list of strings)

#### QsciScintillaCompat.startStyling

startStyling(pos, mask)

Public method to prepare styling.

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

#### QsciScintillaCompat.styleAt

styleAt(pos)

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

pos
  position in the text (integer)

Returns:
  style at the requested position or 0, if the position is negative or past the end of the document (integer)

#### 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
  zoom factor increment (integer)

#### QsciScintillaCompat.zoomOut

zoomOut(zoom=1)

Public method used to decrease the zoom factor.

zoom
  zoom factor decrement (integer)

#### QsciScintillaCompat.zoomTo

zoomTo(zoom)

Public method used to zoom to a specific zoom factor.

zoom
  zoom factor (integer)

Up

## QSCINTILLA_VERSION

QSCINTILLA_VERSION()

Module function to return the QScintilla version.

Returns:
  QScintilla version (integer)

Up