Skip to content
Snippets Groups Projects
scintilla.rb 135 KiB
Newer Older
  • Learn to ignore specific revisions
  •       sendMessage(2339, 0, 0)
        end
    
        # Duplicate the current line.
        def lineDuplicate
          sendMessage(2404, 0, 0)
        end
    
        # Transform the selection to lower case.
        def lowerCase
          sendMessage(2340, 0, 0)
        end
    
        # Transform the selection to upper case.
        def upperCase
          sendMessage(2341, 0, 0)
        end
    
        # Scroll the document down, keeping the caret visible.
        def lineScrollDown
          sendMessage(2342, 0, 0)
        end
    
        # Scroll the document up, keeping the caret visible.
        def lineScrollUp
          sendMessage(2343, 0, 0)
        end
    
        # Delete the selection or if no selection, the character before the caret.
        # Will not delete the character before at the start of a line.
        def deleteBackNotLine
          sendMessage(2344, 0, 0)
        end
    
        # Move caret to first position on display line.
        def homeDisplay
          sendMessage(2345, 0, 0)
        end
    
        # Move caret to first position on display line extending selection to
        # new caret position.
        def homeDisplayExtend
          sendMessage(2346, 0, 0)
        end
    
        # Move caret to last position on display line.
        def lineEndDisplay
          sendMessage(2347, 0, 0)
        end
    
        # Move caret to last position on display line extending selection to new
        # caret position.
        def lineEndDisplayExtend
          sendMessage(2348, 0, 0)
        end
    
        # These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
        # except they behave differently when word-wrap is enabled:
        # They go first to the start / end of the display line, like (Home|LineEnd)Display
        # The difference is that, the cursor is already at the point, it goes on to the start
        # or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
    
        def homeWrap
          sendMessage(2349, 0, 0)
        end
        def homeWrapExtend
          sendMessage(2450, 0, 0)
        end
        def lineEndWrap
          sendMessage(2451, 0, 0)
        end
        def lineEndWrapExtend
          sendMessage(2452, 0, 0)
        end
        def vCHomeWrap
          sendMessage(2453, 0, 0)
        end
        def vCHomeWrapExtend
          sendMessage(2454, 0, 0)
        end
    
        # Copy the line containing the caret.
        def lineCopy
          sendMessage(2455, 0, 0)
        end
    
        # Move the caret inside current view if it's not there already.
        def moveCaretInsideView
          sendMessage(2401, 0, 0)
        end
    
    
        # How many characters are on a line, including end of line characters?
    
        def lineLength(line)
          sendMessage(2350, line, 0)
        end
    
        # Highlight the characters at two positions.
        def braceHighlight(pos1, pos2)
          sendMessage(2351, pos1, pos2)
        end
    
    
        # Use specified indicator to highlight matching braces instead of changing their style.
        def braceHighlightIndicator(useBraceHighlightIndicator, indicator)
          sendMessage(2498, useBraceHighlightIndicator, indicator)
        end
    
    
        # Highlight the character at a position indicating there is no matching brace.
        def braceBadLight(pos)
          sendMessage(2352, pos, 0)
        end
    
    
        # Use specified indicator to highlight non matching brace instead of changing its style.
        def braceBadLightIndicator(useBraceBadLightIndicator, indicator)
          sendMessage(2499, useBraceBadLightIndicator, indicator)
        end
    
    
        # Find the position of a matching brace or INVALID_POSITION if no match.
        def braceMatch(pos)
          sendMessage(2353, pos, 0)
        end
    
        # Are the end of line characters visible?
        def getViewEOL
          sendMessage(2355, 0, 0) == 1 ? true : false
        end
    
        # Make the end of line characters visible or invisible.
        def setViewEOL(visible)
          sendMessage(2356, visible, 0)
        end
    
        # Retrieve a pointer to the document object.
        def getDocPointer
          sendMessage(2357, 0, 0)
        end
    
        # Change the document object used.
        def setDocPointer(pointer)
          sendMessage(2358, 0, pointer)
        end
    
        # Set which document modification events are sent to the container.
        def setModEventMask(mask)
          sendMessage(2359, mask, 0)
        end
    
        EDGE_NONE = 0
        EDGE_LINE = 1
        EDGE_BACKGROUND = 2
    
        # Retrieve the column number which text should be kept within.
        def getEdgeColumn
          sendMessage(2360, 0, 0)
        end
    
        # Set the column number of the edge.
        # If text goes past the edge then it is highlighted.
        def setEdgeColumn(column)
          sendMessage(2361, column, 0)
        end
    
        # Retrieve the edge highlight mode.
        def getEdgeMode
          sendMessage(2362, 0, 0)
        end
    
        # 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).
        def setEdgeMode(mode)
          sendMessage(2363, mode, 0)
        end
    
        # Retrieve the colour used in edge indication.
        def getEdgeColour
          sendMessage(2364, 0, 0)
        end
    
        # Change the colour used in edge indication.
        def setEdgeColour(edgeColour)
          sendMessage(2365, edgeColour & 0xffffff, 0)
        end
    
        # Sets the current caret position to be the search anchor.
        def searchAnchor
          sendMessage(2366, 0, 0)
        end
    
        # Find some text starting at the search anchor.
        # Does not ensure the selection is visible.
        def searchNext(flags, text)
          sendMessage(2367, flags, text)
        end
    
        # Find some text starting at the search anchor and moving backwards.
        # Does not ensure the selection is visible.
        def searchPrev(flags, text)
          sendMessage(2368, flags, text)
        end
    
        # Retrieves the number of lines completely visible.
        def linesOnScreen
          sendMessage(2370, 0, 0)
        end
    
        # Set whether a pop up menu is displayed automatically when the user presses
        # the wrong mouse button.
        def usePopUp(allowPopUp)
          sendMessage(2371, allowPopUp, 0)
        end
    
        # Is the selection rectangular? The alternative is the more common stream selection.
        def selectionIsRectangle
          sendMessage(2372, 0, 0) == 1 ? true : false
        end
    
        # 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.
        def setZoom(zoom)
          sendMessage(2373, zoom, 0)
        end
        # Retrieve the zoom level.
        def getZoom
          sendMessage(2374, 0, 0)
        end
    
        # Create a new document object.
        # Starts with reference count of 1 and not selected into editor.
        def createDocument
          sendMessage(2375, 0, 0)
        end
        # Extend life of document.
        def addRefDocument(doc)
          sendMessage(2376, 0, doc)
        end
        # Release a reference to the document, deleting document if it fades to black.
        def releaseDocument(doc)
          sendMessage(2377, 0, doc)
        end
    
        # Get which document modification events are sent to the container.
        def getModEventMask
          sendMessage(2378, 0, 0)
        end
    
        # Change internal focus flag.
        def setFocusFlag(focus)
          sendMessage(2380, focus, 0)
        end
        # Get internal focus flag.
        def getFocus
          sendMessage(2381, 0, 0) == 1 ? true : false
        end
    
    
        SC_STATUS_OK = 0
        SC_STATUS_FAILURE = 1
        SC_STATUS_BADALLOC = 2
    
    
        # Change error status - 0 = OK.
        def setStatus(statusCode)
          sendMessage(2382, statusCode, 0)
        end
        # Get error status.
        def getStatus
          sendMessage(2383, 0, 0)
        end
    
        # Set whether the mouse is captured when its button is pressed.
        def setMouseDownCaptures(captures)
          sendMessage(2384, captures, 0)
        end
        # Get whether mouse gets captured.
        def getMouseDownCaptures
          sendMessage(2385, 0, 0) == 1 ? true : false
        end
    
        SC_CURSORNORMAL = -1
    
        SC_CURSORWAIT = 4
    
        # Sets the cursor to one of the SC_CURSOR* values.
        def setCursor(cursorType)
          sendMessage(2386, cursorType, 0)
        end
        # Get cursor type.
        def getCursor
          sendMessage(2387, 0, 0)
        end
    
        # Change the way control characters are displayed:
        # If symbol is < 32, keep the drawn way, else, use the given character.
        def setControlCharSymbol(symbol)
          sendMessage(2388, symbol, 0)
        end
        # Get the way control characters are displayed.
        def getControlCharSymbol
          sendMessage(2389, 0, 0)
        end
    
        # Move to the previous change in capitalisation.
        def wordPartLeft
          sendMessage(2390, 0, 0)
        end
        # Move to the previous change in capitalisation extending selection
        # to new caret position.
        def wordPartLeftExtend
          sendMessage(2391, 0, 0)
        end
        # Move to the change next in capitalisation.
        def wordPartRight
          sendMessage(2392, 0, 0)
        end
        # Move to the next change in capitalisation extending selection
        # to new caret position.
        def wordPartRightExtend
          sendMessage(2393, 0, 0)
        end
    
        # Constants for use with SetVisiblePolicy, similar to SetCaretPolicy.
        VISIBLE_SLOP = 0x01
        VISIBLE_STRICT = 0x04
        # Set the way the display area is determined when a particular line
        # is to be moved to by Find, FindNext, GotoLine, etc.
        def setVisiblePolicy(visiblePolicy, visibleSlop)
          sendMessage(2394, visiblePolicy, visibleSlop)
        end
    
        # Delete back from the current position to the start of the line.
        def delLineLeft
          sendMessage(2395, 0, 0)
        end
    
        # Delete forwards from the current position to the end of the line.
        def delLineRight
          sendMessage(2396, 0, 0)
        end
    
        # Get and Set the xOffset (ie, horizonal scroll position).
        def setXOffset(newOffset)
          sendMessage(2397, newOffset, 0)
        end
        def getXOffset
          sendMessage(2398, 0, 0)
        end
    
        # Set the last x chosen value to be the caret x position.
        def chooseCaretX
          sendMessage(2399, 0, 0)
        end
    
        # Set the focus to this Scintilla widget.
        def grabFocus
          sendMessage(2400, 0, 0)
        end
    
        # Caret policy, used by SetXCaretPolicy and SetYCaretPolicy.
        # If CARET_SLOP is set, we can define a slop value: caretSlop.
        # This value defines an unwanted zone (UZ) where the caret is... unwanted.
        # This zone is defined as a number of pixels near the vertical margins,
        # and as a number of lines near the horizontal margins.
        # By keeping the caret away from the edges, it is seen within its context,
        # so it is likely that the identifier that the caret is on can be completely seen,
        # and that the current line is seen with some of the lines following it which are
        # often dependent on that line.
        CARET_SLOP = 0x01
        # If CARET_STRICT is set, the policy is enforced... strictly.
        # The caret is centred on the display if slop is not set,
        # and cannot go in the UZ if slop is set.
        CARET_STRICT = 0x04
        # If CARET_JUMPS is set, the display is moved more energetically
        # so the caret can move in the same direction longer before the policy is applied again.
        CARET_JUMPS = 0x10
        # If CARET_EVEN is not set, instead of having symmetrical UZs,
        # the left and bottom UZs are extended up to right and top UZs respectively.
        # This way, we favour the displaying of useful information: the begining of lines,
        # where most code reside, and the lines after the caret, eg. the body of a function.
        CARET_EVEN = 0x08
    
        # Set the way the caret is kept visible when going sideway.
        # The exclusion zone is given in pixels.
        def setXCaretPolicy(caretPolicy, caretSlop)
          sendMessage(2402, caretPolicy, caretSlop)
        end
    
        # Set the way the line the caret is on is kept visible.
        # The exclusion zone is given in lines.
        def setYCaretPolicy(caretPolicy, caretSlop)
          sendMessage(2403, caretPolicy, caretSlop)
        end
    
        # Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
        def setPrintWrapMode(mode)
          sendMessage(2406, mode, 0)
        end
    
        # Is printing line wrapped?
        def getPrintWrapMode
          sendMessage(2407, 0, 0)
        end
    
        # Set a fore colour for active hotspots.
        def setHotspotActiveFore(useSetting, fore)
          sendMessage(2410, useSetting, fore & 0xffffff)
        end
    
    
        # Get the fore colour for active hotspots.
        def getHotspotActiveFore
          sendMessage(2494, 0, 0)
        end
    
    
        # Set a back colour for active hotspots.
        def setHotspotActiveBack(useSetting, back)
          sendMessage(2411, useSetting, back & 0xffffff)
        end
    
    
        # Get the back colour for active hotspots.
        def getHotspotActiveBack
          sendMessage(2495, 0, 0)
        end
    
    
        # Enable / Disable underlining active hotspots.
        def setHotspotActiveUnderline(underline)
          sendMessage(2412, underline, 0)
        end
    
    
        # Get whether underlining for active hotspots.
        def getHotspotActiveUnderline
          sendMessage(2496, 0, 0) == 1 ? true : false
        end
    
    
        # Limit hotspots to single line so hotspots on two lines don't merge.
        def setHotspotSingleLine(singleLine)
          sendMessage(2421, singleLine, 0)
        end
    
    
        # Get the HotspotSingleLine property
        def getHotspotSingleLine
          sendMessage(2497, 0, 0) == 1 ? true : false
        end
    
    
        # Move caret between paragraphs (delimited by empty lines).
        def paraDown
          sendMessage(2413, 0, 0)
        end
        def paraDownExtend
          sendMessage(2414, 0, 0)
        end
        def paraUp
          sendMessage(2415, 0, 0)
        end
        def paraUpExtend
          sendMessage(2416, 0, 0)
        end
    
        # Given a valid document position, return the previous position taking code
        # page into account. Returns 0 if passed 0.
        def positionBefore(pos)
          sendMessage(2417, pos, 0)
        end
    
        # Given a valid document position, return the next position taking code
        # page into account. Maximum value returned is the last position in the document.
        def positionAfter(pos)
          sendMessage(2418, pos, 0)
        end
    
        # Copy a range of text to the clipboard. Positions are clipped into the document.
        def copyRange(start, last)
          sendMessage(2419, start, last)
        end
    
        # Copy argument text to the clipboard.
        def copyText(length, text)
          sendMessage(2420, length, text)
        end
    
        SC_SEL_STREAM = 0
        SC_SEL_RECTANGLE = 1
        SC_SEL_LINES = 2
    
        # Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or
    
        # by lines (SC_SEL_LINES).
        def setSelectionMode(mode)
          sendMessage(2422, mode, 0)
        end
    
        # Get the mode of the current selection.
        def getSelectionMode
          sendMessage(2423, 0, 0)
        end
    
        # Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
        def getLineSelStartPosition(line)
          sendMessage(2424, line, 0)
        end
    
        # Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).
        def getLineSelEndPosition(line)
          sendMessage(2425, line, 0)
        end
    
        # Move caret down one line, extending rectangular selection to new caret position.
        def lineDownRectExtend
          sendMessage(2426, 0, 0)
        end
    
        # Move caret up one line, extending rectangular selection to new caret position.
        def lineUpRectExtend
          sendMessage(2427, 0, 0)
        end
    
        # Move caret left one character, extending rectangular selection to new caret position.
        def charLeftRectExtend
          sendMessage(2428, 0, 0)
        end
    
        # Move caret right one character, extending rectangular selection to new caret position.
        def charRightRectExtend
          sendMessage(2429, 0, 0)
        end
    
        # Move caret to first position on line, extending rectangular selection to new caret position.
        def homeRectExtend
          sendMessage(2430, 0, 0)
        end
    
        # 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.
        def vCHomeRectExtend
          sendMessage(2431, 0, 0)
        end
    
        # Move caret to last position on line, extending rectangular selection to new caret position.
        def lineEndRectExtend
          sendMessage(2432, 0, 0)
        end
    
        # Move caret one page up, extending rectangular selection to new caret position.
        def pageUpRectExtend
          sendMessage(2433, 0, 0)
        end
    
        # Move caret one page down, extending rectangular selection to new caret position.
        def pageDownRectExtend
          sendMessage(2434, 0, 0)
        end
    
    
        # Move caret to top of page, or one page up if already at top of page.
        def stutteredPageUp
          sendMessage(2435, 0, 0)
        end
    
        # Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.
        def stutteredPageUpExtend
          sendMessage(2436, 0, 0)
        end
    
        # Move caret to bottom of page, or one page down if already at bottom of page.
        def stutteredPageDown
          sendMessage(2437, 0, 0)
        end
    
        # Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.
        def stutteredPageDownExtend
          sendMessage(2438, 0, 0)
        end
    
    
        # Move caret left one word, position cursor at end of word.
        def wordLeftEnd
          sendMessage(2439, 0, 0)
        end
    
        # Move caret left one word, position cursor at end of word, extending selection to new caret position.
        def wordLeftEndExtend
          sendMessage(2440, 0, 0)
        end
    
        # Move caret right one word, position cursor at end of word.
        def wordRightEnd
          sendMessage(2441, 0, 0)
        end
    
        # Move caret right one word, position cursor at end of word, extending selection to new caret position.
        def wordRightEndExtend
          sendMessage(2442, 0, 0)
        end
    
        # Set the set of characters making up whitespace for when moving or selecting by word.
        # Should be called after SetWordChars.
        def setWhitespaceChars(characters)
          sendMessage(2443, 0, characters)
        end
    
        # Reset the set of characters for whitespace and word characters to the defaults.
        def setCharsDefault
          sendMessage(2444, 0, 0)
        end
    
        # Get currently selected item position in the auto-completion list
        def autoCGetCurrent
          sendMessage(2445, 0, 0)
        end
    
    
        # Get currently selected item text in the auto-completion list
        # Returns the length of the item text
        def autoCGetCurrentText
          sendMessage(2610, 0, s)
        end
    
    
        # Enlarge the document to a particular size of text bytes.
        def allocate(bytes)
          sendMessage(2446, bytes, 0)
        end
    
        # Returns the target converted to UTF8.
        # Return the length in bytes.
        def targetAsUTF8
          sendMessage(2447, 0, s)
        end
    
        # Set the length of the utf8 argument for calling EncodedFromUTF8.
        # Set to -1 and the string will be measured to the first nul.
        def setLengthForEncode(bytes)
          sendMessage(2448, bytes, 0)
        end
    
        # Translates a UTF8 string into the document encoding.
        # Return the length of the result in bytes.
        # On error return 0.
        def encodedFromUTF8(utf8)
          buffer = "".ljust(utf8)
          sendMessage(2449, utf8, buffer)
          buffer
        end
    
        # 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.
        def findColumn(line, column)
          sendMessage(2456, line, column)
        end
    
        # Can the caret preferred x position only be changed by explicit movement commands?
        def getCaretSticky
    
        end
    
        # Stop the caret preferred x position changing when the user types.
        def setCaretSticky(useCaretStickyBehaviour)
          sendMessage(2458, useCaretStickyBehaviour, 0)
        end
    
    
        SC_CARETSTICKY_OFF = 0
        SC_CARETSTICKY_ON = 1
        SC_CARETSTICKY_WHITESPACE = 2
    
    
        # Switch between sticky and non-sticky: meant to be bound to a key.
        def toggleCaretSticky
          sendMessage(2459, 0, 0)
        end
    
        # Enable/Disable convert-on-paste for line endings
        def setPasteConvertEndings(convert)
          sendMessage(2467, convert, 0)
        end
    
        # Get convert-on-paste setting
        def getPasteConvertEndings
          sendMessage(2468, 0, 0) == 1 ? true : false
        end
    
        # Duplicate the selection. If selection empty duplicate the line containing the caret.
        def selectionDuplicate
          sendMessage(2469, 0, 0)
        end
    
    
        SC_ALPHA_TRANSPARENT = 0
        SC_ALPHA_OPAQUE = 255
        SC_ALPHA_NOALPHA = 256
    
        # Set background alpha of the caret line.
        def setCaretLineBackAlpha(alpha)
          sendMessage(2470, alpha, 0)
        end
    
        # Get the background alpha of the caret line.
        def getCaretLineBackAlpha
          sendMessage(2471, 0, 0)
        end
    
    
    2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000
        CARETSTYLE_INVISIBLE = 0
        CARETSTYLE_LINE = 1
        CARETSTYLE_BLOCK = 2
    
        # Set the style of the caret to be drawn.
        def setCaretStyle(caretStyle)
          sendMessage(2512, caretStyle, 0)
        end
    
        # Returns the current style of the caret.
        def getCaretStyle
          sendMessage(2513, 0, 0)
        end
    
        # Set the indicator used for IndicatorFillRange and IndicatorClearRange
        def setIndicatorCurrent(indicator)
          sendMessage(2500, indicator, 0)
        end
    
        # Get the current indicator
        def getIndicatorCurrent
          sendMessage(2501, 0, 0)
        end
    
        # Set the value used for IndicatorFillRange
        def setIndicatorValue(value)
          sendMessage(2502, value, 0)
        end
    
        # Get the current indicator vaue
        def getIndicatorValue
          sendMessage(2503, 0, 0)
        end
    
        # Turn a indicator on over a range.
        def indicatorFillRange(position, fillLength)
          sendMessage(2504, position, fillLength)
        end
    
        # Turn a indicator off over a range.
        def indicatorClearRange(position, clearLength)
          sendMessage(2505, position, clearLength)
        end
    
        # Are any indicators present at position?
        def indicatorAllOnFor(position)
          sendMessage(2506, position, 0)
        end
    
        # What value does a particular indicator have at at a position?
        def indicatorValueAt(indicator, position)
          sendMessage(2507, indicator, position)
        end
    
        # Where does a particular indicator start?
        def indicatorStart(indicator, position)
          sendMessage(2508, indicator, position)
        end
    
        # Where does a particular indicator end?
        def indicatorEnd(indicator, position)
          sendMessage(2509, indicator, position)
        end
    
        # Set number of entries in position cache
        def setPositionCache(size)
          sendMessage(2514, size, 0)
        end
    
        # How many entries are allocated to the position cache?
        def getPositionCache
          sendMessage(2515, 0, 0)
        end
    
        # Copy the selection, if selection empty copy the line with the caret
        def copyAllowLine
          sendMessage(2519, 0, 0)
        end
    
        # Compact the document buffer and return a read-only pointer to the
        # characters in the document.
        def getCharacterPointer
          sendMessage(2520, 0, 0)
        end
    
        # Always interpret keyboard input as Unicode
        def setKeysUnicode(keysUnicode)
          sendMessage(2521, keysUnicode, 0)
        end
    
        # Are keys always interpreted as Unicode?
        def getKeysUnicode
          sendMessage(2522, 0, 0) == 1 ? true : false
        end
    
        # Set the alpha fill colour of the given indicator.
        def indicSetAlpha(indicator, alpha)
          sendMessage(2523, indicator, alpha)
        end
    
        # Get the alpha fill colour of the given indicator.
        def indicGetAlpha(indicator)
          sendMessage(2524, indicator, 0)
        end
    
        # Set the alpha outline colour of the given indicator.
        def indicSetOutlineAlpha(indicator, alpha)
          sendMessage(2558, indicator, alpha)
        end
    
        # Get the alpha outline colour of the given indicator.
        def indicGetOutlineAlpha(indicator)
          sendMessage(2559, indicator, 0)
        end
    
        # Set extra ascent for each line
        def setExtraAscent(extraAscent)
          sendMessage(2525, extraAscent, 0)
        end
    
        # Get extra ascent for each line
        def getExtraAscent
          sendMessage(2526, 0, 0)
        end
    
        # Set extra descent for each line
        def setExtraDescent(extraDescent)
          sendMessage(2527, extraDescent, 0)
        end
    
        # Get extra descent for each line
        def getExtraDescent
          sendMessage(2528, 0, 0)
        end
    
        # Which symbol was defined for markerNumber with MarkerDefine
        def markerSymbolDefined(markerNumber)
          sendMessage(2529, markerNumber, 0)
        end
    
        # Set the text in the text margin for a line
        def marginSetText(line, text)
          sendMessage(2530, line, text)
        end
    
        # Get the text in the text margin for a line
        def marginGetText(line)
          buffer = "".ljust(line)
          sendMessage(2531, line, buffer)
          buffer
        end
    
        # Set the style number for the text margin for a line
        def marginSetStyle(line, style)
          sendMessage(2532, line, style)
        end
    
        # Get the style number for the text margin for a line
        def marginGetStyle(line)
          sendMessage(2533, line, 0)
        end
    
        # Set the style in the text margin for a line
        def marginSetStyles(line, styles)
          sendMessage(2534, line, styles)
        end
    
        # Get the styles in the text margin for a line
        def marginGetStyles(line)
          buffer = "".ljust(line)
          sendMessage(2535, line, buffer)
          buffer
        end
    
        # Clear the margin text on all lines
        def marginTextClearAll
          sendMessage(2536, 0, 0)
        end
    
        # Get the start of the range of style numbers used for margin text
        def marginSetStyleOffset(style)
          sendMessage(2537, style, 0)
        end
    
        # Get the start of the range of style numbers used for margin text
        def marginGetStyleOffset
          sendMessage(2538, 0, 0)
        end
    
        SC_MARGINOPTION_NONE = 0
        SC_MARGINOPTION_SUBLINESELECT = 1
    
        # Set the margin options.
        def setMarginOptions(marginOptions)
          sendMessage(2539, marginOptions, 0)
        end
    
        # Get the margin options.
        def getMarginOptions
          sendMessage(2557, 0, 0)
        end
    
        # Set the annotation text for a line
        def annotationSetText(line, text)
          sendMessage(2540, line, text)
        end
    
        # Get the annotation text for a line
        def annotationGetText(line)
          buffer = "".ljust(line)
          sendMessage(2541, line, buffer)
          buffer
        end
    
        # Set the style number for the annotations for a line
        def annotationSetStyle(line, style)
          sendMessage(2542, line, style)
        end
    
        # Get the style number for the annotations for a line
        def annotationGetStyle(line)
          sendMessage(2543, line, 0)
        end
    
        # Set the annotation styles for a line
        def annotationSetStyles(line, styles)
          sendMessage(2544, line, styles)
        end
    
        # Get the annotation styles for a line
        def annotationGetStyles(line)
          buffer = "".ljust(line)
          sendMessage(2545, line, buffer)
          buffer
        end
    
        # Get the number of annotation lines for a line
        def annotationGetLines(line)
          sendMessage(2546, line, 0)
        end
    
        # Clear the annotations from all lines
        def annotationClearAll
          sendMessage(2547, 0, 0)
        end
    
        ANNOTATION_HIDDEN = 0
        ANNOTATION_STANDARD = 1
        ANNOTATION_BOXED = 2
    
        # Set the visibility for the annotations for a view
        def annotationSetVisible(visible)
          sendMessage(2548, visible, 0)
        end
    
        # Get the visibility for the annotations for a view
        def annotationGetVisible
          sendMessage(2549, 0, 0)
        end
    
        # Get the start of the range of style numbers used for annotations
        def annotationSetStyleOffset(style)
          sendMessage(2550, style, 0)
        end
    
        # Get the start of the range of style numbers used for annotations
        def annotationGetStyleOffset
          sendMessage(2551, 0, 0)
        end
    
        UNDO_MAY_COALESCE = 1
    
        # Add a container action to the undo stack
        def addUndoAction(token, flags)
          sendMessage(2560, token, flags)
        end
    
        # Find the position of a character from a point within the window.
        def charPositionFromPoint(x, y)
          sendMessage(2561, x, y)
        end
    
        # Find the position of a character from a point within the window.
        # Return INVALID_POSITION if not close to text.
        def charPositionFromPointClose(x, y)
          sendMessage(2562, x, y)
        end
    
        # Set whether multiple selections can be made
        def setMultipleSelection(multipleSelection)
          sendMessage(2563, multipleSelection, 0)
        end
    
        # Whether multiple selections can be made
        def getMultipleSelection
          sendMessage(2564, 0, 0) == 1 ? true : false
        end
    
        # Set whether typing can be performed into multiple selections
        def setAdditionalSelectionTyping(additionalSelectionTyping)
          sendMessage(2565, additionalSelectionTyping, 0)
        end
    
        # Whether typing can be performed into multiple selections
        def getAdditionalSelectionTyping
          sendMessage(2566, 0, 0) == 1 ? true : false
        end