C# Class Skybound.Gecko.GeckoSelection

Manipulates and queries the current selected range of nodes within the document.
显示文件 Open project: tophatmonocle/DirtyGecko

Public Methods

Method Description
AddRange ( GeckoRange range ) : void

Adds a range to the current selection.

Collapse ( GeckoNode parentNode, int offset ) : void

Collapses the selection to a single point, at the specified offset in the given DOM node. When the selection is collapsed, and the content is focused and editable, the caret will blink there.

CollapseToEnd ( ) : void

Collapses the whole selection to a single point at the end of the current selection (irrespective of direction). If content is focused and editable, the caret will blink there.

CollapseToStart ( ) : void

Collapses the whole selection to a single point at the start of the current selection (irrespective of direction). If content is focused and editable, the caret will blink there.

ContainsNode ( GeckoNode node, bool partlyContained ) : bool

Returns whether the specified node is part of the selection.

DeleteFromDocument ( ) : void

Deletes this selection from the document.

Extend ( GeckoNode parentNode, int offset ) : void

Extends the selection by moving the selection end to the specified node and offset, preserving the selection begin position. The new selection end result will always be from the anchorNode to the new focusNode, regardless of direction.

GetRangeAt ( int index ) : GeckoRange

Returns the range at the specified index.

RemoveAllRanges ( ) : void

Removes all ranges from the current selection.

RemoveRange ( GeckoRange range ) : void

Removes a range from the current selection.

SelectAllChildren ( GeckoNode parentNode ) : void

Adds all children of the specified node to the selection.

SelectionLanguageChange ( bool langRtl ) : void

Modifies the cursor BIDI level after a change in keyboard direction.

ToString ( ) : string

Returns the whole selection as a plain text string.

Private Methods

Method Description
GeckoSelection ( nsISelection selection ) : System

Method Details

AddRange() public method

Adds a range to the current selection.
public AddRange ( GeckoRange range ) : void
range GeckoRange
return void

Collapse() public method

Collapses the selection to a single point, at the specified offset in the given DOM node. When the selection is collapsed, and the content is focused and editable, the caret will blink there.
public Collapse ( GeckoNode parentNode, int offset ) : void
parentNode GeckoNode
offset int
return void

CollapseToEnd() public method

Collapses the whole selection to a single point at the end of the current selection (irrespective of direction). If content is focused and editable, the caret will blink there.
public CollapseToEnd ( ) : void
return void

CollapseToStart() public method

Collapses the whole selection to a single point at the start of the current selection (irrespective of direction). If content is focused and editable, the caret will blink there.
public CollapseToStart ( ) : void
return void

ContainsNode() public method

Returns whether the specified node is part of the selection.
public ContainsNode ( GeckoNode node, bool partlyContained ) : bool
node GeckoNode
partlyContained bool True if the function should return true when some part of the node is contained with the selection; when false, the function only returns true when the entire node is contained within the selection.
return bool

DeleteFromDocument() public method

Deletes this selection from the document.
public DeleteFromDocument ( ) : void
return void

Extend() public method

Extends the selection by moving the selection end to the specified node and offset, preserving the selection begin position. The new selection end result will always be from the anchorNode to the new focusNode, regardless of direction.
public Extend ( GeckoNode parentNode, int offset ) : void
parentNode GeckoNode The node where the selection will be extended to.
offset int Where in node to place the offset in the new selection end.
return void

GetRangeAt() public method

Returns the range at the specified index.
public GetRangeAt ( int index ) : GeckoRange
index int
return GeckoRange

RemoveAllRanges() public method

Removes all ranges from the current selection.
public RemoveAllRanges ( ) : void
return void

RemoveRange() public method

Removes a range from the current selection.
public RemoveRange ( GeckoRange range ) : void
range GeckoRange
return void

SelectAllChildren() public method

Adds all children of the specified node to the selection.
public SelectAllChildren ( GeckoNode parentNode ) : void
parentNode GeckoNode
return void

SelectionLanguageChange() public method

Modifies the cursor BIDI level after a change in keyboard direction.
public SelectionLanguageChange ( bool langRtl ) : void
langRtl bool
return void

ToString() public method

Returns the whole selection as a plain text string.
public ToString ( ) : string
return string