Skip to content
Snippets Groups Projects
scintilla.rb 135 KiB
Newer Older
# This file is automatically generated from Scintilla.iface
# DO NOT MODIFY

module Fox
  class FXScintilla
Lars Kanis's avatar
Lars Kanis committed
    # 







    # Basics

    INVALID_POSITION = -1
    # Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages
    # as many EM_ messages can be used although that use is deprecated.
    SCI_START = 2000
    SCI_OPTIONAL_START = 3000
    SCI_LEXER_START = 4000

    # Add text to the document at current position.
    def addText(length, text)
      sendMessage(2001, length, text)
    end

    # Add array of cells to document.
    def addStyledText(length, c)
      sendMessage(2002, length, c)
    end

    # Insert string at a position.
    def insertText(pos, text)
      sendMessage(2003, pos, text)
    end

    # Delete all text in the document.
    def clearAll
      sendMessage(2004, 0, 0)
    end

    # Set all style bytes to 0, remove all folding information.
    def clearDocumentStyle
      sendMessage(2005, 0, 0)
    end

    # Returns the number of bytes in the document.
    def getLength
      sendMessage(2006, 0, 0)
    end

    # Returns the character byte at the position.
    def getCharAt(pos)
      sendMessage(2007, pos, 0)
    end

    # Returns the position of the caret.
    def getCurrentPos
      sendMessage(2008, 0, 0)
    end

    # Returns the position of the opposite end of the selection to the caret.
    def getAnchor
      sendMessage(2009, 0, 0)
    end

    # Returns the style byte at the position.
    def getStyleAt(pos)
      sendMessage(2010, pos, 0)
    end

    # Redoes the next action on the undo history.
    def redo
      sendMessage(2011, 0, 0)
    end

    # Choose between collecting actions into the undo
    # history and discarding them.
    def setUndoCollection(collectUndo)
      sendMessage(2012, collectUndo, 0)
    end

    # Select all the text in the document.
    def selectAll
      sendMessage(2013, 0, 0)
    end

    # Remember the current position in the undo history as the position
    # at which the document was saved.
    def setSavePoint
      sendMessage(2014, 0, 0)
    end

    # Retrieve a buffer of cells.
    # Returns the number of bytes in the buffer not including terminating NULs.
    def getStyledText(tr)
      sendMessage(2015, 0, tr)
    end

    # Are there any redoable actions in the undo history?
    def canRedo
      sendMessage(2016, 0, 0) == 1 ? true : false
    end

    # Retrieve the line number at which a particular marker is located.
    def markerLineFromHandle(handle)
      sendMessage(2017, handle, 0)
    end

    # Delete a marker.
    def markerDeleteHandle(handle)
      sendMessage(2018, handle, 0)
    end

    # Is undo history being collected?
    def getUndoCollection
      sendMessage(2019, 0, 0) == 1 ? true : false
    end

    SCWS_INVISIBLE = 0
    SCWS_VISIBLEALWAYS = 1
    SCWS_VISIBLEAFTERINDENT = 2

    # Are white space characters currently visible?
    # Returns one of SCWS_* constants.
    def getViewWS
      sendMessage(2020, 0, 0)
    end

    # Make white space characters invisible, always visible or visible outside indentation.
    def setViewWS(viewWS)
      sendMessage(2021, viewWS, 0)
    end

    # Find the position from a point within the window.
    def positionFromPoint(x, y)
      sendMessage(2022, x, y)
    end

    # Find the position from a point within the window but return
    # INVALID_POSITION if not close to text.
    def positionFromPointClose(x, y)
      sendMessage(2023, x, y)
    end

    # Set caret to start of a line and ensure it is visible.
    def gotoLine(line)
      sendMessage(2024, line, 0)
    end

    # Set caret to a position and ensure it is visible.
    def gotoPos(pos)
      sendMessage(2025, pos, 0)
    end

    # Set the selection anchor to a position. The anchor is the opposite
    # end of the selection from the caret.
    def setAnchor(posAnchor)
      sendMessage(2026, posAnchor, 0)
    end

    # Retrieve the text of the line containing the caret.
    # Returns the index of the caret on the line.
    def getCurLine(length)
      buffer = "".ljust(length)
      sendMessage(2027, length, buffer)
      buffer
    end

    # Retrieve the position of the last correctly styled character.
    def getEndStyled
      sendMessage(2028, 0, 0)
    end

    SC_EOL_CRLF = 0
    SC_EOL_CR = 1
    SC_EOL_LF = 2

    # Convert all line endings in the document to one mode.
    def convertEOLs(eolMode)
      sendMessage(2029, eolMode, 0)
    end

    # Retrieve the current end of line mode - one of CRLF, CR, or LF.
    def getEOLMode
      sendMessage(2030, 0, 0)
    end

    # Set the current end of line mode.
    def setEOLMode(eolMode)
      sendMessage(2031, eolMode, 0)
    end

    # 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.
    def startStyling(pos, mask)
      sendMessage(2032, pos, mask)
    end

    # Change style from current styling position for length characters to a style
    # and move the current styling position to after this newly styled segment.
    def setStyling(length, style)
      sendMessage(2033, length, style)
    end

    # Is drawing done first into a buffer or direct to the screen?
    def getBufferedDraw
      sendMessage(2034, 0, 0) == 1 ? true : false
    end

    # If drawing is buffered then each line of text is drawn into a bitmap buffer
    # before drawing it to the screen to avoid flicker.
    def setBufferedDraw(buffered)
      sendMessage(2035, buffered, 0)
    end

    # Change the visible size of a tab to be a multiple of the width of a space character.
    def setTabWidth(tabWidth)
      sendMessage(2036, tabWidth, 0)
    end

    # Retrieve the visible size of a tab.
    def getTabWidth
      sendMessage(2121, 0, 0)
    end

    # The SC_CP_UTF8 value can be used to enter Unicode mode.
    # This is the same value as CP_UTF8 in Windows
    SC_CP_UTF8 = 65001

    # 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.
    def setCodePage(codePage)
      sendMessage(2037, codePage, 0)
    end

    # In palette mode, Scintilla uses the environment's palette calls to display
    # more colours. This may lead to ugly displays.
    def setUsePalette(usePalette)
      sendMessage(2039, usePalette, 0)
    end

    MARKER_MAX = 31
    SC_MARK_CIRCLE = 0
    SC_MARK_ROUNDRECT = 1
    SC_MARK_ARROW = 2
    SC_MARK_SMALLRECT = 3
    SC_MARK_SHORTARROW = 4
    SC_MARK_EMPTY = 5
    SC_MARK_ARROWDOWN = 6
    SC_MARK_MINUS = 7
    SC_MARK_PLUS = 8

    # Shapes used for outlining column.
    SC_MARK_VLINE = 9
    SC_MARK_LCORNER = 10
    SC_MARK_TCORNER = 11
    SC_MARK_BOXPLUS = 12
    SC_MARK_BOXPLUSCONNECTED = 13
    SC_MARK_BOXMINUS = 14
    SC_MARK_BOXMINUSCONNECTED = 15
    SC_MARK_LCORNERCURVE = 16
    SC_MARK_TCORNERCURVE = 17
    SC_MARK_CIRCLEPLUS = 18
    SC_MARK_CIRCLEPLUSCONNECTED = 19
    SC_MARK_CIRCLEMINUS = 20
    SC_MARK_CIRCLEMINUSCONNECTED = 21

    # Invisible mark that only sets the line background colour.
    SC_MARK_BACKGROUND = 22
    SC_MARK_DOTDOTDOT = 23
    SC_MARK_ARROWS = 24
    SC_MARK_PIXMAP = 25
    SC_MARK_FULLRECT = 26
    SC_MARK_LEFTRECT = 27
    SC_MARK_AVAILABLE = 28
    SC_MARK_UNDERLINE = 29
    SC_MARK_RGBAIMAGE = 30

    SC_MARK_CHARACTER = 10000

    # Markers used for outlining column.
    SC_MARKNUM_FOLDEREND = 25
    SC_MARKNUM_FOLDEROPENMID = 26
    SC_MARKNUM_FOLDERMIDTAIL = 27
    SC_MARKNUM_FOLDERTAIL = 28
    SC_MARKNUM_FOLDERSUB = 29
    SC_MARKNUM_FOLDER = 30
    SC_MARKNUM_FOLDEROPEN = 31

    SC_MASK_FOLDERS = 0xFE000000

    # Set the symbol used for a particular marker number.
    def markerDefine(markerNumber, markerSymbol)
      sendMessage(2040, markerNumber, markerSymbol)
    end

    # Set the foreground colour used for a particular marker number.
    def markerSetFore(markerNumber, fore)
      sendMessage(2041, markerNumber, fore & 0xffffff)
    end

    # Set the background colour used for a particular marker number.
    def markerSetBack(markerNumber, back)
      sendMessage(2042, markerNumber, back & 0xffffff)
    end

    # Set the background colour used for a particular marker number when its folding block is selected.
    def markerSetBackSelected(markerNumber, back)
      sendMessage(2292, markerNumber, back & 0xffffff)
    end

    # Enable/disable highlight for current folding bloc (smallest one that contains the caret)
    def markerEnableHighlight(enabled)
      sendMessage(2293, enabled, 0)
    end

    # Add a marker to a line, returning an ID which can be used to find or delete the marker.
    def markerAdd(line, markerNumber)
      sendMessage(2043, line, markerNumber)
    end

    # Delete a marker from a line.
    def markerDelete(line, markerNumber)
      sendMessage(2044, line, markerNumber)
    end

    # Delete all markers with a particular number from all lines.
    def markerDeleteAll(markerNumber)
      sendMessage(2045, markerNumber, 0)
    end

    # Get a bit mask of all the markers set on a line.
    def markerGet(line)
      sendMessage(2046, line, 0)
    end

    # Find the next line at or after lineStart that includes a marker in mask.
    # Return -1 when no more lines.
    def markerNext(lineStart, markerMask)
      sendMessage(2047, lineStart, markerMask)
    end

    # Find the previous line before lineStart that includes a marker in mask.
    def markerPrevious(lineStart, markerMask)
      sendMessage(2048, lineStart, markerMask)
    end

    # Define a marker from a pixmap.
    def markerDefinePixmap(markerNumber, pixmap)
      sendMessage(2049, markerNumber, pixmap)
    end

    # Add a set of markers to a line.
    def markerAddSet(line, set)
      sendMessage(2466, line, set)
    end

    # Set the alpha used for a marker that is drawn in the text area, not the margin.
    def markerSetAlpha(markerNumber, alpha)
      sendMessage(2476, markerNumber, alpha)
    end

    SC_MARGIN_SYMBOL = 0
    SC_MARGIN_NUMBER = 1
    SC_MARGIN_BACK = 2
    SC_MARGIN_FORE = 3
    SC_MARGIN_TEXT = 4
    SC_MARGIN_RTEXT = 5

    # Set a margin to be either numeric or symbolic.
    def setMarginTypeN(margin, marginType)
      sendMessage(2240, margin, marginType)
    end

    # Retrieve the type of a margin.
    def getMarginTypeN(margin)
      sendMessage(2241, margin, 0)
    end

    # Set the width of a margin to a width expressed in pixels.
    def setMarginWidthN(margin, pixelWidth)
      sendMessage(2242, margin, pixelWidth)
    end

    # Retrieve the width of a margin in pixels.
    def getMarginWidthN(margin)
      sendMessage(2243, margin, 0)
    end

    # Set a mask that determines which markers are displayed in a margin.
    def setMarginMaskN(margin, mask)
      sendMessage(2244, margin, mask)
    end

    # Retrieve the marker mask of a margin.
    def getMarginMaskN(margin)
      sendMessage(2245, margin, 0)
    end

    # Make a margin sensitive or insensitive to mouse clicks.
    def setMarginSensitiveN(margin, sensitive)
      sendMessage(2246, margin, sensitive)
    end

    # Retrieve the mouse click sensitivity of a margin.
    def getMarginSensitiveN(margin)
      sendMessage(2247, margin, 0) == 1 ? true : false
    end

    # Set the cursor shown when the mouse is inside a margin.
    def setMarginCursorN(margin, cursor)
      sendMessage(2248, margin, cursor)
    end

    # Retrieve the cursor shown in a margin.
    def getMarginCursorN(margin)
      sendMessage(2249, margin, 0)
    end

    # Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles.
    # Style 39 is for future use.
    STYLE_DEFAULT = 32
    STYLE_LINENUMBER = 33
    STYLE_BRACELIGHT = 34
    STYLE_BRACEBAD = 35
    STYLE_CONTROLCHAR = 36
    STYLE_INDENTGUIDE = 37
    STYLE_LASTPREDEFINED = 39

    # Character set identifiers are used in StyleSetCharacterSet.
    # The values are the same as the Windows *_CHARSET values.
    SC_CHARSET_ANSI = 0
    SC_CHARSET_DEFAULT = 1
    SC_CHARSET_BALTIC = 186
    SC_CHARSET_CHINESEBIG5 = 136
    SC_CHARSET_EASTEUROPE = 238
    SC_CHARSET_GB2312 = 134
    SC_CHARSET_GREEK = 161
    SC_CHARSET_HANGUL = 129
    SC_CHARSET_MAC = 77
    SC_CHARSET_OEM = 255
    SC_CHARSET_RUSSIAN = 204
    SC_CHARSET_CYRILLIC = 1251
    SC_CHARSET_SHIFTJIS = 128
    SC_CHARSET_SYMBOL = 2
    SC_CHARSET_TURKISH = 162
    SC_CHARSET_JOHAB = 130
    SC_CHARSET_HEBREW = 177
    SC_CHARSET_ARABIC = 178
    SC_CHARSET_VIETNAMESE = 163
    SC_CHARSET_THAI = 222
    SC_CHARSET_8859_15 = 1000

    # Clear all the styles and make equivalent to the global default style.
    def styleClearAll
      sendMessage(2050, 0, 0)
    end

    # Set the foreground colour of a style.
    def styleSetFore(style, fore)
      sendMessage(2051, style, fore & 0xffffff)
    end

    # Set the background colour of a style.
    def styleSetBack(style, back)
      sendMessage(2052, style, back & 0xffffff)
    end

    # Set a style to be bold or not.
    def styleSetBold(style, bold)
      sendMessage(2053, style, bold)
    end

    # Set a style to be italic or not.
    def styleSetItalic(style, italic)
      sendMessage(2054, style, italic)
    end

    # Set the size of characters of a style.
    def styleSetSize(style, sizePoints)
      sendMessage(2055, style, sizePoints)
    end

    # Set the font of a style.
    def styleSetFont(style, fontName)
      sendMessage(2056, style, fontName)
    end

    # Set a style to have its end of line filled or not.
    def styleSetEOLFilled(style, filled)
      sendMessage(2057, style, filled)
    end

    # Reset the default style to its state at startup
    def styleResetDefault
      sendMessage(2058, 0, 0)
    end

    # Set a style to be underlined or not.
    def styleSetUnderline(style, underline)
      sendMessage(2059, style, underline)
    end

    SC_CASE_MIXED = 0
    SC_CASE_UPPER = 1
    SC_CASE_LOWER = 2

    # Get the foreground colour of a style.
    def styleGetFore(style)
      sendMessage(2481, style, 0)
    end

    # Get the background colour of a style.
    def styleGetBack(style)
      sendMessage(2482, style, 0)
    end

    # Get is a style bold or not.
    def styleGetBold(style)
      sendMessage(2483, style, 0) == 1 ? true : false
    end

    # Get is a style italic or not.
    def styleGetItalic(style)
      sendMessage(2484, style, 0) == 1 ? true : false
    end

    # Get the size of characters of a style.
    def styleGetSize(style)
      sendMessage(2485, style, 0)
    end

    # Get the font of a style.
    # Returns the length of the fontName
    def styleGetFont(style)
      buffer = "".ljust(style)
      sendMessage(2486, style, buffer)
      buffer
    end

    # Get is a style to have its end of line filled or not.
    def styleGetEOLFilled(style)
      sendMessage(2487, style, 0) == 1 ? true : false
    end

    # Get is a style underlined or not.
    def styleGetUnderline(style)
      sendMessage(2488, style, 0) == 1 ? true : false
    end

    # Get is a style mixed case, or to force upper or lower case.
    def styleGetCase(style)
      sendMessage(2489, style, 0)
    end

    # Get the character get of the font in a style.
    def styleGetCharacterSet(style)
      sendMessage(2490, style, 0)
    end

    # Get is a style visible or not.
    def styleGetVisible(style)
      sendMessage(2491, style, 0) == 1 ? true : false
    end

    # Get is a style changeable or not (read only).
    # Experimental feature, currently buggy.
    def styleGetChangeable(style)
      sendMessage(2492, style, 0) == 1 ? true : false
    end

    # Get is a style a hotspot or not.
    def styleGetHotSpot(style)
      sendMessage(2493, style, 0) == 1 ? true : false
    end

    # Set a style to be mixed case, or to force upper or lower case.
    def styleSetCase(style, caseForce)
      sendMessage(2060, style, caseForce)
    end

    # Set the character set of the font in a style.
    def styleSetCharacterSet(style, characterSet)
      sendMessage(2066, style, characterSet)
    end

    # Set a style to be a hotspot or not.
    def styleSetHotSpot(style, hotspot)
      sendMessage(2409, style, hotspot)
    end

    # Set the foreground colour of the main and additional selections and whether to use this setting.
    def setSelFore(useSetting, fore)
      sendMessage(2067, useSetting, fore & 0xffffff)
    end

    # Set the background colour of the main and additional selections and whether to use this setting.
    def setSelBack(useSetting, back)
      sendMessage(2068, useSetting, back & 0xffffff)
    end

    # Get the alpha of the selection.
    def getSelAlpha
      sendMessage(2477, 0, 0)
    end

    # Set the alpha of the selection.
    def setSelAlpha(alpha)
      sendMessage(2478, alpha, 0)
    end

    # Is the selection end of line filled?
    def getSelEOLFilled
      sendMessage(2479, 0, 0) == 1 ? true : false
    end

    # Set the selection to have its end of line filled or not.
    def setSelEOLFilled(filled)
      sendMessage(2480, filled, 0)
    end

    # Set the foreground colour of the caret.
    def setCaretFore(fore)
      sendMessage(2069, fore & 0xffffff, 0)
    end

    # When key+modifier combination km is pressed perform msg.
    def assignCmdKey(km, msg)
      sendMessage(2070, km, msg)
    end

    # When key+modifier combination km is pressed do nothing.
    def clearCmdKey(km)
      sendMessage(2071, km, 0)
    end

    # Drop all key mappings.
    def clearAllCmdKeys
      sendMessage(2072, 0, 0)
    end

    # Set the styles for a segment of the document.
    def setStylingEx(length, styles)
      sendMessage(2073, length, styles)
    end

    # Set a style to be visible or not.
    def styleSetVisible(style, visible)
      sendMessage(2074, style, visible)
    end

    # Get the time in milliseconds that the caret is on and off.
    def getCaretPeriod
      sendMessage(2075, 0, 0)
    end

    # Get the time in milliseconds that the caret is on and off. 0 = steady on.
    def setCaretPeriod(periodMilliseconds)
      sendMessage(2076, periodMilliseconds, 0)
    end

    # Set the set of characters making up words for when moving or selecting by word.
    # First sets defaults like SetCharsDefault.
    def setWordChars(characters)
      sendMessage(2077, 0, characters)
    end

    # Start a sequence of actions that is undone and redone as a unit.
    # May be nested.
    def beginUndoAction
      sendMessage(2078, 0, 0)
    end

    # End a sequence of actions that is undone and redone as a unit.
    def endUndoAction
      sendMessage(2079, 0, 0)
    end

    # Indicator style enumeration and some constants
    INDIC_PLAIN = 0
    INDIC_SQUIGGLE = 1
    INDIC_TT = 2
    INDIC_DIAGONAL = 3
    INDIC_STRIKE = 4
    INDIC_HIDDEN = 5
    INDIC_BOX = 6
    INDIC_STRAIGHTBOX = 8
    INDIC_DASH = 9
    INDIC_DOTS = 10
    INDIC_SQUIGGLELOW = 11
    INDIC_DOTBOX = 12
    INDIC_MAX = 31
    INDIC_CONTAINER = 8
    INDIC0_MASK = 0x20
    INDIC1_MASK = 0x40
    INDIC2_MASK = 0x80
    INDICS_MASK = 0xE0

    # Set an indicator to plain, squiggle or TT.
    def indicSetStyle(indic, style)
      sendMessage(2080, indic, style)
    end

    # Retrieve the style of an indicator.
    def indicGetStyle(indic)
      sendMessage(2081, indic, 0)
    end

    # Set the foreground colour of an indicator.
    def indicSetFore(indic, fore)
      sendMessage(2082, indic, fore & 0xffffff)
    end

    # Retrieve the foreground colour of an indicator.
    def indicGetFore(indic)
      sendMessage(2083, indic, 0)
    end

    # Set an indicator to draw under text or over(default).
    def indicSetUnder(indic, under)
      sendMessage(2510, indic, under)
    end

    # Retrieve whether indicator drawn under or over text.
    def indicGetUnder(indic)
      sendMessage(2511, indic, 0) == 1 ? true : false
    end

    # Set the foreground colour of all whitespace and whether to use this setting.
    def setWhitespaceFore(useSetting, fore)
      sendMessage(2084, useSetting, fore & 0xffffff)
    end

    # Set the background colour of all whitespace and whether to use this setting.
    def setWhitespaceBack(useSetting, back)
      sendMessage(2085, useSetting, back & 0xffffff)
    end

    # Set the size of the dots used to mark space characters.
    def setWhitespaceSize(size)
      sendMessage(2086, size, 0)
    end

    # Get the size of the dots used to mark space characters.
    def getWhitespaceSize
      sendMessage(2087, 0, 0)
    end

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

    # Retrieve number of bits in style bytes used to hold the lexical state.
    def getStyleBits
      sendMessage(2091, 0, 0)
    end

    # Used to hold extra styling information for each line.
    def setLineState(line, state)
      sendMessage(2092, line, state)
    end

    # Retrieve the extra styling information for a line.
    def getLineState(line)
      sendMessage(2093, line, 0)
    end

    # Retrieve the last line number that has line state.
    def getMaxLineState
      sendMessage(2094, 0, 0)
    end

    # Is the background of the line containing the caret in a different colour?
    def getCaretLineVisible
      sendMessage(2095, 0, 0) == 1 ? true : false
    end

    # Display the background of the line containing the caret in a different colour.
    def setCaretLineVisible(show)
      sendMessage(2096, show, 0)
    end

    # Get the colour of the background of the line containing the caret.
    def getCaretLineBack
      sendMessage(2097, 0, 0)
    end

    # Set the colour of the background of the line containing the caret.
    def setCaretLineBack(back)
      sendMessage(2098, back & 0xffffff, 0)
    end

    # Set a style to be changeable or not (read only).
    # Experimental feature, currently buggy.
    def styleSetChangeable(style, changeable)
      sendMessage(2099, style, changeable)
    end

    # Display a auto-completion list.
    # The lenEntered parameter indicates how many characters before
    # the caret should be used to provide context.
    def autoCShow(lenEntered, itemList)
      sendMessage(2100, lenEntered, itemList)
    end

    # Remove the auto-completion list from the screen.
    def autoCCancel
      sendMessage(2101, 0, 0)
    end

    # Is there an auto-completion list visible?
    def autoCActive
      sendMessage(2102, 0, 0) == 1 ? true : false
    end

    # Retrieve the position of the caret when the auto-completion list was displayed.
    def autoCPosStart
      sendMessage(2103, 0, 0)
    end

    # User has selected an item so remove the list and insert the selection.
    def autoCComplete
      sendMessage(2104, 0, 0)
    end

    # Define a set of character that when typed cancel the auto-completion list.
    def autoCStops(characterSet)
      sendMessage(2105, 0, characterSet)
    end

    # Change the separator character in the string setting up an auto-completion list.
    # Default is space but can be changed if items contain space.
    def autoCSetSeparator(separatorCharacter)
      sendMessage(2106, separatorCharacter, 0)
    end

    # Retrieve the auto-completion list separator character.
    def autoCGetSeparator
      sendMessage(2107, 0, 0)
    end

    # Select the item in the auto-completion list that starts with a string.
    def autoCSelect(text)
      sendMessage(2108, 0, text)
    end

    # Should the auto-completion list be cancelled if the user backspaces to a
    # position before where the box was created.
    def autoCSetCancelAtStart(cancel)
      sendMessage(2110, cancel, 0)
    end

    # Retrieve whether auto-completion cancelled by backspacing before start.
    def autoCGetCancelAtStart
      sendMessage(2111, 0, 0) == 1 ? true : false
    end

    # Define a set of characters that when typed will cause the autocompletion to
    # choose the selected item.
    def autoCSetFillUps(characterSet)
      sendMessage(2112, 0, characterSet)
    end

    # Should a single item auto-completion list automatically choose the item.
    def autoCSetChooseSingle(chooseSingle)
      sendMessage(2113, chooseSingle, 0)
    end

    # Retrieve whether a single item auto-completion list automatically choose the item.
    def autoCGetChooseSingle
      sendMessage(2114, 0, 0) == 1 ? true : false
    end

    # Set whether case is significant when performing auto-completion searches.
    def autoCSetIgnoreCase(ignoreCase)
      sendMessage(2115, ignoreCase, 0)
    end

    # Retrieve state of ignore case flag.
    def autoCGetIgnoreCase
      sendMessage(2116, 0, 0) == 1 ? true : false
    end

    # Display a list of strings and send notification when user chooses one.
    def userListShow(listType, itemList)
      sendMessage(2117, listType, itemList)
    end

    # Set whether or not autocompletion is hidden automatically when nothing matches.
    def autoCSetAutoHide(autoHide)
      sendMessage(2118, autoHide, 0)
    end

    # Retrieve whether or not autocompletion is hidden automatically when nothing matches.
    def autoCGetAutoHide
      sendMessage(2119, 0, 0) == 1 ? true : false
    end

    # Set whether or not autocompletion deletes any word characters
    # after the inserted text upon completion.
    def autoCSetDropRestOfWord(dropRestOfWord)
      sendMessage(2270, dropRestOfWord, 0)
    end

    # Retrieve whether or not autocompletion deletes any word characters
    # after the inserted text upon completion.
    def autoCGetDropRestOfWord
      sendMessage(2271, 0, 0) == 1 ? true : false
    end

    # Register an XPM image for use in autocompletion lists.
    def registerImage(type, xpmData)
      sendMessage(2405, type, xpmData)
    end

    # Clear all the registered XPM images.
    def clearRegisteredImages
      sendMessage(2408, 0, 0)
    end

    # Retrieve the auto-completion list type-separator character.
    def autoCGetTypeSeparator
      sendMessage(2285, 0, 0)
    end

    # Change the type-separator character in the string setting up an auto-completion list.
    # Default is '?' but can be changed if items contain '?'.
    def autoCSetTypeSeparator(separatorCharacter)
      sendMessage(2286, separatorCharacter, 0)
    end

    # 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.
    def autoCSetMaxWidth(characterCount)
      sendMessage(2208, characterCount, 0)
    end

    # Get the maximum width, in characters, of auto-completion and user lists.
    def autoCGetMaxWidth
      sendMessage(2209, 0, 0)
    end

    # Set the maximum height, in rows, of auto-completion and user lists.
    # The default is 5 rows.
    def autoCSetMaxHeight(rowCount)
      sendMessage(2210, rowCount, 0)
    end

    # Set the maximum height, in rows, of auto-completion and user lists.
    def autoCGetMaxHeight
      sendMessage(2211, 0, 0)
    end

    # Set the number of spaces used for one level of indentation.
    def setIndent(indentSize)
      sendMessage(2122, indentSize, 0)
    end

    # Retrieve indentation size.
    def getIndent
      sendMessage(2123, 0, 0)
    end

    # Indentation will only use space characters if useTabs is false, otherwise
    # it will use a combination of tabs and spaces.
    def setUseTabs(useTabs)
      sendMessage(2124, useTabs, 0)
    end

    # Retrieve whether tabs will be used in indentation.
    def getUseTabs
      sendMessage(2125, 0, 0) == 1 ? true : false
    end

    # Change the indentation of a line to a number of columns.
    def setLineIndentation(line, indentSize)
      sendMessage(2126, line, indentSize)
    end

    # Retrieve the number of columns that a line is indented.
    def getLineIndentation(line)
      sendMessage(2127, line, 0)
    end

    # Retrieve the position before the first non indentation character on a line.
    def getLineIndentPosition(line)
      sendMessage(2128, line, 0)
    end

    # Retrieve the column number of a position, taking tab width into account.
    def getColumn(pos)
      sendMessage(2129, pos, 0)