nsISelectionDisplay
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)void characterExtendForBackspace(); Native code only! |
void characterExtendForDelete(); Native code only! |
void characterMove(in boolean forward, in boolean extend); |
boolean checkVisibility(in nsIDOMNode node, in short startOffset, in short endOffset); |
void completeMove(in boolean forward, in boolean extend); |
void completeScroll(in boolean forward); |
boolean getCaretEnabled(); |
short getDisplaySelection(); |
nsISelection getSelection(in short type); |
void intraLineMove(in boolean forward, in boolean extend); |
void lineMove(in boolean forward, in boolean extend); |
void pageMove(in boolean forward, in boolean extend); |
void repaintSelection(in short type); |
void scrollHorizontal(in boolean left); |
void scrollLine(in boolean forward); |
void scrollPage(in boolean forward); |
void scrollSelectionIntoView(in short type, in short region, in short flags); |
void selectAll(); |
void setCaretEnabled(in boolean enabled); |
void setCaretReadOnly(in boolean readOnly); |
void setCaretVisibilityDuringSelection(in boolean visibility); |
void setCaretWidth(in short pixels); Obsolete since Gecko 1.8 |
void setDisplaySelection(in short toggle); |
void wordExtendForDelete(in boolean forward); Native code only! |
void wordMove(in boolean forward, in boolean extend); |
Attribute | Type | Description |
caretVisible |
boolean |
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. Read only. |
Constant | Gecko version | Description | ||
1.7 - 1.9 | 1.9.1 - 1.9.2 | 2.0 | ||
SELECTION_NONE |
0 |
|||
SELECTION_NORMAL |
1 |
|||
SELECTION_SPELLCHECK |
2 |
|||
SELECTION_IME_RAWINPUT |
4 |
|||
SELECTION_IME_SELECTEDRAWTEXT |
8 |
|||
SELECTION_IME_CONVERTEDTEXT |
16 |
|||
SELECTION_IME_SELECTEDCONVERTEDTEXT |
32 |
|||
SELECTION_ACCESSIBILITY |
64 |
For accessibility API usage. | ||
SELECTION_FIND |
128 |
|||
NUM_SELECTIONTYPES |
8 |
9 |
||
SELECTION_ANCHOR_REGION |
0 |
|||
SELECTION_FOCUS_REGION |
1 |
|||
SELECTION_WHOLE_SELECTION |
2 |
|||
NUM_SELECTION_REGIONS |
2 |
3 |
||
SELECTION_OFF |
0 |
|||
SELECTION_HIDDEN |
1 |
Hidden displays selection. | ||
SELECTION_ON |
2 |
|||
SELECTION_DISABLED |
3 |
|||
SELECTION_ATTENTION |
4 |
Constant | Value | Description |
SCROLL_SYNCHRONOUS |
1<<1 |
If 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 |
1<<2 |
If set, only the first ancestor will be scrolled into view. |
SCROLL_CENTER_VERTICALLY |
1<<4 |
If set, the specified location will be scrolled to the center of the view. |
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.
void characterExtendForBackspace();
None.
Will extend the selection one character cell forward in the document. This method is used internally for handling delete key.
void characterExtendForDelete();
None.
Will move the selection one character forward/backward in the document. This will also have the effect of collapsing the selection if the extend = PR_FALSE the "point" of selection that is extended is considered the "focus" point, or the last point adjusted by the selection.
void characterMove( in boolean forward, in boolean extend );
forward
extend
Checks if textnode and offsets are actually rendered in the current precontext.
boolean checkVisibility( in nsIDOMNode node, in short startOffset, in short endOffset );
node
nsIDOMNode
to test.startOffset
endOffset
true
if visible, false
if not.
Will move page view to the top or bottom of the document this will also have the effect of collapsing the selection if the extend = PR_FALSE the "point" of selection that is extended is considered the "focus" point, or the last point adjusted by the selection.
void completeMove( in boolean forward, in boolean extend );
forward
extend
Will move page view to the top or bottom of the document.
void completeScroll( in boolean forward );
forward
Gets the current state of the caret, as set by setCaretEnabled()
.
boolean getCaretEnabled();
None.
If aOutEnabled==null
, returns NS_ERROR_INVALID_ARG else NS_OK.
Will get the display mode for the selection.
short getDisplaySelection();
None.
OFF, ON, DISABLED.
Will return the selection that the presentation shell may implement.
nsISelection getSelection( in short type );
type
Will hold the return value.
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 extend = PR_FALSE the "point" of selection that is extended is considered the "focus" point, or the last point adjusted by the selection.
void intraLineMove( in boolean forward, in boolean extend );
forward
extend
Will move the selection one line forward/backward in the document. This will also have the effect of collapsing the selection if the extend = PR_FALSE the "point" of selection that is extended is considered the "focus" point, or the last point adjusted by the selection.
void lineMove( in boolean forward, in boolean extend );
forward
extend
Will move the selection one page forward/backward in the document. This will also have the effect of collapsing the selection if the extend = PR_FALSE the "point" of selection that is extended is considered the "focus" point, or the last point adjusted by the selection.
void pageMove( in boolean forward, in boolean extend );
forward
extend
Repaints the selection specified.
void repaintSelection( in short type );
type
Will scroll left or right dependent on the boolean.
void scrollHorizontal( in boolean left );
left
Will scroll line up or down dependent on the boolean.
void scrollLine( in boolean forward );
forward
Will scroll the page without affecting the selection.
void scrollPage( in boolean forward );
forward
Scrolls a region of the selection, so that it is visible in the scrolled view.
isSynchronous
is true
, calling this method may flush the pending reflow. This is dangerous for some objects. See bug 418470, comment 12 for details.void scrollSelectionIntoView( in short type, in short region, in short flags );
type
region
flags
Missing Exception
Will select the whole page.
void selectAll();
None.
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.
void setCaretEnabled( in boolean enabled );
enabled
Set the caret readonly or not. An readonly caret will draw but not blink when made visible.
void setCaretReadOnly( in boolean readOnly );
readOnly
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.
void setCaretVisibilityDuringSelection( in boolean visibility );
visibility
Set the carets width. Can be called any time.
void setCaretWidth( in short pixels );
pixels
Will set the display mode for the selection.
void setDisplaySelection( in short toggle );
toggle
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.
void wordExtendForDelete( in boolean forward );
forward
Wwill move the selection one word forward/backward in the document. This will also have the effect of collapsing the selection if the extend = PR_FALSE the "point" of selection that is extended is considered the "focus" point, or the last point adjusted by the selection.
void wordMove( in boolean forward, in boolean extend );
forward
extend