C# Class ICSharpCode.AvalonEdit.Editing.Selection

Base class for selections.
Mostra file Open project: kjk/kjkpub Class Usage Examples

Public Methods

Method Description
Contains ( int offset ) : bool

Gets whether the specified offset is included in the selection.

CreateDataObject ( TextArea textArea ) : System.Windows.DataObject

Creates a data object containing the selection's text.

CreateHtmlFragment ( TextArea textArea, HtmlOptions options ) : string

Creates a HTML fragment for the selected text.

Equals ( object obj ) : bool
GetHashCode ( ) : int
GetText ( TextDocument document ) : string

Gets the selected text.

IsFindOnPageSelection ( ) : bool
IsMultiline ( TextDocument document ) : bool

Gets whether the selection is multi-line.

ReplaceSelectionWithText ( TextArea textArea, string newText ) : void

Replaces the selection with the specified text.

SetEndpoint ( int newEndOffset ) : Selection

Returns a new selection with the changed end point.

StartSelectionOrSetEndpoint ( int startOffset, int newEndOffset ) : Selection

If this selection is empty, starts a new selection from startOffset to newEndOffset, otherwise, changes the endpoint of this selection.

UpdateOnDocumentChange ( ICSharpCode.AvalonEdit.Document.DocumentChangeEventArgs e ) : Selection

Updates the selection when the document changes.

Method Details

Contains() public method

Gets whether the specified offset is included in the selection.
public Contains ( int offset ) : bool
offset int
return bool

CreateDataObject() public method

Creates a data object containing the selection's text.
public CreateDataObject ( TextArea textArea ) : System.Windows.DataObject
textArea TextArea
return System.Windows.DataObject

CreateHtmlFragment() public method

Creates a HTML fragment for the selected text.
public CreateHtmlFragment ( TextArea textArea, HtmlOptions options ) : string
textArea TextArea
options ICSharpCode.AvalonEdit.Highlighting.HtmlOptions
return string

Equals() public abstract method

public abstract Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public abstract method

public abstract GetHashCode ( ) : int
return int

GetText() public method

Gets the selected text.
public GetText ( TextDocument document ) : string
document ICSharpCode.AvalonEdit.Document.TextDocument
return string

IsFindOnPageSelection() public method

public IsFindOnPageSelection ( ) : bool
return bool

IsMultiline() public method

Gets whether the selection is multi-line.
public IsMultiline ( TextDocument document ) : bool
document ICSharpCode.AvalonEdit.Document.TextDocument
return bool

ReplaceSelectionWithText() public abstract method

Replaces the selection with the specified text.
public abstract ReplaceSelectionWithText ( TextArea textArea, string newText ) : void
textArea TextArea
newText string
return void

SetEndpoint() public abstract method

Returns a new selection with the changed end point.
Cannot set endpoint for empty selection
public abstract SetEndpoint ( int newEndOffset ) : Selection
newEndOffset int
return Selection

StartSelectionOrSetEndpoint() public method

If this selection is empty, starts a new selection from startOffset to newEndOffset, otherwise, changes the endpoint of this selection.
public StartSelectionOrSetEndpoint ( int startOffset, int newEndOffset ) : Selection
startOffset int
newEndOffset int
return Selection

UpdateOnDocumentChange() public abstract method

Updates the selection when the document changes.
public abstract UpdateOnDocumentChange ( ICSharpCode.AvalonEdit.Document.DocumentChangeEventArgs e ) : Selection
e ICSharpCode.AvalonEdit.Document.DocumentChangeEventArgs
return Selection