diff --git a/.gitignore b/.gitignore index 1810839..f7d7d2e 100644 --- a/.gitignore +++ b/.gitignore @@ -156,4 +156,4 @@ $RECYCLE.BIN/ /ResEdit-x64 LuaDist gh-pages -/doc/Editor.lua +/docs_gen/Editor.lua diff --git a/docs/classes/Editor.html b/docs/classes/Editor.html new file mode 100644 index 0000000..7005355 --- /dev/null +++ b/docs/classes/Editor.html @@ -0,0 +1,15342 @@ + + + + + LuaScript Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Class Editor

+

Scintilla wrapper.

+

This is a straight forward API to directly control Scintilla. This documentation is not intended to fully describe the Scintilla API, but only to give a brief description. The official Scintilla documentation should be consulted for more details. All constants from the official documentation are exposed as Lua globals variables.

+ +

This class cannot be instantiated, rather predefined globals are available to use.

+ +
    +
  • editor - the currently selected editor
  • +
  • editor1 - the first editor (usually on the left)
  • +
  • editor2 - the second editor (usually on the right)
  • +
  • console - the console output used by LuaScript. Note that since this editor is "read-only" some functionality may not work as expected, e.g. manually adding or removing text.
  • +
+ +

Note: Although the entire Scintilla API is available, a few parts of it should not be used since it would either have unexpected results, or does not make sense to use from Lua.

+ + +

Helper Methods

+ + + + + + + + + + + + + + + + + + + + + +
Editor:textrange(startPos, endPos)Gets the text within a range
Editor:findtext(search[, flags[, startPos[, endPos]]])Finds the next match within the document.
Editor:match(search[, flags[, startPos]])Creates a generator to iterate matches.
Editor:append(text)Appends text to the end of the document.
Editor:remove(startPos, endPos)Removes the text in the range
+

Text retrieval and modification

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor:GetText()Retrieve all the text in the document.
Editor:SetText(text)Replace the contents of the document with the argument text.
Editor:SetSavePoint()Remember the current position in the undo history as the position at which the document was saved.
Editor:GetLine(line)Retrieve the contents of a line.
Editor:ReplaceSel(text)Replace the selected text with the argument text.
Editor.ReadOnlySet to read only or read write.
Editor:Allocate(bytes)Enlarge the document to a particular size of text bytes.
Editor:AddText(text)Add text to the document at current position.
Editor:AppendText(text)Append a string to the end of the document without changing the selection.
Editor:InsertText(pos, text)Insert string at a position.
Editor:ChangeInsertion(text)Change the text that is being inserted in response to SC_MOD_INSERTCHECK
Editor:ClearAll()Delete all text in the document.
Editor:DeleteRange(pos, deleteLength)Delete a range of text in the document.
Editor:ClearDocumentStyle()Set all style bytes to 0, remove all folding information.
Editor.CharAt[pos]read-only
Editor.StyleAt[pos]read-only
Editor:ReleaseAllExtendedStyles()Release all extended (>255) style numbers
Editor:AllocateExtendedStyles(numberStyles)Allocate some extended (>255) style numbers and return the start of the range
Editor:TargetAsUTF8()Returns the target converted to UTF8.
Editor:EncodedFromUTF8(utf8)Translates a UTF8 string into the document encoding.
Editor:SetLengthForEncode(bytes)Set the length of the utf8 argument for calling EncodedFromUTF8.
+

Searching

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.TargetStartSets the position that starts the target which is used for updating the document without affecting the scroll position.
Editor.TargetEndSets the position that ends the target which is used for updating the document without affecting the scroll position.
Editor:SetTargetRange(start, end)Sets both the start and end of the target in one call.
Editor:TargetFromSelection()Make the target range start and end be the same as the selection range start and end.
Editor.SearchFlagsSet the search flags used by SearchInTarget.
Editor:SearchInTarget(text)Search for a counted string in the target and set the target to the found range.
Editor.TargetTextread-only
Editor:ReplaceTarget(text)Replace the target text with the argument text.
Editor:ReplaceTargetRE(text)Replace the target text with the argument text after \d processing.
Editor.Tag[tagNumber]read-only
Editor:SearchAnchor()Sets the current caret position to be the search anchor.
Editor:SearchNext(flags, text)Find some text starting at the search anchor.
Editor:SearchPrev(flags, text)Find some text starting at the search anchor and moving backwards.
+

Overtype

+ + + + + +
Editor.OvertypeSet to overtype (true) or insert mode.
+

Cut, copy and paste

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor:Cut()Cut the selection to the clipboard.
Editor:Copy()Copy the selection to the clipboard.
Editor:Paste()Paste the contents of the clipboard into the document replacing the selection.
Editor:Clear()Clear the selection.
Editor:CanPaste()Will a paste succeed?
Editor:CopyAllowLine()Copy the selection, if selection empty copy the line with the caret
Editor:CopyRange(start, end)Copy a range of text to the clipboard.
Editor:CopyText(text)Copy argument text to the clipboard.
Editor.PasteConvertEndingsEnable/Disable convert-on-paste for line endings
+

Error handling

+ + + + + +
Editor.StatusChange error status - 0 = OK.
+

Undo and Redo

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor:Undo()Undo one action in the undo history.
Editor:CanUndo()Are there any undoable actions in the undo history?
Editor:Redo()Redoes the next action on the undo history.
Editor:CanRedo()Are there any redoable actions in the undo history?
Editor:EmptyUndoBuffer()Delete the undo history.
Editor.UndoCollectionChoose between collecting actions into the undo history and discarding them.
Editor:BeginUndoAction()Start a sequence of actions that is undone and redone as a unit.
Editor:EndUndoAction()End a sequence of actions that is undone and redone as a unit.
Editor:AddUndoAction(token, flags)Add a container action to the undo stack
+

Selection and information

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.TextLengthread-only
Editor.Lengthread-only
Editor.LineCountread-only
Editor.FirstVisibleLineScroll so that a display line is at the top of the display.
Editor.LinesOnScreenread-only
Editor.Modifyread-only
Editor:SetSel(start, end)Select a range of text.
Editor:GotoPos(pos)Set caret to a position and ensure it is visible.
Editor:GotoLine(line)Set caret to start of a line and ensure it is visible.
Editor.CurrentPosSets the position of the caret.
Editor.AnchorSet the selection anchor to a position.
Editor.SelectionStartSets the position that starts the selection - this becomes the anchor.
Editor.SelectionEndSets the position that ends the selection - this becomes the currentPosition.
Editor:SetEmptySelection(pos)Set caret to a position, while removing any existing selection.
Editor:SelectAll()Select all the text in the document.
Editor:LineFromPosition(pos)Retrieve the line containing a position.
Editor:PositionFromLine(line)Retrieve the position at the start of a line.
Editor.LineEndPosition[line]read-only
Editor:LineLength(line)How many characters are on a line, including end of line characters?
Editor:GetSelText()Retrieve the selected text.
Editor:GetCurLine()Retrieve the text of the line containing the caret.
Editor.SelectionIsRectangleread-only
Editor.SelectionModeSet the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or by lines (SC_SEL_LINES).
Editor:GetLineSelStartPosition(line)Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
Editor:GetLineSelEndPosition(line)Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).
Editor:MoveCaretInsideView()Move the caret inside current view if it's not there already.
Editor:WordEndPosition(pos, onlyWordCharacters)Get position of end of word.
Editor:WordStartPosition(pos, onlyWordCharacters)Get position of start of word.
Editor:PositionBefore(pos)Given a valid document position, return the previous position taking code page into account.
Editor:PositionAfter(pos)Given a valid document position, return the next position taking code page into account.
Editor:PositionRelative(pos, relative)Given a valid document position, return a position that differs in a number of characters.
Editor:CountCharacters(startPos, endPos)Count characters between two positions.
Editor:TextWidth(style, text)Measure the pixel width of some text in a particular style.
Editor:TextHeight(line)Retrieve the height of a particular line of text in pixels.
Editor.Column[pos]read-only
Editor:FindColumn(line, column)Find the position of a column on a line taking into account tabs and multi-byte characters.
Editor:PositionFromPoint(x, y)Find the position from a point within the window.
Editor:PositionFromPointClose(x, y)Find the position from a point within the window but return INVALID_POSITION if not close to text.
Editor:CharPositionFromPoint(x, y)Find the position of a character from a point within the window.
Editor:CharPositionFromPointClose(x, y)Find the position of a character from a point within the window.
Editor:PointXFromPosition(pos)Retrieve the x value of the point in the window where a position is displayed.
Editor:PointYFromPosition(pos)Retrieve the y value of the point in the window where a position is displayed.
Editor:HideSelection(normal)Draw the selection in normal style or with selection highlighted.
Editor:ChooseCaretX()Set the last x chosen value to be the caret x position.
Editor:MoveSelectedLinesUp()Move the selected lines up one line, shifting the line above after the selection
Editor:MoveSelectedLinesDown()Move the selected lines down one line, shifting the line below before the selection
Editor.MouseSelectionRectangularSwitchSet whether switching to rectangular mode while selecting with the mouse is allowed.
+

Multiple Selection and Virtual Space

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.MultipleSelectionSet whether multiple selections can be made
Editor.AdditionalSelectionTypingSet whether typing can be performed into multiple selections
Editor.MultiPasteChange the effect of pasting when there are multiple selections.
Editor.VirtualSpaceOptionsReturns the position at the end of the selection.
Editor.RectangularSelectionModifierOn GTK+, allow selecting the modifier key to use for mouse-based rectangular selection.
Editor.Selectionsread-only
Editor.SelectionEmptyread-only
Editor:ClearSelections()Clear selections to a single empty stream selection
Editor:SetSelection(caret, anchor)Set a simple selection
Editor:AddSelection(caret, anchor)Add a selection
Editor:DropSelectionN(selection)Drop one selection
Editor.MainSelectionSet the main selection
Editor.SelectionNCaret[selection]Which selection is the main selection
Editor.SelectionNCaretVirtualSpace[selection]Which selection is the main selection
Editor.SelectionNAnchor[selection]Which selection is the main selection
Editor.SelectionNAnchorVirtualSpace[selection]Which selection is the main selection
Editor.SelectionNStart[selection]Sets the position that starts the selection - this becomes the anchor.
Editor.SelectionNEnd[selection]Sets the position that ends the selection - this becomes the currentPosition.
Editor.RectangularSelectionCaretReturns the position at the end of the selection.
Editor.RectangularSelectionCaretVirtualSpaceReturns the position at the end of the selection.
Editor.RectangularSelectionAnchorReturns the position at the end of the selection.
Editor.RectangularSelectionAnchorVirtualSpaceReturns the position at the end of the selection.
Editor.AdditionalSelAlphaSet the alpha of the selection.
Editor.AdditionalSelForeSet the foreground colour of additional selections.
Editor.AdditionalSelBackSet the background colour of additional selections.
Editor.AdditionalCaretForeSet the foreground colour of additional carets.
Editor.AdditionalCaretsBlinkSet whether additional carets will blink
Editor.AdditionalCaretsVisibleSet whether additional carets are visible
Editor:SwapMainAnchorCaret()Swap that caret and anchor of the main selection.
Editor:RotateSelection()Set the main selection to the next selection.
+

Scrolling and automatic scrolling

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor:LineScroll(columns, lines)Scroll horizontally and vertically.
Editor:ScrollCaret()Ensure the caret is visible.
Editor:ScrollRange(secondary, primary)Scroll the argument positions and the range between them into view giving priority to the primary position then the secondary position.
Editor:SetXCaretPolicy(caretPolicy, caretSlop)Set the way the caret is kept visible when going sideways.
Editor:SetYCaretPolicy(caretPolicy, caretSlop)Set the way the line the caret is on is kept visible.
Editor: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.
Editor.HScrollBarShow or hide the horizontal scroll bar.
Editor.VScrollBarShow or hide the vertical scroll bar.
Editor.XOffsetGet and Set the xOffset (ie, horizontal scroll position).
Editor.ScrollWidthSets the document width assumed for scrolling.
Editor.ScrollWidthTrackingSets whether the maximum width line displayed is used to set scroll width.
Editor.EndAtLastLineSets the scroll range so that maximum scroll position has the last line at the bottom of the view (default).
+

White space

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.ViewWSMake white space characters invisible, always visible or visible outside indentation.
Editor:SetWhitespaceFore(useSetting, fore)Set the foreground colour of all whitespace and whether to use this setting.
Editor:SetWhitespaceBack(useSetting, back)Set the background colour of all whitespace and whether to use this setting.
Editor.WhitespaceSizeSet the size of the dots used to mark space characters.
Editor.ExtraAscentSet extra ascent for each line
Editor.ExtraDescentSet extra descent for each line
+

Cursor

+ + + + + +
Editor.CursorSets the cursor to one of the SC_CURSOR* values.
+

Mouse capture

+ + + + + +
Editor.MouseDownCapturesSet whether the mouse is captured when its button is pressed.
+

Line endings

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.EOLModeSet the current end of line mode.
Editor:ConvertEOLs(eolMode)Convert all line endings in the document to one mode.
Editor.ViewEOLMake the end of line characters visible or invisible.
Editor.LineEndTypesSupportedread-only
Editor.LineEndTypesAllowedSet the line end types that the application wants to use.
Editor.LineEndTypesActiveread-only
+

Styling

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.EndStyledread-only
Editor:StartStyling(pos, mask)Set the current styling position to pos and the styling mask to mask.
Editor: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.
Editor:SetStylingEx(styles)Set the styles for a segment of the document.
Editor.LineState[line]Used to hold extra styling information for each line.
Editor.MaxLineStateread-only
+

Style definition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor:StyleResetDefault()Reset the default style to its state at startup
Editor:StyleClearAll()Clear all the styles and make equivalent to the global default style.
Editor.StyleFont[style]Set the font of a style.
Editor.StyleSize[style]Set the size of characters of a style.
Editor.StyleSizeFractional[style]Set the size of characters of a style.
Editor.StyleBold[style]Set a style to be bold or not.
Editor.StyleWeight[style]Set the weight of characters of a style.
Editor.StyleItalic[style]Set a style to be italic or not.
Editor.StyleUnderline[style]Set a style to be underlined or not.
Editor.StyleFore[style]Set the foreground colour of a style.
Editor.StyleBack[style]Set the background colour of a style.
Editor.StyleEOLFilled[style]Set a style to have its end of line filled or not.
Editor.StyleCharacterSet[style]Set the character set of the font in a style.
Editor.StyleCase[style]Set a style to be mixed case, or to force upper or lower case.
Editor.StyleVisible[style]Set a style to be visible or not.
Editor.StyleChangeable[style]Set a style to be changeable or not (read only).
Editor.StyleHotSpot[style]Set a style to be a hotspot or not.
+

Caret, selection, and hotspot styles

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor:SetSelFore(useSetting, fore)Set the foreground colour of the main and additional selections and whether to use this setting.
Editor:SetSelBack(useSetting, back)Set the background colour of the main and additional selections and whether to use this setting.
Editor.SelAlphaSet the alpha of the selection.
Editor.SelEOLFilledSet the selection to have its end of line filled or not.
Editor.CaretForeSet the foreground colour of the caret.
Editor.CaretLineVisibleDisplay the background of the line containing the caret in a different colour.
Editor.CaretLineBackSet the colour of the background of the line containing the caret.
Editor.CaretLineBackAlphaSet background alpha of the caret line.
Editor.CaretLineVisibleAlwaysSets the caret line to always visible.
Editor.CaretPeriodGet the time in milliseconds that the caret is on and off.
Editor.CaretStyleSet the style of the caret to be drawn.
Editor.CaretWidthSet the width of the insert mode caret.
Editor:SetHotspotActiveFore(useSetting, fore)Set a fore colour for active hotspots.
Editor:GetHotspotActiveFore()Get the fore colour for active hotspots.
Editor:SetHotspotActiveBack(useSetting, back)Set a back colour for active hotspots.
Editor:GetHotspotActiveBack()Get the back colour for active hotspots.
Editor.HotspotActiveUnderlineEnable / Disable underlining active hotspots.
Editor.HotspotSingleLineLimit hotspots to single line so hotspots on two lines don't merge.
Editor.CaretStickyStop the caret preferred x position changing when the user types.
Editor:ToggleCaretSticky()Switch between sticky and non-sticky: meant to be bound to a key.
+

Character representations

+ + + + + + + + + + + + + +
Editor.Representation[encodedCharacter]Set the way a character is drawn.
Editor:ClearRepresentation(encodedCharacter)Remove a character representation.
Editor.ControlCharSymbolChange the way control characters are displayed: If symbol is < 32, keep the drawn way, else, use the given character.
+

Margins

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.MarginTypeN[margin]Set a margin to be either numeric or symbolic.
Editor.MarginWidthN[margin]Set the width of a margin to a width expressed in pixels.
Editor.MarginMaskN[margin]Set a mask that determines which markers are displayed in a margin.
Editor.MarginSensitiveN[margin]Make a margin sensitive or insensitive to mouse clicks.
Editor.MarginCursorN[margin]Set the cursor shown when the mouse is inside a margin.
Editor.MarginLeftSets the size in pixels of the left margin.
Editor.MarginRightSets the size in pixels of the right margin.
Editor:SetFoldMarginColour(useSetting, back)Set the colours used as a chequerboard pattern in the fold margin
Editor:SetFoldMarginHiColour(useSetting, fore)Set the colours used as a chequerboard pattern in the fold margin
Editor.MarginText[line]Set the text in the text margin for a line
Editor.MarginStyle[line]Set the style number for the text margin for a line
Editor.MarginStyles[line]Set the style in the text margin for a line
Editor:MarginTextClearAll()Clear the margin text on all lines
Editor.MarginStyleOffsetGet the start of the range of style numbers used for margin text
Editor.MarginOptionsSet the margin options.
+

Annotations

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.AnnotationText[line]Set the annotation text for a line
Editor.AnnotationStyle[line]Set the style number for the annotations for a line
Editor.AnnotationStyles[line]Set the annotation styles for a line
Editor.AnnotationLines[line]read-only
Editor:AnnotationClearAll()Clear the annotations from all lines
Editor.AnnotationVisibleSet the visibility for the annotations for a view
Editor.AnnotationStyleOffsetGet the start of the range of style numbers used for annotations
+

Other settings

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.BufferedDrawIf drawing is buffered then each line of text is drawn into a bitmap buffer before drawing it to the screen to avoid flicker.
Editor.PhasesDrawIn one phase draw, text is drawn in a series of rectangular blocks with no overlap.
Editor.TwoPhaseDrawIn twoPhaseDraw mode, drawing is performed in two phases, first the background and then the foreground.
Editor.TechnologySet the technology used.
Editor.FontQualityChoose the quality level for text from the FontQuality enumeration.
Editor.CodePageSet the code page used to interpret the bytes of the document as characters.
Editor.IMEInteractionChoose to display the the IME in a winow or inline.
Editor.WordCharsSet the set of characters making up words for when moving or selecting by word.
Editor.WhitespaceCharsSet the set of characters making up whitespace for when moving or selecting by word.
Editor.PunctuationCharsSet the set of characters making up punctuation characters Should be called after SetWordChars.
Editor:SetCharsDefault()Reset the set of characters for whitespace and word characters to the defaults.
Editor:GrabFocus()Set the focus to this Scintilla widget.
Editor.FocusChange internal focus flag.
+

Brace highlighting

+ + + + + + + + + + + + + + + + + + + + + +
Editor:BraceHighlight(pos1, pos2)Highlight the characters at two positions.
Editor:BraceBadLight(pos)Highlight the character at a position indicating there is no matching brace.
Editor:BraceHighlightIndicator(useBraceHighlightIndicator, indicator)Use specified indicator to highlight matching braces instead of changing their style.
Editor:BraceBadLightIndicator(useBraceBadLightIndicator, indicator)Use specified indicator to highlight non matching brace instead of changing its style.
Editor:BraceMatch(pos)Find the position of a matching brace or INVALID_POSITION if no match.
+

Tabs and Indentation Guides

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.TabWidthChange the visible size of a tab to be a multiple of the width of a space character.
Editor:ClearTabStops(line)Clear explicit tabstops on a line.
Editor:AddTabStop(line, x)Add an explicit tab stop for a line.
Editor:GetNextTabStop(line, x)Find the next explicit tab stop position on a line after a position.
Editor.UseTabsIndentation will only use space characters if useTabs is false, otherwise it will use a combination of tabs and spaces.
Editor.IndentSet the number of spaces used for one level of indentation.
Editor.TabIndentsSets whether a tab pressed when caret is within indentation indents.
Editor.BackSpaceUnIndentsSets whether a backspace pressed when caret is within indentation unindents.
Editor.LineIndentation[line]Change the indentation of a line to a number of columns.
Editor.LineIndentPosition[line]read-only
Editor.IndentationGuidesShow or hide indentation guides.
Editor.HighlightGuideSet the highlighted indentation guide column.
+

Markers

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor:MarkerDefine(markerNumber, markerSymbol)Set the symbol used for a particular marker number.
Editor:MarkerDefinePixmap(markerNumber, pixmap)Define a marker from a pixmap.
Editor.RGBAImageWidthSet the width for future RGBA image data.
Editor.RGBAImageHeightSet the height for future RGBA image data.
Editor.RGBAImageScaleSet the scale factor in percent for future RGBA image data.
Editor:MarkerDefineRGBAImage(markerNumber, pixels)Define a marker from RGBA data.
Editor:MarkerSymbolDefined(markerNumber)Which symbol was defined for markerNumber with MarkerDefine
Editor.MarkerFore[markerNumber]Set the foreground colour used for a particular marker number.
Editor.MarkerBack[markerNumber]Set the background colour used for a particular marker number.
Editor.MarkerBackSelected[markerNumber]Set the background colour used for a particular marker number when its folding block is selected.
Editor:MarkerEnableHighlight(enabled)Enable/disable highlight for current folding bloc (smallest one that contains the caret)
Editor.MarkerAlpha[markerNumber]Set the alpha used for a marker that is drawn in the text area, not the margin.
Editor:MarkerAdd(line, markerNumber)Add a marker to a line, returning an ID which can be used to find or delete the marker.
Editor:MarkerAddSet(line, set)Add a set of markers to a line.
Editor:MarkerDelete(line, markerNumber)Delete a marker from a line.
Editor:MarkerDeleteAll(markerNumber)Delete all markers with a particular number from all lines.
Editor:MarkerGet(line)Get a bit mask of all the markers set on a line.
Editor:MarkerNext(lineStart, markerMask)Find the next line at or after lineStart that includes a marker in mask.
Editor:MarkerPrevious(lineStart, markerMask)Find the previous line before lineStart that includes a marker in mask.
Editor:MarkerLineFromHandle(handle)Retrieve the line number at which a particular marker is located.
Editor:MarkerDeleteHandle(handle)Delete a marker.
+

Indicators

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.IndicStyle[indic]Set an indicator to plain, squiggle or TT.
Editor.IndicFore[indic]Set the foreground colour of an indicator.
Editor.IndicAlpha[indicator]Set the alpha fill colour of the given indicator.
Editor.IndicOutlineAlpha[indicator]Set the alpha outline colour of the given indicator.
Editor.IndicUnder[indic]Set an indicator to draw under text or over(default).
Editor.IndicHoverStyle[indic]Set a hover indicator to plain, squiggle or TT.
Editor.IndicHoverFore[indic]Set the foreground hover colour of an indicator.
Editor.IndicFlags[indic]Set the attributes of an indicator.
Editor.IndicatorCurrentSet the indicator used for IndicatorFillRange and IndicatorClearRange
Editor.IndicatorValueSet the value used for IndicatorFillRange
Editor:IndicatorFillRange(position, fillLength)Turn a indicator on over a range.
Editor:IndicatorClearRange(position, clearLength)Turn a indicator off over a range.
Editor:IndicatorAllOnFor(position)Are any indicators present at position?
Editor:IndicatorValueAt(indicator, position)What value does a particular indicator have at at a position?
Editor:IndicatorStart(indicator, position)Where does a particular indicator start?
Editor:IndicatorEnd(indicator, position)Where does a particular indicator end?
Editor:FindIndicatorShow(start, end)On OS X, show a find indicator.
Editor:FindIndicatorFlash(start, end)On OS X, flash a find indicator, then fade out.
Editor:FindIndicatorHide()On OS X, hide the find indicator.
+

Autocompletion

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor:AutoCShow(lenEntered, itemList)Display a auto-completion list.
Editor:AutoCCancel()Remove the auto-completion list from the screen.
Editor:AutoCActive()Is there an auto-completion list visible?
Editor:AutoCPosStart()Retrieve the position of the caret when the auto-completion list was displayed.
Editor:AutoCComplete()User has selected an item so remove the list and insert the selection.
Editor:AutoCStops(characterSet)Define a set of character that when typed cancel the auto-completion list.
Editor.AutoCSeparatorChange the separator character in the string setting up an auto-completion list.
Editor:AutoCSelect(text)Select the item in the auto-completion list that starts with a string.
Editor.AutoCCurrentread-only
Editor.AutoCCurrentTextread-only
Editor.AutoCCancelAtStartShould the auto-completion list be cancelled if the user backspaces to a position before where the box was created.
Editor.AutoCFillUpsDefine a set of characters that when typed will cause the autocompletion to choose the selected item.
Editor.AutoCChooseSingleShould a single item auto-completion list automatically choose the item.
Editor.AutoCIgnoreCaseSet whether case is significant when performing auto-completion searches.
Editor.AutoCCaseInsensitiveBehaviourSet auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference.
Editor.AutoCMultiChange the effect of autocompleting when there are multiple selections.
Editor.AutoCOrderSet the way autocompletion lists are ordered.
Editor.AutoCAutoHideSet whether or not autocompletion is hidden automatically when nothing matches.
Editor.AutoCDropRestOfWordSet whether or not autocompletion deletes any word characters after the inserted text upon completion.
Editor:RegisterImage(type, xpmData)Register an XPM image for use in autocompletion lists.
Editor:RegisterRGBAImage(type, pixels)Register an RGBA image for use in autocompletion lists.
Editor:ClearRegisteredImages()Clear all the registered XPM images.
Editor.AutoCTypeSeparatorChange the type-separator character in the string setting up an auto-completion list.
Editor.AutoCMaxHeightSet the maximum height, in rows, of auto-completion and user lists.
Editor.AutoCMaxWidthSet the maximum width, in characters, of auto-completion and user lists.
+

User lists

+ + + + + +
Editor:UserListShow(listType, itemList)Display a list of strings and send notification when user chooses one.
+

Call tips

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor:CallTipShow(pos, definition)Show a call tip containing a definition near position pos.
Editor:CallTipCancel()Remove the call tip from the screen.
Editor:CallTipActive()Is there an active call tip?
Editor:CallTipPosStart()Retrieve the position where the caret was before displaying the call tip.
Editor.CallTipPosStartSet the start position in order to change when backspacing removes the calltip.
Editor:CallTipSetHlt(start, end)Highlight a segment of the definition.
Editor.CallTipBackSet the background colour for the call tip.
Editor.CallTipForeSet the foreground colour for the call tip.
Editor.CallTipForeHltSet the foreground colour for the highlighted part of the call tip.
Editor.CallTipUseStyleEnable use of STYLE_CALLTIP and set call tip tab size in pixels.
Editor.CallTipPositionSet position of calltip, above or below text.
+

Key bindings

+ + + + + + + + + + + + + + + + + +
Editor:AssignCmdKey(keycode, modifiers, msg)When key+modifier combination km is pressed perform msg.
Editor:ClearCmdKey(keycode, modifiers)When key+modifier combination km is pressed do nothing.
Editor:ClearAllCmdKeys()Drop all key mappings.
Editor:Null()Null operation.
+

Keyboard Commands

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor:LineDown()Move caret down one line.
Editor:LineDownExtend()Move caret down one line extending selection to new caret position.
Editor:LineDownRectExtend()Move caret down one line, extending rectangular selection to new caret position.
Editor:LineScrollDown()Scroll the document down, keeping the caret visible.
Editor:LineUp()Move caret up one line.
Editor:LineUpExtend()Move caret up one line extending selection to new caret position.
Editor:LineUpRectExtend()Move caret up one line, extending rectangular selection to new caret position.
Editor:LineScrollUp()Scroll the document up, keeping the caret visible.
Editor:ParaDown()Move caret between paragraphs (delimited by empty lines).
Editor:ParaDownExtend()Move caret between paragraphs (delimited by empty lines).
Editor:ParaUp()Move caret between paragraphs (delimited by empty lines).
Editor:ParaUpExtend()Move caret between paragraphs (delimited by empty lines).
Editor:CharLeft()Move caret left one character.
Editor:CharLeftExtend()Move caret left one character extending selection to new caret position.
Editor:CharLeftRectExtend()Move caret left one character, extending rectangular selection to new caret position.
Editor:CharRight()Move caret right one character.
Editor:CharRightExtend()Move caret right one character extending selection to new caret position.
Editor:CharRightRectExtend()Move caret right one character, extending rectangular selection to new caret position.
Editor:WordLeft()Move caret left one word.
Editor:WordLeftExtend()Move caret left one word extending selection to new caret position.
Editor:WordRight()Move caret right one word.
Editor:WordRightExtend()Move caret right one word extending selection to new caret position.
Editor:WordLeftEnd()Move caret left one word, position cursor at end of word.
Editor:WordLeftEndExtend()Move caret left one word, position cursor at end of word, extending selection to new caret position.
Editor:WordRightEnd()Move caret right one word, position cursor at end of word.
Editor:WordRightEndExtend()Move caret right one word, position cursor at end of word, extending selection to new caret position.
Editor:WordPartLeft()Move to the previous change in capitalization.
Editor:WordPartLeftExtend()Move to the previous change in capitalization extending selection to new caret position.
Editor:WordPartRight()Move to the change next in capitalization.
Editor:WordPartRightExtend()Move to the next change in capitalization extending selection to new caret position.
Editor:Home()Move caret to first position on line.
Editor:HomeExtend()Move caret to first position on line extending selection to new caret position.
Editor:HomeRectExtend()Move caret to first position on line, extending rectangular selection to new caret position.
Editor:HomeDisplay()Move caret to first position on display line.
Editor:HomeDisplayExtend()Move caret to first position on display line extending selection to new caret position.
Editor:HomeWrap()Similarly Home when word-wrap is enabled.
Editor:HomeWrapExtend()Similarly HomeExtend when word-wrap is enabled.
Editor:VCHome()Move caret to before first visible character on line.
Editor:VCHomeExtend()Like VCHome but extending selection to new caret position.
Editor:VCHomeRectExtend()Move caret to before first visible character on line.
Editor:VCHomeWrap() + +
Editor:VCHomeWrapExtend() + +
Editor:VCHomeDisplay() + +
Editor:VCHomeDisplayExtend() + +
Editor:LineEnd()Move caret to last position on line.
Editor:LineEndExtend()Move caret to last position on line extending selection to new caret position.
Editor:LineEndRectExtend()Move caret to last position on line, extending rectangular selection to new caret position.
Editor:LineEndDisplay()Move caret to last position on display line.
Editor:LineEndDisplayExtend()Move caret to last position on display line extending selection to new caret position.
Editor:LineEndWrap()Similarly LineEnd when word-wrap is enabled.
Editor:LineEndWrapExtend()Similarly LineEndExtend when word-wrap is enabled.
Editor:DocumentStart()Move caret to first position in document.
Editor:DocumentStartExtend()Move caret to first position in document extending selection to new caret position.
Editor:DocumentEnd()Move caret to last position in document.
Editor:DocumentEndExtend()Move caret to last position in document extending selection to new caret position.
Editor:PageUp()Move caret one page up.
Editor:PageUpExtend()Move caret one page up extending selection to new caret position.
Editor:PageUpRectExtend()Move caret one page up, extending rectangular selection to new caret position.
Editor:PageDown()Move caret one page down.
Editor:PageDownExtend()Move caret one page down extending selection to new caret position.
Editor:PageDownRectExtend()Move caret one page down, extending rectangular selection to new caret position.
Editor:StutteredPageUp()Move caret to top of page, or one page up if already at top of page.
Editor:StutteredPageUpExtend()Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.
Editor:StutteredPageDown()Move caret to bottom of page, or one page down if already at bottom of page.
Editor:StutteredPageDownExtend()Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.
Editor:DeleteBack()Delete the selection or if no selection, the character before the caret.
Editor:DeleteBackNotLine()Delete the selection or if no selection, the character before the caret.
Editor:DelWordLeft()Delete the word to the left of the caret.
Editor:DelWordRight()Delete the word to the right of the caret.
Editor:DelWordRightEnd()Delete the word to the right of the caret, but not the trailing non-word characters.
Editor:DelLineLeft()Delete back from the current position to the start of the line.
Editor:DelLineRight()Delete forwards from the current position to the end of the line.
Editor:LineDelete()Delete the line containing the caret.
Editor:LineCut()Cut the line containing the caret.
Editor:LineCopy()Copy the line containing the caret.
Editor:LineTranspose()Switch the current line with the previous.
Editor:LineDuplicate()Duplicate the current line.
Editor:LowerCase()Transform the selection to lower case.
Editor:UpperCase()Transform the selection to upper case.
Editor:Cancel()Cancel any modes such as call tip or auto-completion list display.
Editor:EditToggleOvertype()Switch from insert to overtype mode or the reverse.
Editor:NewLine()Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
Editor:FormFeed()Insert a Form Feed character.
Editor:Tab()If selection is empty or all on one line replace the selection with a tab character.
Editor:BackTab()Dedent the selected lines.
Editor:SelectionDuplicate()Duplicates the current selection.
Editor:VerticalCentreCaret()Scroll the document so that the caret is in the center of the screen.
Editor:MoveSelectedLinesUp()Move the selected lines up one line, shifting the line above after the selection.
Editor:MoveSelectedLinesDown()Move the selected lines down one line, shifting the line below before the selection.
Editor:ScrollToStart()Scroll the document to the start without changing the selection.
Editor:ScrollToEnd()Scroll the document to the end without changing the selection.
+

Popup edit menu

+ + + + + +
Editor:UsePopUp(allowPopUp)Set whether a pop up menu is displayed automatically when the user presses the wrong mouse button.
+

Macro recording

+ + + + + + + + + +
Editor:StartRecord()Start notifying the container of all key presses and commands.
Editor:StopRecord()Stop notifying the container of all key presses and commands.
+

Printing

+ + + + + + + + + + + + + +
Editor.PrintMagnificationSets the print magnification added to the point size of each style for printing.
Editor.PrintColourModeModify colours when printing for clearer printed text.
Editor.PrintWrapModeSet printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
+

Direct access

+ + + + + + + + + + + + + + + + + + + + + +
Editor.DirectFunctionread-only
Editor.DirectPointerread-only
Editor.CharacterPointerread-only
Editor:GetRangePointer(position, rangeLength)Return a read-only pointer to a range of characters in the document.
Editor.GapPositionread-only
+

Multiple views

+ + + + + + + + + + + + + + + + + +
Editor.DocPointerChange the document object used.
Editor:CreateDocument()Create a new document object.
Editor:AddRefDocument(doc)Extend life of document.
Editor:ReleaseDocument(doc)Release a reference to the document, deleting document if it fades to black.
+

Background loading and saving

+ + + + + +
Editor:CreateLoader(bytes)Create an ILoader*.
+

Folding

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor:VisibleFromDocLine(line)Find the display line of a document line taking hidden lines into account.
Editor:DocLineFromVisible(lineDisplay)Find the document line of a display line taking hidden lines into account.
Editor:ShowLines(lineStart, lineEnd)Make a range of lines visible.
Editor:HideLines(lineStart, lineEnd)Make a range of lines invisible.
Editor.LineVisible[line]read-only
Editor.AllLinesVisibleread-only
Editor.FoldLevel[line]Set the fold level of a line.
Editor.FoldFlagsSet some style options for folding.
Editor:GetLastChild(line, level)Find the last child line of a header line.
Editor.FoldParent[line]read-only
Editor:ToggleFold(line)Switch a header line between expanded and contracted.
Editor.FoldExpanded[line]Show the children of a header line.
Editor:FoldLine(line, action)Expand or contract a fold header.
Editor:FoldChildren(line, action)Expand or contract a fold header and its children.
Editor:FoldAll(action)Expand or contract all fold headers.
Editor:ExpandChildren(line, level)Expand a fold header and all children.
Editor.AutomaticFoldSet automatic folding behaviours.
Editor:ContractedFoldNext(lineStart)Find the next line at or after lineStart that is a contracted fold header line.
Editor:EnsureVisible(line)Ensure a particular line is visible by expanding any header line hiding it.
Editor:EnsureVisibleEnforcePolicy(line)Ensure a particular line is visible by expanding any header line hiding it.
+

Line wrapping

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.WrapModeSets whether text is word wrapped.
Editor.WrapVisualFlagsSet the display mode of visual flags for wrapped lines.
Editor.WrapVisualFlagsLocationSet the location of visual flags for wrapped lines.
Editor.WrapIndentModeSets how wrapped sublines are placed.
Editor.WrapStartIndentSet the start indent for wrapped lines.
Editor.LayoutCacheSets the degree of caching of layout information.
Editor.PositionCacheSet number of entries in position cache
Editor:LinesSplit(pixelWidth)Split the lines in the target into lines that are less wide than pixelWidth where possible.
Editor:LinesJoin()Join the lines in the target.
Editor:WrapCount(line)The number of display lines needed to wrap a document line
+

Zooming

+ + + + + + + + + + + + + +
Editor:ZoomIn()Magnify the displayed text by increasing the sizes by 1 point.
Editor:ZoomOut()Make the displayed text smaller by decreasing the sizes by 1 point.
Editor.ZoomSet the zoom level.
+

Long lines

+ + + + + + + + + + + + + +
Editor.EdgeModeThe 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).
Editor.EdgeColumnSet the column number of the edge.
Editor.EdgeColourChange the colour used in edge indication.
+

Lexer

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Editor.LexerSet the lexing language of the document.
Editor.LexerLanguageSet the lexing language of the document based on string name.
Editor:LoadLexerLibrary(path)Load a lexer library (dll / so).
Editor:Colourise(start, end)Colourise a segment of the document using the current lexing language.
Editor:ChangeLexerState(start, end)Indicate that the internal state of a lexer has changed over a range and therefore there may be a need to redraw.
Editor:PropertyNames()Retrieve a '\n' separated list of properties understood by the current lexer.
Editor:PropertyType(name)Retrieve the type of a property.
Editor:DescribeProperty(name)Describe a property.
Editor.Property[key]Set up a value that may be used by a lexer for some optional feature.
Editor.PropertyExpanded[key]read-only
Editor.PropertyInt[key]read-only
Editor.KeyWords[keywordSet]Set up the key words used by the lexer.
Editor:DescribeKeyWordSets()Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.
Editor.SubStyleBasesread-only
Editor.DistanceToSecondaryStylesread-only
Editor:AllocateSubStyles(styleBase, numberStyles)Allocate a set of sub styles for a particular base style, returning start of range
Editor:FreeSubStyles()Free allocated sub styles
Editor.SubStylesStart[styleBase]read-only
Editor.SubStylesLength[styleBase]read-only
Editor.StyleFromSubStyle[subStyle]read-only
Editor.PrimaryStyleFromStyle[style]read-only
Editor.Identifiers[style]Set the identifiers that are shown in a particular style
+

Notifications

+ + + + + + + + + + + + + +
Editor.IdentifierSet the identifier reported as idFrom in notification messages.
Editor.ModEventMaskSet which document modification events are sent to the container.
Editor.MouseDwellTimeSets the time the mouse must sit still to generate a mouse dwell event.
+

Deprecated messages and notifications

+ + + + + +
Editor.StyleBitsNeededread-only
+ +
+
+ + +

Helper Methods

+ +
+
+ + Editor:textrange(startPos, endPos) +
+
+ Gets the text within a range + + +

Parameters:

+
    +
  • startPos + int + + + +
  • +
  • endPos + int + + + +
  • +
+ +

Returns:

+
    + + string + + + +
+ + + + +
+
+ + Editor:findtext(search[, flags[, startPos[, endPos]]]) +
+
+ Finds the next match within the document. + See the Scintilla Documentation for the search flags. + + +

Parameters:

+
    +
  • search + string + string +
  • +
  • flags + int + either 0 or a combination of SCFIND constants + (optional) +
  • +
  • startPos + int + start of the range to search + (optional) +
  • +
  • endPos + int + end of the range to search + (optional) +
  • +
+ +

Returns:

+
    + + the start and end of the first match, or nil if no match +
+ + + + +
+
+ + Editor:match(search[, flags[, startPos]]) +
+
+ Creates a generator to iterate matches. + See the Scintilla Documentation for the search flags. + + +

Parameters:

+
    +
  • search + string + string +
  • +
  • flags + int + either 0 or a combination of SCFIND constants + (optional) +
  • +
  • startPos + int + start of the range to search + (optional) +
  • +
+ +

Returns:

+
    + + Match + match object generator +
+ + +

See also:

+ + +

Usage:

+
    +
    for m in editor:match(text, flags) do ... end
    +
+ +
+
+ + Editor:append(text) +
+
+ Appends text to the end of the document. + + +

Parameters:

+
    +
  • text + string + + + +
  • +
+ + + + + +
+
+ + Editor:remove(startPos, endPos) +
+
+ Removes the text in the range + + +

Parameters:

+
    +
  • startPos + int + + + +
  • +
  • endPos + int + + + +
  • +
+ + + + + +
+
+

Text retrieval and modification

+ +
+
+ + Editor:GetText() +
+
+ Retrieve all the text in the document. Returns number of characters retrieved. Result is NUL-terminated. + + + +

Returns:

+
    + + string + + + +
+ + +

See also:

+ + + +
+
+ + Editor:SetText(text) +
+
+ Replace the contents of the document with the argument text. + + +

Parameters:

+
    +
  • text + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetSavePoint() +
+
+ Remember the current position in the undo history as the position at which the document was saved. + + + + + +

See also:

+ + + +
+
+ + Editor:GetLine(line) +
+
+ Retrieve the contents of a line. Returns the length of the line. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ +

Returns:

+
    + + string + + + +
+ + +

See also:

+ + + +
+
+ + Editor:ReplaceSel(text) +
+
+ Replace the selected text with the argument text. + + +

Parameters:

+
    +
  • text + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.ReadOnly +
+
+ Set to read only or read write. + + +
    +
  • ReadOnly + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:Allocate(bytes) +
+
+ Enlarge the document to a particular size of text bytes. + + +

Parameters:

+
    +
  • bytes + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:AddText(text) +
+
+ Add text to the document at current position. + + +

Parameters:

+
    +
  • text + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:AppendText(text) +
+
+ Append a string to the end of the document without changing the selection. + + +

Parameters:

+
    +
  • text + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:InsertText(pos, text) +
+
+ Insert string at a position. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
  • text + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ChangeInsertion(text) +
+
+ Change the text that is being inserted in response to SC_MOD_INSERTCHECK + + +

Parameters:

+
    +
  • text + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ClearAll() +
+
+ Delete all text in the document. + + + + + +

See also:

+ + + +
+
+ + Editor:DeleteRange(pos, deleteLength) +
+
+ Delete a range of text in the document. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
  • deleteLength + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ClearDocumentStyle() +
+
+ Set all style bytes to 0, remove all folding information. + + + + + +

See also:

+ + + +
+
+ + Editor.CharAt[pos] +
+
+ read-only + + +
    +
  • pos + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleAt[pos] +
+
+ read-only + + +
    +
  • pos + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ReleaseAllExtendedStyles() +
+
+ Release all extended (>255) style numbers + + + + + +

See also:

+ + + +
+
+ + Editor:AllocateExtendedStyles(numberStyles) +
+
+ Allocate some extended (>255) style numbers and return the start of the range + + +

Parameters:

+
    +
  • numberStyles + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:TargetAsUTF8() +
+
+ Returns the target converted to UTF8. Return the length in bytes. + + + +

Returns:

+
    + + string + + + +
+ + +

See also:

+ + + +
+
+ + Editor:EncodedFromUTF8(utf8) +
+
+ Translates a UTF8 string into the document encoding. Return the length of the result in bytes. On error return 0. + + +

Parameters:

+
    +
  • utf8 + string + + + +
  • +
+ +

Returns:

+
    + + string + + + +
+ + +

See also:

+ + + +
+
+ + Editor:SetLengthForEncode(bytes) +
+
+ Set the length of the utf8 argument for calling EncodedFromUTF8. Set to -1 and the string will be measured to the first nul. + + +

Parameters:

+
    +
  • bytes + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Searching

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

See also:

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

See also:

+ + + +
+
+ + Editor:SetTargetRange(start, end) +
+
+ Sets both the start and end of the target in one call. + + +

Parameters:

+
    +
  • start + position + + + +
  • +
  • end + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:TargetFromSelection() +
+
+ Make the target range start and end be the same as the selection range start and end. + + + + + +

See also:

+ + + +
+
+ + Editor.SearchFlags +
+
+ Set the search flags used by SearchInTarget. + + +
    +
  • SearchFlags + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SearchInTarget(text) +
+
+ Search for a counted string in the target and set the target to the found range. Text is counted so it can contain NULs. Returns length of range or -1 for failure in which case target is not moved. + + +

Parameters:

+
    +
  • text + string + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor.TargetText +
+
+ read-only + + +
    +
  • TargetText + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ReplaceTarget(text) +
+
+ Replace the target text with the argument text. Text is counted so it can contain NULs. Returns the length of the replacement text. + + +

Parameters:

+
    +
  • text + string + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:ReplaceTargetRE(text) +
+
+ Replace the target text with the argument text after \d processing. Text is counted so it can contain NULs. 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. + + +

Parameters:

+
    +
  • text + string + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor.Tag[tagNumber] +
+
+ read-only + + +
    +
  • tagNumber + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SearchAnchor() +
+
+ Sets the current caret position to be the search anchor. + + + + + +

See also:

+ + + +
+
+ + Editor:SearchNext(flags, text) +
+
+ Find some text starting at the search anchor. Does not ensure the selection is visible. + + +

Parameters:

+
    +
  • flags + int + + + +
  • +
  • text + string + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:SearchPrev(flags, text) +
+
+ Find some text starting at the search anchor and moving backwards. Does not ensure the selection is visible. + + +

Parameters:

+
    +
  • flags + int + + + +
  • +
  • text + string + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+

Overtype

+ +
+
+ + Editor.Overtype +
+
+ Set to overtype (true) or insert mode. + + +
    +
  • Overtype + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Cut, copy and paste

+ +
+
+ + Editor:Cut() +
+
+ Cut the selection to the clipboard. + + + + + +

See also:

+ + + +
+
+ + Editor:Copy() +
+
+ Copy the selection to the clipboard. + + + + + +

See also:

+ + + +
+
+ + Editor:Paste() +
+
+ Paste the contents of the clipboard into the document replacing the selection. + + + + + +

See also:

+ + + +
+
+ + Editor:Clear() +
+
+ Clear the selection. + + + + + +

See also:

+ + + +
+
+ + Editor:CanPaste() +
+
+ Will a paste succeed? + + + +

Returns:

+
    + + bool + + + +
+ + +

See also:

+ + + +
+
+ + Editor:CopyAllowLine() +
+
+ Copy the selection, if selection empty copy the line with the caret + + + + + +

See also:

+ + + +
+
+ + Editor:CopyRange(start, end) +
+
+ Copy a range of text to the clipboard. Positions are clipped into the document. + + +

Parameters:

+
    +
  • start + position + + + +
  • +
  • end + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:CopyText(text) +
+
+ Copy argument text to the clipboard. + + +

Parameters:

+
    +
  • text + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.PasteConvertEndings +
+
+ Enable/Disable convert-on-paste for line endings + + +
    +
  • PasteConvertEndings + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Error handling

+ +
+
+ + Editor.Status +
+
+ Change error status - 0 = OK. + + +
    +
  • Status + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Undo and Redo

+ +
+
+ + Editor:Undo() +
+
+ Undo one action in the undo history. + + + + + +

See also:

+ + + +
+
+ + Editor:CanUndo() +
+
+ Are there any undoable actions in the undo history? + + + +

Returns:

+
    + + bool + + + +
+ + +

See also:

+ + + +
+
+ + Editor:Redo() +
+
+ Redoes the next action on the undo history. + + + + + +

See also:

+ + + +
+
+ + Editor:CanRedo() +
+
+ Are there any redoable actions in the undo history? + + + +

Returns:

+
    + + bool + + + +
+ + +

See also:

+ + + +
+
+ + Editor:EmptyUndoBuffer() +
+
+ Delete the undo history. + + + + + +

See also:

+ + + +
+
+ + Editor.UndoCollection +
+
+ Choose between collecting actions into the undo history and discarding them. + + +
    +
  • UndoCollection + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:BeginUndoAction() +
+
+ Start a sequence of actions that is undone and redone as a unit. May be nested. + + + + + +

See also:

+ + + +
+
+ + Editor:EndUndoAction() +
+
+ End a sequence of actions that is undone and redone as a unit. + + + + + +

See also:

+ + + +
+
+ + Editor:AddUndoAction(token, flags) +
+
+ Add a container action to the undo stack + + +

Parameters:

+
    +
  • token + int + + + +
  • +
  • flags + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Selection and information

+ +
+
+ + Editor.TextLength +
+
+ read-only + + +
    +
  • TextLength + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.Length +
+
+ read-only + + +
    +
  • Length + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.LineCount +
+
+ read-only + + +
    +
  • LineCount + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.FirstVisibleLine +
+
+ Scroll so that a display line is at the top of the display. + + +
    +
  • FirstVisibleLine + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.LinesOnScreen +
+
+ read-only + + +
    +
  • LinesOnScreen + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.Modify +
+
+ read-only + + +
    +
  • Modify + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetSel(start, end) +
+
+ Select a range of text. + + +

Parameters:

+
    +
  • start + position + + + +
  • +
  • end + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:GotoPos(pos) +
+
+ Set caret to a position and ensure it is visible. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:GotoLine(line) +
+
+ Set caret to start of a line and ensure it is visible. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CurrentPos +
+
+ Sets the position of the caret. + + +
    +
  • CurrentPos + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.Anchor +
+
+ Set the selection anchor to a position. The anchor is the opposite end of the selection from the caret. + + +
    +
  • Anchor + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelectionStart +
+
+ Sets the position that starts the selection - this becomes the anchor. + + +
    +
  • SelectionStart + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelectionEnd +
+
+ Sets the position that ends the selection - this becomes the currentPosition. + + +
    +
  • SelectionEnd + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetEmptySelection(pos) +
+
+ Set caret to a position, while removing any existing selection. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SelectAll() +
+
+ Select all the text in the document. + + + + + +

See also:

+ + + +
+
+ + Editor:LineFromPosition(pos) +
+
+ Retrieve the line containing a position. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:PositionFromLine(line) +
+
+ Retrieve the position at the start of a line. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor.LineEndPosition[line] +
+
+ read-only + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:LineLength(line) +
+
+ How many characters are on a line, including end of line characters? + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:GetSelText() +
+
+ Retrieve the selected text. Return the length of the text. Result is NUL-terminated. + + + +

Returns:

+
    + + string + + + +
+ + +

See also:

+ + + +
+
+ + Editor:GetCurLine() +
+
+ Retrieve the text of the line containing the caret. Returns the index of the caret on the line. Result is NUL-terminated. + + + +

Returns:

+
    + + string + + + +
+ + +

See also:

+ + + +
+
+ + Editor.SelectionIsRectangle +
+
+ read-only + + +
    +
  • SelectionIsRectangle + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelectionMode +
+
+ Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or by lines (SC_SEL_LINES). + + +
    +
  • SelectionMode + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:GetLineSelStartPosition(line) +
+
+ Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor:GetLineSelEndPosition(line) +
+
+ Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor:MoveCaretInsideView() +
+
+ Move the caret inside current view if it's not there already. + + + + + +

See also:

+ + + +
+
+ + Editor:WordEndPosition(pos, onlyWordCharacters) +
+
+ Get position of end of word. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
  • onlyWordCharacters + bool + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:WordStartPosition(pos, onlyWordCharacters) +
+
+ Get position of start of word. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
  • onlyWordCharacters + bool + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:PositionBefore(pos) +
+
+ Given a valid document position, return the previous position taking code page into account. Returns 0 if passed 0. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
+ +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor:PositionAfter(pos) +
+
+ Given a valid document position, return the next position taking code page into account. Maximum value returned is the last position in the document. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
+ +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor:PositionRelative(pos, relative) +
+
+ Given a valid document position, return a position that differs in a number of characters. Returned value is always between 0 and last position in document. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
  • relative + int + + + +
  • +
+ +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor:CountCharacters(startPos, endPos) +
+
+ Count characters between two positions. + + +

Parameters:

+
    +
  • startPos + int + + + +
  • +
  • endPos + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor: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. + + +

Parameters:

+
    +
  • style + int + + + +
  • +
  • text + string + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:TextHeight(line) +
+
+ Retrieve the height of a particular line of text in pixels. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor.Column[pos] +
+
+ read-only + + +
    +
  • pos + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:FindColumn(line, column) +
+
+ Find the position of a column on a line taking into account tabs and multi-byte characters. If beyond end of line, return line end position. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • column + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:PositionFromPoint(x, y) +
+
+ Find the position from a point within the window. + + +

Parameters:

+
    +
  • x + int + + + +
  • +
  • y + int + + + +
  • +
+ +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor:PositionFromPointClose(x, y) +
+
+ Find the position from a point within the window but return INVALID_POSITION if not close to text. + + +

Parameters:

+
    +
  • x + int + + + +
  • +
  • y + int + + + +
  • +
+ +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor:CharPositionFromPoint(x, y) +
+
+ Find the position of a character from a point within the window. + + +

Parameters:

+
    +
  • x + int + + + +
  • +
  • y + int + + + +
  • +
+ +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor:CharPositionFromPointClose(x, y) +
+
+ Find the position of a character from a point within the window. Return INVALID_POSITION if not close to text. + + +

Parameters:

+
    +
  • x + int + + + +
  • +
  • y + int + + + +
  • +
+ +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor:PointXFromPosition(pos) +
+
+ Retrieve the x value of the point in the window where a position is displayed. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:PointYFromPosition(pos) +
+
+ Retrieve the y value of the point in the window where a position is displayed. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:HideSelection(normal) +
+
+ Draw the selection in normal style or with selection highlighted. + + +

Parameters:

+
    +
  • normal + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ChooseCaretX() +
+
+ Set the last x chosen value to be the caret x position. + + + + + +

See also:

+ + + +
+
+ + Editor:MoveSelectedLinesUp() +
+
+ Move the selected lines up one line, shifting the line above after the selection + + + + + +

See also:

+ + + +
+
+ + Editor:MoveSelectedLinesDown() +
+
+ Move the selected lines down one line, shifting the line below before the selection + + + + + +

See also:

+ + + +
+
+ + Editor.MouseSelectionRectangularSwitch +
+
+ Set whether switching to rectangular mode while selecting with the mouse is allowed. + + +
    +
  • MouseSelectionRectangularSwitch + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Multiple Selection and Virtual Space

+ +
+
+ + Editor.MultipleSelection +
+
+ Set whether multiple selections can be made + + +
    +
  • MultipleSelection + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AdditionalSelectionTyping +
+
+ Set whether typing can be performed into multiple selections + + +
    +
  • AdditionalSelectionTyping + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MultiPaste +
+
+ Change the effect of pasting when there are multiple selections. + + +
    +
  • MultiPaste + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.VirtualSpaceOptions +
+
+ Returns the position at the end of the selection. + + +
    +
  • VirtualSpaceOptions + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.RectangularSelectionModifier +
+
+ On GTK+, allow selecting the modifier key to use for mouse-based rectangular selection. Often the window manager requires Alt+Mouse Drag for moving windows. Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. + + +
    +
  • RectangularSelectionModifier + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.Selections +
+
+ read-only + + +
    +
  • Selections + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelectionEmpty +
+
+ read-only + + +
    +
  • SelectionEmpty + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ClearSelections() +
+
+ Clear selections to a single empty stream selection + + + + + +

See also:

+ + + +
+
+ + Editor:SetSelection(caret, anchor) +
+
+ Set a simple selection + + +

Parameters:

+
    +
  • caret + int + + + +
  • +
  • anchor + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:AddSelection(caret, anchor) +
+
+ Add a selection + + +

Parameters:

+
    +
  • caret + int + + + +
  • +
  • anchor + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:DropSelectionN(selection) +
+
+ Drop one selection + + +

Parameters:

+
    +
  • selection + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MainSelection +
+
+ Set the main selection + + +
    +
  • MainSelection + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelectionNCaret[selection] +
+
+ Which selection is the main selection + + +
    +
  • selection + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelectionNCaretVirtualSpace[selection] +
+
+ Which selection is the main selection + + +
    +
  • selection + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelectionNAnchor[selection] +
+
+ Which selection is the main selection + + +
    +
  • selection + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelectionNAnchorVirtualSpace[selection] +
+
+ Which selection is the main selection + + +
    +
  • selection + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelectionNStart[selection] +
+
+ Sets the position that starts the selection - this becomes the anchor. + + +
    +
  • selection + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelectionNEnd[selection] +
+
+ Sets the position that ends the selection - this becomes the currentPosition. + + +
    +
  • selection + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.RectangularSelectionCaret +
+
+ Returns the position at the end of the selection. + + +
    +
  • RectangularSelectionCaret + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.RectangularSelectionCaretVirtualSpace +
+
+ Returns the position at the end of the selection. + + +
    +
  • RectangularSelectionCaretVirtualSpace + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.RectangularSelectionAnchor +
+
+ Returns the position at the end of the selection. + + +
    +
  • RectangularSelectionAnchor + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.RectangularSelectionAnchorVirtualSpace +
+
+ Returns the position at the end of the selection. + + +
    +
  • RectangularSelectionAnchorVirtualSpace + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AdditionalSelAlpha +
+
+ Set the alpha of the selection. + + +
    +
  • AdditionalSelAlpha + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AdditionalSelFore +
+
+ Set the foreground colour of additional selections. Must have previously called SetSelFore with non-zero first argument for this to have an effect. + + +
    +
  • AdditionalSelFore + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AdditionalSelBack +
+
+ Set the background colour of additional selections. Must have previously called SetSelBack with non-zero first argument for this to have an effect. + + +
    +
  • AdditionalSelBack + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AdditionalCaretFore +
+
+ Set the foreground colour of additional carets. + + +
    +
  • AdditionalCaretFore + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AdditionalCaretsBlink +
+
+ Set whether additional carets will blink + + +
    +
  • AdditionalCaretsBlink + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AdditionalCaretsVisible +
+
+ Set whether additional carets are visible + + +
    +
  • AdditionalCaretsVisible + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SwapMainAnchorCaret() +
+
+ Swap that caret and anchor of the main selection. + + + + + +

See also:

+ + + +
+
+ + Editor:RotateSelection() +
+
+ Set the main selection to the next selection. + + + + + +

See also:

+ + + +
+
+

Scrolling and automatic scrolling

+ +
+
+ + Editor:LineScroll(columns, lines) +
+
+ Scroll horizontally and vertically. + + +

Parameters:

+
    +
  • columns + int + + + +
  • +
  • lines + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ScrollCaret() +
+
+ Ensure the caret is visible. + + + + + +

See also:

+ + + +
+
+ + Editor:ScrollRange(secondary, primary) +
+
+ Scroll the argument positions and the range between them into view giving priority to the primary position then the secondary position. This may be used to make a search match visible. + + +

Parameters:

+
    +
  • secondary + position + + + +
  • +
  • primary + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetXCaretPolicy(caretPolicy, caretSlop) +
+
+ Set the way the caret is kept visible when going sideways. The exclusion zone is given in pixels. + + +

Parameters:

+
    +
  • caretPolicy + int + + + +
  • +
  • caretSlop + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetYCaretPolicy(caretPolicy, caretSlop) +
+
+ Set the way the line the caret is on is kept visible. The exclusion zone is given in lines. + + +

Parameters:

+
    +
  • caretPolicy + int + + + +
  • +
  • caretSlop + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor: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. + + +

Parameters:

+
    +
  • visiblePolicy + int + + + +
  • +
  • visibleSlop + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.HScrollBar +
+
+ Show or hide the horizontal scroll bar. + + +
    +
  • HScrollBar + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.VScrollBar +
+
+ Show or hide the vertical scroll bar. + + +
    +
  • VScrollBar + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.XOffset +
+
+ Get and Set the xOffset (ie, horizontal scroll position). + + +
    +
  • XOffset + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.ScrollWidth +
+
+ Sets the document width assumed for scrolling. + + +
    +
  • ScrollWidth + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.ScrollWidthTracking +
+
+ Sets whether the maximum width line displayed is used to set scroll width. + + +
    +
  • ScrollWidthTracking + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.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. + + +
    +
  • EndAtLastLine + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+

White space

+ +
+
+ + Editor.ViewWS +
+
+ Make white space characters invisible, always visible or visible outside indentation. + + +
    +
  • ViewWS + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetWhitespaceFore(useSetting, fore) +
+
+ Set the foreground colour of all whitespace and whether to use this setting. + + +

Parameters:

+
    +
  • useSetting + bool + + + +
  • +
  • fore + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetWhitespaceBack(useSetting, back) +
+
+ Set the background colour of all whitespace and whether to use this setting. + + +

Parameters:

+
    +
  • useSetting + bool + + + +
  • +
  • back + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.WhitespaceSize +
+
+ Set the size of the dots used to mark space characters. + + +
    +
  • WhitespaceSize + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.ExtraAscent +
+
+ Set extra ascent for each line + + +
    +
  • ExtraAscent + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.ExtraDescent +
+
+ Set extra descent for each line + + +
    +
  • ExtraDescent + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Cursor

+ +
+
+ + Editor.Cursor +
+
+ Sets the cursor to one of the SC_CURSOR* values. + + +
    +
  • Cursor + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Mouse capture

+ +
+
+ + Editor.MouseDownCaptures +
+
+ Set whether the mouse is captured when its button is pressed. + + +
    +
  • MouseDownCaptures + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Line endings

+ +
+
+ + Editor.EOLMode +
+
+ Set the current end of line mode. + + +
    +
  • EOLMode + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ConvertEOLs(eolMode) +
+
+ Convert all line endings in the document to one mode. + + +

Parameters:

+
    +
  • eolMode + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.ViewEOL +
+
+ Make the end of line characters visible or invisible. + + +
    +
  • ViewEOL + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.LineEndTypesSupported +
+
+ read-only + + +
    +
  • LineEndTypesSupported + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.LineEndTypesAllowed +
+
+ Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. + + +
    +
  • LineEndTypesAllowed + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.LineEndTypesActive +
+
+ read-only + + +
    +
  • LineEndTypesActive + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Styling

+ +
+
+ + Editor.EndStyled +
+
+ read-only + + +
    +
  • EndStyled + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor: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. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
  • mask + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor: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. + + +

Parameters:

+
    +
  • length + int + + + +
  • +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetStylingEx(styles) +
+
+ Set the styles for a segment of the document. + + +

Parameters:

+
    +
  • styles + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.LineState[line] +
+
+ Used to hold extra styling information for each line. + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MaxLineState +
+
+ read-only + + +
    +
  • MaxLineState + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Style definition

+ +
+
+ + Editor:StyleResetDefault() +
+
+ Reset the default style to its state at startup + + + + + +

See also:

+ + + +
+
+ + Editor:StyleClearAll() +
+
+ Clear all the styles and make equivalent to the global default style. + + + + + +

See also:

+ + + +
+
+ + Editor.StyleFont[style] +
+
+ Set the font of a style. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleSize[style] +
+
+ Set the size of characters of a style. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleSizeFractional[style] +
+
+ Set the size of characters of a style. Size is in points multiplied by 100. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleBold[style] +
+
+ Set a style to be bold or not. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleWeight[style] +
+
+ Set the weight of characters of a style. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleItalic[style] +
+
+ Set a style to be italic or not. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleUnderline[style] +
+
+ Set a style to be underlined or not. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleFore[style] +
+
+ Set the foreground colour of a style. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleBack[style] +
+
+ Set the background colour of a style. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleEOLFilled[style] +
+
+ Set a style to have its end of line filled or not. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleCharacterSet[style] +
+
+ Set the character set of the font in a style. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleCase[style] +
+
+ Set a style to be mixed case, or to force upper or lower case. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleVisible[style] +
+
+ Set a style to be visible or not. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleChangeable[style] +
+
+ Set a style to be changeable or not (read only). Experimental feature, currently buggy. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleHotSpot[style] +
+
+ Set a style to be a hotspot or not. + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Caret, selection, and hotspot styles

+ +
+
+ + Editor:SetSelFore(useSetting, fore) +
+
+ Set the foreground colour of the main and additional selections and whether to use this setting. + + +

Parameters:

+
    +
  • useSetting + bool + + + +
  • +
  • fore + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetSelBack(useSetting, back) +
+
+ Set the background colour of the main and additional selections and whether to use this setting. + + +

Parameters:

+
    +
  • useSetting + bool + + + +
  • +
  • back + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelAlpha +
+
+ Set the alpha of the selection. + + +
    +
  • SelAlpha + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SelEOLFilled +
+
+ Set the selection to have its end of line filled or not. + + +
    +
  • SelEOLFilled + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CaretFore +
+
+ Set the foreground colour of the caret. + + +
    +
  • CaretFore + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CaretLineVisible +
+
+ Display the background of the line containing the caret in a different colour. + + +
    +
  • CaretLineVisible + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CaretLineBack +
+
+ Set the colour of the background of the line containing the caret. + + +
    +
  • CaretLineBack + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CaretLineBackAlpha +
+
+ Set background alpha of the caret line. + + +
    +
  • CaretLineBackAlpha + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CaretLineVisibleAlways +
+
+ Sets the caret line to always visible. + + +
    +
  • CaretLineVisibleAlways + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CaretPeriod +
+
+ Get the time in milliseconds that the caret is on and off. 0 = steady on. + + +
    +
  • CaretPeriod + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CaretStyle +
+
+ Set the style of the caret to be drawn. + + +
    +
  • CaretStyle + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CaretWidth +
+
+ Set the width of the insert mode caret. + + +
    +
  • CaretWidth + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetHotspotActiveFore(useSetting, fore) +
+
+ Set a fore colour for active hotspots. + + +

Parameters:

+
    +
  • useSetting + bool + + + +
  • +
  • fore + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:GetHotspotActiveFore() +
+
+ Get the fore colour for active hotspots. + + + +

Returns:

+
    + + colour + + + +
+ + +

See also:

+ + + +
+
+ + Editor:SetHotspotActiveBack(useSetting, back) +
+
+ Set a back colour for active hotspots. + + +

Parameters:

+
    +
  • useSetting + bool + + + +
  • +
  • back + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:GetHotspotActiveBack() +
+
+ Get the back colour for active hotspots. + + + +

Returns:

+
    + + colour + + + +
+ + +

See also:

+ + + +
+
+ + Editor.HotspotActiveUnderline +
+
+ Enable / Disable underlining active hotspots. + + +
    +
  • HotspotActiveUnderline + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.HotspotSingleLine +
+
+ Limit hotspots to single line so hotspots on two lines don't merge. + + +
    +
  • HotspotSingleLine + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CaretSticky +
+
+ Stop the caret preferred x position changing when the user types. + + +
    +
  • CaretSticky + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ToggleCaretSticky() +
+
+ Switch between sticky and non-sticky: meant to be bound to a key. + + + + + +

See also:

+ + + +
+
+

Character representations

+ +
+
+ + Editor.Representation[encodedCharacter] +
+
+ Set the way a character is drawn. + + +
    +
  • encodedCharacter + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ClearRepresentation(encodedCharacter) +
+
+ Remove a character representation. + + +

Parameters:

+
    +
  • encodedCharacter + string + + + +
  • +
+ + + +

See also:

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

See also:

+ + + +
+
+

Margins

+ +
+
+ + Editor.MarginTypeN[margin] +
+
+ Set a margin to be either numeric or symbolic. + + +
    +
  • margin + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarginWidthN[margin] +
+
+ Set the width of a margin to a width expressed in pixels. + + +
    +
  • margin + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarginMaskN[margin] +
+
+ Set a mask that determines which markers are displayed in a margin. + + +
    +
  • margin + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarginSensitiveN[margin] +
+
+ Make a margin sensitive or insensitive to mouse clicks. + + +
    +
  • margin + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarginCursorN[margin] +
+
+ Set the cursor shown when the mouse is inside a margin. + + +
    +
  • margin + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarginLeft +
+
+ Sets the size in pixels of the left margin. + + +
    +
  • MarginLeft + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarginRight +
+
+ Sets the size in pixels of the right margin. + + +
    +
  • MarginRight + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetFoldMarginColour(useSetting, back) +
+
+ Set the colours used as a chequerboard pattern in the fold margin + + +

Parameters:

+
    +
  • useSetting + bool + + + +
  • +
  • back + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetFoldMarginHiColour(useSetting, fore) +
+
+ Set the colours used as a chequerboard pattern in the fold margin + + +

Parameters:

+
    +
  • useSetting + bool + + + +
  • +
  • fore + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarginText[line] +
+
+ Set the text in the text margin for a line + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarginStyle[line] +
+
+ Set the style number for the text margin for a line + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarginStyles[line] +
+
+ Set the style in the text margin for a line + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:MarginTextClearAll() +
+
+ Clear the margin text on all lines + + + + + +

See also:

+ + + +
+
+ + Editor.MarginStyleOffset +
+
+ Get the start of the range of style numbers used for margin text + + +
    +
  • MarginStyleOffset + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarginOptions +
+
+ Set the margin options. + + +
    +
  • MarginOptions + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Annotations

+ +
+
+ + Editor.AnnotationText[line] +
+
+ Set the annotation text for a line + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AnnotationStyle[line] +
+
+ Set the style number for the annotations for a line + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AnnotationStyles[line] +
+
+ Set the annotation styles for a line + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AnnotationLines[line] +
+
+ read-only + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:AnnotationClearAll() +
+
+ Clear the annotations from all lines + + + + + +

See also:

+ + + +
+
+ + Editor.AnnotationVisible +
+
+ Set the visibility for the annotations for a view + + +
    +
  • AnnotationVisible + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AnnotationStyleOffset +
+
+ Get the start of the range of style numbers used for annotations + + +
    +
  • AnnotationStyleOffset + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Other settings

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

See also:

+ + + +
+
+ + Editor.PhasesDraw +
+
+ In one phase draw, text is drawn in a series of rectangular blocks with no overlap. In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. In multiple phase draw, each element is drawn over the whole drawing area, allowing text to overlap from one line to the next. + + +
    +
  • PhasesDraw + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.TwoPhaseDraw +
+
+ 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. + + +
    +
  • TwoPhaseDraw + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.Technology +
+
+ Set the technology used. + + +
    +
  • Technology + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.FontQuality +
+
+ Choose the quality level for text from the FontQuality enumeration. + + +
    +
  • FontQuality + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.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. + + +
    +
  • CodePage + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.IMEInteraction +
+
+ Choose to display the the IME in a winow or inline. + + +
    +
  • IMEInteraction + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.WordChars +
+
+ Set the set of characters making up words for when moving or selecting by word. First sets defaults like SetCharsDefault. + + +
    +
  • WordChars + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.WhitespaceChars +
+
+ Set the set of characters making up whitespace for when moving or selecting by word. Should be called after SetWordChars. + + +
    +
  • WhitespaceChars + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.PunctuationChars +
+
+ Set the set of characters making up punctuation characters Should be called after SetWordChars. + + +
    +
  • PunctuationChars + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:SetCharsDefault() +
+
+ Reset the set of characters for whitespace and word characters to the defaults. + + + + + +

See also:

+ + + +
+
+ + Editor:GrabFocus() +
+
+ Set the focus to this Scintilla widget. + + + + + +

See also:

+ + + +
+
+ + Editor.Focus +
+
+ Change internal focus flag. + + +
    +
  • Focus + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Brace highlighting

+ +
+
+ + Editor:BraceHighlight(pos1, pos2) +
+
+ Highlight the characters at two positions. + + +

Parameters:

+
    +
  • pos1 + position + + + +
  • +
  • pos2 + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:BraceBadLight(pos) +
+
+ Highlight the character at a position indicating there is no matching brace. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:BraceHighlightIndicator(useBraceHighlightIndicator, indicator) +
+
+ Use specified indicator to highlight matching braces instead of changing their style. + + +

Parameters:

+
    +
  • useBraceHighlightIndicator + bool + + + +
  • +
  • indicator + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:BraceBadLightIndicator(useBraceBadLightIndicator, indicator) +
+
+ Use specified indicator to highlight non matching brace instead of changing its style. + + +

Parameters:

+
    +
  • useBraceBadLightIndicator + bool + + + +
  • +
  • indicator + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:BraceMatch(pos) +
+
+ Find the position of a matching brace or INVALID_POSITION if no match. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
+ +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+

Tabs and Indentation Guides

+ +
+
+ + Editor.TabWidth +
+
+ Change the visible size of a tab to be a multiple of the width of a space character. + + +
    +
  • TabWidth + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ClearTabStops(line) +
+
+ Clear explicit tabstops on a line. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:AddTabStop(line, x) +
+
+ Add an explicit tab stop for a line. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • x + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:GetNextTabStop(line, x) +
+
+ Find the next explicit tab stop position on a line after a position. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • x + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

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

See also:

+ + + +
+
+ + Editor.Indent +
+
+ Set the number of spaces used for one level of indentation. + + +
    +
  • Indent + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.TabIndents +
+
+ Sets whether a tab pressed when caret is within indentation indents. + + +
    +
  • TabIndents + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.BackSpaceUnIndents +
+
+ Sets whether a backspace pressed when caret is within indentation unindents. + + +
    +
  • BackSpaceUnIndents + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.LineIndentation[line] +
+
+ Change the indentation of a line to a number of columns. + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.LineIndentPosition[line] +
+
+ read-only + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.IndentationGuides +
+
+ Show or hide indentation guides. + + +
    +
  • IndentationGuides + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.HighlightGuide +
+
+ Set the highlighted indentation guide column. 0 = no highlighted guide. + + +
    +
  • HighlightGuide + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Markers

+ +
+
+ + Editor:MarkerDefine(markerNumber, markerSymbol) +
+
+ Set the symbol used for a particular marker number. + + +

Parameters:

+
    +
  • markerNumber + int + + + +
  • +
  • markerSymbol + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:MarkerDefinePixmap(markerNumber, pixmap) +
+
+ Define a marker from a pixmap. + + +

Parameters:

+
    +
  • markerNumber + int + + + +
  • +
  • pixmap + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.RGBAImageWidth +
+
+ Set the width for future RGBA image data. + + +
    +
  • RGBAImageWidth + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.RGBAImageHeight +
+
+ Set the height for future RGBA image data. + + +
    +
  • RGBAImageHeight + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.RGBAImageScale +
+
+ Set the scale factor in percent for future RGBA image data. + + +
    +
  • RGBAImageScale + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:MarkerDefineRGBAImage(markerNumber, pixels) +
+
+ Define a marker from RGBA data. It has the width and height from RGBAImageSetWidth/Height + + +

Parameters:

+
    +
  • markerNumber + int + + + +
  • +
  • pixels + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:MarkerSymbolDefined(markerNumber) +
+
+ Which symbol was defined for markerNumber with MarkerDefine + + +

Parameters:

+
    +
  • markerNumber + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor.MarkerFore[markerNumber] +
+
+ Set the foreground colour used for a particular marker number. + + +
    +
  • markerNumber + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarkerBack[markerNumber] +
+
+ Set the background colour used for a particular marker number. + + +
    +
  • markerNumber + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarkerBackSelected[markerNumber] +
+
+ Set the background colour used for a particular marker number when its folding block is selected. + + +
    +
  • markerNumber + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:MarkerEnableHighlight(enabled) +
+
+ Enable/disable highlight for current folding bloc (smallest one that contains the caret) + + +

Parameters:

+
    +
  • enabled + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MarkerAlpha[markerNumber] +
+
+ Set the alpha used for a marker that is drawn in the text area, not the margin. + + +
    +
  • markerNumber + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:MarkerAdd(line, markerNumber) +
+
+ Add a marker to a line, returning an ID which can be used to find or delete the marker. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • markerNumber + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:MarkerAddSet(line, set) +
+
+ Add a set of markers to a line. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • set + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:MarkerDelete(line, markerNumber) +
+
+ Delete a marker from a line. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • markerNumber + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:MarkerDeleteAll(markerNumber) +
+
+ Delete all markers with a particular number from all lines. + + +

Parameters:

+
    +
  • markerNumber + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:MarkerGet(line) +
+
+ Get a bit mask of all the markers set on a line. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:MarkerNext(lineStart, markerMask) +
+
+ Find the next line at or after lineStart that includes a marker in mask. Return -1 when no more lines. + + +

Parameters:

+
    +
  • lineStart + int + + + +
  • +
  • markerMask + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:MarkerPrevious(lineStart, markerMask) +
+
+ Find the previous line before lineStart that includes a marker in mask. + + +

Parameters:

+
    +
  • lineStart + int + + + +
  • +
  • markerMask + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:MarkerLineFromHandle(handle) +
+
+ Retrieve the line number at which a particular marker is located. + + +

Parameters:

+
    +
  • handle + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:MarkerDeleteHandle(handle) +
+
+ Delete a marker. + + +

Parameters:

+
    +
  • handle + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Indicators

+ +
+
+ + Editor.IndicStyle[indic] +
+
+ Set an indicator to plain, squiggle or TT. + + +
    +
  • indic + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.IndicFore[indic] +
+
+ Set the foreground colour of an indicator. + + +
    +
  • indic + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.IndicAlpha[indicator] +
+
+ Set the alpha fill colour of the given indicator. + + +
    +
  • indicator + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.IndicOutlineAlpha[indicator] +
+
+ Set the alpha outline colour of the given indicator. + + +
    +
  • indicator + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.IndicUnder[indic] +
+
+ Set an indicator to draw under text or over(default). + + +
    +
  • indic + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.IndicHoverStyle[indic] +
+
+ Set a hover indicator to plain, squiggle or TT. + + +
    +
  • indic + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.IndicHoverFore[indic] +
+
+ Set the foreground hover colour of an indicator. + + +
    +
  • indic + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.IndicFlags[indic] +
+
+ Set the attributes of an indicator. + + +
    +
  • indic + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.IndicatorCurrent +
+
+ Set the indicator used for IndicatorFillRange and IndicatorClearRange + + +
    +
  • IndicatorCurrent + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.IndicatorValue +
+
+ Set the value used for IndicatorFillRange + + +
    +
  • IndicatorValue + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:IndicatorFillRange(position, fillLength) +
+
+ Turn a indicator on over a range. + + +

Parameters:

+
    +
  • position + int + + + +
  • +
  • fillLength + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:IndicatorClearRange(position, clearLength) +
+
+ Turn a indicator off over a range. + + +

Parameters:

+
    +
  • position + int + + + +
  • +
  • clearLength + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:IndicatorAllOnFor(position) +
+
+ Are any indicators present at position? + + +

Parameters:

+
    +
  • position + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:IndicatorValueAt(indicator, position) +
+
+ What value does a particular indicator have at at a position? + + +

Parameters:

+
    +
  • indicator + int + + + +
  • +
  • position + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:IndicatorStart(indicator, position) +
+
+ Where does a particular indicator start? + + +

Parameters:

+
    +
  • indicator + int + + + +
  • +
  • position + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:IndicatorEnd(indicator, position) +
+
+ Where does a particular indicator end? + + +

Parameters:

+
    +
  • indicator + int + + + +
  • +
  • position + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:FindIndicatorShow(start, end) +
+
+ On OS X, show a find indicator. + + +

Parameters:

+
    +
  • start + position + + + +
  • +
  • end + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:FindIndicatorFlash(start, end) +
+
+ On OS X, flash a find indicator, then fade out. + + +

Parameters:

+
    +
  • start + position + + + +
  • +
  • end + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:FindIndicatorHide() +
+
+ On OS X, hide the find indicator. + + + + + +

See also:

+ + + +
+
+

Autocompletion

+ +
+
+ + Editor:AutoCShow(lenEntered, itemList) +
+
+ Display a auto-completion list. The lenEntered parameter indicates how many characters before the caret should be used to provide context. + + +

Parameters:

+
    +
  • lenEntered + int + + + +
  • +
  • itemList + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:AutoCCancel() +
+
+ Remove the auto-completion list from the screen. + + + + + +

See also:

+ + + +
+
+ + Editor:AutoCActive() +
+
+ Is there an auto-completion list visible? + + + +

Returns:

+
    + + bool + + + +
+ + +

See also:

+ + + +
+
+ + Editor:AutoCPosStart() +
+
+ Retrieve the position of the caret when the auto-completion list was displayed. + + + +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor:AutoCComplete() +
+
+ User has selected an item so remove the list and insert the selection. + + + + + +

See also:

+ + + +
+
+ + Editor:AutoCStops(characterSet) +
+
+ Define a set of character that when typed cancel the auto-completion list. + + +

Parameters:

+
    +
  • characterSet + string + + + +
  • +
+ + + +

See also:

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

See also:

+ + + +
+
+ + Editor:AutoCSelect(text) +
+
+ Select the item in the auto-completion list that starts with a string. + + +

Parameters:

+
    +
  • text + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutoCCurrent +
+
+ read-only + + +
    +
  • AutoCCurrent + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutoCCurrentText +
+
+ read-only + + +
    +
  • AutoCCurrentText + string + + + +
  • +
+ + + +

See also:

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

See also:

+ + + +
+
+ + Editor.AutoCFillUps +
+
+ Define a set of characters that when typed will cause the autocompletion to choose the selected item. + + +
    +
  • AutoCFillUps + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutoCChooseSingle +
+
+ Should a single item auto-completion list automatically choose the item. + + +
    +
  • AutoCChooseSingle + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutoCIgnoreCase +
+
+ Set whether case is significant when performing auto-completion searches. + + +
    +
  • AutoCIgnoreCase + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutoCCaseInsensitiveBehaviour +
+
+ Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. + + +
    +
  • AutoCCaseInsensitiveBehaviour + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutoCMulti +
+
+ Change the effect of autocompleting when there are multiple selections. + + +
    +
  • AutoCMulti + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutoCOrder +
+
+ Set the way autocompletion lists are ordered. + + +
    +
  • AutoCOrder + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutoCAutoHide +
+
+ Set whether or not autocompletion is hidden automatically when nothing matches. + + +
    +
  • AutoCAutoHide + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutoCDropRestOfWord +
+
+ Set whether or not autocompletion deletes any word characters after the inserted text upon completion. + + +
    +
  • AutoCDropRestOfWord + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:RegisterImage(type, xpmData) +
+
+ Register an XPM image for use in autocompletion lists. + + +

Parameters:

+
    +
  • type + int + + + +
  • +
  • xpmData + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:RegisterRGBAImage(type, pixels) +
+
+ Register an RGBA image for use in autocompletion lists. It has the width and height from RGBAImageSetWidth/Height + + +

Parameters:

+
    +
  • type + int + + + +
  • +
  • pixels + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ClearRegisteredImages() +
+
+ Clear all the registered XPM images. + + + + + +

See also:

+ + + +
+
+ + Editor.AutoCTypeSeparator +
+
+ Change the type-separator character in the string setting up an auto-completion list. Default is '?' but can be changed if items contain '?'. + + +
    +
  • AutoCTypeSeparator + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutoCMaxHeight +
+
+ Set the maximum height, in rows, of auto-completion and user lists. The default is 5 rows. + + +
    +
  • AutoCMaxHeight + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutoCMaxWidth +
+
+ Set the maximum width, in characters, of auto-completion and user lists. Set to 0 to autosize to fit longest item, which is the default. + + +
    +
  • AutoCMaxWidth + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

User lists

+ +
+
+ + Editor:UserListShow(listType, itemList) +
+
+ Display a list of strings and send notification when user chooses one. + + +

Parameters:

+
    +
  • listType + int + + + +
  • +
  • itemList + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Call tips

+ +
+
+ + Editor:CallTipShow(pos, definition) +
+
+ Show a call tip containing a definition near position pos. + + +

Parameters:

+
    +
  • pos + position + + + +
  • +
  • definition + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:CallTipCancel() +
+
+ Remove the call tip from the screen. + + + + + +

See also:

+ + + +
+
+ + Editor:CallTipActive() +
+
+ Is there an active call tip? + + + +

Returns:

+
    + + bool + + + +
+ + +

See also:

+ + + +
+
+ + Editor:CallTipPosStart() +
+
+ Retrieve the position where the caret was before displaying the call tip. + + + +

Returns:

+
    + + position + + + +
+ + +

See also:

+ + + +
+
+ + Editor.CallTipPosStart +
+
+ Set the start position in order to change when backspacing removes the calltip. + + +
    +
  • CallTipPosStart + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:CallTipSetHlt(start, end) +
+
+ Highlight a segment of the definition. + + +

Parameters:

+
    +
  • start + int + + + +
  • +
  • end + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CallTipBack +
+
+ Set the background colour for the call tip. + + +
    +
  • CallTipBack + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CallTipFore +
+
+ Set the foreground colour for the call tip. + + +
    +
  • CallTipFore + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CallTipForeHlt +
+
+ Set the foreground colour for the highlighted part of the call tip. + + +
    +
  • CallTipForeHlt + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CallTipUseStyle +
+
+ Enable use of STYLE_CALLTIP and set call tip tab size in pixels. + + +
    +
  • CallTipUseStyle + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CallTipPosition +
+
+ Set position of calltip, above or below text. + + +
    +
  • CallTipPosition + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Key bindings

+ +
+
+ + Editor:AssignCmdKey(keycode, modifiers, msg) +
+
+ When key+modifier combination km is pressed perform msg. + + +

Parameters:

+
    +
  • keycode + int + e.g. SCK_LEFT or string.byte("A") +
  • +
  • modifiers + int + e.g. SCMOD_CTRL | SCMOD_SHIFT +
  • +
  • msg + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ClearCmdKey(keycode, modifiers) +
+
+ When key+modifier combination km is pressed do nothing. + + +

Parameters:

+
    +
  • keycode + int + e.g. SCK_LEFT or string.byte("A") +
  • +
  • modifiers + int + e.g. SCMOD_CTRL | SCMOD_SHIFT +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ClearAllCmdKeys() +
+
+ Drop all key mappings. + + + + + +

See also:

+ + + +
+
+ + Editor:Null() +
+
+ Null operation. + + + + + +

See also:

+ + + +
+
+

Keyboard Commands

+ +
+
+ + Editor:LineDown() +
+
+ Move caret down one line. + + + + + + + +
+
+ + Editor:LineDownExtend() +
+
+ Move caret down one line extending selection to new caret position. + + + + + + + +
+
+ + Editor:LineDownRectExtend() +
+
+ Move caret down one line, extending rectangular selection to new caret position. + + + + + + + +
+
+ + Editor:LineScrollDown() +
+
+ Scroll the document down, keeping the caret visible. + + + + + + + +
+
+ + Editor:LineUp() +
+
+ Move caret up one line. + + + + + + + +
+
+ + Editor:LineUpExtend() +
+
+ Move caret up one line extending selection to new caret position. + + + + + + + +
+
+ + Editor:LineUpRectExtend() +
+
+ Move caret up one line, extending rectangular selection to new caret position. + + + + + + + +
+
+ + Editor:LineScrollUp() +
+
+ Scroll the document up, keeping the caret visible. + + + + + + + +
+
+ + Editor:ParaDown() +
+
+ Move caret between paragraphs (delimited by empty lines). + + + + + + + +
+
+ + Editor:ParaDownExtend() +
+
+ Move caret between paragraphs (delimited by empty lines). + + + + + + + +
+
+ + Editor:ParaUp() +
+
+ Move caret between paragraphs (delimited by empty lines). + + + + + + + +
+
+ + Editor:ParaUpExtend() +
+
+ Move caret between paragraphs (delimited by empty lines). + + + + + + + +
+
+ + Editor:CharLeft() +
+
+ Move caret left one character. + + + + + + + +
+
+ + Editor:CharLeftExtend() +
+
+ Move caret left one character extending selection to new caret position. + + + + + + + +
+
+ + Editor:CharLeftRectExtend() +
+
+ Move caret left one character, extending rectangular selection to new caret position. + + + + + + + +
+
+ + Editor:CharRight() +
+
+ Move caret right one character. + + + + + + + +
+
+ + Editor:CharRightExtend() +
+
+ Move caret right one character extending selection to new caret position. + + + + + + + +
+
+ + Editor:CharRightRectExtend() +
+
+ Move caret right one character, extending rectangular selection to new caret position. + + + + + + + +
+
+ + Editor:WordLeft() +
+
+ Move caret left one word. + + + + + + + +
+
+ + Editor:WordLeftExtend() +
+
+ Move caret left one word extending selection to new caret position. + + + + + + + +
+
+ + Editor:WordRight() +
+
+ Move caret right one word. + + + + + + + +
+
+ + Editor:WordRightExtend() +
+
+ Move caret right one word extending selection to new caret position. + + + + + + + +
+
+ + Editor:WordLeftEnd() +
+
+ Move caret left one word, position cursor at end of word. + + + + + + + +
+
+ + Editor:WordLeftEndExtend() +
+
+ Move caret left one word, position cursor at end of word, extending selection to new caret position. + + + + + + + +
+
+ + Editor:WordRightEnd() +
+
+ Move caret right one word, position cursor at end of word. + + + + + + + +
+
+ + Editor:WordRightEndExtend() +
+
+ Move caret right one word, position cursor at end of word, extending selection to new caret position. + + + + + + + +
+
+ + Editor:WordPartLeft() +
+
+ Move to the previous change in capitalization. + + + + + + + +
+
+ + Editor:WordPartLeftExtend() +
+
+ Move to the previous change in capitalization extending selection to new caret position. + + + + + + + +
+
+ + Editor:WordPartRight() +
+
+ Move to the change next in capitalization. + + + + + + + +
+
+ + Editor:WordPartRightExtend() +
+
+ Move to the next change in capitalization extending selection to new caret position. + + + + + + + +
+
+ + Editor:Home() +
+
+ Move caret to first position on line. + + + + + + + +
+
+ + Editor:HomeExtend() +
+
+ Move caret to first position on line extending selection to new caret position. + + + + + + + +
+
+ + Editor:HomeRectExtend() +
+
+ Move caret to first position on line, extending rectangular selection to new caret position. + + + + + + + +
+
+ + Editor:HomeDisplay() +
+
+ Move caret to first position on display line. + + + + + + + +
+
+ + Editor:HomeDisplayExtend() +
+
+ Move caret to first position on display line extending selection to new caret position. + + + + + + + +
+
+ + Editor:HomeWrap() +
+
+ Similarly Home when word-wrap is enabled. + + + + + + + +
+
+ + Editor:HomeWrapExtend() +
+
+ Similarly HomeExtend when word-wrap is enabled. + + + + + + + +
+
+ + Editor:VCHome() +
+
+ Move caret to before first visible character on line. If already there move to first character on line. + + + + + + + +
+
+ + Editor:VCHomeExtend() +
+
+ Like VCHome but extending selection to new caret position. + + + + + + + +
+
+ + Editor:VCHomeRectExtend() +
+
+ Move caret to before first visible character on line. If already there move to first character on line. In either case, extend rectangular selection to new caret position. + + + + + + + +
+
+ + Editor:VCHomeWrap() +
+
+ + + + + + + + + + +
+
+ + Editor:VCHomeWrapExtend() +
+
+ + + + + + + + + + +
+
+ + Editor:VCHomeDisplay() +
+
+ + + + + + + + + + +
+
+ + Editor:VCHomeDisplayExtend() +
+
+ + + + + + + + + + +
+
+ + Editor:LineEnd() +
+
+ Move caret to last position on line. + + + + + + + +
+
+ + Editor:LineEndExtend() +
+
+ Move caret to last position on line extending selection to new caret position. + + + + + + + +
+
+ + Editor:LineEndRectExtend() +
+
+ Move caret to last position on line, extending rectangular selection to new caret position. + + + + + + + +
+
+ + Editor:LineEndDisplay() +
+
+ Move caret to last position on display line. + + + + + + + +
+
+ + Editor:LineEndDisplayExtend() +
+
+ Move caret to last position on display line extending selection to new caret position. + + + + + + + +
+
+ + Editor:LineEndWrap() +
+
+ Similarly LineEnd when word-wrap is enabled. + + + + + + + +
+
+ + Editor:LineEndWrapExtend() +
+
+ Similarly LineEndExtend when word-wrap is enabled. + + + + + + + +
+
+ + Editor:DocumentStart() +
+
+ Move caret to first position in document. + + + + + + + +
+
+ + Editor:DocumentStartExtend() +
+
+ Move caret to first position in document extending selection to new caret position. + + + + + + + +
+
+ + Editor:DocumentEnd() +
+
+ Move caret to last position in document. + + + + + + + +
+
+ + Editor:DocumentEndExtend() +
+
+ Move caret to last position in document extending selection to new caret position. + + + + + + + +
+
+ + Editor:PageUp() +
+
+ Move caret one page up. + + + + + + + +
+
+ + Editor:PageUpExtend() +
+
+ Move caret one page up extending selection to new caret position. + + + + + + + +
+
+ + Editor:PageUpRectExtend() +
+
+ Move caret one page up, extending rectangular selection to new caret position. + + + + + + + +
+
+ + Editor:PageDown() +
+
+ Move caret one page down. + + + + + + + +
+
+ + Editor:PageDownExtend() +
+
+ Move caret one page down extending selection to new caret position. + + + + + + + +
+
+ + Editor:PageDownRectExtend() +
+
+ Move caret one page down, extending rectangular selection to new caret position. + + + + + + + +
+
+ + Editor:StutteredPageUp() +
+
+ Move caret to top of page, or one page up if already at top of page. + + + + + + + +
+
+ + Editor:StutteredPageUpExtend() +
+
+ Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. + + + + + + + +
+
+ + Editor:StutteredPageDown() +
+
+ Move caret to bottom of page, or one page down if already at bottom of page. + + + + + + + +
+
+ + Editor:StutteredPageDownExtend() +
+
+ Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. + + + + + + + +
+
+ + Editor:DeleteBack() +
+
+ Delete the selection or if no selection, the character before the caret. + + + + + + + +
+
+ + Editor: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. + + + + + + + +
+
+ + Editor:DelWordLeft() +
+
+ Delete the word to the left of the caret. + + + + + + + +
+
+ + Editor:DelWordRight() +
+
+ Delete the word to the right of the caret. + + + + + + + +
+
+ + Editor:DelWordRightEnd() +
+
+ Delete the word to the right of the caret, but not the trailing non-word characters. + + + + + + + +
+
+ + Editor:DelLineLeft() +
+
+ Delete back from the current position to the start of the line. + + + + + + + +
+
+ + Editor:DelLineRight() +
+
+ Delete forwards from the current position to the end of the line. + + + + + + + +
+
+ + Editor:LineDelete() +
+
+ Delete the line containing the caret. + + + + + + + +
+
+ + Editor:LineCut() +
+
+ Cut the line containing the caret. + + + + + + + +
+
+ + Editor:LineCopy() +
+
+ Copy the line containing the caret. + + + + + + + +
+
+ + Editor:LineTranspose() +
+
+ Switch the current line with the previous. + + + + + + + +
+
+ + Editor:LineDuplicate() +
+
+ Duplicate the current line. + + + + + + + +
+
+ + Editor:LowerCase() +
+
+ Transform the selection to lower case. + + + + + + + +
+
+ + Editor:UpperCase() +
+
+ Transform the selection to upper case. + + + + + + + +
+
+ + Editor:Cancel() +
+
+ Cancel any modes such as call tip or auto-completion list display. + + + + + + + +
+
+ + Editor:EditToggleOvertype() +
+
+ Switch from insert to overtype mode or the reverse. + + + + + + + +
+
+ + Editor:NewLine() +
+
+ Insert a new line, may use a CRLF, CR or LF depending on EOL mode. + + + + + + + +
+
+ + Editor:FormFeed() +
+
+ Insert a Form Feed character. + + + + + + + +
+
+ + Editor: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. + + + + + + + +
+
+ + Editor:BackTab() +
+
+ Dedent the selected lines. + + + + + + + +
+
+ + Editor:SelectionDuplicate() +
+
+ Duplicates the current selection. + + + + + + + +
+
+ + Editor:VerticalCentreCaret() +
+
+ Scroll the document so that the caret is in the center of the screen. + + + + + + + +
+
+ + Editor:MoveSelectedLinesUp() +
+
+ Move the selected lines up one line, shifting the line above after the selection. + + + + + + + +
+
+ + Editor:MoveSelectedLinesDown() +
+
+ Move the selected lines down one line, shifting the line below before the selection. + + + + + + + +
+
+ + Editor:ScrollToStart() +
+
+ Scroll the document to the start without changing the selection. + + + + + + + +
+
+ + Editor:ScrollToEnd() +
+
+ Scroll the document to the end without changing the selection. + + + + + + + +
+
+

Popup edit menu

+ +
+
+ + Editor:UsePopUp(allowPopUp) +
+
+ Set whether a pop up menu is displayed automatically when the user presses the wrong mouse button. + + +

Parameters:

+
    +
  • allowPopUp + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Macro recording

+ +
+
+ + Editor:StartRecord() +
+
+ Start notifying the container of all key presses and commands. + + + + + +

See also:

+ + + +
+
+ + Editor:StopRecord() +
+
+ Stop notifying the container of all key presses and commands. + + + + + +

See also:

+ + + +
+
+

Printing

+ +
+
+ + Editor.PrintMagnification +
+
+ Sets the print magnification added to the point size of each style for printing. + + +
    +
  • PrintMagnification + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.PrintColourMode +
+
+ Modify colours when printing for clearer printed text. + + +
    +
  • PrintColourMode + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.PrintWrapMode +
+
+ Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). + + +
    +
  • PrintWrapMode + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Direct access

+ +
+
+ + Editor.DirectFunction +
+
+ read-only + + +
    +
  • DirectFunction + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.DirectPointer +
+
+ read-only + + +
    +
  • DirectPointer + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.CharacterPointer +
+
+ read-only + + +
    +
  • CharacterPointer + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:GetRangePointer(position, rangeLength) +
+
+ Return a read-only pointer to a range of characters in the document. May move the gap so that the range is contiguous, but will only move up to rangeLength bytes. + + +

Parameters:

+
    +
  • position + int + + + +
  • +
  • rangeLength + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor.GapPosition +
+
+ read-only + + +
    +
  • GapPosition + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Multiple views

+ +
+
+ + Editor.DocPointer +
+
+ Change the document object used. + + +
    +
  • DocPointer + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:CreateDocument() +
+
+ Create a new document object. Starts with reference count of 1 and not selected into editor. + + + +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:AddRefDocument(doc) +
+
+ Extend life of document. + + +

Parameters:

+
    +
  • doc + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ReleaseDocument(doc) +
+
+ Release a reference to the document, deleting document if it fades to black. + + +

Parameters:

+
    +
  • doc + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Background loading and saving

+ +
+
+ + Editor:CreateLoader(bytes) +
+
+ Create an ILoader*. + + +

Parameters:

+
    +
  • bytes + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+

Folding

+ +
+
+ + Editor:VisibleFromDocLine(line) +
+
+ Find the display line of a document line taking hidden lines into account. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:DocLineFromVisible(lineDisplay) +
+
+ Find the document line of a display line taking hidden lines into account. + + +

Parameters:

+
    +
  • lineDisplay + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:ShowLines(lineStart, lineEnd) +
+
+ Make a range of lines visible. + + +

Parameters:

+
    +
  • lineStart + int + + + +
  • +
  • lineEnd + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:HideLines(lineStart, lineEnd) +
+
+ Make a range of lines invisible. + + +

Parameters:

+
    +
  • lineStart + int + + + +
  • +
  • lineEnd + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.LineVisible[line] +
+
+ read-only + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AllLinesVisible +
+
+ read-only + + +
    +
  • AllLinesVisible + bool + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.FoldLevel[line] +
+
+ 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. + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.FoldFlags +
+
+ Set some style options for folding. + + +
    +
  • FoldFlags + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:GetLastChild(line, level) +
+
+ Find the last child line of a header line. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • level + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor.FoldParent[line] +
+
+ read-only + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ToggleFold(line) +
+
+ Switch a header line between expanded and contracted. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.FoldExpanded[line] +
+
+ Show the children of a header line. + + +
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:FoldLine(line, action) +
+
+ Expand or contract a fold header. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • action + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:FoldChildren(line, action) +
+
+ Expand or contract a fold header and its children. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • action + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:FoldAll(action) +
+
+ Expand or contract all fold headers. + + +

Parameters:

+
    +
  • action + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ExpandChildren(line, level) +
+
+ Expand a fold header and all children. Use the level argument instead of the line's current level. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • level + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.AutomaticFold +
+
+ Set automatic folding behaviours. + + +
    +
  • AutomaticFold + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ContractedFoldNext(lineStart) +
+
+ Find the next line at or after lineStart that is a contracted fold header line. Return -1 when no more lines. + + +

Parameters:

+
    +
  • lineStart + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:EnsureVisible(line) +
+
+ Ensure a particular line is visible by expanding any header line hiding it. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor: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. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Line wrapping

+ +
+
+ + Editor.WrapMode +
+
+ Sets whether text is word wrapped. + + +
    +
  • WrapMode + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.WrapVisualFlags +
+
+ Set the display mode of visual flags for wrapped lines. + + +
    +
  • WrapVisualFlags + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.WrapVisualFlagsLocation +
+
+ Set the location of visual flags for wrapped lines. + + +
    +
  • WrapVisualFlagsLocation + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.WrapIndentMode +
+
+ Sets how wrapped sublines are placed. Default is fixed. + + +
    +
  • WrapIndentMode + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.WrapStartIndent +
+
+ Set the start indent for wrapped lines. + + +
    +
  • WrapStartIndent + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.LayoutCache +
+
+ Sets the degree of caching of layout information. + + +
    +
  • LayoutCache + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.PositionCache +
+
+ Set number of entries in position cache + + +
    +
  • PositionCache + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:LinesSplit(pixelWidth) +
+
+ Split the lines in the target into lines that are less wide than pixelWidth where possible. + + +

Parameters:

+
    +
  • pixelWidth + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:LinesJoin() +
+
+ Join the lines in the target. + + + + + +

See also:

+ + + +
+
+ + Editor:WrapCount(line) +
+
+ The number of display lines needed to wrap a document line + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+

Zooming

+ +
+
+ + Editor:ZoomIn() +
+
+ Magnify the displayed text by increasing the sizes by 1 point. + + + + + +

See also:

+ + + +
+
+ + Editor:ZoomOut() +
+
+ Make the displayed text smaller by decreasing the sizes by 1 point. + + + + + +

See also:

+ + + +
+
+ + Editor.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. + + +
    +
  • Zoom + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Long lines

+ +
+
+ + Editor.EdgeMode +
+
+ 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). + + +
    +
  • EdgeMode + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.EdgeColumn +
+
+ Set the column number of the edge. If text goes past the edge then it is highlighted. + + +
    +
  • EdgeColumn + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.EdgeColour +
+
+ Change the colour used in edge indication. + + +
    +
  • EdgeColour + colour + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Lexer

+ +
+
+ + Editor.Lexer +
+
+ Set the lexing language of the document. + + +
    +
  • Lexer + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.LexerLanguage +
+
+ Set the lexing language of the document based on string name. + + +
    +
  • LexerLanguage + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:LoadLexerLibrary(path) +
+
+ Load a lexer library (dll / so). + + +

Parameters:

+
    +
  • path + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:Colourise(start, end) +
+
+ Colourise a segment of the document using the current lexing language. + + +

Parameters:

+
    +
  • start + position + + + +
  • +
  • end + position + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:ChangeLexerState(start, end) +
+
+ Indicate that the internal state of a lexer has changed over a range and therefore there may be a need to redraw. + + +

Parameters:

+
    +
  • start + position + + + +
  • +
  • end + position + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:PropertyNames() +
+
+ Retrieve a '\n' separated list of properties understood by the current lexer. Result is NUL-terminated. + + + +

Returns:

+
    + + string + + + +
+ + +

See also:

+ + + +
+
+ + Editor:PropertyType(name) +
+
+ Retrieve the type of a property. + + +

Parameters:

+
    +
  • name + string + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:DescribeProperty(name) +
+
+ Describe a property. Result is NUL-terminated. + + +

Parameters:

+
    +
  • name + string + + + +
  • +
+ +

Returns:

+
    + + string + + + +
+ + +

See also:

+ + + +
+
+ + Editor.Property[key] +
+
+ Set up a value that may be used by a lexer for some optional feature. + + +
    +
  • key + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.PropertyExpanded[key] +
+
+ read-only + + +
    +
  • key + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.PropertyInt[key] +
+
+ read-only + + +
    +
  • key + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.KeyWords[keywordSet] +
+
+ Set up the key words used by the lexer. + + +
    +
  • keywordSet + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:DescribeKeyWordSets() +
+
+ Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. Result is NUL-terminated. + + + +

Returns:

+
    + + string + + + +
+ + +

See also:

+ + + +
+
+ + Editor.SubStyleBases +
+
+ read-only + + +
    +
  • SubStyleBases + string + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.DistanceToSecondaryStyles +
+
+ read-only + + +
    +
  • DistanceToSecondaryStyles + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor:AllocateSubStyles(styleBase, numberStyles) +
+
+ Allocate a set of sub styles for a particular base style, returning start of range + + +

Parameters:

+
    +
  • styleBase + int + + + +
  • +
  • numberStyles + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + +

See also:

+ + + +
+
+ + Editor:FreeSubStyles() +
+
+ Free allocated sub styles + + + + + +

See also:

+ + + +
+
+ + Editor.SubStylesStart[styleBase] +
+
+ read-only + + +
    +
  • styleBase + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.SubStylesLength[styleBase] +
+
+ read-only + + +
    +
  • styleBase + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.StyleFromSubStyle[subStyle] +
+
+ read-only + + +
    +
  • subStyle + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.PrimaryStyleFromStyle[style] +
+
+ read-only + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.Identifiers[style] +
+
+ Set the identifiers that are shown in a particular style + + +
    +
  • style + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Notifications

+ +
+
+ + Editor.Identifier +
+
+ Set the identifier reported as idFrom in notification messages. + + +
    +
  • Identifier + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.ModEventMask +
+
+ Set which document modification events are sent to the container. + + +
    +
  • ModEventMask + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + Editor.MouseDwellTime +
+
+ Sets the time the mouse must sit still to generate a mouse dwell event. + + +
    +
  • MouseDwellTime + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+

Deprecated messages and notifications

+ +
+
+ + Editor.StyleBitsNeeded +
+
+ read-only + + +
    +
  • StyleBitsNeeded + int + + + +
  • +
+ + + +

See also:

+ + + +
+
+ + +
+
+
+Generated by LDoc 1.4.3 +Last updated 2016-09-09 09:10:16 +
+
+ + + diff --git a/docs/classes/Match.html b/docs/classes/Match.html new file mode 100644 index 0000000..36a50cc --- /dev/null +++ b/docs/classes/Match.html @@ -0,0 +1,244 @@ + + + + + LuaScript Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Class Match

+

Used for searching and replacing text.

+

A match generator is returned from Editor:match which can + be used to iterate search results. While looping through matches, if the document is modified by any + method other than the match object's replace method, this may cause the match generator to lose its + place. Also, do not attempt to store the match object for later access outside the loop; it will not + be usable. +

+

See also:

+ +

Usage:

+
    +
    for m in editor:match("teh") do m:replace("the") end
    +
+ + +

Fields

+ + + + + + + + + + + + + +
Match.posBeginning position of the located match.
Match.lenLength of text matched.
Match.textThe actual text matched.
+

Methods

+ + + + + +
Match:replace(text)Replaces the matched text.
+

Metamethods

+ + + + + +
Match:__tostring()String representation of the match.
+ +
+
+ + +

Fields

+ +
+
+ + Match.pos +
+
+ Beginning position of the located match. + + +
    +
  • pos + int + + + + (readonly) +
  • +
+ + + + + +
+
+ + Match.len +
+
+ Length of text matched. + + +
    +
  • len + int + + + + (readonly) +
  • +
+ + + + + +
+
+ + Match.text +
+
+ The actual text matched. + + +
    +
  • text + string + + + + (readonly) +
  • +
+ + + + + +
+
+

Methods

+ +
+
+ + Match:replace(text) +
+
+ Replaces the matched text. + + +

Parameters:

+
    +
  • text + string + replacement text +
  • +
+ + + + + +
+
+

Metamethods

+ +
+
+ + Match:__tostring() +
+
+ String representation of the match. + + + + + + + +
+
+ + +
+
+
+Generated by LDoc 1.4.3 +Last updated 2016-09-09 09:10:16 +
+
+ + + diff --git a/docs/classes/Notepad.html b/docs/classes/Notepad.html new file mode 100644 index 0000000..ad62328 --- /dev/null +++ b/docs/classes/Notepad.html @@ -0,0 +1,1283 @@ + + + + + LuaScript Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Class Notepad

+

Notepad++ wrapper.

+

Provides access to the Notepad++ application. Most of the API messages and notifications have been made available, but more can be made available as needed.

+ +

The global instance npp is used for application access. +

+ + +

Helper Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Notepad.SendEditor(sci_const[, wparam=0[, lparam=0]])Sends a message to the current editor.
Notepad.ConstantName(const[, hint])Looks up the symbolic name of a constant.
Notepad.AddEventHandler(event, callback)Registers a Lua function to handle a given event.
Notepad.RemoveEventHandler(event, callback)Removes previously registered Lua function for a given event.
Notepad.RemoveAllEventHandlers(event)Removes all registered Lua functions for a given event.
Notepad.AddShortcut(name, shortcut, callback)Registers a Lua function for a shortcut key.
Notepad.WriteError(...)Writes an error message to the console.
Notepad.ClearConsole()Clears the console.
+

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Notepad:ActivateDoc(view, index2Activate)Activates the specified document.
Notepad:DoOpen(file)Opens a document.
Notepad:GetBufferIDFromPos(position, view)Gets the BufferID located at the given position.
Notepad:GetCurrentDirectory()Gets the current directory of the document.
Notepad:GetBufferIDFromPos(view)Gets the BufferID located at the given position.
Notepad:GetCurrentDocIndex(view)Gets the current document index within the view.
Notepad:GetCurrentWord()Selects and returns the word at the cursor's position
Notepad:GetExtPart()Gets the file extension of the current document.
Notepad:GetFileName()Gets the file name of the current document.
Notepad:GetFullCurrentPath()Gets the full path of the current document.
Notepad:GetNamePart()Gets the file name (without extension) of the current document.
Notepad:GetNbOpenFiles(view)Gets the number of open documents.
Notepad:GetNppDirectory()Gets the directory of the Notepad++ application.
Notepad:GetPluginsConfigDir()Gets the plugin configuration directory.
Notepad:MenuCommand(command)Executes a menu command.
Notepad:ReloadFile(withAlert, filename)Reloads the specified file.
Notepad:SaveAllFiles()Saves all the opened documents.
Notepad:SaveCurrentFile()Saves the current document.
Notepad:SaveCurrentFileAs(asCopy, filename)Saves the current document as the specified name.
Notepad:SwitchToFile(filename)Switch to the specified document.
+

Properties

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Notepad.AppDataPluginsAllowedWhether plugins are allowed to be loaded from the %APPDATA% directory.
Notepad.BufferLangType[id]Gets or sets the buffer's language type (one of the L_xxx constants).
Notepad.CurrentBufferIDGets the current BufferID.
Notepad.CurrentColumnGets the current column of the cursor.
Notepad.CurrentLineGets the current line number of the cursor.
Notepad.CurrentViewGets the currently active view, either MAIN_VIEW or SUB_VIEW.
Notepad.DefaultBackgroundColorGets the default background color used for documents.
Notepad.DefaultForegroundColorGets the default foreground color used for documents.
Notepad.LanguageDescription[language]Gets the description of a language.
Notepad.LanguageName[language]Gets the language name.
Notepad.VersionGets the Notepad++ version.
Notepad.WindowsVersionGets the version of the Windows operating system (one of the WV_xxx constants).
+ +
+
+ + +

Helper Methods

+ +
+
+ + Notepad.SendEditor(sci_const[, wparam=0[, lparam=0]]) +
+
+ Sends a message to the current editor. + This duplicates the functionality of the editor object, providing access to this through an interface that is more familiar to Scintilla C++ developers. + + +

Parameters:

+
    +
  • sci_const + int + A SCI_xxx message constant +
  • +
  • wparam + optional parameter dependent on the specific message + (default 0) +
  • +
  • lparam + optional parameter dependent on the specific message + (default 0) +
  • +
+ +

Returns:

+
    + + optional return value dependent on the specific message +
+ + + + +
+
+ + Notepad.ConstantName(const[, hint]) +
+
+ Looks up the symbolic name of a constant. + + +

Parameters:

+
    +
  • const + int + number +
  • +
  • hint + string + the prefix of the constant to attempt to find + (optional) +
  • +
+ +

Returns:

+
    + + string + The symbolic name of a Scintilla / Notepad++ constant. Raises error if not found. +
+ + + + +
+
+ + Notepad.AddEventHandler(event, callback) +
+
+ +

Registers a Lua function to handle a given event. + event must be one of the following

+ +
    +
  • "OnReady"
  • +
  • "OnChar"
  • +
  • "OnModification"
  • +
  • "OnUpdateUI"
  • +
  • "OnSavePointReached"
  • +
  • "OnSavePointLeft"
  • +
  • "OnBeforeOpen"
  • +
  • "OnOpen"
  • +
  • "OnSwitchFile"
  • +
  • "OnBeforeSave"
  • +
  • "OnSave"
  • +
  • "OnFileRenamed"
  • +
  • "OnFileDeleted"
  • +
  • "OnBeforeClose"
  • +
  • "OnClose"
  • +
  • "OnLangChange"
  • +
  • "OnBeforeShutdown"
  • +
  • "OnCancelShutdown"
  • +
  • "OnStyle"
  • +
  • "OnDoubleClick"
  • +
  • "OnShutdown" +
  • +
+ + + +

Parameters:

+
    +
  • event + string + name of the desired event +
  • +
  • callback + function + function to call when the event is triggered +
  • +
+ +

Returns:

+
    + + bool + always returns true currently +
+ + + + +
+
+ + Notepad.RemoveEventHandler(event, callback) +
+
+ Removes previously registered Lua function for a given event. + + +

Parameters:

+
    +
  • event + string + name of the desired event +
  • +
  • callback + function + a previously registered function +
  • +
+ +

Returns:

+
    + + bool + true if the function had been previously registered, else false +
+ + +

See also:

+ + + +
+
+ + Notepad.RemoveAllEventHandlers(event) +
+
+ Removes all registered Lua functions for a given event. + + +

Parameters:

+
    +
  • event + string + name of the desired event +
  • +
+ + + +

See also:

+ + + +
+
+ + Notepad.AddShortcut(name, shortcut, callback) +
+
+ Registers a Lua function for a shortcut key. + The callback is not passed any parameters.

+ +

Note: This can only be called during startup. + + +

Parameters:

+
    +
  • name + string + the user-friendly name of the shortcut (this is displayed in the menu) +
  • +
  • shortcut + string + the modifier and key (e.g. "Ctrl+Alt+Shift+D"). The key must be A-Z, 0-9, or F1-F12 +
  • +
  • callback + function + function to call when the shortcut is triggered +
  • +
+ + + + + +
+
+ + Notepad.WriteError(...) +
+
+ Writes an error message to the console. + Calls tostring on each parameter and prints the results in the console in red text. + + +

Parameters:

+
    +
  • ... + variable number of arguments +
  • +
+ + + + + +
+
+ + Notepad.ClearConsole() +
+
+ Clears the console. + + + + + + + +
+
+

Methods

+ +
+
+ + Notepad:ActivateDoc(view, index2Activate) +
+
+ Activates the specified document. + + +

Parameters:

+
    +
  • view + int + either MAIN_VIEW or SUB_VIEW +
  • +
  • index2Activate + int + index of the view to activate +
  • +
+ + + + + +
+
+ + Notepad:DoOpen(file) +
+
+ Opens a document. + + +

Parameters:

+
    +
  • file + string + name +
  • +
+ +

Returns:

+
    + + bool + true if successful, else false +
+ + + + +
+
+ + Notepad:GetBufferIDFromPos(position, view) +
+
+ Gets the BufferID located at the given position. + + +

Parameters:

+
    +
  • position + int + position of document +
  • +
  • view + int + either MAIN_VIEW or SUB_VIEW +
  • +
+ +

Returns:

+
    + + int + BufferID or 0 if invalid +
+ + + + +
+
+ + Notepad:GetCurrentDirectory() +
+
+ Gets the current directory of the document. + + + +

Returns:

+
    + + string + current directory +
+ + + + +
+
+ + Notepad:GetBufferIDFromPos(view) +
+
+ Gets the BufferID located at the given position. + + +

Parameters:

+
    +
  • view + int + either MAIN_VIEW or SUB_VIEW +
  • +
+ +

Returns:

+
    + + int + + + +
+ + + + +
+
+ + Notepad:GetCurrentDocIndex(view) +
+
+ Gets the current document index within the view. + + +

Parameters:

+
    +
  • view + int + either MAIN_VIEW or SUB_VIEW +
  • +
+ +

Returns:

+
    + + int + index of the current document. -1 if the requested view is not visible. +
+ + + + +
+
+ + Notepad:GetCurrentWord() +
+
+ Selects and returns the word at the cursor's position + + + +

Returns:

+
    + + string + word +
+ + + + +
+
+ + Notepad:GetExtPart() +
+
+ Gets the file extension of the current document. + + + +

Returns:

+
    + + string + file extension +
+ + + + +
+
+ + Notepad:GetFileName() +
+
+ Gets the file name of the current document. + + + +

Returns:

+
    + + string + file name +
+ + + + +
+
+ + Notepad:GetFullCurrentPath() +
+
+ Gets the full path of the current document. + + + +

Returns:

+
    + + string + full path +
+ + + + +
+
+ + Notepad:GetNamePart() +
+
+ Gets the file name (without extension) of the current document. + + + +

Returns:

+
    + + string + + + +
+ + + + +
+
+ + Notepad:GetNbOpenFiles(view) +
+
+ Gets the number of open documents. + + +

Parameters:

+
    +
  • view + int + either ALL_OPEN_FILES, PRIMARY_VIEW, or SECOND_VIEW +
  • +
+ +

Returns:

+
    + + int + + + +
+ + + + +
+
+ + Notepad:GetNppDirectory() +
+
+ Gets the directory of the Notepad++ application. + + + +

Returns:

+
    + + string + + + +
+ + + + +
+
+ + Notepad:GetPluginsConfigDir() +
+
+ Gets the plugin configuration directory. + + + +

Returns:

+
    + + string + + + +
+ + + + +
+
+ + Notepad:MenuCommand(command) +
+
+ Executes a menu command. + + +

Parameters:

+
    +
  • command + int + one of the IDM_xxx constants +
  • +
+ + + + + +
+
+ + Notepad:ReloadFile(withAlert, filename) +
+
+ Reloads the specified file. + + +

Parameters:

+
    +
  • withAlert + bool + use an alert or not +
  • +
  • filename + string + file name to reload +
  • +
+ + + + + +
+
+ + Notepad:SaveAllFiles() +
+
+ Saves all the opened documents. + + + +

Returns:

+
    + + bool + + + +
+ + + + +
+
+ + Notepad:SaveCurrentFile() +
+
+ Saves the current document. + + + +

Returns:

+
    + + bool + + + +
+ + + + +
+
+ + Notepad:SaveCurrentFileAs(asCopy, filename) +
+
+ Saves the current document as the specified name. + + +

Parameters:

+
    +
  • asCopy + bool + flag to indicate of the file should be saved as a copy +
  • +
  • filename + string + file name +
  • +
+ +

Returns:

+
    + + bool + + + +
+ + + + +
+
+ + Notepad:SwitchToFile(filename) +
+
+ Switch to the specified document. + + +

Parameters:

+
    +
  • filename + string + file name +
  • +
+ +

Returns:

+
    + + bool + true if successful, else false +
+ + + + +
+
+

Properties

+ +
+
+ + Notepad.AppDataPluginsAllowed +
+
+ Whether plugins are allowed to be loaded from the %APPDATA% directory. + + +
    +
  • AppDataPluginsAllowed + bool + + + + (readonly) +
  • +
+ + + + + +
+
+ + Notepad.BufferLangType[id] +
+
+ Gets or sets the buffer's language type (one of the L_xxx constants). + + +
    +
  • id + BufferID + + + +
  • +
+ + + + + +
+
+ + Notepad.CurrentBufferID +
+
+ Gets the current BufferID. + + +
    +
  • CurrentBufferID + BufferID + + + + (readonly) +
  • +
+ + + + + +
+
+ + Notepad.CurrentColumn +
+
+ Gets the current column of the cursor. + + +
    +
  • CurrentColumn + int + + + + (readonly) +
  • +
+ + + + + +
+
+ + Notepad.CurrentLine +
+
+ Gets the current line number of the cursor. + + +
    +
  • CurrentLine + int + + + + (readonly) +
  • +
+ + + + + +
+
+ + Notepad.CurrentView +
+
+ Gets the currently active view, either MAIN_VIEW or SUB_VIEW. + + +
    +
  • CurrentView + int + + + + (readonly) +
  • +
+ + + + + +
+
+ + Notepad.DefaultBackgroundColor +
+
+ Gets the default background color used for documents. + + +
    +
  • DefaultBackgroundColor + colour + + + + (readonly) +
  • +
+ + + + + +
+
+ + Notepad.DefaultForegroundColor +
+
+ Gets the default foreground color used for documents. + + +
    +
  • DefaultForegroundColor + colour + + + + (readonly) +
  • +
+ + + + + +
+
+ + Notepad.LanguageDescription[language] +
+
+ Gets the description of a language. + + +
    +
  • language + int + one of the L_xxx constant + (readonly) +
  • +
+ + + + + +
+
+ + Notepad.LanguageName[language] +
+
+ Gets the language name. + + +
    +
  • language + int + one of the L_xxx constant + (readonly) +
  • +
+ + + + + +
+
+ + Notepad.Version +
+
+ Gets the Notepad++ version. + The high 16 bits contain the major version. The low 16 bits contain the minor version. + + +
    +
  • Version + int + + + + (readonly) +
  • +
+ + + + +

Usage:

+
    +
    print((npp.Version >> 16) .. '.' .. (npp.Version & 0xff))
    +
+ +
+
+ + Notepad.WindowsVersion +
+
+ Gets the version of the Windows operating system (one of the WV_xxx constants). + + +
    +
  • WindowsVersion + int + + + + (readonly) +
  • +
+ + + + + +
+
+ + +
+
+
+Generated by LDoc 1.4.3 +Last updated 2016-09-09 09:10:16 +
+
+ + + diff --git a/docs/classes/Styler.html b/docs/classes/Styler.html new file mode 100644 index 0000000..16fd37e --- /dev/null +++ b/docs/classes/Styler.html @@ -0,0 +1,833 @@ + + + + + LuaScript Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Class Styler

+

Description

+

+ +

+ + +

Fields

+ + + + + + + + + + + + + +
Styler.startPosStart of the range to be lexed.
Styler.lengthDocLength of the range to be lexed.
Styler.initStyleStarting style.
+

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Styler:StartStyling(startPos, length, initStyle)Start setting styles from startPos for length with initial style initStyle.
Styler:EndStyling()Styling has been completed so tidy up.
Styler:More()Are there any more characters to process.
Styler:Forward()Move forward one character.
Styler:Position()What is the position in the document of the current character.
Styler:AtLineStart()Is the current character the first on a line.
Styler:AtLineEnd()Is the current character the last on a line.
Styler:State()The current lexical state value.
Styler:SetState()Set the style of the current token to the current state and then change the state to the argument.
Styler:ForwardSetState()Combination of moving forward and setting the state.
Styler:ChangeState(state)Change the current state so that the state of the current token will be set to the argument.
Styler:Current()The current character.
Styler:Next()The next character.
Styler:Previous()The previous character.
Styler:Token()The current token.
Styler:Match(str)Is the text from the current position the same as the argument?
Styler:Line(position)Convert a byte position into a line number.
Styler:CharAt(position)Unsigned byte value at argument.
Styler:StyleAt(position)Style value at argument.
Styler:LevelAt(line)Fold level for a line.
Styler:SetLevelAt(line, level)Set the fold level for a line.
Styler:LineState(line)State value for a line.
Styler:SetLineState(line, state)Set state value for a line.
+ +
+
+ + +

Fields

+ +
+
+ + Styler.startPos +
+
+ Start of the range to be lexed. + + +
    +
  • startPos + int + + + + (readonly) +
  • +
+ + + + + +
+
+ + Styler.lengthDoc +
+
+ Length of the range to be lexed. + + +
    +
  • lengthDoc + int + + + + (readonly) +
  • +
+ + + + + +
+
+ + Styler.initStyle +
+
+ Starting style. + + +
    +
  • initStyle + int + + + + (readonly) +
  • +
+ + + + + +
+
+

Methods

+ +
+
+ + Styler:StartStyling(startPos, length, initStyle) +
+
+ Start setting styles from startPos for length with initial style initStyle. + + +

Parameters:

+
    +
  • startPos + int + + + +
  • +
  • length + int + + + +
  • +
  • initStyle + int + + + +
  • +
+ + + + + +
+
+ + Styler:EndStyling() +
+
+ Styling has been completed so tidy up. + + + + + + + +
+
+ + Styler:More() +
+
+ Are there any more characters to process. + + + +

Returns:

+
    + + boolean + + + +
+ + + + +
+
+ + Styler:Forward() +
+
+ Move forward one character. + + + + + + + +
+
+ + Styler:Position() +
+
+ What is the position in the document of the current character. + + + +

Returns:

+
    + + int + + + +
+ + + + +
+
+ + Styler:AtLineStart() +
+
+ Is the current character the first on a line. + + + +

Returns:

+
    + + boolean + + + +
+ + + + +
+
+ + Styler:AtLineEnd() +
+
+ Is the current character the last on a line. + + + +

Returns:

+
    + + boolean + + + +
+ + + + +
+
+ + Styler:State() +
+
+ The current lexical state value. + + + +

Returns:

+
    + + int + + + +
+ + + + +
+
+ + Styler:SetState() +
+
+ Set the style of the current token to the current state and then change the state to the argument. + + + + + + + +
+
+ + Styler:ForwardSetState() +
+
+ Combination of moving forward and setting the state. + Useful when the current character is a token terminator like " for a string. + + + + + + + +
+
+ + Styler:ChangeState(state) +
+
+ Change the current state so that the state of the current token will be set to the argument. + + +

Parameters:

+
    +
  • state + int + + + +
  • +
+ + + + + +
+
+ + Styler:Current() +
+
+ The current character. + + + +

Returns:

+
    + + string + + + +
+ + + + +
+
+ + Styler:Next() +
+
+ The next character. + + + +

Returns:

+
    + + string + + + +
+ + + + +
+
+ + Styler:Previous() +
+
+ The previous character. + + + +

Returns:

+
    + + string + + + +
+ + + + +
+
+ + Styler:Token() +
+
+ The current token. + + + +

Returns:

+
    + + string + + + +
+ + + + +
+
+ + Styler:Match(str) +
+
+ Is the text from the current position the same as the argument? + + +

Parameters:

+
    +
  • str + string + + + +
  • +
+ +

Returns:

+
    + + boolean + + + +
+ + + + +
+
+ + Styler:Line(position) +
+
+ Convert a byte position into a line number. + + +

Parameters:

+
    +
  • position + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + + + +
+
+ + Styler:CharAt(position) +
+
+ Unsigned byte value at argument. + + +

Parameters:

+
    +
  • position + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + + + +
+
+ + Styler:StyleAt(position) +
+
+ Style value at argument. + + +

Parameters:

+
    +
  • position + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + + + +
+
+ + Styler:LevelAt(line) +
+
+ Fold level for a line. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + + + +
+
+ + Styler:SetLevelAt(line, level) +
+
+ Set the fold level for a line. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • level + int + + + +
  • +
+ + + + + +
+
+ + Styler:LineState(line) +
+
+ State value for a line. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
+ +

Returns:

+
    + + int + + + +
+ + + + +
+
+ + Styler:SetLineState(line, state) +
+
+ Set state value for a line. + This can be used to store extra information from lexing, such as a current language mode, so that there is no need to look back in the document. + + +

Parameters:

+
    +
  • line + int + + + +
  • +
  • state + int + + + +
  • +
+ + + + + +
+
+ + +
+
+
+Generated by LDoc 1.4.3 +Last updated 2016-09-09 09:07:12 +
+
+ + + diff --git a/docs/examples/bookmark.lua.html b/docs/examples/bookmark.lua.html new file mode 100644 index 0000000..593bb45 --- /dev/null +++ b/docs/examples/bookmark.lua.html @@ -0,0 +1,82 @@ + + + + + LuaScript Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

bookmark.lua

+
+-- Get rid of Notepad++'s ugly bookmark icon
+
+-- Notepad++ uses 24 internally
+editor1:MarkerDefine(24, SC_MARK_BOOKMARK)
+editor1.MarkerFore[24] = 0x0000EE
+editor1.MarkerBack[24] = 0x6060F2
+
+editor2:MarkerDefine(24, SC_MARK_BOOKMARK)
+editor2.MarkerFore[24] = 0x0000EE
+editor2.MarkerBack[24] = 0x6060F2
+ + +
+
+
+Generated by LDoc 1.4.3 +Last updated 2016-09-09 09:10:16 +
+
+ + + diff --git a/docs/examples/highlightoccurrences.lua.html b/docs/examples/highlightoccurrences.lua.html new file mode 100644 index 0000000..27a9bee --- /dev/null +++ b/docs/examples/highlightoccurrences.lua.html @@ -0,0 +1,125 @@ + + + + + LuaScript Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

highlightoccurrences.lua

+
+-- Mark occurrences of the current word under the cursor
+
+-- Adjust these values if desired
+local indicator = 12 -- not sure what one is best to use but this works
+editor1.IndicStyle[indicator] = INDIC_ROUNDBOX
+editor2.IndicStyle[indicator] = INDIC_ROUNDBOX
+editor1.IndicAlpha[indicator] = 20
+editor2.IndicAlpha[indicator] = 20
+editor1.IndicOutlineAlpha[indicator] = 20
+editor2.IndicOutlineAlpha[indicator] = 20
+
+npp.AddEventHandler("OnUpdateUI", function()
+    local function getRangeOnScreen()
+        local firstLine = editor.FirstVisibleLine
+        local lastLine = firstLine + editor.LinesOnScreen
+        local startPos = editor:PositionFromLine(firstLine)
+        local endPos = editor.LineEndPosition[lastLine]
+        return startPos, endPos
+    end
+
+    local function clearIndicatorOnScreen()
+        local s, e = getRangeOnScreen()
+        editor:IndicatorClearRange(s, e - s)
+    end
+
+    editor.IndicatorCurrent = indicator
+
+    if not editor.SelectionEmpty then
+        clearIndicatorOnScreen()
+        return false
+    end
+
+    local startWord = editor:WordStartPosition(editor.CurrentPos, true)
+    local endWord = editor:WordEndPosition(startWord, true)
+
+    -- Not a word
+    if startWord == endWord then
+        clearIndicatorOnScreen()
+        return false
+    end
+
+    local word = editor:textrange(startWord, endWord)
+
+    clearIndicatorOnScreen()
+
+    -- for each match on screen turn on the indicator
+    local startPos, endPos = getRangeOnScreen()
+    local s, e = editor:findtext(word, SCFIND_WHOLEWORD | SCFIND_MATCHCASE, startPos, endPos)
+    while s ~= nil do
+        editor:IndicatorFillRange(s, e - s)
+        s, e = editor:findtext(word, SCFIND_WHOLEWORD | SCFIND_MATCHCASE, e, endPos)
+    end
+end)
+ + +
+
+
+Generated by LDoc 1.4.3 +Last updated 2016-09-09 09:10:16 +
+
+ + + diff --git a/docs/examples/selectionaddnext.lua.html b/docs/examples/selectionaddnext.lua.html new file mode 100644 index 0000000..344a4ed --- /dev/null +++ b/docs/examples/selectionaddnext.lua.html @@ -0,0 +1,98 @@ + + + + + LuaScript Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

selectionaddnext.lua

+
+-- Select the next occurrence of the current word
+npp.AddShortcut("Selection Add Next", "Ctrl+D", function()
+    -- From SciTEBase.cxx
+    local flags = SCFIND_MATCHCASE -- can use 0
+    editor:SetTargetRange(0, editor.TextLength)
+    editor.SearchFlags = flags
+
+    -- From Editor.cxx
+    if editor.SelectionEmpty or not editor.MultipleSelection then
+        local startWord = editor:WordStartPosition(editor.CurrentPos, true)
+        local endWord = editor:WordEndPosition(startWord, true)
+        editor:SetSelection(startWord, endWord)
+    else
+        local i = editor.MainSelection
+        local s = editor:textrange(editor.SelectionNStart[i], editor.SelectionNEnd[i])
+        local searchRanges = {{editor.SelectionNEnd[i], editor.TargetEnd}, {editor.TargetStart, editor.SelectionNStart[i]}}
+        for _, range in pairs(searchRanges) do
+            editor:SetTargetRange(range[1], range[2])
+            if editor:SearchInTarget(s) ~= -1 then
+                editor:AddSelection(editor.TargetStart, editor.TargetEnd)
+                editor:ScrollRange(editor.TargetStart, editor.TargetEnd)
+                break
+            end
+        end
+    end
+end)
+ + +
+
+
+Generated by LDoc 1.4.3 +Last updated 2016-09-09 09:10:16 +
+
+ + + diff --git a/docs/examples/sessionmanager.lua.html b/docs/examples/sessionmanager.lua.html new file mode 100644 index 0000000..9e40673 --- /dev/null +++ b/docs/examples/sessionmanager.lua.html @@ -0,0 +1,255 @@ + + + + + LuaScript Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

sessionmanager.lua

+
+-- A very simplistic session manager. It opens previously open files and restores
+-- cursor position and scroll position. It is not perfect, for example it does
+-- not keep track of the order or in which view the files are in. This code must
+-- be ran during startup. This is just a demonstration of how to use the API
+-- and what can be done in a small amount of Lua.
+
+
+local opened_files = {}
+local is_shutting_down = false
+
+-- If a session is found, load it. Note this cannot be done directly during
+-- startup since N++ hasn't completely initialized yet.
+npp.AddEventHandler("OnReady", function()
+    local files = table.load(npp:GetPluginsConfigDir() .. "\\session.lua")
+    if files ~= nil then
+        for i,v in pairs(files) do
+            npp:DoOpen(v.name)
+            if v.lang then npp.BufferLangType[npp.CurrentBufferID] = v.lang end
+            editor.FirstVisibleLine = v.top or 0
+            editor.CurrentPos = v.pos or 0
+            editor.Anchor = v.anchor or 0
+        end
+    end
+    return false
+end)
+
+-- Remove any files that are closed
+npp.AddEventHandler("OnClose", function(f,i)
+    -- If N++ is in the middle of shutting down, just ignore it
+    if is_shutting_down then return false end
+    opened_files[i] = nil
+    return false
+end)
+
+-- This won't be called unless the user manually changes it, else it just
+-- defaults to whatever value N++ decides is best
+npp.AddEventHandler("OnLangChange", function()
+    local i = npp.CurrentBufferID
+    opened_files[i].lang = npp.BufferLangType[i]
+end)
+
+-- Keep track of some of the variables we want to restore in the file
+-- This event will also catch any files being opened for the first time
+npp.AddEventHandler("OnUpdateUI", function()
+    local i = npp.CurrentBufferID
+    if opened_files[i] == nil then
+        opened_files[i] = {}
+        opened_files[i].name = npp:GetFullCurrentPath()
+    end
+    opened_files[i].pos = editor.CurrentPos
+    opened_files[i].anchor = editor.Anchor
+    opened_files[i].top = editor.FirstVisibleLine
+end)
+
+npp.AddEventHandler("OnFileRenamed", function(f,i)
+    opened_files[i].name = f -- update the name
+    return false
+end)
+
+-- Set a flag so we know N++ is shutting down
+npp.AddEventHandler("OnBeforeShutdown", function()
+    is_shutting_down = true
+    return false
+end)
+
+-- The user could cancel the shutdown
+npp.AddEventHandler("OnCancelShutdown", function()
+    is_shutting_down = false
+    return false
+end)
+
+-- If it is actually shutting down, save the session file
+npp.AddEventHandler("OnShutdown", function()
+    -- Remove any dummy files, e.g. "new 1"
+    for id, tab in pairs(opened_files) do
+        if tab.name:find("^new %d+$") ~= nil then
+            opened_files[id] = nil
+        end
+    end
+    table.save(opened_files, npp:GetPluginsConfigDir() .. "\\session.lua")
+end)
+
+
+-- These below are merely helper fuctions to serialize tables. They were found
+-- laying around on the Internet somewhere and worked for this case.
+
+function table.save(tbl,filename )
+    local function exportstring( s )
+        return string.format("%q", s)
+    end
+    local charS,charE = "\t","\n"
+    local file,err = io.open( filename, "wb" )
+    if err then return err end
+
+    -- initiate variables for save procedure
+    local tables,lookup = { tbl },{ [tbl] = 1 }
+    file:write( "return {"..charE )
+
+    for idx,t in ipairs( tables ) do
+        file:write( "-- Table: {"..idx.."}"..charE )
+        file:write( "{"..charE )
+        local thandled = {}
+
+        for i,v in ipairs( t ) do
+            thandled[i] = true
+            local stype = type( v )
+            -- only handle value
+            if stype == "table" then
+                if not lookup[v] then
+                    table.insert( tables, v )
+                    lookup[v] = #tables
+                end
+                file:write( charS.."{"..lookup[v].."},"..charE )
+            elseif stype == "string" then
+                file:write(  charS..exportstring( v )..","..charE )
+            elseif stype == "number" then
+                file:write(  charS..tostring( v )..","..charE )
+            end
+        end
+
+        for i,v in pairs( t ) do
+            -- escape handled values
+            if (not thandled[i]) then
+
+                local str = ""
+                local stype = type( i )
+                -- handle index
+                if stype == "table" then
+                    if not lookup[i] then
+                        table.insert( tables,i )
+                        lookup[i] = #tables
+                    end
+                    str = charS.."[{"..lookup[i].."}]="
+                elseif stype == "string" then
+                    str = charS.."["..exportstring( i ).."]="
+                elseif stype == "number" then
+                    str = charS.."["..tostring( i ).."]="
+                end
+
+                if str ~= "" then
+                    stype = type( v )
+                    -- handle value
+                    if stype == "table" then
+                        if not lookup[v] then
+                            table.insert( tables,v )
+                            lookup[v] = #tables
+                        end
+                        file:write( str.."{"..lookup[v].."},"..charE )
+                    elseif stype == "string" then
+                        file:write( str..exportstring( v )..","..charE )
+                    elseif stype == "number" then
+                        file:write( str..tostring( v )..","..charE )
+                    end
+                end
+            end
+        end
+        file:write( "},"..charE )
+    end
+    file:write( "}" )
+    file:close()
+end
+
+function table.load( sfile )
+    local ftables,err = loadfile( sfile )
+    if err then return _,err end
+    local tables = ftables()
+    for idx = 1,#tables do
+        local tolinki = {}
+        for i,v in pairs( tables[idx] ) do
+            if type( v ) == "table" then
+                tables[idx][i] = tables[v[1]]
+            end
+            if type( i ) == "table" and tables[i[1]] then
+                table.insert( tolinki,{ i,tables[i[1]] } )
+            end
+        end
+        -- link indices
+        for _,v in ipairs( tolinki ) do
+            tables[idx][v[2]],tables[idx][v[1]] =  tables[idx][v[1]],nil
+        end
+    end
+    return tables[1]
+end
+ + +
+
+
+Generated by LDoc 1.4.3 +Last updated 2016-09-09 09:10:16 +
+
+ + + diff --git a/docs/examples/visualstudiolinecopy.lua.html b/docs/examples/visualstudiolinecopy.lua.html new file mode 100644 index 0000000..92f7573 --- /dev/null +++ b/docs/examples/visualstudiolinecopy.lua.html @@ -0,0 +1,86 @@ + + + + + LuaScript Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

visualstudiolinecopy.lua

+
+-- Mimic Visual Studio's "Ctrl+C" that copies the entire line if nothing is selected
+npp.AddShortcut("Copy Allow Line", "Ctrl+C", function()
+    editor:CopyAllowLine()
+end)
+
+-- Mimic Visual Studio's "Ctrl+X" that cuts the line if nothing is selected
+npp.AddShortcut("Cut Allow Line", "Ctrl+X", function()
+    if editor.SelectionEmpty then
+        editor:CopyAllowLine()
+        editor:LineDelete()
+    else
+        editor:Cut()
+    end
+end)
+ + +
+
+
+Generated by LDoc 1.4.3 +Last updated 2016-09-09 09:10:16 +
+
+ + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..14af801 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,128 @@ + + + + + LuaScript Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ + +

Notepad++ plugin for Lua scripting capabilities.

+

LuaScript allows you to customize Notepad++.

+ +
    +
  • Assign Lua functions to shortcut keys or menus
  • +
  • Register callbacks for events
  • +
  • Full Lua 5.3 functionality
  • +
  • Interactive console with auto-completion
  • +
+ +

The startup script is automatically ran when Notepad++ is launched. This is used to register shortcuts and callbacks to extend Notepad++'s functionality

+ +

Issues or feature requests can be made on the GitHub issue tracker.

+ +

Make sure to check out the examples.

+ +

Classes

+ + + + + + + + + + + + + +
EditorScintilla wrapper.
MatchUsed for searching and replacing text.
NotepadNotepad++ wrapper.
+

Topics

+ + + + + +
callbacks.md
+

Examples

+ + + + + + + + + + + + + + + + + + + + + +
bookmark.lua
highlightoccurrences.lua
selectionaddnext.lua
sessionmanager.lua
visualstudiolinecopy.lua
+ +
+
+
+Generated by LDoc 1.4.3 +Last updated 2016-09-09 09:10:16 +
+
+ + + diff --git a/doc/ldoc.css b/docs/ldoc.css similarity index 100% rename from doc/ldoc.css rename to docs/ldoc.css diff --git a/docs/topics/callbacks.md.html b/docs/topics/callbacks.md.html new file mode 100644 index 0000000..57583f8 --- /dev/null +++ b/docs/topics/callbacks.md.html @@ -0,0 +1,120 @@ + + + + + LuaScript Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ + +

Callbacks

+

Scripts can register Lua functions as a callback when certain events take place. Each event type can have multiple callbacks registered. Supported events include:

+ +
    +
  • OnReady()
  • +
  • OnChar(character)
  • +
  • OnModification(modType, position, length, text, linesAdded)
  • +
  • OnUpdateUI(flags)
  • +
  • OnSavePointReached()
  • +
  • OnSavePointLeft()
  • +
  • OnBeforeOpen(filename, bufferid)
  • +
  • OnOpen(filename, bufferid)
  • +
  • OnSwitchFile(filename, bufferid)
  • +
  • OnBeforeSave(filename, bufferid)
  • +
  • OnSave(filename, bufferid)
  • +
  • OnFileRenamed(filename, bufferid)
  • +
  • OnFileDeleted(filename, bufferid)
  • +
  • OnBeforeClose(filename, bufferid)
  • +
  • OnClose(filename, bufferid)
  • +
  • OnLangChange()
  • +
  • OnBeforeShutdown()
  • +
  • OnCancelShutdown()
  • +
  • OnStyle(styler)
  • +
  • `OnDoubleClick(position, line, modifiers)
  • +
  • OnShutdown()
  • +
+ +

The Notepad++ object allows adding, removing, and clearing callback functions for the events.

+ +
    +
  • npp.AddEventHandler(event, function)
  • +
  • npp.RemoveEventHandler(event, function)
  • +
  • npp.RemoveAllEventHandlers(event)
  • +
+ +

To register for an event, first define your function that accepts the parameters (if any). You can then add the callback to the appropriate event. Although callbacks are not required to return a value, in order to ensure forwards compatibility it should return false. For example:

+ + +
+function printchar(ch)
+    print("You typed " .. ch)
+    return false
+end
+
+npp.AddEventHandler("OnChar", printchar)
+
+ + +

Take care not to register the same callback twice. To be safe you can attempt to remove it before adding it.

+ + +
+
+
+Generated by LDoc 1.4.3 +Last updated 2016-09-09 09:10:16 +
+
+ + + diff --git a/doc/Callbacks.md b/docs_gen/Callbacks.md similarity index 100% rename from doc/Callbacks.md rename to docs_gen/Callbacks.md diff --git a/doc/KeyboardCommands.lua b/docs_gen/KeyboardCommands.lua similarity index 93% rename from doc/KeyboardCommands.lua rename to docs_gen/KeyboardCommands.lua index 8dd36b0..be48860 100644 --- a/doc/KeyboardCommands.lua +++ b/docs_gen/KeyboardCommands.lua @@ -1,13 +1,13 @@ --- Keyboard Commands -- @section keyboardcommands ---- Start of key messages Move caret down one line. +--- Move caret down one line. -- @function LineDown --- Move caret down one line extending selection to new caret position. -- @function LineDownExtend ---- RectExtended rectangular selection moves Move caret down one line, extending rectangular selection to new caret position. +--- Move caret down one line, extending rectangular selection to new caret position. -- @function LineDownRectExtend --- Scroll the document down, keeping the caret visible. @@ -256,20 +256,20 @@ --- Dedent the selected lines. -- @function BackTab ---- +--- Duplicates the current selection. -- @function SelectionDuplicate ---- +--- Scroll the document so that the caret is in the center of the screen. -- @function VerticalCentreCaret ---- +--- Move the selected lines up one line, shifting the line above after the selection. -- @function MoveSelectedLinesUp ---- +--- Move the selected lines down one line, shifting the line below before the selection. -- @function MoveSelectedLinesDown ---- +--- Scroll the document to the start without changing the selection. -- @function ScrollToStart ---- +--- Scroll the document to the end without changing the selection. -- @function ScrollToEnd diff --git a/doc/Match.lua b/docs_gen/Match.lua similarity index 100% rename from doc/Match.lua rename to docs_gen/Match.lua diff --git a/doc/Notepad.lua b/docs_gen/Notepad.lua similarity index 100% rename from doc/Notepad.lua rename to docs_gen/Notepad.lua diff --git a/doc/PaneAPI.html b/docs_gen/PaneAPI.html similarity index 100% rename from doc/PaneAPI.html rename to docs_gen/PaneAPI.html diff --git a/doc/Styler.lua b/docs_gen/Styler.lua similarity index 100% rename from doc/Styler.lua rename to docs_gen/Styler.lua diff --git a/doc/config.ld b/docs_gen/config.ld similarity index 63% rename from doc/config.ld rename to docs_gen/config.ld index 759a122..afa9c85 100644 --- a/doc/config.ld +++ b/docs_gen/config.ld @@ -16,15 +16,28 @@ end local scidocurl = 'http://www.scintilla.org/ScintillaDoc.html#%s' custom_see_handler('^(SCI_[%w_]+)$', function(name) - local url = scidocurl:format(name) - return name, url + local url = scidocurl:format(name) + return name, url end) project = 'LuaScript v0.4.0' title = 'LuaScript Reference' description = 'Notepad++ plugin for [Lua](http://www.lua.org/) scripting capabilities.' +full_description = [[LuaScript allows you to customize Notepad++. + +* Assign Lua functions to shortcut keys or menus +* Register callbacks for events +* Full Lua 5.3 functionality +* Interactive console with auto-completion + +The startup script is automatically ran when Notepad++ is launched. This is used to register shortcuts and callbacks to extend Notepad++'s functionality + +Issues or feature requests can be made on the GitHub [issue tracker](https://github.com/dail8859/LuaScript/issues). + +Make sure to check out the examples. +]] format = 'markdown' -dir = './gh-pages' +dir = '../docs' style = true template = true no_lua_ref = true diff --git a/doc/genEditor.lua b/docs_gen/genEditor.lua similarity index 100% rename from doc/genEditor.lua rename to docs_gen/genEditor.lua diff --git a/doc/ldoc.bat b/docs_gen/ldoc.bat similarity index 100% rename from doc/ldoc.bat rename to docs_gen/ldoc.bat diff --git a/docs_gen/ldoc.css b/docs_gen/ldoc.css new file mode 100644 index 0000000..e7327d9 --- /dev/null +++ b/docs_gen/ldoc.css @@ -0,0 +1,304 @@ +/* BEGIN RESET + +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.2r1 +*/ +html { + color: #000; + background: #FFF; +} +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { + margin: 0; + padding: 0; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +fieldset,img { + border: 0; +} +address,caption,cite,code,dfn,em,strong,th,var,optgroup { + font-style: inherit; + font-weight: inherit; +} +del,ins { + text-decoration: none; +} +li { + list-style: disc; + margin-left: 20px; +} +caption,th { + text-align: left; +} +h1,h2,h3,h4,h5,h6 { + font-size: 100%; + font-weight: bold; +} +q:before,q:after { + content: ''; +} +abbr,acronym { + border: 0; + font-variant: normal; +} +sup { + vertical-align: baseline; +} +sub { + vertical-align: baseline; +} +legend { + color: #000; +} +input,button,textarea,select,optgroup,option { + font-family: inherit; + font-size: inherit; + font-style: inherit; + font-weight: inherit; +} +input,button,textarea,select {*font-size:100%; +} +/* END RESET */ + +body { + margin-left: 1em; + margin-right: 1em; + font-family: arial, helvetica, geneva, sans-serif; + background-color: #ffffff; margin: 0px; +} + +code, tt { font-family: monospace; font-size: 1.1em; } +span.parameter { font-family:monospace; } +span.parameter:after { content:":"; } +span.types:before { content:"("; } +span.types:after { content:")"; } +.type { font-weight: bold; font-style:italic } + +body, p, td, th { font-size: .95em; line-height: 1.2em;} + +p, ul { margin: 10px 0 0 0px;} + +strong { font-weight: bold;} + +em { font-style: italic;} + +h1 { + font-size: 1.5em; + margin: 0 0 20px 0; +} +h2, h3, h4 { margin: 15px 0 10px 0; } +h2 { font-size: 1.25em; } +h3 { font-size: 1.15em; } +h4 { font-size: 1.06em; } + +a:link { font-weight: bold; color: #004080; text-decoration: none; } +a:visited { font-weight: bold; color: #006699; text-decoration: none; } +a:link:hover { text-decoration: underline; } + +hr { + color:#cccccc; + background: #00007f; + height: 1px; +} + +blockquote { margin-left: 3em; } + +ul { list-style-type: disc; } + +p.name { + font-family: "Andale Mono", monospace; + padding-top: 1em; +} + +pre { + background-color: rgb(245, 245, 245); + border: 1px solid #C0C0C0; /* silver */ + padding: 10px; + margin: 10px 0 10px 0; + overflow: auto; + font-family: "Andale Mono", monospace; +} + +pre.example { + font-size: .85em; +} + +table.index { border: 1px #00007f; } +table.index td { text-align: left; vertical-align: top; } + +#container { + margin-left: 1em; + margin-right: 1em; + background-color: #ffffff; +} + +#product { + text-align: center; + border-bottom: 1px solid #cccccc; + background-color: #ffffff; +} + +#product big { + font-size: 2em; +} + +#main { + background-color:#FFFFFF; // #f0f0f0; + //border-left: 2px solid #cccccc; +} + +#navigation { + float: left; + width: 14em; + vertical-align: top; + background-color:#FFFFFF; // #f0f0f0; + border-right: 2px solid #cccccc; + overflow: visible; +} + +#navigation h2 { + background-color:#FFFFFF;//:#e7e7e7; + font-size:1.1em; + color:#000000; + text-align: left; + padding:0.2em; + //border-top:1px solid #dddddd; + border-bottom:1px solid #dddddd; +} + +#navigation ul +{ + font-size:1em; + list-style-type: none; + margin: 1px 1px 10px 1px; +} + +#navigation li { + text-indent: -1em; + display: block; + margin: 3px 0px 0px 22px; +} + +#navigation li li a { + margin: 0px 3px 0px -1em; +} + +#content { + margin-left: 14em; + padding: 1em; + width: 900px; + border-left: 2px solid #cccccc; + // border-right: 2px solid #cccccc; + background-color: #ffffff; +} + +#about { + clear: both; + padding: 5px; + border-top: 2px solid #cccccc; + background-color: #ffffff; +} + +@media print { + body { + font: 12pt "Times New Roman", "TimeNR", Times, serif; + } + a { font-weight: bold; color: #004080; text-decoration: underline; } + + #main { + background-color: #ffffff; + border-left: 0px; + } + + #container { + margin-left: 2%; + margin-right: 2%; + background-color: #ffffff; + } + + #content { + padding: 1em; + background-color: #ffffff; + } + + #navigation { + display: none; + } + pre.example { + font-family: "Andale Mono", monospace; + font-size: 10pt; + page-break-inside: avoid; + } +} + +table.module_list { + border-width: 1px; + border-style: solid; + border-color: #cccccc; + border-collapse: collapse; +} +table.module_list td { + border-width: 1px; + padding: 3px; + border-style: solid; + border-color: #cccccc; +} +table.module_list td.name { background-color: #f0f0f0; ; min-width: 200px; } +table.module_list td.summary { width: 100%; } + +table.function_list { + border-width: 1px; + border-style: solid; + border-color: #cccccc; + border-collapse: collapse; +} +table.function_list td { + border-width: 1px; + padding: 3px; + border-style: solid; + border-color: #cccccc; +} +table.function_list td.name { background-color: #f6f6ff; ; min-width: 200px; } +table.function_list td.summary { width: 100%; } + +dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;} +dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;} +dl.table h3, dl.function h3 {font-size: .95em;} + +ul.nowrap { + overflow:auto; + whitespace:nowrap; +} + +/* stop sublists from having initial vertical space */ +ul ul { margin-top: 0px; } +ol ul { margin-top: 0px; } +ol ol { margin-top: 0px; } +ul ol { margin-top: 0px; } + +/* make the target distinct; helps when we're navigating to a function */ +a:target + * { + background-color: #FF9; +} + + +/* styles for prettification of source */ +pre .comment { color: #558817; } +pre .constant { color: #a8660d; } +pre .escape { color: #844631; } +pre .keyword { color: #aa5050; font-weight: bold; } +pre .library { color: #0e7c6b; } +pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; } +pre .string { color: #8080ff; } +pre .number { color: #f8660d; } +pre .operator { color: #2239a8; font-weight: bold; } +pre .preprocessor, pre .prepro { color: #a33243; } +pre .global { color: #800080; } +pre .user-keyword { color: #800080; } +pre .prompt { color: #558817; } +pre .url { color: #272fc2; text-decoration: underline; } + diff --git a/doc/ldoc.ltp b/docs_gen/ldoc.ltp similarity index 100% rename from doc/ldoc.ltp rename to docs_gen/ldoc.ltp