Continue layout work

This commit is contained in:
Garen Torikian 2012-04-24 17:29:26 -07:00
commit 2f36c2ee35
27 changed files with 265 additions and 302 deletions

View file

@ -103,7 +103,7 @@ var Editor = function(renderer, session) {
oop.implement(this, EventEmitter);
/**
* Editor.setKeyboardHandler(keyboardHandler) -> Void
* Editor.setKeyboardHandler(keyboardHandler)
*
* Sets a new keyboard handler.
**/
@ -121,7 +121,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.setSession(session) -> Void
* Editor.setSession(session)
* - session (EditSession): The new session to use
*
* Sets a new editsession to use. This method also emits the `'changeSession'` event.
@ -244,7 +244,7 @@ var Editor = function(renderer, session) {
};
/** related to: VirtualRenderer.onResize
* Editor.resize() -> Void
* Editor.resize()
*
* {:VirtualRenderer.onResize}
**/
@ -253,7 +253,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.setTheme(theme) -> Void
* Editor.setTheme(theme)
*
* {:VirtualRenderer.setTheme}
**/
@ -271,7 +271,7 @@ var Editor = function(renderer, session) {
};
/** related to: VirtualRenderer.setStyle
* Editor.setStyle(style) -> Void
* Editor.setStyle(style)
*
* {:VirtualRenderer.setStyle}
**/
@ -280,7 +280,7 @@ var Editor = function(renderer, session) {
};
/** related to: VirtualRenderer.unsetStyle
* Editor.unsetStyle(style) -> Void
* Editor.unsetStyle(style)
*
* {:VirtualRenderer.unsetStyle}
**/
@ -289,7 +289,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.setFontSize(size) -> Void
* Editor.setFontSize(size)
* - size (Number): A font size
*
* Set a new font size (in pixels) for the editor text.
@ -300,7 +300,7 @@ var Editor = function(renderer, session) {
};
/** internal, hide
* Editor.$highlightBrackets() -> Void
* Editor.$highlightBrackets()
*
**/
this.$highlightBrackets = function() {
@ -328,7 +328,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.focus() -> Void
* Editor.focus()
*
* Brings the current `textInput` into focus.
**/
@ -353,7 +353,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.blur() -> Void
* Editor.blur()
*
* Blurs the current `textInput`.
**/
@ -419,9 +419,9 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onScrollTopChange() -> Void
*
* Editor@onScrollTopChange()
*
* Emitted when the scroll top changes.
**/
this.onScrollTopChange = function() {
this.renderer.scrollToY(this.session.getScrollTop());
@ -430,7 +430,7 @@ var Editor = function(renderer, session) {
/**
* Editor@onScrollLeftChange()
*
*
* Emitted when the scroll left changes.
**/
this.onScrollLeftChange = function() {
this.renderer.scrollToX(this.session.getScrollLeft());
@ -439,7 +439,7 @@ var Editor = function(renderer, session) {
/**
* Editor@onCursorChange()
*
*
* Emitted when the cursor changes.
**/
this.onCursorChange = function() {
this.renderer.updateCursor();
@ -616,7 +616,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.insert(text) -> Void
* Editor.insert(text)
* - text (String): The new text to add
*
* Inserts `text` into wherever the cursor is pointing.
@ -737,7 +737,7 @@ var Editor = function(renderer, session) {
};
/** related to: EditSession.setOverwrite
* Editor.setOverwrite(overwrite) -> Void
* Editor.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.
@ -757,7 +757,7 @@ var Editor = function(renderer, session) {
};
/** related to: EditSession.toggleOverwrite
* Editor.toggleOverwrite() -> Void
* Editor.toggleOverwrite()
*
* Sets the value of overwrite to the opposite of whatever it currently is.
**/
@ -766,7 +766,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.setScrollSpeed(speed) -> Void
* Editor.setScrollSpeed(speed)
* - speed (Number): A value indicating the new speed
*
* Sets how fast the mouse scrolling should do.
@ -786,7 +786,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.setDragDelay(dragDelay) -> Void
* Editor.setDragDelay(dragDelay)
* - dragDelay (Number): A value indicating the new delay
*
* Sets the delay (in milliseconds) of the mouse drag.
@ -807,7 +807,7 @@ var Editor = function(renderer, session) {
this.$selectionStyle = "line";
/**
* Editor.setSelectionStyle(style) -> Void
* Editor.setSelectionStyle(style)
* - style (String): The new selection style
*
* Indicates how selections should occur. By default, selections are set to "line". This function also emits the `'changeSelectionStyle'` event.
@ -833,7 +833,7 @@ var Editor = function(renderer, session) {
this.$highlightActiveLine = true;
/**
* Editor.setHighlightActiveLine(shouldHighlight) -> Void
* Editor.setHighlightActiveLine(shouldHighlight)
* - shouldHighlight (Boolean): Set to `true` to highlight the current line
*
* Determines whether or not the current line should be highlighted.
@ -857,7 +857,7 @@ var Editor = function(renderer, session) {
this.$highlightSelectedWord = true;
/**
* Editor.setHighlightSelectedWord(shouldHighlight) -> Void
* Editor.setHighlightSelectedWord(shouldHighlight)
* - shouldHighlight (Boolean): Set to `true` to highlight the currently selected word
*
* Determines if the currently selected word should be highlighted.
@ -883,7 +883,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.setShowInvisibles(showInvisibles) -> Void
* Editor.setShowInvisibles(showInvisibles)
* - showInvisibles (Boolean): Specifies whether or not to show invisible characters
*
* If `showInvisibiles` is set to `true`, invisible characters—like spaces or new lines—are show in the editor.
@ -905,7 +905,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.setShowPrintMargin(showPrintMargin) -> Void
* Editor.setShowPrintMargin(showPrintMargin)
* - showPrintMargin (Boolean): Specifies whether or not to show the print margin
*
* If `showPrintMargin` is set to `true`, the print margin is shown in the editor.
@ -924,7 +924,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.setPrintMarginColumn(showPrintMargin) -> Void
* Editor.setPrintMarginColumn(showPrintMargin)
* - showPrintMargin (Number): Specifies the new print margin
*
* Sets the column defining where the print margin should be.
@ -945,7 +945,7 @@ var Editor = function(renderer, session) {
this.$readOnly = false;
/**
* Editor.setReadOnly(readOnly) -> Void
* Editor.setReadOnly(readOnly)
* - readOnly (Boolean): Specifies whether the editor can be modified or not
*
* If `readOnly` is true, then the editor is set to read-only mode, and none of the content can change.
@ -966,7 +966,7 @@ var Editor = function(renderer, session) {
this.$modeBehaviours = true;
/**
* Editor.setBehavioursEnabled() -> Void
* Editor.setBehavioursEnabled()
* - enabled (Boolean): Enables or disables behaviors
*
* 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}
@ -986,7 +986,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.setShowFoldWidgets(show) -> Void
* Editor.setShowFoldWidgets(show)
* - show (Boolean): Specifies whether the fold widgets are shown
*
* Indicates whether the fold widgets are shown or not.
@ -1011,7 +1011,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.remove(dir) -> Void
* Editor.remove(dir)
* - dir (String): The direction of the deletion to occur, either "left" or "right"
*
* Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
@ -1039,7 +1039,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.removeWordRight() -> Void
* Editor.removeWordRight()
*
* Removes the word directly to the right of the current selection.
**/
@ -1052,7 +1052,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.removeWordLeft() -> Void
* Editor.removeWordLeft()
*
* Removes the word directly to the left of the current selection.
**/
@ -1065,7 +1065,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.removeToLineStart() -> Void
* Editor.removeToLineStart()
*
* Removes all the words to the left of the current selection, until the start of the line.
**/
@ -1078,7 +1078,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.removeToLineEnd() -> Void
* Editor.removeToLineEnd()
*
* Removes all the words to the right of the current selection, until the end of the line.
**/
@ -1097,7 +1097,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.splitLine() -> Void
* Editor.splitLine()
*
* Splits the line at the current selection (by inserting an `'\n'`).
**/
@ -1113,7 +1113,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.transposeLetters() -> Void
* Editor.transposeLetters()
*
* Transposes current line.
**/
@ -1141,7 +1141,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.toLowerCase() -> Void
* Editor.toLowerCase()
*
* Converts the current selection entirely into lowercase.
**/
@ -1158,7 +1158,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.toUpperCase() -> Void
* Editor.toUpperCase()
*
* Converts the current selection entirely into uppercase.
**/
@ -1175,7 +1175,7 @@ var Editor = function(renderer, session) {
};
/** related to: EditSession.indentRows
* Editor.indent() -> Void
* Editor.indent()
*
* Indents the current line.
**/
@ -1203,7 +1203,7 @@ var Editor = function(renderer, session) {
};
/** related to: EditSession.outdentRows
* Editor.blockOutdent() -> Void
* Editor.blockOutdent()
*
* Outdents the current line.
**/
@ -1213,7 +1213,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.toggleCommentLines() -> Void
* Editor.toggleCommentLines()
*
* Given the currently selected range, this function either comments all lines or uncomments all lines (depending on whether it's commented or not).
**/
@ -1224,7 +1224,7 @@ var Editor = function(renderer, session) {
};
/** related to: EditSession.remove
* Editor.removeLines() -> Void
* Editor.removeLines()
*
* Removes all the lines in the current selection
**/
@ -1331,7 +1331,7 @@ var Editor = function(renderer, session) {
/**
* Editor.$moveLines(mover) -> Void
* Editor.$moveLines(mover)
* - mover (Function): A method to call on each selected row
*
* Executes a specific function, which can be anything that manipulates selected lines, such as copying them, duplicating them, or shifting them.
@ -1465,7 +1465,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.selectPageDown() -> Void
* Editor.selectPageDown()
*
* Selects the text from the current position of the document until where a "page down" finishes.
**/
@ -1481,7 +1481,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.selectPageUp() -> Void
* Editor.selectPageUp()
*
* Selects the text from the current position of the document until where a "page up" finishes.
**/
@ -1498,7 +1498,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.gotoPageDown() -> Void
* Editor.gotoPageDown()
*
* Shifts the document to wherever "page down" is, as well as moving the cursor position.
**/
@ -1511,7 +1511,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.gotoPageUp() -> Void
* Editor.gotoPageUp()
*
* Shifts the document to wherever "page up" is, as well as moving the cursor position.
**/
@ -1524,7 +1524,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.scrollPageDown() -> Void
* Editor.scrollPageDown()
*
* Scrolls the document to wherever "page down" is, without changing the cursor position.
**/
@ -1533,7 +1533,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.scrollPageUp() -> Void
* Editor.scrollPageUp()
*
* Scrolls the document to wherever "page up" is, without changing the cursor position.
**/
@ -1542,7 +1542,7 @@ var Editor = function(renderer, session) {
};
/** related to: VirtualRenderer.scrollToRow
* Editor.scrollToRow(row) -> Void
* Editor.scrollToRow(row)
* - row (Number): The row to move to
*
* Moves the editor to the specified row.
@ -1553,7 +1553,7 @@ var Editor = function(renderer, session) {
};
/** related to: VirtualRenderer.scrollToLine
* Editor.scrollToLine(line, center) -> Void
* Editor.scrollToLine(line, center)
* - line (Number): The line to scroll to
* - center (Boolean): If `true`
*
@ -1564,7 +1564,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.centerSelection() -> Void
* Editor.centerSelection()
*
* Attempts to center the current selection on the screen.
**/
@ -1610,7 +1610,7 @@ var Editor = function(renderer, session) {
/** related to: Selection.selectAll
* Editor.selectAll() -> Void
* Editor.selectAll()
*
* Selects all the text in editor.
**/
@ -1621,7 +1621,7 @@ var Editor = function(renderer, session) {
};
/** related to: Selection.clearSelection
* Editor.clearSelection() -> Void
* Editor.clearSelection()
*
* {:Selection.clearSelection}
**/
@ -1630,7 +1630,7 @@ var Editor = function(renderer, session) {
};
/** related to: Selection.moveCursorTo
* Editor.moveCursorTo(row, column) -> Void
* Editor.moveCursorTo(row, column)
* - row (Number): The new row number
* - column (Number): The new column number
*
@ -1642,7 +1642,7 @@ var Editor = function(renderer, session) {
};
/** related to: Selection.moveCursorToPosition
* Editor.moveCursorToPosition(pos) -> Void
* Editor.moveCursorToPosition(pos)
* - pos (Object): An object with two properties, row and column
*
* Moves the cursor to the position indicated by `pos.row` and `pos.column`.
@ -1653,7 +1653,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.jumpToMatching() -> Void
* Editor.jumpToMatching()
*
* Moves the cursor's row and column to the next matching bracket.
*
@ -1677,7 +1677,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.gotoLine(lineNumber, column) -> Void
* Editor.gotoLine(lineNumber, column)
* - lineNumber (Number): The line number to go to
* - column (Number): A column number to go to
*
@ -1696,7 +1696,7 @@ var Editor = function(renderer, session) {
};
/** related to: Editor.moveCursorTo
* Editor.navigateTo(row, column) -> Void
* Editor.navigateTo(row, column)
* - row (Number): The new row number
* - column (Number): The new column number
*
@ -1709,7 +1709,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.navigateUp(times) -> Void
* Editor.navigateUp(times)
* - times (Number): The number of times to change navigation
*
* Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
@ -1721,7 +1721,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.navigateDown(times) -> Void
* Editor.navigateDown(times)
* - times (Number): The number of times to change navigation
*
* Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
@ -1733,7 +1733,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.navigateLeft(times) -> Void
* Editor.navigateLeft(times)
* - times (Number): The number of times to change navigation
*
* Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
@ -1753,7 +1753,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.navigateRight(times) -> Void
* Editor.navigateRight(times)
* - times (Number): The number of times to change navigation
*
* Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
@ -1773,7 +1773,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.navigateLineStart() -> Void
* Editor.navigateLineStart()
*
* Moves the cursor to the start of the current line. Note that this does de-select the current selection.
**/
@ -1783,7 +1783,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.navigateLineEnd() -> Void
* Editor.navigateLineEnd()
*
* Moves the cursor to the end of the current line. Note that this does de-select the current selection.
**/
@ -1793,7 +1793,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.navigateFileEnd() -> Void
* Editor.navigateFileEnd()
*
* Moves the cursor to the end of the current file. Note that this does de-select the current selection.
**/
@ -1803,7 +1803,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.navigateFileStart() -> Void
* Editor.navigateFileStart()
*
* Moves the cursor to the start of the current file. Note that this does de-select the current selection.
**/
@ -1813,7 +1813,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.navigateWordRight() -> Void
* Editor.navigateWordRight()
*
* Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
**/
@ -1823,7 +1823,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.navigateWordLeft() -> Void
* Editor.navigateWordLeft()
*
* Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
**/
@ -1833,7 +1833,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.replace(replacement, options) -> Void
* Editor.replace(replacement, options)
* - replacement (String): The text to replace with
* - options (Object): The [[Search `Search`]] options to use
*
@ -1860,7 +1860,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.replaceAll(replacement, options) -> Void
* Editor.replaceAll(replacement, options)
* - replacement (String): The text to replace with
* - options (Object): The [[Search `Search`]] options to use
*
@ -1915,7 +1915,7 @@ var Editor = function(renderer, session) {
};
/** related to: Search.find
* Editor.find(needle, options) -> Void
* Editor.find(needle, options)
* - needle (String): The text to search for
* - options (Object): An object defining various search properties
*
@ -1930,7 +1930,7 @@ var Editor = function(renderer, session) {
};
/** related to: Editor.find
* Editor.findNext(options) -> Void
* Editor.findNext(options)
*
* Performs another search for `needle` in the document. For more information on `options`, see [[Search `Search`]].
**/
@ -1943,7 +1943,7 @@ var Editor = function(renderer, session) {
};
/** related to: Editor.find
* Editor.findPrevious(options) -> Void
* Editor.findPrevious(options)
*
* Performs a search for `needle` backwards. For more information on `options`, see [[Search `Search`]].
**/
@ -1986,7 +1986,7 @@ var Editor = function(renderer, session) {
};
/** related to: UndoManager.undo
* Editor.undo() -> Void
* Editor.undo()
*
* {:UndoManager.undo}
**/
@ -1995,7 +1995,7 @@ var Editor = function(renderer, session) {
};
/** related to: UndoManager.redo
* Editor.redo() -> Void
* Editor.redo()
*
* {:UndoManager.redo}
**/
@ -2004,7 +2004,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor.destroy() -> Void
* Editor.destroy()
*
* Cleans up the entire editor.
**/