Class Index | File Index

Classes


Class gui.SelectionController


Defined in: SelectionController.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
gui.SelectionController(session, inputMemberId)
Method Summary
Method Attributes Method Name and Description
<inner>  
adjustSelectionByNode(direction, extend, getContainmentNode)
<inner>  
Create a new step iterator with the base Odt filter, and a root filter for the current input member.
<inner>  
createOpMoveCursor(position, length, selectionType)
<inner>  
createWordBoundaryStepIterator(node, offset, includeWhitespace)
Create a new step iterator that will iterate by word boundaries
 
destroy(callback)
<inner>  
Expands the supplied selection to the nearest paragraph boundaries
<inner>  
Expands the supplied selection to the nearest word boundaries
<inner>  
<inner>  
<inner>  
 
 
<inner>  
<inner>  
<inner>  
<inner>  
 
 
<inner>  
<inner>  
<inner>  
moveCursor(direction, extend)
<inner>  
<inner>  
moveCursorByLine(direction, extend)
<inner>  
moveCursorByWord(direction, extend)
<inner>  
<inner>  
moveCursorFocusPoint(focusNode, focusOffset, extend)
Move or extend the local member's selection to the specified focus point.
<inner>  
 
 
<inner>  
<inner>  
moveCursorToLineBoundary(direction, extend)
<inner>  
<inner>  
 
 
<inner>  
<inner>  
<inner>  
rangeToSelection(range, hasForwardSelection)
Derive a selection-type object from the provided cursor
<inner>  
<inner>  
roundToClosestStep(root, filters, range, modifyStart)
Rounds to the closest available step inside the supplied root, and preferably inside the original paragraph the node and offset are within.
<inner>  
selectImage(frameNode)
<inner>  
selectionToRange(selection)
Derive a selection-type object from the provided cursor
<inner>  
selectRange(range, hasForwardSelection, clickCount)
Set the user's cursor to the specified selection.
 
Sets the position locator function for the local input member's visual caret.
Class Detail
gui.SelectionController(session, inputMemberId)
Parameters:
{!ops.Session} session
{!string} inputMemberId
Method Detail
<inner> {undefined} adjustSelectionByNode(direction, extend, getContainmentNode)
Parameters:
{!core.StepDirection} direction
{!boolean} extend
True to extend the selection
{!function(!Node):Node} getContainmentNode
Returns a node container for the supplied node. Usually this will be something like the parent paragraph or root the supplied node is within
Returns:
{undefined}

<inner> {!core.StepIterator} createKeyboardStepIterator()
Create a new step iterator with the base Odt filter, and a root filter for the current input member. The step iterator subtree is set to the root of the current cursor node
Returns:
{!core.StepIterator}

<inner> {!ops.Operation} createOpMoveCursor(position, length, selectionType)
Parameters:
{!number} position
{!number} length
{string=} selectionType
Returns:
{!ops.Operation}

<inner> {!core.StepIterator} createWordBoundaryStepIterator(node, offset, includeWhitespace)
Create a new step iterator that will iterate by word boundaries
Parameters:
{!Node} node
{!number} offset
{!odf.WordBoundaryFilter.IncludeWhitespace} includeWhitespace
Returns:
{!core.StepIterator}

{undefined} destroy(callback)
Parameters:
{!function(!Error=)} callback
passing an error object in case of error
Returns:
{undefined}

<inner> expandToParagraphBoundaries(range)
Expands the supplied selection to the nearest paragraph boundaries
Parameters:
{!Range} range

<inner> expandToWordBoundaries(range)
Expands the supplied selection to the nearest word boundaries
Parameters:
{!Range} range

<inner> {!boolean} extendSelectionBeforeWord()
Returns:
{!boolean}

<inner> {!boolean} extendSelectionDown()
Returns:
{!boolean}

<inner> {!boolean} extendSelectionPastWord()
Returns:
{!boolean}

{!boolean} extendSelectionToDocumentEnd()
Returns:
{!boolean}

{!boolean} extendSelectionToDocumentStart()
Returns:
{!boolean}

<inner> {!boolean} extendSelectionToEntireDocument()
Returns:
{!boolean}

<inner> {!boolean} extendSelectionToLeft()
Returns:
{!boolean}

<inner> {!boolean} extendSelectionToLineEnd()
Returns:
{!boolean}

<inner> {!boolean} extendSelectionToLineStart()
Returns:
{!boolean}

{!boolean} extendSelectionToParagraphEnd()
Returns:
{!boolean}

{!boolean} extendSelectionToParagraphStart()
Returns:
{!boolean}

<inner> {!boolean} extendSelectionToRight()
Returns:
{!boolean}

<inner> {!boolean} extendSelectionUp()
Returns:
{!boolean}

<inner> {undefined} moveCursor(direction, extend)
Parameters:
{!core.StepDirection} direction
{!boolean} extend
Returns:
{undefined}

<inner> {!boolean} moveCursorBeforeWord()
Returns:
{!boolean}

<inner> {undefined} moveCursorByLine(direction, extend)
Parameters:
{!core.StepDirection} direction
PREVIOUS for upwards NEXT for downwards
{!boolean} extend
Returns:
{undefined}

<inner> {undefined} moveCursorByWord(direction, extend)
Parameters:
{!core.StepDirection} direction
{!boolean} extend
whether extend the selection instead of moving the cursor
Returns:
{undefined}

<inner> {!boolean} moveCursorDown()
Returns:
{!boolean}

<inner> {undefined} moveCursorFocusPoint(focusNode, focusOffset, extend)
Move or extend the local member's selection to the specified focus point.
Parameters:
{!Node} focusNode
{!number} focusOffset
{!boolean} extend
Set to true to extend the selection (i.e., the current selection anchor will remain unchanged)
Returns:
{undefined}

<inner> {!boolean} moveCursorPastWord()
Returns:
{!boolean}

{!boolean} moveCursorToDocumentEnd()
Returns:
{!boolean}

{!boolean} moveCursorToDocumentStart()
Returns:
{!boolean}

<inner> {!boolean} moveCursorToLeft()
Returns:
{!boolean}

<inner> {undefined} moveCursorToLineBoundary(direction, extend)
Parameters:
{!core.StepDirection} direction
{!boolean} extend
Returns:
{undefined}

<inner> {!boolean} moveCursorToLineEnd()
Returns:
{!boolean}

<inner> {!boolean} moveCursorToLineStart()
Returns:
{!boolean}

{!boolean} moveCursorToParagraphEnd()
Returns:
{!boolean}

{!boolean} moveCursorToParagraphStart()
Returns:
{!boolean}

<inner> {!boolean} moveCursorToRight()
Returns:
{!boolean}

<inner> {!boolean} moveCursorUp()
Returns:
{!boolean}

<inner> {!{anchorNode: !Node|anchorOffset: !number|focusNode: !Node|focusOffset: !number}} rangeToSelection(range, hasForwardSelection)
Derive a selection-type object from the provided cursor
Parameters:
{!Range} range
{!boolean} hasForwardSelection
Returns:
{!{anchorNode: !Node|anchorOffset: !number|focusNode: !Node|focusOffset: !number}}

<inner> resetLastXPosition(op)
Parameters:
{!ops.Operation} op
Returns:
undefined;

<inner> {undefined} roundToClosestStep(root, filters, range, modifyStart)
Rounds to the closest available step inside the supplied root, and preferably inside the original paragraph the node and offset are within. If (node, offset) is outside the root, the closest root boundary is used instead. This function will assert if no valid step is found within the supplied root.
Parameters:
{!Node} root
Root to contain iteration within
{!Array.} filters
Position filters
{!Range} range
Range to modify
{!boolean} modifyStart
Set to true to modify the start container & offset. If false, the end container and offset will be modified instead.
Returns:
{undefined}

<inner> selectImage(frameNode)
Parameters:
{!Node} frameNode

<inner> {{range: !Range|hasForwardSelection: !boolean}} selectionToRange(selection)
Derive a selection-type object from the provided cursor
Parameters:
{!{anchorNode: Node|anchorOffset: !number|focusNode: Node|focusOffset: !number}} selection
Returns:
{{range: !Range|hasForwardSelection: !boolean}}

<inner> {undefined} selectRange(range, hasForwardSelection, clickCount)
Set the user's cursor to the specified selection. If the start and end containers are in different roots, the anchor's root constraint is used (the anchor is the startContainer for a forward selection, or the endContainer for a reverse selection). If both the range start and range end are outside of the canvas element, no operations are generated.
Parameters:
{!Range} range
{!boolean} hasForwardSelection
Set to true to indicate the range is from anchor (startContainer) to focus (endContainer)
{number=} clickCount
A value of 2 denotes expandToWordBoundaries, while a value of 3 and above will expand to paragraph boundaries.
Returns:
{undefined}

{undefined} setCaretXPositionLocator(locator)
Sets the position locator function for the local input member's visual caret. If set to null, cursor movement by line will be disabled.
Parameters:
{?function():(!number|undefined)} locator
Returns:
{undefined}

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Aug 06 2015 04:10:40 GMT+0200 (MESZ)