Class gui.ShadowCursor
The ShadowCursor class provides a very minimal OdtCursor-like interface.
It does not insert anything into the DOM, and is useful mainly for
simulating a Cursor when you cannot/should not use a real cursor.
Defined in: ShadowCursor.js.
Constructor Attributes | Constructor Name and Description |
---|---|
gui.ShadowCursor(document)
|
Field Attributes | Field Name and Description |
---|---|
<static> |
gui.ShadowCursor.ShadowCursorMemberId
|
Method Attributes | Method Name and Description |
---|---|
Obtain the document to which the cursor corresponds.
|
|
Obtain the memberid the cursor is assigned to.
|
|
Obtain the currently selected range to which the cursor corresponds.
|
|
Gets the current selection type.
|
|
Returns if the selection of this cursor has the
same direction as the direction of the range
|
|
setSelectedRange(range, isForwardSelection)
Set the given range as the selected range for this cursor
|
Field Detail
<static>
gui.ShadowCursor.ShadowCursorMemberId
Method Detail
{!ops.Document}
getDocument()
Obtain the document to which the cursor corresponds.
- Returns:
- {!ops.Document}
{string}
getMemberId()
Obtain the memberid the cursor is assigned to. For a shadow cursor,
this value is always gui.ShadowCursor.ShadowCursorMemberId
- Returns:
- {string}
{!Range}
getSelectedRange()
Obtain the currently selected range to which the cursor corresponds.
- Returns:
- {!Range}
{!string}
getSelectionType()
Gets the current selection type. For a shadow cursor, this value is always
ops.OdtCursor.RangeSelection
- Returns:
- {!string}
{boolean}
hasForwardSelection()
Returns if the selection of this cursor has the
same direction as the direction of the range
- Returns:
- {boolean}
{undefined}
setSelectedRange(range, isForwardSelection)
Set the given range as the selected range for this cursor
- Parameters:
- {!Range} range
- {boolean=} isForwardSelection
- Assumed to be true by default
- Returns:
- {undefined}