Class Index | File Index

Classes


Class gui.SelectionMover


Defined in: SelectionMover.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
gui.SelectionMover(cursor, rootNode)
This class modifies the selection in different ways.
Method Summary
Method Attributes Method Name and Description
<inner>  
convertBackwardStepsBetweenFilters(stepsFilter1, filter1, filter2)
Returns the number of positions to the left the (steps, filter1) pair is equivalent to in filter2 space.
<inner>  
convertForwardStepsBetweenFilters(stepsFilter1, filter1, filter2)
Returns the number of positions to the right the (steps, filter1) pair is equivalent to in filter2 space.
<inner>  
countLinesSteps(lines, filter)
<inner>  
countLineSteps(direction, filter, iterator)
Return the number of steps needed to move across one line in the specified direction.
<inner>  
countStepsToLineBoundary(direction, filter)
Returns the number of steps needed to move to the beginning/end of the line.
<static>  
gui.SelectionMover.createPositionIterator(rootNode)
<inner>  
getClientRect(clientRectangles, useRightEdge)
Get the first or last client rectangle based on the useRightEdge flag.
<inner>  
Resets the positionIterator back to the current cursor position and returns the iterator.
<inner>  
Gets the maximum available offset for a given node.
 
<inner>  
getVisibleRect(container, offset, range, useRightEdge)
Gets the client rect of a position specified by the container and an offset.
Class Detail
gui.SelectionMover(cursor, rootNode)
This class modifies the selection in different ways.
Parameters:
{core.Cursor} cursor
{!Node} rootNode
Method Detail
<inner> {!number} convertBackwardStepsBetweenFilters(stepsFilter1, filter1, filter2)
Returns the number of positions to the left the (steps, filter1) pair is equivalent to in filter2 space.
Parameters:
{!number} stepsFilter1
Number of filter1 steps to count
{!core.PositionFilter} filter1
{!core.PositionFilter} filter2
Returns:
{!number} Equivalent steps in filter2 space

<inner> {!number} convertForwardStepsBetweenFilters(stepsFilter1, filter1, filter2)
Returns the number of positions to the right the (steps, filter1) pair is equivalent to in filter2 space.
Parameters:
{!number} stepsFilter1
Number of filter1 steps to count
{!core.PositionFilter} filter1
{!core.PositionFilter} filter2
Returns:
{!number} Equivalent steps in filter2 space

<inner> {!number} countLinesSteps(lines, filter)
Parameters:
{!number} lines
negative number for upwards, positive number for downwards
{!core.PositionFilter} filter
Returns:
{!number} steps

<inner> {!number} countLineSteps(direction, filter, iterator)
Return the number of steps needed to move across one line in the specified direction. If it is not possible to move across one line, then 0 is returned.
Parameters:
{!number} direction
-1 for upwards, +1 for downwards
{!core.PositionFilter} filter
{!core.PositionIterator} iterator
Returns:
{!number} steps

<inner> {!number} countStepsToLineBoundary(direction, filter)
Returns the number of steps needed to move to the beginning/end of the line.
Parameters:
{!number} direction
-1 for beginning of the line, 1 for end of the line
{!core.PositionFilter} filter
Returns:
{!number} steps

<static> {!core.PositionIterator} gui.SelectionMover.createPositionIterator(rootNode)
Parameters:
{!Node} rootNode
Returns:
{!core.PositionIterator}

<inner> {?{top: !number|left: !number|bottom: !number}} getClientRect(clientRectangles, useRightEdge)
Get the first or last client rectangle based on the useRightEdge flag. If useRightEdge is set to true, this will return the right-most offset of the last available rectangle
Parameters:
{ClientRectList} clientRectangles
{!boolean} useRightEdge
Returns:
{?{top: !number|left: !number|bottom: !number}}

<inner> {!core.PositionIterator} getIteratorAtCursor()
Resets the positionIterator back to the current cursor position and returns the iterator.
Returns:
{!core.PositionIterator}

<inner> {!number} getMaximumNodePosition(node)
Gets the maximum available offset for a given node. For a text node, this is text length, for element nodes, this will be childNodes.length
Parameters:
{!Node} node
Returns:
{!number}

{!gui.StepCounter} getStepCounter()
Returns:
{!gui.StepCounter}

<inner> {{top: !number|left: !number|bottom: !number}} getVisibleRect(container, offset, range, useRightEdge)
Gets the client rect of a position specified by the container and an offset. If this is not possible with a range, then the last element's coordinates are used to guesstimate the position.
Parameters:
{!Node} container
{!number} offset
{!Range} range
{boolean=} useRightEdge
Default value is false. Used when searching for the closest visually equivalent rectangle, starting at the specified container offset. In these circumstances, the right-side of the last client rectangle actually defines the visual position.
Returns:
{{top: !number|left: !number|bottom: !number}}

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jul 17 2014 23:45:40 GMT+0200 (MESZ)