Index: trunk/parsers/wikidom/lib/es/es.Position.js |
— | — | @@ -1,12 +1,16 @@ |
2 | 2 | /** |
3 | | - * Pixel position, a 2D position within a rendered document. |
| 3 | + * Pixel position. |
4 | 4 | * |
5 | 5 | * This can also support an optional bottom field, to represent a vertical line, such as a cursor. |
6 | 6 | * |
| 7 | + * @class |
| 8 | + * @constructor |
7 | 9 | * @param left {Integer} Horizontal position |
8 | 10 | * @param top {Integer} Vertical top position |
9 | 11 | * @param bottom {Integer} Vertical bottom position of bottom (optional, default: top) |
10 | | - * @returns {es.Position} |
| 12 | + * @property left {Integer} Horizontal position |
| 13 | + * @property top {Integer} Vertical top position |
| 14 | + * @property bottom {Integer} Vertical bottom position of bottom |
11 | 15 | */ |
12 | 16 | es.Position = function( left, top, bottom ) { |
13 | 17 | this.left = left || 0; |
Index: trunk/parsers/wikidom/lib/es/es.ListBlockItem.js |
— | — | @@ -1,5 +1,17 @@ |
2 | 2 | /** |
3 | | - * es.ListBlockItem |
| 3 | + * List item. |
| 4 | + * |
| 5 | + * @class |
| 6 | + * @constructor |
| 7 | + * @extends {es.EventEmitter} |
| 8 | + * @extends {es.Container} |
| 9 | + * @param line {Object} WikiDom line object to convert and use initially |
| 10 | + * @param lists {Array} List of WikiDom list objects to convert and use initially |
| 11 | + * @property lists {Array} |
| 12 | + * @property $line |
| 13 | + * @property $content |
| 14 | + * @property content |
| 15 | + * @property flow |
4 | 16 | */ |
5 | 17 | es.ListBlockItem = function( line, lists ) { |
6 | 18 | // Inheritance |
Index: trunk/parsers/wikidom/lib/es/es.Location.js |
— | — | @@ -1,9 +1,12 @@ |
2 | 2 | /** |
3 | | - * Content location, an offset within a block. |
| 3 | + * Offset within a block. |
4 | 4 | * |
5 | | - * @param block {es.Block} Location target |
6 | | - * @param offset {Integer} Location offset |
7 | | - * @returns {es.Location} |
| 5 | + * @class |
| 6 | + * @constructor |
| 7 | + * @param block {es.Block} Block offset is within |
| 8 | + * @param offset {Integer} Offset within block |
| 9 | + * @property block {es.Block} Block offset is within |
| 10 | + * @property offset {Integer} Offset within block (optional, default: 0) |
8 | 11 | */ |
9 | 12 | es.Location = function( block, offset ) { |
10 | 13 | this.block = block; |
Index: trunk/parsers/wikidom/lib/es/es.Content.js |
— | — | @@ -1,14 +1,16 @@ |
2 | | -/* Classes */ |
3 | | - |
4 | 2 | /** |
| 3 | + * Annotated content. |
| 4 | + * |
5 | 5 | * Content objects are wrappers around arrays of plain or annotated characters. Data in this form |
6 | 6 | * is ultimately equivalent to but more efficient to work with than WikiDom line objects (plain text |
7 | 7 | * paired with offset annotation), especially when performing substring operations. Content can be |
8 | 8 | * derived from or converted to one or more WikiDom line objects. |
9 | 9 | * |
| 10 | + * @class |
| 11 | + * @constructor |
10 | 12 | * @extends {es.EventEmitter} |
11 | 13 | * @param content {Array} List of plain or annotated characters |
12 | | - * @returns {es.Content} |
| 14 | + * @property data {Array} |
13 | 15 | */ |
14 | 16 | es.Content = function( content ) { |
15 | 17 | es.EventEmitter.call( this ); |
Index: trunk/parsers/wikidom/lib/es/es.EventEmitter.js |
— | — | @@ -1,3 +1,10 @@ |
| 2 | +/** |
| 3 | + * Event emitter. |
| 4 | + * |
| 5 | + * @class |
| 6 | + * @constructor |
| 7 | + * @property events {Object} |
| 8 | + */ |
2 | 9 | es.EventEmitter = function() { |
3 | 10 | this.events = {}; |
4 | 11 | } |
Index: trunk/parsers/wikidom/lib/es/es.TextFlow.js |
— | — | @@ -1,10 +1,19 @@ |
2 | 2 | /** |
3 | | - * Renders and provides access to flowed text. |
| 3 | + * Flowing text renderer. |
4 | 4 | * |
| 5 | + * @class |
| 6 | + * @constructor |
5 | 7 | * @extends {es.EventEmitter} |
6 | | - * @param $container {jQuery Selection} Element to render into |
| 8 | + * @param $container {jQuery} Element to render into |
7 | 9 | * @param content {es.Content} Initial content to render |
8 | | - * @returns {es.TextFlow} |
| 10 | + * @property $ {jQuery} |
| 11 | + * @property content {es.Content} |
| 12 | + * @property boundaries {Array} |
| 13 | + * @property lines {Array} |
| 14 | + * @property width {Integer} |
| 15 | + * @property bondaryTest {RegExp} |
| 16 | + * @property widthCache {Object} |
| 17 | + * @property renderState {Object} |
9 | 18 | */ |
10 | 19 | es.TextFlow = function( $container, content ) { |
11 | 20 | // Inheritance |
Index: trunk/parsers/wikidom/lib/es/es.Cursor.js |
— | — | @@ -1,6 +1,10 @@ |
2 | 2 | /** |
| 3 | + * Blinking cursor. |
3 | 4 | * |
4 | | - * @returns {es.Cursor} |
| 5 | + * @class |
| 6 | + * @constructor |
| 7 | + * @property cursorInterval {Interval} |
| 8 | + * @property $ {jQuery} |
5 | 9 | */ |
6 | 10 | es.Cursor = function() { |
7 | 11 | this.cursorInterval = null; |
Index: trunk/parsers/wikidom/lib/es/es.Document.js |
— | — | @@ -1,8 +1,12 @@ |
2 | 2 | /** |
| 3 | + * Ordered collection of blocks. |
3 | 4 | * |
| 5 | + * @class |
| 6 | + * @constructor |
4 | 7 | * @extends {es.EventEmitter} |
5 | 8 | * @param blocks {Array} List of blocks |
6 | | - * @returns {es.Document} |
| 9 | + * @property blocks {Array} |
| 10 | + * @property width {Integer} |
7 | 11 | */ |
8 | 12 | es.Document = function( blocks ) { |
9 | 13 | es.Container.call( this, 'document', 'blocks', blocks ); |
Index: trunk/parsers/wikidom/lib/es/es.ParagraphBlock.js |
— | — | @@ -1,9 +1,13 @@ |
2 | 2 | /** |
3 | | - * es.ParagraphBlock |
| 3 | + * Paragraph block. |
4 | 4 | * |
| 5 | + * @class |
| 6 | + * @constructor |
5 | 7 | * @extends {es.Block} |
6 | 8 | * @param lines {Array} List of Wikidom line objects |
7 | | - * @returns {es.ParagraphBlock} |
| 9 | + * @property content {es.Content} |
| 10 | + * @property $ {jQuery} |
| 11 | + * @property flow {es.TextFlow} |
8 | 12 | */ |
9 | 13 | es.ParagraphBlock = function( lines ) { |
10 | 14 | es.Block.call( this ); |
Index: trunk/parsers/wikidom/lib/es/es.Container.js |
— | — | @@ -1,8 +1,16 @@ |
2 | 2 | /** |
| 3 | + * Generic synchronized Object/Element container. |
3 | 4 | * |
| 5 | + * @class |
| 6 | + * @constructor |
4 | 7 | * @extends {es.EventEmitter} |
| 8 | + * @param typeName {String} |
| 9 | + * @param listName {String} |
5 | 10 | * @param items {Array} List of items |
6 | | - * @returns {es.Container} |
| 11 | + * @property _typeName {String} |
| 12 | + * @property _listName {String} |
| 13 | + * @property _list {Array} |
| 14 | + * @property $ {jQuery} |
7 | 15 | */ |
8 | 16 | es.Container = function( typeName, listName, items ) { |
9 | 17 | es.EventEmitter.call( this ); |
Index: trunk/parsers/wikidom/lib/es/es.ListBlockList.js |
— | — | @@ -1,5 +1,14 @@ |
2 | 2 | /** |
3 | | - * es.ListBlockList |
| 3 | + * Number or bullet list. |
| 4 | + * |
| 5 | + * @class |
| 6 | + * @constructor |
| 7 | + * @extends {es.EventEmitter} |
| 8 | + * @extends {es.Container} |
| 9 | + * @param style {String} Style of list, either "number" or "bullet" |
| 10 | + * @param items {Array} List of es.ListBlockItem objects to initialize list with |
| 11 | + * @property style {String} Style of list |
| 12 | + * @property items {Array} List of es.ListBlockItem objects |
4 | 13 | */ |
5 | 14 | es.ListBlockList = function( style, items ) { |
6 | 15 | // Inheritance |
Index: trunk/parsers/wikidom/lib/es/es.Selection.js |
— | — | @@ -1,9 +1,14 @@ |
2 | 2 | /** |
3 | 3 | * Content selection, a pair of locations. |
4 | 4 | * |
| 5 | + * @class |
| 6 | + * @constructor |
5 | 7 | * @param from {es.Location} Starting location |
6 | 8 | * @param to {es.Location} Ending location |
7 | | - * @returns {es.Selection} |
| 9 | + * @property from {es.Location} |
| 10 | + * @property to {es.Location} |
| 11 | + * @property start {es.Location} |
| 12 | + * @property end {es.Location} |
8 | 13 | */ |
9 | 14 | es.Selection = function( from, to ) { |
10 | 15 | this.from = from; |
Index: trunk/parsers/wikidom/lib/es/es.ListBlock.js |
— | — | @@ -1,10 +1,14 @@ |
2 | 2 | /** |
3 | 3 | * es.ListBlock |
4 | 4 | * |
| 5 | + * |
| 6 | + * @class |
| 7 | + * @constructor |
5 | 8 | * @extends {es.Block} |
6 | 9 | * @param style {String} Type of list, either "number" or "bullet" |
7 | 10 | * @param items {Array} List of es.ListBlockItems to append initially to the root list |
8 | | - * @return {es.ListBlock} |
| 11 | + * @property list {es.ListBlockList} |
| 12 | + * @property $ {jQuery} |
9 | 13 | */ |
10 | 14 | es.ListBlock = function( style, items ) { |
11 | 15 | es.Block.call( this ); |
Index: trunk/parsers/wikidom/lib/es/es.Surface.js |
— | — | @@ -1,8 +1,23 @@ |
2 | 2 | /** |
| 3 | + * Wikitext document editing surface. |
3 | 4 | * |
4 | | - * @param $container |
5 | | - * @param doc |
6 | | - * @returns {Surface} |
| 5 | + * @class |
| 6 | + * @constructor |
| 7 | + * @param $container {jQuery} |
| 8 | + * @param doc {es.Document} |
| 9 | + * @property $ {jQuery} |
| 10 | + * @property doc {es.Document} |
| 11 | + * @property location {es.Location} |
| 12 | + * @property selection {es.Selection} |
| 13 | + * @property initialHorizontalPosition {Integer} |
| 14 | + * @property mouse {Object} |
| 15 | + * @property keyboard {Object} |
| 16 | + * @property $ranges {jQuery} |
| 17 | + * @property $rangeStart {jQuery} |
| 18 | + * @property $rangeFill {jQuery} |
| 19 | + * @property $rangeEnd {jQuery} |
| 20 | + * @property cursor {es.Cursor} |
| 21 | + * @property $input {jQuery} |
7 | 22 | */ |
8 | 23 | es.Surface = function( $container, doc ) { |
9 | 24 | var surface = this; |
Index: trunk/parsers/wikidom/lib/es/es.Block.js |
— | — | @@ -1,9 +1,13 @@ |
2 | 2 | /** |
| 3 | + * Document block. |
| 4 | + * |
3 | 5 | * Base object for all blocks, providing basic shared functionality and stubs for required |
4 | 6 | * implementations. |
5 | 7 | * |
| 8 | + * @class |
| 9 | + * @constructor |
6 | 10 | * @extends {es.EventEmitter} |
7 | | - * @returns {es.Block} |
| 11 | + * @property document {es.Document} |
8 | 12 | */ |
9 | 13 | es.Block = function() { |
10 | 14 | es.EventEmitter.call( this ); |
Index: trunk/parsers/wikidom/lib/es/es.Range.js |
— | — | @@ -1,9 +1,10 @@ |
2 | 2 | /** |
3 | 3 | * Range of content. |
4 | 4 | * |
| 5 | + * @class |
| 6 | + * @constructor |
5 | 7 | * @param start {Integer} Starting point |
6 | 8 | * @param end {Integer} Ending point |
7 | | - * @returns {es.Range} |
8 | 9 | * @property to {Integer} |
9 | 10 | * @property from {Integer} |
10 | 11 | * @property start {Integer} |