VirtualRenderer
The class that is responsible for drawing everything you see on the screen!
Constructors
- new VirtualRenderer(DOMElement container, String theme)
Constructs a new VirtualRenderer
within the container
specified, applying the given theme
.
container | DOMElement | Required. The root element of the editor |
theme | String | Required. The starting theme |
Methods
- VirtualRenderer._loadTheme()
- Undocumented
Deprecated; (moved to EditSession
)
row | Object | Required. |
className | Object | Required. |
- VirtualRenderer.adjustWrapLimit()
Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
- VirtualRenderer.alignCursor()
- Undocumented
- VirtualRenderer.animateScrolling()
- Undocumented
- VirtualRenderer.destroy()
Destroys the text and cursor layers for this renderer.
- VirtualRenderer.getAnimatedScroll()
- 返回值: Boolean
Returns whether an animated scroll happens or not.
- VirtualRenderer.getContainerElement()
- 返回值: DOMElement
Returns the root element containing this renderer.
- VirtualRenderer.getDisplayIndentGuides()
- Undocumented
- VirtualRenderer.getFadeFoldWidgets()
- Undocumented
- VirtualRenderer.getFirstFullyVisibleRow()
- 返回值: Number
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()
- 返回值: Number
Returns the index of the first visible row.
- VirtualRenderer.getHighlightGutterLine()
- Undocumented
- VirtualRenderer.getHScrollBarAlwaysVisible()
- 返回值: Boolean
Returns whether the horizontal scrollbar is set to be always visible.
- VirtualRenderer.getLastFullyVisibleRow()
- 返回值: Number
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()
- 返回值: Number
Returns the index of the last visible row.
- VirtualRenderer.getMouseEventTarget()
- 返回值: DOMElement
Returns the element that the mouse events are attached to
- VirtualRenderer.getPrintMarginColumn()
- 返回值: Boolean
Returns whether the print margin column is being shown or not.
- VirtualRenderer.getScrollBottomRow()
- 返回值: Number
Returns the last visible row, regardless of whether it's fully visible or not.
- VirtualRenderer.getScrollLeft()
- 返回值: Number
Returns the value of the distance between the left of the editor and the leftmost part of the visible content.
- VirtualRenderer.getScrollTop()
- 返回值: Number
Returns the value of the distance between the top of the editor and the topmost part of the visible content.
- VirtualRenderer.getScrollTopRow()
- 返回值: Number
Returns the first visible row, regardless of whether it's fully visible or not.
- VirtualRenderer.getShowGutter()
- 返回值: Boolean
Returns true
if the gutter is being shown.
- VirtualRenderer.getShowInvisibles()
- 返回值: Boolean
Returns whether invisible characters are being shown or not.
- VirtualRenderer.getShowPrintMargin()
- 返回值: Boolean
Returns whether the print margin is being shown or not.
- VirtualRenderer.getTextAreaContainer()
- 返回值: DOMElement
Returns the element to which the hidden text area is added.
- VirtualRenderer.getTheme()
- 返回值: String
Returns the path of the current theme.
- VirtualRenderer.hideComposition()
Hides the current composition.
- VirtualRenderer.hideCursor()
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.
deltaX | Number | Required. The x value to scroll by |
deltaY | Number | Required. The y value to scroll by |
- VirtualRenderer.onChangeTabSize()
- Undocumented
- VirtualRenderer.onGutterResize()
- Undocumented
Triggers a resize of the editor.
force | Boolean | Required. If true , recomputes the size, even if the height and width haven't changed |
gutterWidth | Number | Required. The width of the gutter in pixels |
width | Number | Required. The width of the editor in pixels |
height | Number | Required. The height of the editor, in pixels |
- VirtualRenderer.pixelToScreenCoordinates()
- Undocumented
Deprecated; (moved to EditSession
)
row | Object | Required. |
className | Object | Required. |
- VirtualRenderer.screenToTextCoordinates()
- Undocumented
Scrolls the editor across both x- and y-axes.
deltaX | Number | Required. The x value to scroll by |
deltaY | Number | Required. The y value to scroll by |
Scrolls the cursor into the first visible area of the editor
cursor | Object | Required. |
offset | Object | Required. |
- VirtualRenderer.scrollSelectionIntoView()
- Undocumented
Gracefully scrolls the editor to the row indicated.
line | Number | Required. A line number |
center | Boolean | Required. If true , centers the editor the to indicated line |
animate | Boolean | Required. If true animates scrolling |
callback | Function | Required. Function to be called after the animation has finished |
- VirtualRenderer.scrollToRow(Number row)
Gracefully scrolls from the top of the editor to the row indicated.
row | Number | Required. A row id |
Scrolls the editor across the x-axis to the pixel indicated.
scrollLeft | Number | Required. The position to scroll to |
Scrolls the editor to the y pixel indicated.
scrollTop | Number | Required. The position to scroll to |
- VirtualRenderer.setAnimatedScroll(Boolean shouldAnimate)
Identifies whether you want to have an animated scroll or not.
shouldAnimate | Boolean | Required. Set to true to show animated scrolls |
- VirtualRenderer.setAnnotations(Array annotations)
Sets annotations for the gutter.
annotations | Array | Required. An array containing annotations |
- VirtualRenderer.setCompositionText(String text)
- Undocumented
text | String | Required. A string of text to use Sets the inner text of the current composition to |
- VirtualRenderer.setDisplayIndentGuides()
- Undocumented
- VirtualRenderer.setFadeFoldWidgets()
- Undocumented
- VirtualRenderer.setHighlightGutterLine()
- Undocumented
- VirtualRenderer.setHScrollBarAlwaysVisible(Boolean alwaysVisible)
Identifies whether you want to show the horizontal scrollbar or not.
alwaysVisible | Boolean | Required. Set to true to make the horizontal scroll bar visible |
- VirtualRenderer.setPadding(Number padding)
Sets the padding for all the layers.
padding | Number | Required. A new padding value (in pixels) |
- VirtualRenderer.setPrintMarginColumn(Boolean showPrintMargin)
Identifies whether you want to show the print margin column or not.
showPrintMargin | Boolean | Required. Set to true to show the print margin column |
- VirtualRenderer.setSession(Object session)
Associates the renderer with an EditSession
.
session | Object | Required. |
- VirtualRenderer.setShowGutter(Boolean show)
Identifies whether you want to show the gutter or not.
show | Boolean | Required. Set to true to show the gutter |
- VirtualRenderer.setShowInvisibles(Boolean showInvisibles)
Identifies whether you want to show invisible characters or not.
showInvisibles | Boolean | Required. Set to true to show invisibles |
- VirtualRenderer.setShowPrintMargin(Boolean showPrintMargin)
Identifies whether you want to show the print margin or not.
showPrintMargin | Boolean | Required. Set to true to show the print margin |
- VirtualRenderer.setStyle()
- Undocumented
- VirtualRenderer.setTheme(String theme)
Sets a new theme for the editor. theme
should exist, and be a directory path, like ace/theme/textmate
.
theme | String | Required. The path to a theme |
- VirtualRenderer.showCursor()
Shows the cursor icon.
Returns an object containing the pageX
and pageY
coordinates of the document position.
row | Number | Required. The document row position |
column | Number | Required. The document column position |
- VirtualRenderer.unsetStyle(String style)
Removes the class style
from the editor.
style | String | Required. A class name |
- VirtualRenderer.updateBackMarkers()
Schedules an update to all the back markers in the document.
- VirtualRenderer.updateBreakpoints(Object rows)
Redraw breakpoints.
rows | Object | Required. |
- VirtualRenderer.updateCharacterSize()
- Undocumented
- VirtualRenderer.updateCursor()
Updates the cursor icon.
- VirtualRenderer.updateFontSize()
Updates the font size.
- VirtualRenderer.updateFrontMarkers()
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.
force | Boolean | Required. If true , forces the changes through |
Triggers a partial update of the text, from the range given by the two parameters.
firstRow | Number | Required. The first row to update |
lastRow | Number | Required. The last row to update |
- VirtualRenderer.updateText()
Triggers a full update of the text, for all the rows.
- VirtualRenderer.visualizeBlur()
Blurs the current container.
- VirtualRenderer.visualizeFocus()
Focuses the current container.