C# Class ICSharpCode.AvalonEdit.Editing.Selection

Base class for selections.
Afficher le fichier Open project: kjk/kjkpub Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

CreateDataObject() public méthode

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

CreateHtmlFragment() public méthode

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

Equals() public abstract méthode

public abstract Equals ( object obj ) : bool
obj object
Résultat bool

GetHashCode() public abstract méthode

public abstract GetHashCode ( ) : int
Résultat int

GetText() public méthode

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

IsFindOnPageSelection() public méthode

public IsFindOnPageSelection ( ) : bool
Résultat bool

IsMultiline() public méthode

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

ReplaceSelectionWithText() public abstract méthode

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

SetEndpoint() public abstract méthode

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

StartSelectionOrSetEndpoint() public méthode

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
Résultat Selection

UpdateOnDocumentChange() public abstract méthode

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