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

containerDOMElement

Required. The root element of the editor

themeString

Required. The starting theme

Methods

    • VirtualRenderer.addGutterDecoration(row, className)
    • Deprecated

Deprecated; (moved to EditSession)

Deprecated; (moved to EditSession)

    • VirtualRenderer.adjustWrapLimit()

    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.

        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 truncated; that the top and the bottom of the row are on the screen.

          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; that the top and the bottom of the row are on the screen.

                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.

                  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.

                        • VirtualRenderer.getScrollLeft()
                        • Related to:

                      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.

                        • VirtualRenderer.getScrollTop()
                        • Related to:

                      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.

                              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()

                                  Hides the current composition.

                                  Hides the current composition.

                                    • VirtualRenderer.hideCursor()

                                    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 or line.

                                    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

                                    deltaXNumber

                                    Required. The x value to scroll by

                                    deltaYNumber

                                    Required. The y value to scroll by

                                    Triggers a resize of the editor.

                                    Triggers a resize of the editor.

                                    Arguments

                                    forceBoolean

                                    Required. If true, recomputes the size, even if the height and width haven't changed

                                    gutterWidthNumber

                                    Required. The width of the gutter in pixels

                                    widthNumber

                                    Required. The width of the editor in pixels

                                    heightNumber

                                    Required. The hiehgt of the editor, in pixels

                                      • VirtualRenderer.removeGutterDecoration(row, className)
                                        • Void
                                      • Deprecated

                                    Deprecated; (moved to EditSession)

                                    Deprecated; (moved to EditSession)

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

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

                                    Arguments

                                    deltaXNumber

                                    Required. The x value to scroll by

                                    deltaYNumber

                                    Required. The y value to scroll by

                                      • VirtualRenderer.scrollCursorIntoView(cursor, offset)

                                      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

                                      lineNumber

                                      Required. A line number

                                      centerBoolean

                                      Required. If true, centers the editor the to indicated line

                                      animateBoolean

                                      Required. If true animates scrolling

                                      callbackFunction

                                      Required. Function to be called after the animation has finished

                                        • VirtualRenderer.scrollToRow(Number row)
                                        • Related to:

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

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

                                      Arguments

                                      rowNumber

                                      Required. A row id

                                      Scrolls the editor to the x pixel indicated.

                                      Scrolls the editor to the x pixel indicated.

                                      Arguments

                                      scrollLeftNumber

                                      Required. The position to scroll to

                                      Scrolls the editor to the y pixel indicated.

                                      Scrolls the editor to the y pixel indicated.

                                      Arguments

                                      scrollTopNumber

                                      Required. The position to scroll to

                                        • VirtualRenderer.setAnimatedScroll(Boolean shouldAnimate)

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

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

                                        Arguments

                                        shouldAnimateBoolean

                                        Required. Set to true to show animated scrolls

                                          • VirtualRenderer.setAnnotations(Array annotations)

                                          Sets annotations for the gutter.

                                          Sets annotations for the gutter.

                                          Arguments

                                          annotationsArray

                                          Required. An array containing annotations

                                            • VirtualRenderer.setCompositionText(String text)

                                            Sets the inner text of the current composition to text.

                                            Sets the inner text of the current composition to text.

                                            Arguments

                                            textString

                                            Required. A string of text to use

                                              • VirtualRenderer.setHScrollBarAlwaysVisible(Boolean alwaysVisible)

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

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

                                              Arguments

                                              alwaysVisibleBoolean

                                              Required. Set to true to make the horizontal scroll bar visible

                                                • VirtualRenderer.setPadding(Number padding)

                                                Sets the padding for all the layers.

                                                Sets the padding for all the layers.

                                                Arguments

                                                paddingNumber

                                                Required. 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

                                                  showPrintMarginBoolean

                                                  Required. Set to true to show the print margin column

                                                    • VirtualRenderer.setShowGutter(Boolean show)

                                                    Identifies whether you want to show the gutter or not.

                                                    Identifies whether you want to show the gutter or not.

                                                    Arguments

                                                    showBoolean

                                                    Required. Set to true to show the gutter

                                                      • VirtualRenderer.setShowInvisibles(Boolean showInvisibles)

                                                      Identifies whether you want to show invisible characters or not.

                                                      Identifies whether you want to show invisible characters or not.

                                                      Arguments

                                                      showInvisiblesBoolean

                                                      Required. 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

                                                        showPrintMarginBoolean

                                                        Required. Set to true to show the print margin

                                                          • VirtualRenderer.setStyle(String style)

                                                          Adds a new class, style, to the editor.

                                                          Adds a new class, style, to the editor.

                                                          Arguments

                                                          styleString

                                                          Required. A class name

                                                            • VirtualRenderer.setTheme(String theme)

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

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

                                                            Arguments

                                                            themeString

                                                            Required. The path to a theme

                                                              • VirtualRenderer.showComposition(Number position)
                                                              • Internal

                                                            Arguments

                                                            positionNumber

                                                            Required.

                                                              • VirtualRenderer.showCursor()

                                                              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

                                                              rowNumber

                                                              Required. The document row position

                                                              columnNumber

                                                              Required. The document column position

                                                                • VirtualRenderer.unsetStyle(String style)

                                                                Removes the class style from the editor.

                                                                Removes the class style from the editor.

                                                                Arguments

                                                                styleString

                                                                Required. A class name

                                                                  • VirtualRenderer.updateBackMarkers()

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

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

                                                                    • VirtualRenderer.updateBreakpoints()

                                                                    Redraw breakpoints.

                                                                    Redraw breakpoints.

                                                                      • VirtualRenderer.updateCursor()

                                                                      Updates the cursor icon.

                                                                      Updates the cursor icon.

                                                                        • VirtualRenderer.updateFontSize()

                                                                        Updates the font size.

                                                                        Updates the font size.

                                                                          • VirtualRenderer.updateFrontMarkers()

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

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

                                                                            • VirtualRenderer.updateFull(Boolean force)

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

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

                                                                            Arguments

                                                                            forceBoolean

                                                                            Required. If true, forces the changes through

                                                                              • VirtualRenderer.updateLines(Number firstRow, Number lastRow)

                                                                              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

                                                                              firstRowNumber

                                                                              Required. The first row to update

                                                                              lastRowNumber

                                                                              Required. The last row to update

                                                                                • VirtualRenderer.updateText()

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

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

                                                                                  • VirtualRenderer.visualizeBlur()

                                                                                  Blurs the current container.

                                                                                  Blurs the current container.

                                                                                    • VirtualRenderer.visualizeFocus()

                                                                                    Focuses the current container.

                                                                                    Focuses the current container.