C# Класс ICSharpCode.AvalonEdit.Editing.Selection

Base class for selections.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

Contains() публичный Метод

Gets whether the specified offset is included in the selection.
public Contains ( int offset ) : bool
offset int
Результат bool

CreateDataObject() публичный Метод

Creates a data object containing the selection's text.
public CreateDataObject ( TextArea textArea ) : System.Windows.DataObject
textArea TextArea
Результат System.Windows.DataObject

CreateHtmlFragment() публичный Метод

Creates a HTML fragment for the selected text.
public CreateHtmlFragment ( TextArea textArea, HtmlOptions options ) : string
textArea TextArea
options ICSharpCode.AvalonEdit.Highlighting.HtmlOptions
Результат string

Equals() публичный абстрактный Метод

public abstract Equals ( object obj ) : bool
obj object
Результат bool

GetHashCode() публичный абстрактный Метод

public abstract GetHashCode ( ) : int
Результат int

GetText() публичный Метод

Gets the selected text.
public GetText ( TextDocument document ) : string
document ICSharpCode.AvalonEdit.Document.TextDocument
Результат string

IsFindOnPageSelection() публичный Метод

public IsFindOnPageSelection ( ) : bool
Результат bool

IsMultiline() публичный Метод

Gets whether the selection is multi-line.
public IsMultiline ( TextDocument document ) : bool
document ICSharpCode.AvalonEdit.Document.TextDocument
Результат bool

ReplaceSelectionWithText() публичный абстрактный Метод

Replaces the selection with the specified text.
public abstract ReplaceSelectionWithText ( TextArea textArea, string newText ) : void
textArea TextArea
newText string
Результат void

SetEndpoint() публичный абстрактный Метод

Returns a new selection with the changed end point.
Cannot set endpoint for empty selection
public abstract SetEndpoint ( int newEndOffset ) : Selection
newEndOffset int
Результат Selection

StartSelectionOrSetEndpoint() публичный Метод

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
Результат Selection

UpdateOnDocumentChange() публичный абстрактный Метод

Updates the selection when the document changes.
public abstract UpdateOnDocumentChange ( ICSharpCode.AvalonEdit.Document.DocumentChangeEventArgs e ) : Selection
e ICSharpCode.AvalonEdit.Document.DocumentChangeEventArgs
Результат Selection