The class that is responsible for drawing everything you see on the screen!

Constructors

Constructs a new VirtualRenderer within the container specified, applying the given theme. ...

Constructs a new VirtualRenderer within the container specified, applying the given theme.

   

Arguments

containerDOMElementRequired. The root element of the editor
themeStringRequired. The starting theme

Methods

    • VirtualRenderer.addGutterDecoration(Number row, String className)
      • Void

Adds className to the row, to be used for CSS stylings and whatnot. ...

Adds className to the row, to be used for CSS stylings and whatnot.

   

Arguments

rowNumberRequired. The row number
classNameStringRequired. The class to add
    • VirtualRenderer.adjustWrapLimit()
      • Void

Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen. ...

Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.

   

    • VirtualRenderer.destroy()

Destroys the text and cursor layers for this renderer. ...

Destroys the text and cursor layers for this renderer.

   

    • VirtualRenderer.getAnimatedScroll()

Returns whether an animated scroll happens or not. ...

Returns whether an animated scroll happens or not.

   

    • VirtualRenderer.getContainerElement()

Returns the root element containing this renderer. ...

Returns the root element containing this renderer.

   

    • VirtualRenderer.getFirstFullyVisibleRow()

Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncate...

Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.

   

    • VirtualRenderer.getFirstVisibleRow()

Returns the index of the first visible row.

Returns the index of the first visible row.

   

    • VirtualRenderer.getHScrollBarAlwaysVisible()

Returns whether the horizontal scrollbar is set to be always visible. ...

Returns whether the horizontal scrollbar is set to be always visible.

   

    • VirtualRenderer.getLastFullyVisibleRow()

Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated...

Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.

   

    • VirtualRenderer.getLastVisibleRow()

Returns the index of the last visible row.

Returns the index of the last visible row.

   

    • VirtualRenderer.getMouseEventTarget()

Returns the element that the mouse events are attached to ...

Returns the element that the mouse events are attached to

   

    • VirtualRenderer.getPrintMarginColumn()

Returns whether the print margin column is being shown or not. ...

Returns whether the print margin column is being shown or not.

   

    • VirtualRenderer.getScrollBottomRow()

Returns the last visible row, regardless of whether it's fully visible or not. ...

Returns the last visible row, regardless of whether it's fully visible or not.

   

Returns the value of the distance between the left of the editor and the leftmost part of the visible content. ...

Returns the value of the distance between the left of the editor and the leftmost part of the visible content.

   

Returns the value of the distance between the top of the editor and the topmost part of the visible content. ...

Returns the value of the distance between the top of the editor and the topmost part of the visible content.

   

    • VirtualRenderer.getScrollTopRow()

Returns the first visible row, regardless of whether it's fully visible or not. ...

Returns the first visible row, regardless of whether it's fully visible or not.

   

    • VirtualRenderer.getShowGutter()

Returns true if the gutter is being shown. ...

Returns true if the gutter is being shown.

   

    • VirtualRenderer.getShowInvisibles()

Returns whether invisible characters are being shown or not. ...

Returns whether invisible characters are being shown or not.

   

    • VirtualRenderer.getShowPrintMargin()

Returns whetherthe print margin is being shown or not. ...

Returns whetherthe print margin is being shown or not.

   

    • VirtualRenderer.getTextAreaContainer()

Returns the element to which the hidden text area is added. ...

Returns the element to which the hidden text area is added.

   

    • VirtualRenderer.getTheme()

Returns the path of the current theme.

Returns the path of the current theme.

   

    • VirtualRenderer.hideComposition()
      • Void

Hides the current composition. ...

Hides the current composition.

   

    • VirtualRenderer.hideCursor()
      • Void

Hides the cursor icon. ...

Hides the cursor icon.

   

Returns true if you can still scroll by either parameter; in other words, you haven't reached the end of the file ...

Returns true if you can still scroll by either parameter; in other words, you haven't reached the end of the file or line.

   

Arguments

deltaXNumberRequired. The x value to scroll by
deltaYNumberRequired. The y value to scroll by
    • VirtualRenderer.moveTextAreaToCursor(DOMElement textarea)
      • Void

Changes the position of textarea to where the cursor is pointing. ...

Changes the position of textarea to where the cursor is pointing.

   

Arguments

textareaDOMElementRequired. A text area to work with
    • VirtualRenderer.onResize(Boolean force)
      • Void

Triggers a resize of the editor.

Triggers a resize of the editor.

   

Arguments

forceBooleanRequired. If true, recomputes the size, even if the height and width haven't changed
    • VirtualRenderer.removeGutterDecoration(Number row, String className)
      • Void

Removes className from the row. ...

Removes className from the row.

   

Arguments

rowNumberRequired. The row number
classNameStringRequired. The class to add
    • VirtualRenderer.scrollBy(Number deltaX, Number deltaY)
      • Void

Scrolls the editor across both x- and y-axes. ...

Scrolls the editor across both x- and y-axes.

   

Arguments

deltaXNumberRequired. The x value to scroll by
deltaYNumberRequired. The y value to scroll by
    • VirtualRenderer.scrollCursorIntoView()
      • Void

Scrolls the cursor into the first visibile area of the editor ...

Scrolls the cursor into the first visibile area of the editor

   

Gracefully scrolls the editor to the row indicated. ...

Gracefully scrolls the editor to the row indicated.

   

Arguments

lineNumberRequired. A line number
centerBooleanRequired. If true, centers the editor the to indicated line

Gracefully scrolls the top of the editor to the row indicated. ...

Gracefully scrolls the top of the editor to the row indicated.

   

Arguments

rowNumberRequired. A row id

Scrolls the editor to the x pixel indicated. ...

Scrolls the editor to the x pixel indicated.

   

Arguments

scrollLeftNumberRequired. The position to scroll to

Scrolls the editor to the y pixel indicated. ...

Scrolls the editor to the y pixel indicated.

   

Arguments

scrollTopNumberRequired. The position to scroll to
    • VirtualRenderer.setAnimatedScroll(Boolean shouldAnimate)
      • Void

Identifies whether you want to have an animated scroll or not. ...

Identifies whether you want to have an animated scroll or not.

   

Arguments

shouldAnimateBooleanRequired. Set to true to show animated scrolls
    • VirtualRenderer.setAnnotations(Array annotations)
      • Void

Sets annotations for the gutter. ...

Sets annotations for the gutter.

   

Arguments

annotationsArrayRequired. An array containing annotations
    • VirtualRenderer.setBreakpoints(Array rows)
      • Void

Sets a breakpoint for every row number indicated on rows. ...

Sets a breakpoint for every row number indicated on rows.

   

Arguments

rowsArrayRequired. An array containg row numbers
    • VirtualRenderer.setCompositionText(String text)
      • Void

Sets the inner text of the current composition to text. ...

Sets the inner text of the current composition to text.

   

Arguments

textStringRequired. A string of text to use
    • VirtualRenderer.setHScrollBarAlwaysVisible(Boolean alwaysVisible)
      • Void

Identifies whether you want to show the horizontal scrollbar or not. ...

Identifies whether you want to show the horizontal scrollbar or not.

   

Arguments

alwaysVisibleBooleanRequired. Set to true to make the horizontal scroll bar visible
    • VirtualRenderer.setPadding(Number padding)
      • Void

Sets the padding for all the layers. ...

Sets the padding for all the layers.

   

Arguments

paddingNumberRequired. A new padding value (in pixels)
    • VirtualRenderer.setPrintMarginColumn(Boolean showPrintMargin)

Identifies whether you want to show the print margin column or not. ...

Identifies whether you want to show the print margin column or not.

   

Arguments

showPrintMarginBooleanRequired. Set to true to show the print margin column
    • VirtualRenderer.setShowGutter(Boolean show)
      • Void

Identifies whether you want to show the gutter or not. ...

Identifies whether you want to show the gutter or not.

   

Arguments

showBooleanRequired. Set to true to show the gutter
    • VirtualRenderer.setShowInvisibles(Boolean showInvisibles)
      • Void

Identifies whether you want to show invisible characters or not. ...

Identifies whether you want to show invisible characters or not.

   

Arguments

showInvisiblesBooleanRequired. Set to true to show invisibles
    • VirtualRenderer.setShowPrintMargin(Boolean showPrintMargin)

Identifies whether you want to show the print margin or not. ...

Identifies whether you want to show the print margin or not.

   

Arguments

showPrintMarginBooleanRequired. Set to true to show the print margin
    • VirtualRenderer.setStyle(String style)
      • Void

Adds a new class, style, to the editor.

Adds a new class, style, to the editor.

   

Arguments

styleStringRequired. A class name
    • VirtualRenderer.setTheme(String theme)
      • Void

[Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.]{: #Virt...

Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.

   

Arguments

themeStringRequired. The path to a theme
    • VirtualRenderer.showCursor()
      • Void

Shows the cursor icon. ...

Shows the cursor icon.

   

Returns an object containing the pageX and pageY coordinates of the document position. ...

Returns an object containing the pageX and pageY coordinates of the document position.

   

Arguments

rowNumberRequired. The document row position
columnNumberRequired. The document column position
    • VirtualRenderer.unsetStyle(String style)
      • Void

Removes the class style from the editor.

Removes the class style from the editor.

   

Arguments

styleStringRequired. A class name
    • VirtualRenderer.updateBackMarkers()
      • Void

Schedules an update to all the back markers in the document. ...

Schedules an update to all the back markers in the document.

   

    • VirtualRenderer.updateCursor()
      • Void

Updates the cursor icon. ...

Updates the cursor icon.

   

    • VirtualRenderer.updateFontSize()
      • Void

Updates the font size. ...

Updates the font size.

   

    • VirtualRenderer.updateFrontMarkers()
      • Void

Schedules an update to all the front markers in the document. ...

Schedules an update to all the front markers in the document.

   

    • VirtualRenderer.updateFull()
      • Void

Triggers a full update of all the layers, for all the rows. ...

Triggers a full update of all the layers, for all the rows.

   

    • VirtualRenderer.updateLines(Number firstRow, Number lastRow)
      • Void

Triggers a partial update of the text, from the range given by the two parameters. ...

Triggers a partial update of the text, from the range given by the two parameters.

   

Arguments

firstRowNumberRequired. The first row to update
lastRowNumberRequired. The last row to update
    • VirtualRenderer.updateText()
      • Void

Triggers a full update of the text, for all the rows. ...

Triggers a full update of the text, for all the rows.

   

    • VirtualRenderer.visualizeBlur()
      • Void

Blurs the current container. ...

Blurs the current container.

   

    • VirtualRenderer.visualizeFocus()
      • Void

Focuses the current container. ...

Focuses the current container.