Class Index | File Index

## Classes

- _global_
- Boolean
- Date
- Object
- orion
- orion.breadcrumbs.BreadCrumbs
- orion.commands.Command
- orion.commands.CommandService
- orion.compare.DiffProvider
- orion.compare.rulers.CompareOverviewRuler
- orion.compare.rulers.CompareRuler
- orion.compare.rulers.LineNumberCompareRuler
- orion.compareUtils
- orion.contentAssist.CssContentAssistProvider
- orion.dialogs.DialogService
- orion.editor.AbstractStyler
- orion.editor.ContentAssist
- orion.editor.Editor
- orion.editor.HtmlGrammar
- orion.editor.JavaScriptContentAssistProvider
- orion.editor.TextMateStyler
- orion.explorer-table.FileExplorer
- orion.explorer.Explorer
- orion.explorer.ExplorerFlatModel
- orion.explorer.ExplorerModel
- orion.explorer.SelectionRenderer
- orion.favorites.Favorites
- orion.favorites.FavoritesService
- orion.fileClient.FileClient
- orion.fileCommands
- orion.git.GitClonesExplorer
- orion.git.GitClonesModel
- orion.git.GitCommitNavigator
- orion.git.GitService
- orion.globalCommands
- orion.log.LogService
- orion.outliner.Outliner
- orion.outliner.OutlineService
- orion.pluginregistry.Plugin
- orion.pluginregistry.PluginRegistry
- orion.preferences.Preferences
- orion.preferences.PreferencesService
- orion.problems.ProblemService
- orion.profile.usersClient.UsersClient
- orion.searchClient.Searcher
- orion.searchResults.SearchResultsGenerator
- orion.selection.Selection
- orion.serviceregistry.EventTarget
- orion.serviceregistry.Service
- orion.serviceregistry.ServiceReference
- orion.serviceregistry.ServiceRegistration
- orion.serviceregistry.ServiceRegistry
- orion.status.StatusReportingService
- orion.textview.ContextMenuEvent
- orion.textview.DestroyEvent
- orion.textview.KeyBinding
- orion.textview.LineStyleEvent
- orion.textview.ModelChangedEvent
- orion.textview.ModelChangingEvent
- orion.textview.ModifyEvent
- orion.textview.Ruler
- orion.textview.ScrollEvent
- orion.textview.Selection
- orion.textview.SelectionEvent
- orion.textview.Style
- orion.textview.StyleRange
- orion.textview.TextModel
- orion.textview.TextView
- orion.textview.UndoStack
- orion.textview.VerifyEvent
- orion.treetable.TableTree
- orion.util
- orion.widgets.DirectoryTreeModel
- String

# Class orion.textview.Ruler

This interface represents a ruler for the text view.

A Ruler is a graphical element that is placed either on the left or on the right side of the view. It can be used to provide the view with per line decoration such as line numbering, bookmarks, breakpoints, folding disclosures, etc.

There are two types of rulers: page and document. A page ruler only shows the content for the lines that are visible, while a document ruler always shows the whole content.

See:
orion.textview.TextView
orion.textview.TextView#addRuler
Defined in: </shared/eclipse/e4/orion/I201106270200/plugins/org.eclipse.orion.client.editor/web/orion/textview/textView.js>.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| orion.textview.Ruler()

Method Summary
Method Attributes | Method Name and Description
--- | ---
| getAnnotations() Returns the indices of the lines that have decoration.
| getHTML(lineIndex) Returns the HTML content for the decoration of a given line.
| getLocation() Returns the ruler location.
| getOverview() Returns the ruler overview type.
| getStyle(lineIndex) Returns the CSS styling information for the decoration of a given line.
<inner> | Ruler(rulerLocation, rulerOverview, rulerStyle)

Event Summary
Event Attributes | Event Name and Description
--- | ---
| onClick(lineIndex, e) This event is sent when the user clicks a line decoration.
| onDblClick(lineIndex, e) This event is sent when the user double clicks a line decoration.

Class Detail
orion.textview.Ruler()
Method Detail
{Number[]} getAnnotations()
Returns the indices of the lines that have decoration.

This function is only called for rulers with "document" overview type.

Returns:
  {Number[]} an array of line indices.

{String} getHTML(lineIndex)
Returns the HTML content for the decoration of a given line.

If the line index is `-1`, the HTML content for the decoration that determines the width of the ruler should be returned.

Parameters:
{Number} lineIndex

Returns:
  {String} the HTML content for a given line, or generic line.

See:
  #getStyle

{String} getLocation()
Returns the ruler location.

Returns:
  {String} the ruler location, which is either "left" or "right".

{String} getOverview()
Returns the ruler overview type.

Returns:
  {String} the overview type, which is either "page" or "document".

See:
  #getLocation

{orion.textview.Style} getStyle(lineIndex)
Returns the CSS styling information for the decoration of a given line.

If the line index is `-1`, the CSS styling information for the decoration that determines the width of the ruler should be returned. If the line is `undefined`, the ruler styling information should be returned.

Parameters:
{Number} lineIndex

Returns:
  {orion.textview.Style} the CSS styling for ruler, given line, or generic line.

See:
  #getHTML

<inner> Ruler(rulerLocation, rulerOverview, rulerStyle)
Defined in: </shared/eclipse/e4/orion/I201106270200/plugins/org.eclipse.orion.client.editor/web/orion/textview/rulers.js>.

Parameters:
rulerLocation
rulerOverview
rulerStyle

Event Detail
onClick(lineIndex, e)
This event is sent when the user clicks a line decoration.

Parameters:
{Number} lineIndex
  the line index of the clicked decoration
{DOMEvent} e
  the click event

onDblClick(lineIndex, e)
This event is sent when the user double clicks a line decoration.

Parameters:
{Number} lineIndex
  the line index of the double clicked decoration
{DOMEvent} e
  the double click event

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jun 27 2011 02:03:41 GMT-0400 (EDT)