SetDisplaySelection will set the display mode for the selection. OFF,ON,DISABLED
GetDisplaySelection will get the display mode for the selection. OFF,ON,DISABLED
GetSelection will return the selection that the presentation
shell may implement.
aType | will hold the type of selection //SelectionType |
_return | will hold the return value |
ScrollSelectionIntoView scrolls a region of the selection,
so that it is visible in the scrolled view.
Note that if isSynchronous is true, then this might flush the pending
reflow. It’s dangerous for some objects. See bug 418470 comment 12.
aType | the selection to scroll into view. //SelectionType |
aRegion | the region inside the selection to scroll into view. //SelectionRegion |
aFlags | the scroll flags. Valid bits include: SCROLL_SYNCHRONOUS: when set, scrolls the selection into view before returning. If not set, posts a request which is processed at some point after the method returns. SCROLL_FIRST_ANCESTOR_ONLY: if set, only the first ancestor will be scrolled into view. SCROLL_OVERFLOW_HIDDEN: if set, scrolls even if the overflow is specified as hidden. |
RepaintSelection repaints the selection specified by aType.
aType | specifies the selection to repaint. |
Set the caret as enabled or disabled. An enabled caret will
draw or blink when made visible. A disabled caret will never show up.
Can be called any time.
aEnable | PR_TRUE to enable caret. PR_FALSE to disable. |
always NS_OK |
Set the caret readonly or not. An readonly caret will
draw but not blink when made visible.
aReadOnly | PR_TRUE to enable caret. PR_FALSE to disable. |
always NS_OK |
Gets the current state of the caret.
aEnabled | [OUT] set to the current caret state, as set by SetCaretEnabled |
if aOutEnabled==null, returns NS_ERROR_INVALID_ARG else NS_OK |
Show the caret even in selections. By default the caret is hidden unless the
selection is collapsed. Use this function to show the caret even in selections.
aVisibility | PR_TRUE to show the caret in selections. PR_FALSE to hide. |
always NS_OK |
CharacterMove will move the selection one character forward/backward in the document.
this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
the “point” of selection that is extended is considered the “focus” point.
or the last point adjusted by the selection.
aForward | forward or backward if PR_FALSE |
aExtend | should it collapse the selection of extend it? |
CharacterExtendForDelete will extend the selection one character cell
forward in the document.
this method is used internally for handling del key.
CharacterExtendForBackspace will extend the selection one character cell
backward in the document.
this method is used internally for handling backspace key only when we’re
after UTF-16 surrogates.
WordMove will move the selection one word forward/backward in the document.
this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
the “point” of selection that is extended is considered the “focus” point.
or the last point adjusted by the selection.
aForward | forward or backward if PR_FALSE |
aExtend | should it collapse the selection of extend it? |
wordExtendForDelete will extend the selection one word forward/backward in the document.
this method is used internally for handling ctrl[option]-backspace and ctrl[option]-del.
aForward | forward or backward if PR_FALSE |
LineMove will move the selection one line forward/backward in the document.
this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
the “point” of selection that is extended is considered the “focus” point.
or the last point adjusted by the selection.
aForward | forward or backward if PR_FALSE |
aExtend | should it collapse the selection of extend it? |
IntraLineMove will move the selection to the front of the line or end of the line
in the document.
this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
the “point” of selection that is extended is considered the “focus” point.
or the last point adjusted by the selection.
aForward | forward or backward if PR_FALSE |
aExtend | should it collapse the selection of extend it? |
PageMove will move the selection one page forward/backward in the document.
this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
the “point” of selection that is extended is considered the “focus” point.
or the last point adjusted by the selection.
aForward | forward or backward if PR_FALSE |
aExtend | should it collapse the selection of extend it? |
CompleteScroll will move page view to the top or bottom of the document
aForward | forward or backward if PR_FALSE |
CompleteMove will move page view to the top or bottom of the document
this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
the “point” of selection that is extended is considered the “focus” point.
or the last point adjusted by the selection.
aForward | forward or backward if PR_FALSE |
aExtend | should it collapse the selection of extend it? |
ScrollPage will scroll the page without affecting the selection.
aForward | scroll forward or backwards in selection |
ScrollLine will scroll line up or down dependent on the boolean
aForward | scroll forward or backwards in selection |
ScrollCharacter will scroll right or left dependent on the boolean
aRight | if true will scroll right. if not will scroll left. |
SelectAll will select the whole page
CheckVisibility will return true if textnode and offsets are actually rendered
in the current precontext.
aNode | textNode to test |
aStartOffset | offset in dom to first char of textnode to test |
aEndOffset | offset in dom to last char of textnode to test |
aReturnBool | boolean returned TRUE if visible FALSE if not |
This is true if the caret is enabled, visible, and currently blinking.
This is still true when the caret is enabled, visible, but in its “off”
blink cycle.