update doc comments

This commit is contained in:
nightwing 2013-01-27 13:47:49 +04:00
commit 99879fdeef
3 changed files with 168 additions and 221 deletions

View file

@ -456,27 +456,6 @@ var EditSession = function(text, mode) {
}
};
/**
* Pass `true` to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character (`'\t'`).
* @param {Boolean} useSoftTabs Value indicating whether or not to use soft tabs
*
**/
/**
* Returns `true` if soft tabs are being used, `false` otherwise.
* @returns {Boolean}
**/
/**
* 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.
* @param {Number} tabSize The new tab size
*
*
**/
/**
* Returns the current tab size.
**/
/**
* Returns `true` if the character at the position is a soft tab.
* @param {Object} position The position to check
@ -844,14 +823,6 @@ var EditSession = function(text, mode) {
return this.doc.getNewLineMode();
};
/**
* Identifies if you want to use a worker for the `EditSession`.
* @param {Boolean} useWorker Set to `true` to use a worker
*
**/
/**
* Returns `true` if workers are being used.
**/
/**
* Reloads all the tokens on the current session. This function calls [[BackgroundTokenizer.start `BackgroundTokenizer.start ()`]] to all the rows; it also emits the `'tokenizerUpdate'` event.
**/
@ -2366,6 +2337,26 @@ var EditSession = function(text, mode) {
require("./edit_session/folding").Folding.call(EditSession.prototype);
require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype);
/**
* Pass `true` to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character (`'\t'`).
* @param {Boolean} useSoftTabs Value indicating whether or not to use soft tabs
* @method EditSession.setUseSoftTabs
**/
/**
* 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.
* @param {Number} tabSize The new tab size
* @method EditSession.setTabSize
**/
/**
* Identifies if you want to use a worker for the `EditSession`.
* @param {Boolean} useWorker Set to `true` to use a worker
* @method EditSession.setUseWorker
**/
/**
* Sets the number displayed in the gutter for the first line of code.
* @param {Number} firstLineNumber The number displayed in the gutter for the first line of code.
* @method EditSession.setFirstLineNumber
*/
config.defineOptions(EditSession.prototype, "session", {
wrap: {
set: function(value) {

View file

@ -802,139 +802,6 @@ var Editor = function(renderer, session) {
this.session.toggleOverwrite();
};
/**
* Sets how fast the mouse scrolling should do.
* @param {Number} speed A value indicating the new speed (in milliseconds)
*
*
*
**/
/**
* Returns the value indicating how fast the mouse scroll speed is (in milliseconds).
* @returns {Number}
**/
/**
* Sets the delay (in milliseconds) of the mouse drag.
* @param {Number} dragDelay A value indicating the new delay
*
*
*
**/
/**
* Returns the current mouse drag delay.
* @returns {Number}
**/
/**
* Emitted when the selection style changes, via [[Editor.setSelectionStyle]].
* @event changeSelectionStyle
* @param {Object} data Contains one property, `data`, which indicates the new selection style
*
*
*
**/
/**
* Indicates how selections should occur.
*
* By default, selections are set to "line". There are no other styles at the moment,
* although this code change in the future.
*
* This function also emits the `'changeSelectionStyle'` event.
*
* @param {String} style The new selection style
*
*
**/
/**
* Returns the current selection style.
* @returns {String}
**/
/**
* Determines whether or not the current line should be highlighted.
* @param {Boolean} shouldHighlight Set to `true` to highlight the current line
*
**/
/**
* Returns `true` if current lines are always highlighted.
* @return {Boolean}
**/
/**
* Determines if the currently selected word should be highlighted.
* @param {Boolean} shouldHighlight Set to `true` to highlight the currently selected word
*
*
**/
/**
* Returns `true` if currently highlighted words are to be highlighted.
* @returns {Boolean}
**/
/**
* If `showInvisibiles` is set to `true`, invisible characters—like spaces or new lines—are show in the editor.
* @param {Boolean} showInvisibles Specifies whether or not to show invisible characters
*
*
**/
/**
* Returns `true` if invisible characters are being shown.
* @returns {Boolean}
**/
/**
* If `showPrintMargin` is set to `true`, the print margin is shown in the editor.
* @param {Boolean} showPrintMargin Specifies whether or not to show the print margin
*
*
**/
/**
* Returns `true` if the print margin is being shown.
* @returns {Boolean}
**/
/**
* Sets the column defining where the print margin should be.
* @param {Number} showPrintMargin Specifies the new print margin
*
*
*
**/
/**
* Returns the column number of where the print margin is.
* @returns {Number}
**/
/**
* If `readOnly` is true, then the editor is set to read-only mode, and none of the content can change.
* @param {Boolean} readOnly Specifies whether the editor can be modified or not
*
*
**/
/**
* Returns `true` if the editor is set to read-only mode.
* @returns {Boolean}
**/
/**
* Specifies whether to use behaviors or not. ["Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.]{: #BehaviorsDef}
* @param {Boolean} enabled Enables or disables behaviors
*
*
**/
/**
* Specifies whether to use wrapping behaviors or not, i.e. automatically wrapping the selection with characters such as brackets
* when such a character is typed in.
* @param {Boolean} enabled Enables or disables wrapping behaviors
*
**/
/**
* Returns `true` if the wrapping behaviors are currently enabled.
**/
/**
* Indicates whether the fold widgets are shown or not.
* @param {Boolean} show Specifies whether the fold widgets are shown
*
**/
/**
* Returns `true` if the fold widgets are shown.
* @return {Boolean}
**/
/**
* Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
* @param {String} dir The direction of the deletion to occur, either "left" or "right"
@ -2008,6 +1875,102 @@ var Editor = function(renderer, session) {
}).call(Editor.prototype);
/**
* Sets how fast the mouse scrolling should do.
* @param {Number} speed A value indicating the new speed (in milliseconds)
* @method Editor.setScrollSpeed
**/
/**
* Returns the value indicating how fast the mouse scroll speed is (in milliseconds).
* @returns {Number}
* @method Editor.getScrollSpeed
**/
/**
* Sets the delay (in milliseconds) of the mouse drag.
* @param {Number} dragDelay A value indicating the new delay
* @method Editor.setDragDelay
**/
/**
* Returns the current mouse drag delay.
* @returns {Number}
* @method Editor.getDragDelay
**/
/**
* Emitted when the selection style changes, via [[Editor.setSelectionStyle]].
* @event changeSelectionStyle
* @param {Object} data Contains one property, `data`, which indicates the new selection style
**/
/**
* Draw selection markers spanning whole line, or only over selected text. Default value is "line"
* @param {String} style The new selection style "line"|"text"
* @method Editor.setSelectionStyle
**/
/**
* Determines whether or not the current line should be highlighted.
* @param {Boolean} shouldHighlight Set to `true` to highlight the current line
* @method Editor.setHighlightActiveLine
**/
/**
* Returns `true` if current lines are always highlighted.
* @return {Boolean}
* @method Editor.getHighlightActiveLine
**/
/**
* Determines if the currently selected word should be highlighted.
* @param {Boolean} shouldHighlight Set to `true` to highlight the currently selected word
* @method Editor.setHighlightSelectedWord
**/
/**
* If `showInvisibiles` is set to `true`, invisible characters—like spaces or new lines—are show in the editor.
* @param {Boolean} showInvisibles Specifies whether or not to show invisible characters
* @method Editor.setShowInvisibles
**/
/**
* If `showPrintMargin` is set to `true`, the print margin is shown in the editor.
* @param {Boolean} showPrintMargin Specifies whether or not to show the print margin
* @method Editor.setShowPrintMargin
**/
/**
* Returns `true` if the print margin is being shown.
* @returns {Boolean}
* @method Editor.getShowPrintMargin
**/
/**
* Sets the column defining where the print margin should be.
* @param {Number} showPrintMargin Specifies the new print margin
* @method Editor.setPrintMarginColumn
**/
/**
* Returns the column number of where the print margin is.
* @returns {Number}
* @method Editor.getPrintMarginColumn
**/
/**
* If `readOnly` is true, then the editor is set to read-only mode, and none of the content can change.
* @param {Boolean} readOnly Specifies whether the editor can be modified or not
* @method Editor.setReadOnly
**/
/**
* Returns `true` if the editor is set to read-only mode.
* @returns {Boolean}
* @method Editor.getReadOnly
**/
/**
* Specifies whether to use behaviors or not. ["Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.]{: #BehaviorsDef}
* @param {Boolean} enabled Enables or disables behaviors
* @method Editor.setBehavioursEnabled
**/
/**
* Specifies whether to use wrapping behaviors or not, i.e. automatically wrapping the selection with characters such as brackets
* when such a character is typed in.
* @param {Boolean} enabled Enables or disables wrapping behaviors
* @method Editor.setWrapBehavioursEnabled
**/
/**
* Indicates whether the fold widgets should be shown or not.
* @param {Boolean} show Specifies whether the fold widgets are shown
* @method Editor.setShowFoldWidgets
**/
config.defineOptions(Editor.prototype, "editor", {
selectionStyle: {
@ -2042,6 +2005,7 @@ config.defineOptions(Editor.prototype, "editor", {
printMarginColumn: "renderer",
fadeFoldWidgets: "renderer",
showFoldWidgets: "renderer",
showGutter: "renderer",
displayIndentGuides: "renderer",
scrollSpeed: "$mouseHandler",
dragDelay: "$mouseHandler",

View file

@ -357,64 +357,6 @@ var VirtualRenderer = function(container, theme) {
return this.session.adjustWrapLimit(limit);
};
/**
* Identifies whether you want to have an animated scroll or not.
* @param {Boolean} shouldAnimate Set to `true` to show animated scrolls
*
*
*
**/
/**
*
* Returns whether an animated scroll happens or not.
* @returns {Boolean}
**/
/**
* Identifies whether you want to show invisible characters or not.
* @param {Boolean} showInvisibles Set to `true` to show invisibles
*
*
*
**/
/**
*
* Returns whether invisible characters are being shown or not.
* @returns {Boolean}
**/
/**
* Identifies whether you want to show the print margin or not.
* @param {Boolean} showPrintMargin Set to `true` to show the print margin
*
*
*
**/
/**
* Returns whether the print margin is being shown or not.
* @returns {Boolean}
**/
/**
* Identifies whether you want to show the print margin column or not.
* @param {Boolean} showPrintMargin Set to `true` to show the print margin column
*
*
*
**/
/**
*
* Returns whether the print margin column is being shown or not.
* @returns {Boolean}
**/
/**
*
* Returns `true` if the gutter is being shown.
* @returns {Boolean}
**/
/**
* Identifies whether you want to show the gutter or not.
* @param {Boolean} show Set to `true` to show the gutter
*
*
**/
this.$updateGutterLineHighlight = function() {
this.$gutterLineHighlight.style.top = this.$cursorLayer.$pixelPos.top - this.layerConfig.offset + "px";
this.$gutterLineHighlight.style.height = this.layerConfig.lineHeight + "px";
@ -1278,7 +1220,57 @@ var VirtualRenderer = function(container, theme) {
}).call(VirtualRenderer.prototype);
/**
* Identifies whether you want to have an animated scroll or not.
* @param {Boolean} shouldAnimate Set to `true` to show animated scrolls
* @method VirtualRenderer.setAnimatedScroll
*
**/
/**
* Returns whether an animated scroll happens or not.
* @returns {Boolean}
* @method VirtualRenderer.getAnimatedScroll
**/
/**
* Identifies whether you want to show invisible characters or not.
* @param {Boolean} showInvisibles Set to `true` to show invisibles
* @method VirtualRenderer.setShowInvisibles
**/
/**
* Returns whether invisible characters are being shown or not.
* @returns {Boolean}
* @method VirtualRenderer.getShowInvisibles
**/
/**
* Identifies whether you want to show the print margin or not.
* @param {Boolean} showPrintMargin Set to `true` to show the print margin
* @method VirtualRenderer.setShowPrintMargin
**/
/**
* Returns whether the print margin is being shown or not.
* @returns {Boolean}
* @method VirtualRenderer.getShowPrintMargin
**/
/**
* Identifies whether you want to show the print margin column or not.
* @param {Boolean} showPrintMargin Set to `true` to show the print margin column
* @method VirtualRenderer.setPrintMarginColumn
**/
/**
* Returns whether the print margin column is being shown or not.
* @returns {Boolean}
* @method VirtualRenderer.getPrintMarginColumn
**/
/**
* Returns `true` if the gutter is being shown.
* @returns {Boolean}
* @method VirtualRenderer.getShowGutter
**/
/**
* Identifies whether you want to show the gutter or not.
* @param {Boolean} show Set to `true` to show the gutter
* @method VirtualRenderer.setShowGutter
**/
config.defineOptions(VirtualRenderer.prototype, "renderer", {
animatedScroll: {initialValue: false},
showInvisibles: {