nsISelectionController
| IID: | 39429306-4c81-4d8b-9421-eb7d9f43bfd0 |
| Inherits From: | nsISelectionDisplay |
Constants
Methods
void characterMove ( PRBool forward , PRBool extend )
PRBool checkVisibility ( nsIDOMNode node , PRInt16 startOffset , PRInt16 endOffset )
void completeMove ( PRBool forward , PRBool extend )
void completeScroll ( PRBool forward )
PRBool getCaretEnabled ( )
PRInt16 getDisplaySelection ( )
nsISelection getSelection ( PRInt16 type )
void intraLineMove ( PRBool forward , PRBool extend )
void lineMove ( PRBool forward , PRBool extend )
void pageMove ( PRBool forward , PRBool extend )
void repaintSelection ( PRInt16 type )
void scrollHorizontal ( PRBool left )
void scrollLine ( PRBool forward )
void scrollPage ( PRBool forward )
void scrollSelectionIntoView ( PRInt16 type , PRInt16 region , PRBool isSynchronous )
void selectAll ( )
void setCaretEnabled ( PRBool enabled )
void setCaretReadOnly ( PRBool readOnly )
void setCaretVisibilityDuringSelection ( PRBool visibility )
void setDisplaySelection ( PRInt16 toggle )
[noscript] void wordExtendForDelete ( PRBool forward )
void wordMove ( PRBool forward , PRBool extend )
void characterMove ( PRBool forward , PRBool extend )
CharacterMove 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.
- Arguments:
- forward: forward or backward if PR_FALSE
- extend: should it collapse the selection of extend it?
PRBool checkVisibility ( nsIDOMNode node , PRInt16 startOffset , PRInt16 endOffset )
CheckVisibility will return true if textnode and offsets are actually rendered in the current precontext.
- Arguments:
- node: textNode to test
- startOffset: offset in dom to first char of textnode to test
- endOffset: offset in dom to last char of textnode to test
void completeMove ( PRBool forward , PRBool extend )
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 extend = PR_FALSE the "point" of selection that is extended is considered the "focus" point. or the last point adjusted by the selection.
- Arguments:
- forward: forward or backward if PR_FALSE
- extend: should it collapse the selection of extend it?
void completeScroll ( PRBool forward )
CompleteScroll will move page view to the top or bottom of the document
- Arguments:
- forward: forward or backward if PR_FALSE
Gets the current state of the caret.
- Returns:
- if aOutEnabled==null, returns NS_ERROR_INVALID_ARG else NS_OK
PRInt16 getDisplaySelection ( )
GetDisplaySelection will get the display mode for the selection. OFF,ON,DISABLED
nsISelection getSelection ( PRInt16 type )
GetSelection will return the selection that the presentation shell may implement.
- Arguments:
- type: will hold the type of selection //SelectionType
void intraLineMove ( PRBool forward , PRBool extend )
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 extend = PR_FALSE the "point" of selection that is extended is considered the "focus" point. or the last point adjusted by the selection.
- Arguments:
- forward: forward or backward if PR_FALSE
- extend: should it collapse the selection of extend it?
void lineMove ( PRBool forward , PRBool extend )
LineMove 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.
- Arguments:
- forward: forward or backward if PR_FALSE
- extend: should it collapse the selection of extend it?
void pageMove ( PRBool forward , PRBool extend )
PageMove 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.
- Arguments:
- forward: forward or backward if PR_FALSE
- extend: should it collapse the selection of extend it?
void repaintSelection ( PRInt16 type )
RepaintSelection repaints the selection specified by type.
- Arguments:
- type: specifies the selection to repaint.
void scrollHorizontal ( PRBool left )
ScrolHorizontal will scroll left or right dependent on the boolean
- Arguments:
- left: if true will scroll left. if not will scroll right.
void scrollLine ( PRBool forward )
ScrolLine will scroll line up or down dependent on the boolean
- Arguments:
- forward: scroll forward or backwards in selection
void scrollPage ( PRBool forward )
ScrollPage will scroll the page without affecting the selection.
- Arguments:
- forward: scroll forward or backwards in selection
void scrollSelectionIntoView ( PRInt16 type , PRInt16 region , PRBool isSynchronous )
ScrollSelectionIntoView scrolls a region of the selection, so that it is visible in the scrolled view.
- Arguments:
- type: the selection to scroll into view. //SelectionType
- region: the region inside the selection to scroll into view. //SelectionRegion
- isSynchronous: when true, scrolls the selection into view before returning. If false, posts a request which is processed at some point after the method returns.
void setCaretEnabled ( PRBool enabled )
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.
- Arguments:
- enabled
- Returns:
- always NS_OK
void setCaretReadOnly ( PRBool readOnly )
Set the caret readonly or not. An readonly caret will draw but not blink when made visible.
- Arguments:
- readOnly: PR_TRUE to enable caret. PR_FALSE to disable.
- Returns:
- always NS_OK
void setCaretVisibilityDuringSelection ( PRBool visibility )
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.
- Arguments:
- visibility: PR_TRUE to show the caret in selections. PR_FALSE to hide.
- Returns:
- always NS_OK
void setDisplaySelection ( PRInt16 toggle )
SetDisplaySelection will set the display mode for the selection. OFF,ON,DISABLED
- Arguments:
- toggle
void wordExtendForDelete ( PRBool forward )
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.
- Arguments:
- forward: forward or backward if PR_FALSE
void wordMove ( PRBool forward , PRBool extend )
WordMove will 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.
- Arguments:
- forward: forward or backward if PR_FALSE
- extend: should it collapse the selection of extend it?
References
This interface is the type of the following properties:
This interface is passed as an argument to the following methods:
Reference documentation is generated from Mozilla's source.
