Class Fox::FXScintilla
In: FXScintilla.rb
../lib/fox/scintilla.rb
Parent: FXScrollArea

FXScintilla is a FOX widget, developed by Gilles Filippini, that provides an interface to Neil Hodgson’s Scintilla (www.scintilla.org) source code editing component. The Scintilla component is a very complicated beast, and for best results you should read the very fine documentation at www.scintilla.org/ScintillaDoc.html.

Events

The following messages are sent by FXScintilla to its target:

SEL_COMMAND:sent when the Scintilla component calls NotifyParent to signal some event. The message data is an SCNotification instance.
SEL_CHANGED:sent when the Scintilla component calls NotifyChange to signal some event.
SEL_RIGHTBUTTONPRESS:sent when the right mouse button goes down; the message data is an FXEvent instance.
Methods
addRefDocument    addStyledText    addText    appendText    assignCmdKey    autoCActive    autoCCancel    autoCComplete    autoCGetAutoHide    autoCGetCancelAtStart    autoCGetChooseSingle    autoCGetDropRestOfWord    autoCGetIgnoreCase    autoCGetSeparator    autoCGetTypeSeparator    autoCPosStart    autoCSelect    autoCSetAutoHide    autoCSetCancelAtStart    autoCSetChooseSingle    autoCSetDropRestOfWord    autoCSetFillUps    autoCSetIgnoreCase    autoCSetSeparator    autoCSetTypeSeparator    autoCShow    autoCStops    backTab    beginUndoAction    braceBadLight    braceHighlight    braceMatch    callTipActive    callTipCancel    callTipPosStart    callTipSetBack    callTipSetHlt    callTipShow    canPaste    canRedo    canUndo    cancel    charLeft    charLeftExtend    charRight    charRightExtend    chooseCaretX    clear    clearAll    clearAllCmdKeys    clearCmdKey    clearDocumentStyle    clearRegisteredImages    colourise    convertEOLs    copy    createDocument    cut    delLineLeft    delLineRight    delWordLeft    delWordRight    deleteBack    deleteBackNotLine    docLineFromVisible    documentEnd    documentEndExtend    documentStart    documentStartExtend    editToggleOvertype    emptyUndoBuffer    endUndoAction    ensureVisible    ensureVisibleEnforcePolicy    findText    formFeed    formatRange    getAnchor    getBackSpaceUnIndents    getBufferedDraw    getCaretFore    getCaretLineBack    getCaretLineVisible    getCaretPeriod    getCaretWidth    getCharAt    getCodePage    getColumn    getControlCharSymbol    getCurLine    getCurrentPos    getCursor    getDirectFunction    getDirectPointer    getDocPointer    getEOLMode    getEdgeColour    getEdgeColumn    getEdgeMode    getEndAtLastLine    getEndStyled    getFirstVisibleLine    getFocus    getFoldExpanded    getFoldLevel    getFoldParent    getHScrollBar    getHighlightGuide    getIndent    getIndentationGuides    getLastChild    getLayoutCache    getLength    getLexer    getLine    getLineCount    getLineEndPosition    getLineIndentPosition    getLineIndentation    getLineState    getLineVisible    getMarginLeft    getMarginMaskN    getMarginRight    getMarginSensitiveN    getMarginTypeN    getMarginWidthN    getMaxLineState    getModEventMask    getModify    getMouseDownCaptures    getMouseDwellTime    getOvertype    getPrintColourMode    getPrintMagnification    getPrintWrapMode    getReadOnly    getScrollWidth    getSearchFlags    getSelText    getSelectionEnd    getSelectionStart    getStatus    getStyleAt    getStyleBits    getStyledText    getTabIndents    getTabWidth    getTargetEnd    getTargetStart    getText    getTextLength    getTextRange    getTwoPhaseDraw    getUndoCollection    getUsePalette    getUseTabs    getVScrollBar    getViewEOL    getViewWS    getWrapMode    getXOffset    getZoom    gotoLine    gotoPos    grabFocus    hideLines    hideSelection    home    homeDisplay    homeDisplayExtend    homeExtend    indicGetFore    indicGetStyle    indicSetFore    indicSetStyle    insertText    lineCut    lineDelete    lineDown    lineDownExtend    lineDuplicate    lineEnd    lineEndDisplay    lineEndDisplayExtend    lineEndExtend    lineFromPosition    lineLength    lineScroll    lineScrollDown    lineScrollUp    lineTranspose    lineUp    lineUpExtend    linesJoin    linesOnScreen    linesSplit    lowerCase    markerAdd    markerDefine    markerDefinePixmap    markerDelete    markerDeleteAll    markerDeleteHandle    markerGet    markerLineFromHandle    markerNext    markerPrevious    markerSetBack    markerSetFore    moveCaretInsideView    new    newLine    null    pageDown    pageDownExtend    pageUp    pageUpExtend    paste    pointXFromPosition    pointYFromPosition    positionFromLine    positionFromPoint    positionFromPointClose    redo    registerImage    releaseDocument    replaceSel    replaceTarget    replaceTargetRE    scrollCaret    searchAnchor    searchInTarget    searchNext    searchPrev    selectAll    selectionIsRectangle    sendMessage    setAnchor    setBackSpaceUnIndents    setBufferedDraw    setCaretFore    setCaretLineBack    setCaretLineVisible    setCaretPeriod    setCaretPolicy    setCaretWidth    setCodePage    setControlCharSymbol    setCurrentPos    setCursor    setDocPointer    setEOLMode    setEdgeColour    setEdgeColumn    setEdgeMode    setEndAtLastLine    setFocusFlag    setFoldExpanded    setFoldFlags    setFoldLevel    setFoldMarginColour    setFoldMarginHiColour    setHScrollBar    setHighlightGuide    setIndent    setIndentationGuides    setKeyWords    setLayoutCache    setLexer    setLexerLanguage    setLineIndentation    setLineState    setMarginLeft    setMarginMaskN    setMarginRight    setMarginSensitiveN    setMarginTypeN    setMarginWidthN    setModEventMask    setMouseDownCaptures    setMouseDwellTime    setOvertype    setPrintColourMode    setPrintMagnification    setPrintWrapMode    setProperty    setReadOnly    setSavePoint    setScintillaID    setScrollWidth    setSearchFlags    setSel    setSelBack    setSelFore    setSelectionEnd    setSelectionStart    setStatus    setStyleBits    setStyling    setStylingEx    setTabIndents    setTabWidth    setTargetEnd    setTargetStart    setText    setTwoPhaseDraw    setUndoCollection    setUsePalette    setUseTabs    setVScrollBar    setViewEOL    setViewWS    setVisiblePolicy    setWhitespaceBack    setWhitespaceFore    setWordChars    setWrapMode    setXCaretPolicy    setXOffset    setYCaretPolicy    setZoom    showLines    startRecord    startStyling    stopRecord    styleClearAll    styleResetDefault    styleSetBack    styleSetBold    styleSetCase    styleSetChangeable    styleSetCharacterSet    styleSetEOLFilled    styleSetFont    styleSetFore    styleSetItalic    styleSetSize    styleSetUnderline    styleSetVisible    tab    targetFromSelection    textHeight    textWidth    toggleFold    undo    upperCase    usePopUp    userListShow    vCHome    vCHomeExtend    visibleFromDocLine    wordEndPosition    wordLeft    wordLeftExtend    wordPartLeft    wordPartLeftExtend    wordPartRight    wordPartRightExtend    wordRight    wordRightExtend    wordStartPosition    zoomIn    zoomOut   
Public Class methods
new(p, tgt=nil, sel=0, opts=0, x=0, y=0, w=0, h=0) {|theScintilla| ...}

Return an initialized FXScintilla instance.

Public Instance methods
setScintillaID(id)

Set the identifier for this widget’s embedded Scintilla component.

sendMessage(iMsg, wParam=nil, lParam=nil)

Send a message (iMsg) to the Scintilla control, with optional wParam and lParam values. Note that in most cases, it will be easier to use one of the convenience methods defined in the ‘scintilla’ library module.

addText(length, text)

Add text to the document.

addStyledText(length, c)

Add array of cells to document.

insertText(pos, text)

Insert string at a position.

clearAll()

Delete all text in the document.

clearDocumentStyle()

Set all style bytes to 0, remove all folding information.

getLength()

The number of characters in the document.

getCharAt(pos)

Returns the character byte at the position.

getCurrentPos()

Returns the position of the caret.

getAnchor()

Returns the position of the opposite end of the selection to the caret.

getStyleAt(pos)

Returns the style byte at the position.

redo()

Redoes the next action on the undo history.

setUndoCollection(collectUndo)

Choose between collecting actions into the undo history and discarding them.

selectAll()

Select all the text in the document.

setSavePoint()

Remember the current position in the undo history as the position at which the document was saved.

getStyledText(tr)

Retrieve a buffer of cells. Returns the number of bytes in the buffer not including terminating nulls.

canRedo()

Are there any redoable actions in the undo history?

markerLineFromHandle(handle)

Retrieve the line number at which a particular marker is located.

markerDeleteHandle(handle)

Delete a marker.

getUndoCollection()

Is undo history being collected?

getViewWS()

Are white space characters currently visible? Returns one of SCWS_* constants.

setViewWS(viewWS)

Make white space characters invisible, always visible or visible outside indentation.

positionFromPoint(x, y)

Find the position from a point within the window.

positionFromPointClose(x, y)

Find the position from a point within the window but return INVALID_POSITION if not close to text.

gotoLine(line)

Set caret to start of a line and ensure it is visible.

gotoPos(pos)

Set caret to a position and ensure it is visible.

setAnchor(posAnchor)

Set the selection anchor to a position. The anchor is the opposite end of the selection from the caret.

getCurLine(length)

Retrieve the text of the line containing the caret. Returns the index of the caret on the line.

getEndStyled()

Retrieve the position of the last correctly styled character.

convertEOLs(eolMode)

Convert all line endings in the document to one mode.

getEOLMode()

Retrieve the current end of line mode - one of CRLF, CR, or LF.

setEOLMode(eolMode)

Set the current end of line mode.

startStyling(pos, mask)

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.

setStyling(length, style)

Change style from current styling position for length characters to a style and move the current styling position to after this newly styled segment.

getBufferedDraw()

Is drawing done first into a buffer or direct to the screen?

setBufferedDraw(buffered)

If drawing is buffered then each line of text is drawn into a bitmap buffer before drawing it to the screen to avoid flicker.

setTabWidth(tabWidth)

Change the visible size of a tab to be a multiple of the width of a space character.

getTabWidth()

Retrieve the visible size of a tab.

setCodePage(codePage)

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.

setUsePalette(usePalette)

In palette mode, Scintilla uses the environment’s palette calls to display more colours. This may lead to ugly displays.

markerDefine(markerNumber, markerSymbol)

Set the symbol used for a particular marker number.

markerSetFore(markerNumber, fore)

Set the foreground colour used for a particular marker number.

markerSetBack(markerNumber, back)

Set the background colour used for a particular marker number.

markerAdd(line, markerNumber)

Add a marker to a line, returning an ID which can be used to find or delete the marker.

markerDelete(line, markerNumber)

Delete a marker from a line.

markerDeleteAll(markerNumber)

Delete all markers with a particular number from all lines.

markerGet(line)

Get a bit mask of all the markers set on a line.

markerNext(lineStart, markerMask)

Find the next line after lineStart that includes a marker in mask.

markerPrevious(lineStart, markerMask)

Find the previous line before lineStart that includes a marker in mask.

markerDefinePixmap(markerNumber, pixmap)

Define a marker from a pixmap.

setMarginTypeN(margin, marginType)

Set a margin to be either numeric or symbolic.

getMarginTypeN(margin)

Retrieve the type of a margin.

setMarginWidthN(margin, pixelWidth)

Set the width of a margin to a width expressed in pixels.

getMarginWidthN(margin)

Retrieve the width of a margin in pixels.

setMarginMaskN(margin, mask)

Set a mask that determines which markers are displayed in a margin.

getMarginMaskN(margin)

Retrieve the marker mask of a margin.

setMarginSensitiveN(margin, sensitive)

Make a margin sensitive or insensitive to mouse clicks.

getMarginSensitiveN(margin)

Retrieve the mouse click sensitivity of a margin.

styleClearAll()

Clear all the styles and make equivalent to the global default style.

styleSetFore(style, fore)

Set the foreground colour of a style.

styleSetBack(style, back)

Set the background colour of a style.

styleSetBold(style, bold)

Set a style to be bold or not.

styleSetItalic(style, italic)

Set a style to be italic or not.

styleSetSize(style, sizePoints)

Set the size of characters of a style.

styleSetFont(style, fontName)

Set the font of a style.

styleSetEOLFilled(style, filled)

Set a style to have its end of line filled or not.

styleResetDefault()

Reset the default style to its state at startup

styleSetUnderline(style, underline)

Set a style to be underlined or not.

styleSetCase(style, caseForce)

Set a style to be mixed case, or to force upper or lower case.

styleSetCharacterSet(style, characterSet)

Set the character set of the font in a style.

setSelFore(useSetting, fore)

Set the foreground colour of the selection and whether to use this setting.

setSelBack(useSetting, back)

Set the background colour of the selection and whether to use this setting.

setCaretFore(fore)

Set the foreground colour of the caret.

assignCmdKey(km, msg)

When key+modifier combination km is pressed perform msg.

clearCmdKey(km)

When key+modifier combination km do nothing.

clearAllCmdKeys()

Drop all key mappings.

setStylingEx(length, styles)

Set the styles for a segment of the document.

styleSetVisible(style, visible)

Set a style to be visible or not.

getCaretPeriod()

Get the time in milliseconds that the caret is on and off.

setCaretPeriod(periodMilliseconds)

Get the time in milliseconds that the caret is on and off. 0 = steady on.

setWordChars(characters)

Set the set of characters making up words for when moving or selecting by word.

beginUndoAction()

Start a sequence of actions that is undone and redone as a unit. May be nested.

endUndoAction()

End a sequence of actions that is undone and redone as a unit.

indicSetStyle(indic, style)

Set an indicator to plain, squiggle or TT.

indicGetStyle(indic)

Retrieve the style of an indicator.

indicSetFore(indic, fore)

Set the foreground colour of an indicator.

indicGetFore(indic)

Retrieve the foreground colour of an indicator.

setWhitespaceFore(useSetting, fore)

Set the foreground colour of all whitespace and whether to use this setting.

setWhitespaceBack(useSetting, back)

Set the background colour of all whitespace and whether to use this setting.

setStyleBits(bits)

Divide each styling byte into lexical class bits (default: 5) and indicator bits (default: 3). If a lexer requires more than 32 lexical states, then this is used to expand the possible states.

getStyleBits()

Retrieve number of bits in style bytes used to hold the lexical state.

setLineState(line, state)

Used to hold extra styling information for each line.

getLineState(line)

Retrieve the extra styling information for a line.

getMaxLineState()

Retrieve the last line number that has line state.

getCaretLineVisible()

Is the background of the line containing the caret in a different colour?

setCaretLineVisible(show)

Display the background of the line containing the caret in a different colour.

getCaretLineBack()

Get the colour of the background of the line containing the caret.

setCaretLineBack(back)

Set the colour of the background of the line containing the caret.

styleSetChangeable(style, changeable)

Set a style to be changeable or not (read only). Experimental feature, currently buggy.

autoCShow(lenEntered, itemList)

Display a auto-completion list. The lenEntered parameter indicates how many characters before the caret should be used to provide context.

autoCCancel()

Remove the auto-completion list from the screen.

autoCActive()

Is there an auto-completion list visible?

autoCPosStart()

Retrieve the position of the caret when the auto-completion list was displayed.

autoCComplete()

User has selected an item so remove the list and insert the selection.

autoCStops(characterSet)

Define a set of character that when typed cancel the auto-completion list.

autoCSetSeparator(separatorCharacter)

Change the separator character in the string setting up an auto-completion list. Default is space but can be changed if items contain space.

autoCGetSeparator()

Retrieve the auto-completion list separator character.

autoCSelect(text)

Select the item in the auto-completion list that starts with a string.

autoCSetCancelAtStart(cancel)

Should the auto-completion list be cancelled if the user backspaces to a position before where the box was created.

autoCGetCancelAtStart()

Retrieve whether auto-completion cancelled by backspacing before start.

autoCSetFillUps(characterSet)

Define a set of characters that when typed will cause the autocompletion to choose the selected item.

autoCSetChooseSingle(chooseSingle)

Should a single item auto-completion list automatically choose the item.

autoCGetChooseSingle()

Retrieve whether a single item auto-completion list automatically choose the item.

autoCSetIgnoreCase(ignoreCase)

Set whether case is significant when performing auto-completion searches.

autoCGetIgnoreCase()

Retrieve state of ignore case flag.

userListShow(listType, itemList)

Display a list of strings and send notification when user chooses one.

autoCSetAutoHide(autoHide)

Set whether or not autocompletion is hidden automatically when nothing matches.

autoCGetAutoHide()

Retrieve whether or not autocompletion is hidden automatically when nothing matches.

autoCSetDropRestOfWord(dropRestOfWord)

Set whether or not autocompletion deletes any word characters after the inserted text upon completion.

autoCGetDropRestOfWord()

Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion.

registerImage(type, xpmData)

Register an XPM image for use in autocompletion lists.

clearRegisteredImages()

Clear all the registered XPM images.

autoCGetTypeSeparator()

Retrieve the auto-completion list type-separator character.

autoCSetTypeSeparator(separatorCharacter)

Change the type-separator character in the string setting up an auto-completion list. Default is ’?’ but can be changed if items contain ’?’.

setIndent(indentSize)

Set the number of spaces used for one level of indentation.

getIndent()

Retrieve indentation size.

setUseTabs(useTabs)

Indentation will only use space characters if useTabs is false, otherwise it will use a combination of tabs and spaces.

getUseTabs()

Retrieve whether tabs will be used in indentation.

setLineIndentation(line, indentSize)

Change the indentation of a line to a number of columns.

getLineIndentation(line)

Retrieve the number of columns that a line is indented.

getLineIndentPosition(line)

Retrieve the position before the first non indentation character on a line.

getColumn(pos)

Retrieve the column number of a position, taking tab width into account.

setHScrollBar(show)

Show or hide the horizontal scroll bar.

getHScrollBar()

Is the horizontal scroll bar visible?

setIndentationGuides(show)

Show or hide indentation guides.

getIndentationGuides()

Are the indentation guides visible?

setHighlightGuide(column)

Set the highlighted indentation guide column. 0 = no highlighted guide.

getHighlightGuide()

Get the highlighted indentation guide column.

getLineEndPosition(line)

Get the position after the last visible characters on a line.

getCodePage()

Get the code page used to interpret the bytes of the document as characters.

getCaretFore()

Get the foreground colour of the caret.

getUsePalette()

In palette mode?

getReadOnly()

In read-only mode?

setCurrentPos(pos)

Sets the position of the caret.

setSelectionStart(pos)

Sets the position that starts the selection - this becomes the anchor.

getSelectionStart()

Returns the position at the start of the selection.

setSelectionEnd(pos)

Sets the position that ends the selection - this becomes the currentPosition.

getSelectionEnd()

Returns the position at the end of the selection.

setPrintMagnification(magnification)

Sets the print magnification added to the point size of each style for printing.

getPrintMagnification()

Returns the print magnification.

setPrintColourMode(mode)

Modify colours when printing for clearer printed text.

getPrintColourMode()

Returns the print colour mode.

findText(flags, ft)

Find some text in the document.

formatRange(draw, fr)

On Windows, will draw the document into a display context such as a printer.

getFirstVisibleLine()

Retrieve the display line at the top of the display.

getLine(line)

Retrieve the contents of a line. Returns the length of the line.

getLineCount()

Returns the number of lines in the document. There is always at least one.

setMarginLeft(pixelWidth)

Sets the size in pixels of the left margin.

getMarginLeft()

Returns the size in pixels of the left margin.

setMarginRight(pixelWidth)

Sets the size in pixels of the right margin.

getMarginRight()

Returns the size in pixels of the right margin.

getModify()

Is the document different from when it was last saved?

setSel(start, last)

Select a range of text.

getSelText()

Retrieve the selected text. Return the length of the text.

getTextRange(tr)

Retrieve a range of text. Return the length of the text.

hideSelection(normal)

Draw the selection in normal style or with selection highlighted.

pointXFromPosition(pos)

Retrieve the x value of the point in the window where a position is displayed.

pointYFromPosition(pos)

Retrieve the y value of the point in the window where a position is displayed.

lineFromPosition(pos)

Retrieve the line containing a position.

positionFromLine(line)

Retrieve the position at the start of a line.

lineScroll(columns, lines)

Scroll horizontally and vertically.

scrollCaret()

Ensure the caret is visible.

replaceSel(text)

Replace the selected text with the argument text.

setReadOnly(readOnly)

Set to read only or read write.

null()

Null operation.

canPaste()

Will a paste succeed?

canUndo()

Are there any undoable actions in the undo history?

emptyUndoBuffer()

Delete the undo history.

undo()

Undo one action in the undo history.

cut()

Cut the selection to the clipboard.

copy()

Copy the selection to the clipboard.

paste()

Paste the contents of the clipboard into the document replacing the selection.

clear()

Clear the selection.

setText(text)

Replace the contents of the document with the argument text.

getText(length)

Retrieve all the text in the document. Returns number of characters retrieved.

getTextLength()

Retrieve the number of characters in the document.

getDirectFunction()

Retrieve a pointer to a function that processes messages for this Scintilla.

getDirectPointer()

Retrieve a pointer value to use as the first argument when calling the function returned by GetDirectFunction.

setOvertype(overtype)

Set to overtype (true) or insert mode.

getOvertype()

Returns true if overtype mode is active otherwise false is returned.

setCaretWidth(pixelWidth)

Set the width of the insert mode caret.

getCaretWidth()

Returns the width of the insert mode caret.

setTargetStart(pos)

Sets the position that starts the target which is used for updating the document without affecting the scroll position.

getTargetStart()

Get the position that starts the target.

setTargetEnd(pos)

Sets the position that ends the target which is used for updating the document without affecting the scroll position.

getTargetEnd()

Get the position that ends the target.

replaceTarget(length, text)

Replace the target text with the argument text. Text is counted so it can contain nulls. Returns the length of the replacement text.

replaceTargetRE(length, text)

Replace the target text with the argument text after \d processing. Text is counted so it can contain nulls. Looks for \d where d is between 1 and 9 and replaces these with the strings matched in the last search operation which were surrounded by \( and \). Returns the length of the replacement text including any change caused by processing the \d patterns.

searchInTarget(length, text)

Search for a counted string in the target and set the target to the found range. Text is counted so it can contain nulls. Returns length of range or -1 for failure in which case target is not moved.

setSearchFlags(flags)

Set the search flags used by SearchInTarget.

getSearchFlags()

Get the search flags used by SearchInTarget.

callTipShow(pos, definition)

Show a call tip containing a definition near position pos.

callTipCancel()

Remove the call tip from the screen.

callTipActive()

Is there an active call tip?

callTipPosStart()

Retrieve the position where the caret was before displaying the call tip.

callTipSetHlt(start, last)

Highlight a segment of the definition.

callTipSetBack(back)

Set the background colour for the call tip.

visibleFromDocLine(line)

Find the display line of a document line taking hidden lines into account.

docLineFromVisible(lineDisplay)

Find the document line of a display line taking hidden lines into account.

setFoldLevel(line, level)

Set the fold level of a line. This encodes an integer level along with flags indicating whether the line is a header and whether it is effectively white space.

getFoldLevel(line)

Retrieve the fold level of a line.

getLastChild(line, level)

Find the last child line of a header line.

getFoldParent(line)

Find the parent line of a child line.

showLines(lineStart, lineEnd)

Make a range of lines visible.

hideLines(lineStart, lineEnd)

Make a range of lines invisible.

getLineVisible(line)

Is a line visible?

setFoldExpanded(line, expanded)

Show the children of a header line.

getFoldExpanded(line)

Is a header line expanded?

toggleFold(line)

Switch a header line between expanded and contracted.

ensureVisible(line)

Ensure a particular line is visible by expanding any header line hiding it.

setFoldFlags(flags)

Set some style options for folding.

ensureVisibleEnforcePolicy(line)

Ensure a particular line is visible by expanding any header line hiding it. Use the currently set visibility policy to determine which range to display.

setTabIndents(tabIndents)

Sets whether a tab pressed when caret is within indentation indents.

getTabIndents()

Does a tab pressed when caret is within indentation indent?

setBackSpaceUnIndents(bsUnIndents)

Sets whether a backspace pressed when caret is within indentation unindents.

getBackSpaceUnIndents()

Does a backspace pressed when caret is within indentation unindent?

setMouseDwellTime(periodMilliseconds)

Sets the time the mouse must sit still to generate a mouse dwell event.

getMouseDwellTime()

Retrieve the time the mouse must sit still to generate a mouse dwell event.

wordStartPosition(pos, onlyWordCharacters)

Get position of start of word.

wordEndPosition(pos, onlyWordCharacters)

Get position of end of word.

setWrapMode(mode)

Sets whether text is word wrapped.

getWrapMode()

Retrieve whether text is word wrapped.

setLayoutCache(mode)

Sets the degree of caching of layout information.

getLayoutCache()

Retrieve the degree of caching of layout information.

setScrollWidth(pixelWidth)

Sets the document width assumed for scrolling.

getScrollWidth()

Retrieve the document width assumed for scrolling.

textWidth(style, text)

Measure the pixel width of some text in a particular style. Nul terminated text argument. Does not handle tab or control characters.

setEndAtLastLine(endAtLastLine)

Sets the scroll range so that maximum scroll position has the last line at the bottom of the view (default). Setting this to false allows scrolling one page below the last line.

getEndAtLastLine()

Retrieve whether the maximum scroll position has the last line at the bottom of the view.

textHeight(line)

Retrieve the height of a particular line of text in pixels.

setVScrollBar(show)

Show or hide the vertical scroll bar.

getVScrollBar()

Is the vertical scroll bar visible?

appendText(length, text)

Append a string to the end of the document without changing the selection.

getTwoPhaseDraw()

Is drawing done in two phases with backgrounds drawn before faoregrounds?

setTwoPhaseDraw(twoPhase)

In twoPhaseDraw mode, drawing is performed in two phases, first the background and then the foreground. This avoids chopping off characters that overlap the next run.

targetFromSelection()

Make the target range start and end be the same as the selection range start and end.

linesJoin()

Join the lines in the target. This is an experimental feature and may be changed or removed.

linesSplit(pixelWidth)

Split the lines in the target into lines that are less wide than pixelWidth where possible.

setFoldMarginColour(useSetting, back)

Set the colours used as a chequerboard pattern in the fold margin

setFoldMarginHiColour(useSetting, fore)
lineDown()

Move caret down one line.

lineDownExtend()

Move caret down one line extending selection to new caret position.

lineUp()

Move caret up one line.

lineUpExtend()

Move caret up one line extending selection to new caret position.

charLeft()

Move caret left one character.

charLeftExtend()

Move caret left one character extending selection to new caret position.

charRight()

Move caret right one character.

charRightExtend()

Move caret right one character extending selection to new caret position.

wordLeft()

Move caret left one word.

wordLeftExtend()

Move caret left one word extending selection to new caret position.

wordRight()

Move caret right one word.

wordRightExtend()

Move caret right one word extending selection to new caret position.

home()

Move caret to first position on line.

homeExtend()

Move caret to first position on line extending selection to new caret position.

lineEnd()

Move caret to last position on line.

lineEndExtend()

Move caret to last position on line extending selection to new caret position.

documentStart()

Move caret to first position in document.

documentStartExtend()

Move caret to first position in document extending selection to new caret position.

documentEnd()

Move caret to last position in document.

documentEndExtend()

Move caret to last position in document extending selection to new caret position.

pageUp()

Move caret one page up.

pageUpExtend()

Move caret one page up extending selection to new caret position.

pageDown()

Move caret one page down.

pageDownExtend()

Move caret one page down extending selection to new caret position.

editToggleOvertype()

Switch from insert to overtype mode or the reverse.

cancel()

Cancel any modes such as call tip or auto-completion list display.

deleteBack()

Delete the selection or if no selection, the character before the caret.

tab()

If selection is empty or all on one line replace the selection with a tab character. If more than one line selected, indent the lines.

backTab()

Dedent the selected lines.

newLine()

Insert a new line, may use a CRLF, CR or LF depending on EOL mode.

formFeed()

Insert a Form Feed character.

vCHome()

Move caret to before first visible character on line. If already there move to first character on line.

vCHomeExtend()

Like VCHome but extending selection to new caret position.

zoomIn()

Magnify the displayed text by increasing the sizes by 1 point.

zoomOut()

Make the displayed text smaller by decreasing the sizes by 1 point.

delWordLeft()

Delete the word to the left of the caret.

delWordRight()

Delete the word to the right of the caret.

lineCut()

Cut the line containing the caret.

lineDelete()

Delete the line containing the caret.

lineTranspose()

Switch the current line with the previous.

lineDuplicate()

Duplicate the current line.

lowerCase()

Transform the selection to lower case.

upperCase()

Transform the selection to upper case.

lineScrollDown()

Scroll the document down, keeping the caret visible.

lineScrollUp()

Scroll the document up, keeping the caret visible.

deleteBackNotLine()

Delete the selection or if no selection, the character before the caret. Will not delete the character before at the start of a line.

homeDisplay()

Move caret to first position on display line.

homeDisplayExtend()

Move caret to first position on display line extending selection to new caret position.

lineEndDisplay()

Move caret to last position on display line.

lineEndDisplayExtend()

Move caret to last position on display line extending selection to new caret position.

moveCaretInsideView()

Move the caret inside current view if it’s not there already.

lineLength(line)

How many characters are on a line, not including end of line characters?

braceHighlight(pos1, pos2)

Highlight the characters at two positions.

braceBadLight(pos)

Highlight the character at a position indicating there is no matching brace.

braceMatch(pos)

Find the position of a matching brace or INVALID_POSITION if no match.

getViewEOL()

Are the end of line characters visible?

setViewEOL(visible)

Make the end of line characters visible or invisible.

getDocPointer()

Retrieve a pointer to the document object.

setDocPointer(pointer)

Change the document object used.

setModEventMask(mask)

Set which document modification events are sent to the container.

getEdgeColumn()

Retrieve the column number which text should be kept within.

setEdgeColumn(column)

Set the column number of the edge. If text goes past the edge then it is highlighted.

getEdgeMode()

Retrieve the edge highlight mode.

setEdgeMode(mode)

The edge may be displayed by a line (EDGE_LINE) or by highlighting text that goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).

getEdgeColour()

Retrieve the colour used in edge indication.

setEdgeColour(edgeColour)

Change the colour used in edge indication.

searchAnchor()

Sets the current caret position to be the search anchor.

searchNext(flags, text)

Find some text starting at the search anchor. Does not ensure the selection is visible.

searchPrev(flags, text)

Find some text starting at the search anchor and moving backwards. Does not ensure the selection is visible.

linesOnScreen()

Retrieves the number of lines completely visible.

usePopUp(allowPopUp)

Set whether a pop up menu is displayed automatically when the user presses the wrong mouse button.

selectionIsRectangle()

Is the selection rectangular? The alternative is the more common stream selection.

setZoom(zoom)

Set the zoom level. This number of points is added to the size of all fonts. It may be positive to magnify or negative to reduce.

getZoom()

Retrieve the zoom level.

createDocument()

Create a new document object. Starts with reference count of 1 and not selected into editor.

addRefDocument(doc)

Extend life of document.

releaseDocument(doc)

Release a reference to the document, deleting document if it fades to black.

getModEventMask()

Get which document modification events are sent to the container.

setFocusFlag(focus)

Change internal focus flag.

getFocus()

Get internal focus flag.

setStatus(statusCode)

Change error status - 0 = OK.

getStatus()

Get error status.

setMouseDownCaptures(captures)

Set whether the mouse is captured when its button is pressed.

getMouseDownCaptures()

Get whether mouse gets captured.

setCursor(cursorType)

Sets the cursor to one of the SC_CURSOR* values.

getCursor()

Get cursor type.

setControlCharSymbol(symbol)

Change the way control characters are displayed: If symbol is < 32, keep the drawn way, else, use the given character.

getControlCharSymbol()

Get the way control characters are displayed.

wordPartLeft()

Move to the previous change in capitalisation.

wordPartLeftExtend()

Move to the previous change in capitalisation extending selection to new caret position.

wordPartRight()

Move to the change next in capitalisation.

wordPartRightExtend()

Move to the next change in capitalisation extending selection to new caret position.

setVisiblePolicy(visiblePolicy, visibleSlop)

Set the way the display area is determined when a particular line is to be moved to by Find, FindNext, GotoLine, etc.

delLineLeft()

Delete back from the current position to the start of the line.

delLineRight()

Delete forwards from the current position to the end of the line.

setXOffset(newOffset)

Get and Set the xOffset (ie, horizonal scroll position).

getXOffset()
chooseCaretX()

Set the last x chosen value to be the caret x position

grabFocus()

Set the focus to this Scintilla widget. GTK+ Specific.

setXCaretPolicy(caretPolicy, caretSlop)

Set the way the caret is kept visible when going sideway. The exclusion zone is given in pixels.

setYCaretPolicy(caretPolicy, caretSlop)

Set the way the line the caret is on is kept visible. The exclusion zone is given in lines.

setPrintWrapMode(mode)

Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).

getPrintWrapMode()

Is printing line wrapped.

startRecord()

Start notifying the container of all key presses and commands.

stopRecord()

Stop notifying the container of all key presses and commands.

setLexer(lexer)

Set the lexing language of the document.

getLexer()

Retrieve the lexing language of the document.

colourise(start, last)

Colourise a segment of the document using the current lexing language.

setProperty(key, value)

Set up a value that may be used by a lexer for some optional feature.

setKeyWords(keywordSet, keyWords)

Set up the key words used by the lexer.

setLexerLanguage(language)

Set the lexing language of the document based on string name.

setCaretPolicy(caretPolicy, caretSlop)

CARET_POLICY changed in 1.47