Fires whenever the anchor position changes. Events that can trigger this function include 'insertText', 'insertLines', 'removeText', and 'removeLines'.
-
Fires whenever the anchor position changes. Events that can trigger this function include 'insertText', 'insertLines', 'removeText', and 'removeLines'.
Tokenizes the current Document in the background, and caches the tokenized rows for future use. If a certain row is changed, everything below that row is re-tokenized.
Tokenizes the current Document in the background, and caches the tokenized rows for future use. If a certain row is changed, everything below that row is re-tokenized.
Contains the text of the document. Document can be attached to several EditSessions. At its core, Documents are just an array of strings, with each row in the document matching up to the array index.
Contains the text of the document. Document can be attached to several EditSessions. At its core, Documents are just an array of strings, with each row in the document matching up to the array index.
Required. Contains at least one property called "action". "action" indicates the action that triggered the change. Each action also has a set of additional properties.
The position of the last line of text. If the length of text is 0, this function simply returns position. Inserts a block of text and the indicated position.
Returns an object containing the final row and column, like this: {row: endRow, column: 0} If lines is empty, this function returns an object containing the current row, and column, like this: {row: row, column: 0}
Returns the new start property of the range, which contains startRow and startColumn. If range is empty, this function returns the unmodified value of range.start.
Returns an object containing startRow and startColumn, indicating the new row and column values. If startColumn is equal to endColumn, this function returns nothing.
Document.removeLines(Number firstRow, Number lastRow)
Returns an object containing the final row and column, like this: {row: endRow, column: 0} If the text and range are empty, this function returns an object containing the current range.start value. If the text is the exact same as what currently exists, this function returns an object containing the current range.end value.
Document.revertDeltas(deltas)
Void
Reverts any changes previously applied. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
Reverts any changes previously applied. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
Stores all the data about Editor state providing easy way to change editors state. EditSession can be attached to only one Document. Same Document can be attached to several EditSessions.
Stores all the data about Editor state providing easy way to change editors state. EditSession can be attached to only one Document. Same Document can be attached to several EditSessions.
Returns an int[] array with two elements: The first position indicates the number of columns for str on screen. The second value contains the position of the document column that this function read until.
Adds a new marker to the given Range. If inFront is true, a front marker is defined, and the 'changeFrontMarker' event fires; otherwise, the 'changeBackMarker' event fires.
Adds a new marker to the given Range. If inFront is true, a front marker is defined, and the 'changeFrontMarker' event fires; otherwise, the 'changeBackMarker' event fires.
Adds a new marker to the given Range. If inFront is true, a front marker is defined, and the 'changeFrontMarker' event fires; otherwise, the 'changeBackMarker' event fires.
Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize); otherwise it's simply '\t'.
-
Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize); otherwise it's simply '\t'.
Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize()); otherwise it's simply '\t'.
+
Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize()); otherwise it's simply '\t'.
The new range where the text was moved to. Moves a range of text from the given range to the given position. toPosition is an object that looks like this:
EditSession.onReloadTokenizer(e)
Reloads all the tokens on the current session. This function calls BackgroundTokenizer.start () to all the rows; it also emits the 'tokenizerUpdate' event.
+
Reloads all the tokens on the current session. This function calls BackgroundTokenizer.start () to all the rows; it also emits the 'tokenizerUpdate' event.
The new start property of the range, which contains startRow and startColumn. If range is empty, this function returns the unmodified value of range.start.
Removes the marker with the specified ID. If this marker was in front, the 'changeFrontMarker' event is emitted. If the marker was in the back, the 'changeBackMarker' event is emitted.
Removes the marker with the specified ID. If this marker was in front, the 'changeFrontMarker' event is emitted. If the marker was in the back, the 'changeBackMarker' event is emitted.
Removes the marker with the specified ID. If this marker was in front, the 'changeFrontMarker' event is emitted. If the marker was in the back, the 'changeBackMarker' event is emitted.
Converts characters coordinates on the screen to characters coordinates within the document. This takes into account code folding, word wrap, tab size, and any other visual modifications.
Returns an object containing the final row and column, like this: {row: endRow, column: 0} If the text and range are empty, this function returns an object containing the current range.start value. If the text is the exact same as what currently exists, this function returns an object containing the current range.end value.
Converts characters coordinates on the screen to characters coordinates within the document. This takes into account code folding, word wrap, tab size, and any other visual modifications.
Converts characters coordinates on the screen to characters coordinates within the document. This takes into account code folding, word wrap, tab size, and any other visual modifications.
Sets a new text mode for the EditSession. This method also emits the 'changeMode' event. If a BackgroundTokenizer is set, the 'tokenizerUpdate' event is also emitted.
-
Sets a new text mode for the EditSession. This method also emits the 'changeMode' event. If a BackgroundTokenizer is set, the 'tokenizerUpdate' event is also emitted.
Sets a new text mode for the EditSession. This method also emits the 'changeMode' event. If a BackgroundTokenizer is set, the 'tokenizerUpdate' event is also emitted.
+
Sets a new text mode for the EditSession. This method also emits the 'changeMode' event. If a BackgroundTokenizer is set, the 'tokenizerUpdate' event is also emitted.
Pass in true to enable overwrites in your session, or false to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite changes, this function also emites the changeOverwrite event.
-
Pass in true to enable overwrites in your session, or false to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite changes, this function also emites the changeOverwrite event.
Pass in true to enable overwrites in your session, or false to disable.
+
Pass in true to enable overwrites in your session, or false to disable.
+
If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite changes, this function also emites the changeOverwrite event.
Set the number of spaces that define a soft tab; for example, passing in 4 transforms the soft tabs to be equivalent to four spaces. This function also emits the changeTabSize event.
Set the number of spaces that define a soft tab; for example, passing in 4 transforms the soft tabs to be equivalent to four spaces. This function also emits the changeTabSize event.
Set the number of spaces that define a soft tab; for example, passing in 4 transforms the soft tabs to be equivalent to four spaces. This function also emits the changeTabSize event.
EditSession.setWrapLimitRange(Number min, Number max)
Sets the boundaries of wrap. Either value can be null to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for min or max are different, this method also emits the 'changeWrapMode' event.
EditSession.setWrapLimitRange(Number min, Number max)
Sets the boundaries of wrap. Either value can be null to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for min or max are different, this method also emits the 'changeWrapMode' event.
Sets the boundaries of wrap. Either value can be null to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for min or max are different, this method also emits the 'changeWrapMode' event.
The main entry point into the Ace functionality. The Editor manages the EditSession (which manages Documents), as well as the VirtualRenderer, which draws everything to the screen. Event sessions dealing with the mouse and keyboard are bubbled up from Document to the Editor, which decides what to do with them.
The main entry point into the Ace functionality. The Editor manages the EditSession (which manages Documents), as well as the VirtualRenderer, which draws everything to the screen. Event sessions dealing with the mouse and keyboard are bubbled up from Document to the Editor, which decides what to do with them.
Returns true if the behaviors are currently enabled. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
Returns true if the behaviors are currently enabled. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
Returns true if the behaviors are currently enabled. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
Specifies whether to use behaviors or not. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
Specifies whether to use behaviors or not. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
Pass in true to enable overwrites in your session, or false to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite changes, this function also emites the changeOverwrite event.
Pass in true to enable overwrites in your session, or false to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite changes, this function also emites the changeOverwrite event.
This object is used in various places to indicate a region within the editor. To better visualize how this works, imagine a rectangle. Each quadrant of the rectangle is analogus to a range, as ranges contain a starting row and starting column, and an ending row, and ending column.
This method returns one of the following numbers: 0 if the two points are exactly equal -1 if p.row is less then the calling range 1 if p.row is greater than the calling range
If the starting row of the calling range is equal to p.row, and: p.column is greater than or equal to the calling range's starting column, this returns 0 Otherwise, it returns -1
If the ending row of the calling range is equal to p.row, and: p.column is less than or equal to the calling range's ending column, this returns 0 Otherwise, it returns 1
This method returns one of the following numbers: 0 if the two points are exactly equal -1 if p.row is less then the calling range 1 if p.row is greater than the calling range, or if isEnd is true.<br/> <br/> If the starting row of the calling range is equal to p.row, and:<br/> p.column is greater than or equal to the calling range's starting column, this returns 0<br/> Otherwise, it returns -1<br/> <br/> If the ending row of the calling range is equal to p.row, and:<br/> p.column is less than or equal to the calling range's ending column, this returns 0` Otherwise, it returns 1
This method returns one of the following numbers: 1 if the ending row of the calling range is equal to row, and the ending column of the calling range is equal to column -1 if the starting row of the calling range is equal to row, and the starting column of the calling range is equal to column
Otherwise, it returns the value after calling compare().
This method returns one of the following numbers: 0 if the two points are exactly equal -1 if p.row is less then the calling range 1 if p.row is greater than the calling range
If the starting row of the calling range is equal to p.row, and: p.column is greater than or equal to the calling range's starting column, this returns 0 Otherwise, it returns -1
If the ending row of the calling range is equal to p.row, and: p.column is less than or equal to the calling range's ending column, this returns 0 Otherwise, it returns 1
-2: (B) is in front of (A), and doesn't intersect with (A) -1: (B) begins before (A) but ends inside of (A) 0: (B) is completely inside of (A) OR (A) is completely inside of (B) +1: (B) begins inside of (A) but ends outside of (A) +2: (B) is after (A) and doesn't intersect with (A) 42: FTW state: (B) ends in (A) but starts outside of (A)
0 if the two points are exactly equal -1 if p.row is less then the calling range 1 if p.row is greater than the calling range, or if isStart is true.
If the starting row of the calling range is equal to p.row, and: p.column is greater than or equal to the calling range's starting column, this returns 0 Otherwise, it returns -1
If the ending row of the calling range is equal to p.row, and: p.column is less than or equal to the calling range's ending column, this returns 0 Otherwise, it returns 1
Searches for options.needle. If found, this method returns the Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
-
Searches for options.needle. If found, this method returns the Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
Searches for all occurances options.needle. If found, this method returns an array of Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
-
Searches for all occurances options.needle. If found, this method returns an array of Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
Searches for options.needle. If found, this method returns the Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
+
Searches for options.needle. If found, this method returns the Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
Searches for all occurances options.needle. If found, this method returns an array of Ranges where the text first occurs. If options.backwards is true, the search goes backwards in the session.
+
Searches for all occurances options.needle. If found, this method returns an array of Ranges where the text first occurs. If options.backwards is true, the search goes backwards in the session.
If options.regExp is true, this function returns input with the replacement already made. Otherwise, this function just returns replacement. If options.needle was not found, this function returns null.
Contains the cursor position and the text selection of an edit session.
The row/columns used in the selection are in document coordinates representing ths coordinates as thez appear in the document before applying soft wrap and folding.
Selection.moveCursorTo(Number row, Number column, Boolean keepDesiredColumn)
Moves the cursor to the row and column provided. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
Moves the cursor to the row and column provided. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
Selection.moveCursorToScreen(Number row, Number column, Boolean keepDesiredColumn)
Moves the cursor to the screen position indicated by row and column. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
Selection.moveCursorToScreen(Number row, Number column, Boolean keepDesiredColumn)
Moves the cursor to the screen position indicated by row and column. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
Moves the cursor to the screen position indicated by row and column. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
Tokenizes all the items from the current point until the next row in the document. If the current point is at the end of the file, this function returns null. Otherwise, it returns the tokenized string.
Tokenizes all the items from the current point until the next row in the document. If the current point is at the end of the file, this function returns null. Otherwise, it returns the tokenized string.
Tokenizes all the items from the current point until the next row in the document. If the current point is at the end of the file, this function returns null. Otherwise, it returns the tokenized string.
diff --git a/api/tokenizer.html b/api/tokenizer.html
index de974f6b..5dfeae94 100644
--- a/api/tokenizer.html
+++ b/api/tokenizer.html
@@ -4,7 +4,9 @@
Tokenizer - Ace API
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.
+
VirtualRenderer.visualizeBlur()
Blurs the current container.
Blurs the current container.
-
VirtualRenderer.visualizeFocus()
Void
Focuses the current container.
+
VirtualRenderer.visualizeFocus()
Focuses the current container.
Focuses the current container.
diff --git a/doc/package.json b/doc/package.json
index 6f9e675e..294fe73f 100644
--- a/doc/package.json
+++ b/doc/package.json
@@ -2,7 +2,7 @@
"name": "ace-api",
"version": "0.1.0",
"dependencies": {
- "panino" : ">=2.0.1",
+ "panino" : ">=2.0.8",
"asset-smasher": "0.2.0"
}
}
\ No newline at end of file
diff --git a/doc/resources/ace/templates/lib.jade b/doc/resources/ace/templates/lib.jade
index d8437979..f3a75e1c 100644
--- a/doc/resources/ace/templates/lib.jade
+++ b/doc/resources/ace/templates/lib.jade
@@ -152,9 +152,9 @@ mixin article(obj, parents)
h4 Arguments
!= argumentTable(obj.arguments, ["argument-list", "table", "table-striped", "table-bordered"])
- if obj.retDesc
+ if obj.returns
h4 Returns
- != returnTable(obj.retDesc, ["return-list", "table", "table-striped", "table-bordered"])
+ != returnTable(obj.returns, ["return-list", "table", "table-striped", "table-bordered"])
//- children
for child in obj.children.filter(function(x){return x.type === 'section'})
diff --git a/lib/ace/anchor.js b/lib/ace/anchor.js
index 11809bc0..7ff69351 100644
--- a/lib/ace/anchor.js
+++ b/lib/ace/anchor.js
@@ -98,9 +98,14 @@ var Anchor = exports.Anchor = function(doc, row, column) {
/**
* Anchor@change(e)
- * - e (Event): Contains data about the event
+ * - e (Object): An object containing information about the anchor position. It has two properties:
+ * `old`: An object describing the old Anchor position
+ * `value`: An object describing the new Anchor position
+ Both of these objects have a `row` and `column` property corresponding to the position.
*
- * Fires whenever the anchor position changes. Events that can trigger this function include `'insertText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`.
+ * Fires whenever the anchor position changes.
+ *
+ * Events that can trigger this function include [[Anchor.setPosition `setPosition()`]].
*
**/
diff --git a/lib/ace/background_tokenizer.js b/lib/ace/background_tokenizer.js
index 7422d36d..bae507f5 100644
--- a/lib/ace/background_tokenizer.js
+++ b/lib/ace/background_tokenizer.js
@@ -142,6 +142,13 @@ var BackgroundTokenizer = function(tokenizer, editor) {
* Emits the `'update'` event. `firstRow` and `lastRow` are used to define the boundaries of the region to be updated.
*
**/
+ /**
+ * BackgroundTokenizer@update(e)
+ * - e (Object): An object containing two properties, `first` and `last`, which indicate the rows of the region being updated.
+ *
+ * Fires whenever the background tokeniziers between a range of rows are going to be updated.
+ *
+ **/
this.fireUpdateEvent = function(firstRow, lastRow) {
var data = {
first: firstRow,
diff --git a/lib/ace/document.js b/lib/ace/document.js
index ed83c18c..f35c1d51 100644
--- a/lib/ace/document.js
+++ b/lib/ace/document.js
@@ -58,6 +58,7 @@ var Anchor = require("./anchor").Anchor;
* Creates a new `Document`. If `text` is included, the `Document` contains those strings; otherwise, it's empty.
*
**/
+
var Document = function(text) {
this.$lines = [];
@@ -322,6 +323,29 @@ var Document = function(text) {
*
*
**/
+ /**
+ * Document@change(e)
+ * - e (Object): Contains at least one property called `"action"`. `"action"` indicates the action that triggered the change. Each action also has a set of additional properties.
+ *
+ * Fires whenever the document changes.
+ *
+ * Several methods trigger different `"change"` events. Below is a list of each action type, followed by each property that's also available:
+ *
+ * * `"insertLines"` (emitted by [[Document.insertLines]])
+ * * `range`: the [[Range]] of the change within the document
+ * * `lines`: the lines in the document that are changing
+ * * `"insertText"` (emitted by [[Document.insertNewLine]])
+ * * `range`: the [[Range]] of the change within the document
+ * * `text`: the text that's being added
+ * * `"removeLines"` (emitted by [[Document.insertLines]])
+ * * `range`: the [[Range]] of the change within the document
+ * * `lines`: the lines in the document that were removed
+ * * `nl`: the new line character (as defined by [[Document.getNewLineCharacter]])
+ * * `"removeText"` (emitted by [[Document.removeInLine]] and [[Document.removeNewLine]])
+ * * `range`: the [[Range]] of the change within the document
+ * * `text`: the text that's being removed
+ *
+ **/
this.insertLines = function(row, lines) {
if (lines.length == 0)
return {row: row, column: 0};
diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js
index 21d908b5..26159dff 100644
--- a/lib/ace/edit_session.js
+++ b/lib/ace/edit_session.js
@@ -63,29 +63,87 @@ var SearchHighlight = require("./search_highlight").SearchHighlight;
// events
/**
* EditSession@change(e)
+ * - e (Object): An object containing a `delta` of information about the change.
*
* Emitted when the document changes.
**/
/**
- * EditSession@tokenizerUpdate(e)
+ * EditSession@changeTabSize()
*
- * Emitted when a background tokenizer asynchronousely processes new rows.
+ * Emitted when the tab size changes, via [[EditSession.setTabSize]].
+ **/
+/**
+ * EditSession@changeOverwrite()
+ *
+ * Emitted when the ability to overwrite text changes, via [[EditSession.setOverwrite]].
+ **/
+/**
+ * EditSession@changeBreakpoint()
+ *
+ * Emitted when the gutter changes, either by setting or removing breakpoints, or when the gutter decorations change.
+ **/
+/**
+ * EditSession@changeFrontMarker()
+ *
+ * Emitted when a front marker changes.
+ **/
+/**
+ * EditSession@changeBackMarker()
+ *
+ * Emitted when a back marker changes.
+ **/
+/**
+ * EditSession@changeAnnotation()
+ *
+ * Emitted when an annotation changes, like through [[EditSession.setAnnotations]].
+ **/
+/**
+ * EditSession@tokenizerUpdate(e)
+ * - e (Object): An object containing one property, `"data"`, that contains information about the changing rows
+ *
+ * Emitted when a background tokenizer asynchronously processes new rows.
+ *
+ **/
+/** hide
+ * EditSession@loadMode(e)
+ *
+ *
+ *
+ **/
+/**
+ * EditSession@changeMode()
+ *
+ * Emitted when the current mode changes.
+ *
+ **/
+/**
+ * EditSession@changeWrapMode()
+ *
+ * Emitted when the wrap mode changes.
+ *
+ **/
+/**
+ * EditSession@changeWrapLimit()
+ *
+ * Emitted when the wrapping limit changes.
*
**/
/**
* EditSession@changeFold(e)
*
- * Emitted when a code fold added or removed.
+ * Emitted when a code fold is added or removed.
*
**/
/**
- * EditSession@changeScrollTop()
- *
+ * EditSession@changeScrollTop(scrollTop)
+ * - scrollTop (Number): The new scroll top value
+ *
* Emitted when the scroll top changes.
**/
/**
- * EditSession@changeScrollLeft()
- *
+ * EditSession@changeScrollLeft(scrollLeft)
+ * - scrollLeft (Number): The new scroll left value
+ *
* Emitted when the scroll left changes.
**/
@@ -482,7 +540,9 @@ var EditSession = function(text, mode) {
* EditSession.setOverwrite(overwrite)
* - overwrite (Boolean): Defines wheter or not to set overwrites
*
- * Pass in `true` to enable overwrites in your session, or `false` to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of `overwrite` changes, this function also emites the `changeOverwrite` event.
+ * Pass in `true` to enable overwrites in your session, or `false` to disable.
+ *
+ * If overwrites is enabled, any text you enter will type over any text after it. If the value of `overwrite` changes, this function also emites the `changeOverwrite` event.
*
**/
this.setOverwrite = function(overwrite) {
diff --git a/lib/ace/editor.js b/lib/ace/editor.js
index be072a57..917a8a5c 100644
--- a/lib/ace/editor.js
+++ b/lib/ace/editor.js
@@ -127,6 +127,12 @@ var Editor = function(renderer, session) {
*
* Sets a new editsession to use. This method also emits the `'changeSession'` event.
**/
+ /**
+ * Editor@changeSession(e)
+ * - e (Object): An object with two properties, `oldSession` and `session`, that represent the old and new [[EditSession]]s.
+ *
+ * Emitted whenever the [[EditSession]] changes.
+ **/
this.setSession = function(session) {
if (this.session == session)
return;
@@ -462,9 +468,10 @@ var Editor = function(renderer, session) {
};
/**
- * Editor@cursorChange()
+ * Editor@changeSelection()
+ *
+ * Emitted when the selection changes.
*
- * Emitted when the cursor changes.
**/
this.onCursorChange = function() {
this.$cursorChange();
@@ -508,12 +515,6 @@ var Editor = function(renderer, session) {
};
- /**
- * Editor@selectionChange(e)
- * - e (Object): Contains a single property, `data`, which has the delta of changes
- *
- * Emitted when a selection has changed.
- **/
this.onSelectionChange = function(e) {
var session = this.session;
@@ -568,74 +569,39 @@ var Editor = function(renderer, session) {
return re;
};
- /**
- * Editor@changeFrontMarker()
- *
- * Emitted when a front marker changes.
- **/
+
this.onChangeFrontMarker = function() {
this.renderer.updateFrontMarkers();
};
- /**
- * Editor@changeBackMarker()
- *
- * Emitted when a back marker changes.
- **/
this.onChangeBackMarker = function() {
this.renderer.updateBackMarkers();
};
- /**
- * Editor@changeBreakpoint()
- *
- * Emitted when a breakpoint changes.
- **/
+
this.onChangeBreakpoint = function() {
this.renderer.updateBreakpoints();
};
- /**
- * Editor@changeAnnotation()
- *
- * Emitted when an annotation changes.
- **/
this.onChangeAnnotation = function() {
this.renderer.setAnnotations(this.session.getAnnotations());
};
- /**
- * Editor@changeMode()
- *
- * Emitted when the mode changes.
- **/
+
this.onChangeMode = function() {
this.renderer.updateText();
};
- /**
- * Editor@changeWrapLimit()
- *
- * Emitted when the wrap limit changes.
- **/
+
this.onChangeWrapLimit = function() {
this.renderer.updateFull();
};
- /**
- * Editor@changeWrapMode()
- *
- * Emitted when the wrap mode changes.
- **/
this.onChangeWrapMode = function() {
this.renderer.onResize(true);
};
- /**
- * Editor@changeFold()
- *
- * Emitted when the code folds change.
- **/
+
this.onChangeFold = function() {
// Update the active line marker as due to folding changes the current
// line range on the screen might have changed.
@@ -649,6 +615,12 @@ var Editor = function(renderer, session) {
*
* Returns the string of text currently highlighted.
**/
+ /**
+ * Editor@copy(text)
+ * - text (String): The copied text
+ *
+ * Emitted when text is copied.
+ **/
this.getCopyText = function() {
var text = "";
if (!this.selection.isEmpty())
@@ -677,9 +649,16 @@ var Editor = function(renderer, session) {
};
/**
- * Editor.onPaste()
- *
- * called whenever a text "paste" happens.
+ * Editor.onPaste(text)
+ * - text (String): The pasted text
+ *
+ * Called whenever a text "paste" happens.
+ **/
+ /**
+ * Editor@paste(text)
+ * - text (String): The pasted text
+ *
+ * Emitted when text is pasted.
**/
this.onPaste = function(text) {
// todo this should change when paste becomes a command
@@ -872,6 +851,13 @@ var Editor = function(renderer, session) {
* Indicates how selections should occur. By default, selections are set to "line". This function also emits the `'changeSelectionStyle'` event.
*
**/
+ /**
+ * Editor@changeSelectionStyle(data)
+ * - data (Object): Contains one property, `data`, which indicates the new selection style
+ *
+ * Emitted when the selection style changes, via [[Editor.setSelectionStyle]].
+ *
+ **/
this.setSelectionStyle = function(style) {
if (this.$selectionStyle == style) return;
diff --git a/lib/ace/scrollbar.js b/lib/ace/scrollbar.js
index 02afb232..64438740 100644
--- a/lib/ace/scrollbar.js
+++ b/lib/ace/scrollbar.js
@@ -82,7 +82,8 @@ var ScrollBar = function(parent) {
oop.implement(this, EventEmitter);
/**
- * ScrollBar@onScroll()
+ * ScrollBar@scroll(e)
+ * - e (Object): Contains one property, `"data"`, which indicates the current scroll top position
*
* Emitted when the scroll bar, well, scrolls.
*
diff --git a/lib/ace/selection.js b/lib/ace/selection.js
index 8ae66093..b976cb2d 100644
--- a/lib/ace/selection.js
+++ b/lib/ace/selection.js
@@ -59,6 +59,18 @@ var Range = require("./range").Range;
* Creates a new `Selection` object.
*
**/
+/**
+ * Selection@changeCursor()
+ *
+ * Emitted when the cursor position changes.
+ *
+**/
+/**
+ * Selection@changeSelection()
+ *
+ * Emitted when the cursor selection changes.
+ *
+**/
var Selection = function(session) {
this.session = session;
this.doc = session.getDocument();
diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js
index 69a04240..85794989 100644
--- a/lib/ace/virtual_renderer.js
+++ b/lib/ace/virtual_renderer.js
@@ -203,7 +203,7 @@ var VirtualRenderer = function(container, theme) {
oop.implement(this, EventEmitter);
/**
- * VirtualRenderer.setSession(session) -> Void
+ * VirtualRenderer.setSession(session)
*
* Associates an [[EditSession `EditSession`]].
**/
@@ -222,7 +222,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.updateLines(firstRow, lastRow) -> Void
+ * VirtualRenderer.updateLines(firstRow, lastRow)
* - firstRow (Number): The first row to update
* - lastRow (Number): The last row to update
*
@@ -255,7 +255,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.updateText() -> Void
+ * VirtualRenderer.updateText()
*
* Triggers a full update of the text, for all the rows.
**/
@@ -264,7 +264,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.updateFull() -> Void
+ * VirtualRenderer.updateFull()
*
* Triggers a full update of all the layers, for all the rows.
**/
@@ -278,7 +278,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.updateFontSize() -> Void
+ * VirtualRenderer.updateFontSize()
*
* Updates the font size.
**/
@@ -287,7 +287,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.onResize(force) -> Void
+ * VirtualRenderer.onResize(force)
* - force (Boolean): If `true`, recomputes the size, even if the height and width haven't changed
*
* [Triggers a resize of the editor.]{: #VirtualRenderer.onResize}
@@ -342,7 +342,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.adjustWrapLimit() -> Void
+ * VirtualRenderer.adjustWrapLimit()
*
* Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
**/
@@ -353,7 +353,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.setAnimatedScroll(shouldAnimate) -> Void
+ * VirtualRenderer.setAnimatedScroll(shouldAnimate)
* - shouldAnimate (Boolean): Set to `true` to show animated scrolls
*
* Identifies whether you want to have an animated scroll or not.
@@ -373,7 +373,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.setShowInvisibles(showInvisibles) -> Void
+ * VirtualRenderer.setShowInvisibles(showInvisibles)
* - showInvisibles (Boolean): Set to `true` to show invisibles
*
* Identifies whether you want to show invisible characters or not.
@@ -458,7 +458,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.setShowGutter(show) -> Void
+ * VirtualRenderer.setShowGutter(show)
* - show (Boolean): Set to `true` to show the gutter
*
* Identifies whether you want to show the gutter or not.
@@ -626,7 +626,7 @@ var VirtualRenderer = function(container, theme) {
this.$padding = null;
/**
- * VirtualRenderer.setPadding(padding) -> Void
+ * VirtualRenderer.setPadding(padding)
* - padding (Number): A new padding value (in pixels)
*
* Sets the padding for all the layers.
@@ -652,7 +652,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.setHScrollBarAlwaysVisible(alwaysVisible) -> Void
+ * VirtualRenderer.setHScrollBarAlwaysVisible(alwaysVisible)
* - alwaysVisible (Boolean): Set to `true` to make the horizontal scroll bar visible
*
* Identifies whether you want to show the horizontal scrollbar or not.
@@ -867,7 +867,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.updateFrontMarkers() -> Void
+ * VirtualRenderer.updateFrontMarkers()
*
* Schedules an update to all the front markers in the document.
**/
@@ -877,7 +877,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.updateBackMarkers() -> Void
+ * VirtualRenderer.updateBackMarkers()
*
* Schedules an update to all the back markers in the document.
**/
@@ -886,26 +886,26 @@ var VirtualRenderer = function(container, theme) {
this.$loop.schedule(this.CHANGE_MARKER_BACK);
};
- /**
- * VirtualRenderer.addGutterDecoration(row, className) -> Void
+ /** deprecated
+ * VirtualRenderer.addGutterDecoration(row, className)
*
- * Deprecated (moved to EditSession)
+ * Deprecated; (moved to [[EditSession]])
**/
this.addGutterDecoration = function(row, className){
this.$gutterLayer.addGutterDecoration(row, className);
};
- /**
+ /** deprecated
* VirtualRenderer.removeGutterDecoration(row, className)-> Void
*
- * Deprecated (moved to EditSession)
+ * Deprecated; (moved to [[EditSession]])
**/
this.removeGutterDecoration = function(row, className){
this.$gutterLayer.removeGutterDecoration(row, className);
};
/**
- * VirtualRenderer.updateBreakpoints() -> Void
+ * VirtualRenderer.updateBreakpoints()
*
* Redraw breakpoints.
**/
@@ -914,7 +914,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.setAnnotations(annotations) -> Void
+ * VirtualRenderer.setAnnotations(annotations)
* - annotations (Array): An array containing annotations
*
* Sets annotations for the gutter.
@@ -925,7 +925,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.updateCursor() -> Void
+ * VirtualRenderer.updateCursor()
*
* Updates the cursor icon.
**/
@@ -934,7 +934,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.hideCursor() -> Void
+ * VirtualRenderer.hideCursor()
*
* Hides the cursor icon.
**/
@@ -943,7 +943,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.showCursor() -> Void
+ * VirtualRenderer.showCursor()
*
* Shows the cursor icon.
**/
@@ -958,7 +958,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.scrollCursorIntoView(cursor, offset) -> Void
+ * VirtualRenderer.scrollCursorIntoView(cursor, offset)
*
* Scrolls the cursor into the first visibile area of the editor
**/
@@ -1030,7 +1030,7 @@ var VirtualRenderer = function(container, theme) {
};
/** related to: EditSession.setScrollTop
- * VirtualRenderer.scrollToRow(row) -> Void
+ * VirtualRenderer.scrollToRow(row)
* - row (Number): A row id
*
* Gracefully scrolls the top of the editor to the row indicated.
@@ -1066,7 +1066,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.scrollToLine(line, center, animate, callback) -> Void
+ * VirtualRenderer.scrollToLine(line, center, animate, callback)
* - line (Number): A line number
* - center (Boolean): If `true`, centers the editor the to indicated line
* - animate (Boolean): If `true` animates scrolling
@@ -1148,7 +1148,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.scrollBy(deltaX, deltaY) -> Void
+ * VirtualRenderer.scrollBy(deltaX, deltaY)
* - deltaX (Number): The x value to scroll by
* - deltaY (Number): The y value to scroll by
*
@@ -1220,7 +1220,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.visualizeFocus() -> Void
+ * VirtualRenderer.visualizeFocus()
*
* Focuses the current container.
**/
@@ -1229,7 +1229,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.visualizeBlur() -> Void
+ * VirtualRenderer.visualizeBlur()
*
* Blurs the current container.
**/
@@ -1238,7 +1238,7 @@ var VirtualRenderer = function(container, theme) {
};
/** internal, hide
- * VirtualRenderer.showComposition(position) -> Void
+ * VirtualRenderer.showComposition(position)
* - position (Number):
*
**/
@@ -1256,7 +1256,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.setCompositionText(text) -> Void
+ * VirtualRenderer.setCompositionText(text)
* - text (String): A string of text to use
*
* Sets the inner text of the current composition to `text`.
@@ -1266,7 +1266,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.hideComposition() -> Void
+ * VirtualRenderer.hideComposition()
*
* Hides the current composition.
**/
@@ -1288,7 +1288,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.setTheme(theme) -> Void
+ * VirtualRenderer.setTheme(theme)
* - theme (String): The path to a theme
*
* [Sets a new theme for the editor. `theme` should exist, and be a directory path, like `ace/theme/textmate`.]{: #VirtualRenderer.setTheme}
@@ -1361,7 +1361,7 @@ var VirtualRenderer = function(container, theme) {
// a certain mode that editor is in.
/**
- * VirtualRenderer.setStyle(style) -> Void
+ * VirtualRenderer.setStyle(style)
* - style (String): A class name
*
* [Adds a new class, `style`, to the editor.]{: #VirtualRenderer.setStyle}
@@ -1371,7 +1371,7 @@ var VirtualRenderer = function(container, theme) {
};
/**
- * VirtualRenderer.unsetStyle(style) -> Void
+ * VirtualRenderer.unsetStyle(style)
* - style (String): A class name
*
* [Removes the class `style` from the editor.]{: #VirtualRenderer.unsetStyle}