C# Класс ICSharpCode.AvalonEdit.Rendering.VisualLine

Represents a visual line in the document. A visual line usually corresponds to one DocumentLine, but it can span multiple lines if all but the first are collapsed.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetNextCaretPosition ( int visualColumn, LogicalDirection direction, CaretPositioningMode mode ) : int

Gets the next possible caret position after visualColumn, or -1 if there is no caret position.

GetRelativeOffset ( int visualColumn ) : int

Gets the document offset (relative to the first line start) from a visual column.

GetTextLine ( int visualColumn ) : System.Windows.Media.TextFormatting.TextLine

Gets the text line containing the specified visual column.

GetTextLineByVisualYPosition ( double visualTop ) : System.Windows.Media.TextFormatting.TextLine

Gets a TextLine by the visual position.

GetTextLineVisualStartColumn ( System.Windows.Media.TextFormatting.TextLine textLine ) : int

Gets the start visual column from the specified text line.

GetTextLineVisualYPosition ( System.Windows.Media.TextFormatting.TextLine textLine, VisualYPosition yPositionMode ) : double

Gets the visual top from the specified text line.

GetVisualColumn ( Point point ) : int

Gets the visual column from a document position (relative to top left of the document).

GetVisualColumn ( int relativeTextOffset ) : int

Gets the visual column from a document offset relative to the first line start.

GetVisualPosition ( int visualColumn, VisualYPosition yPositionMode ) : Point

Gets the visual position from the specified visualColumn.

Приватные методы

Метод Описание
CalculateOffsets ( System.Windows.Media.TextFormatting.TextRunProperties globalTextRunProperties ) : void
ConstructVisualElements ( ITextRunConstructionContext context, ICSharpCode.AvalonEdit.Rendering.VisualLineElementGenerator generators ) : void
HasImplicitStopAtLineEnd ( CaretPositioningMode mode ) : bool
HasImplicitStopAtLineStart ( CaretPositioningMode mode ) : bool
PerformVisualElementConstruction ( ICSharpCode.AvalonEdit.Rendering.VisualLineElementGenerator generators ) : void
RunTransformers ( ITextRunConstructionContext context, IVisualLineTransformer transformers ) : void
SetTextLines ( List textLines ) : void
VisualLine ( TextView textView, DocumentLine firstDocumentLine ) : System

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

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

Gets the next possible caret position after visualColumn, or -1 if there is no caret position.
public GetNextCaretPosition ( int visualColumn, LogicalDirection direction, CaretPositioningMode mode ) : int
visualColumn int
direction LogicalDirection
mode CaretPositioningMode
Результат int

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

Gets the document offset (relative to the first line start) from a visual column.
public GetRelativeOffset ( int visualColumn ) : int
visualColumn int
Результат int

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

Gets the text line containing the specified visual column.
public GetTextLine ( int visualColumn ) : System.Windows.Media.TextFormatting.TextLine
visualColumn int
Результат System.Windows.Media.TextFormatting.TextLine

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

Gets a TextLine by the visual position.
public GetTextLineByVisualYPosition ( double visualTop ) : System.Windows.Media.TextFormatting.TextLine
visualTop double
Результат System.Windows.Media.TextFormatting.TextLine

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

Gets the start visual column from the specified text line.
public GetTextLineVisualStartColumn ( System.Windows.Media.TextFormatting.TextLine textLine ) : int
textLine System.Windows.Media.TextFormatting.TextLine
Результат int

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

Gets the visual top from the specified text line.
public GetTextLineVisualYPosition ( System.Windows.Media.TextFormatting.TextLine textLine, VisualYPosition yPositionMode ) : double
textLine System.Windows.Media.TextFormatting.TextLine
yPositionMode VisualYPosition
Результат double

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

Gets the visual column from a document position (relative to top left of the document).
public GetVisualColumn ( Point point ) : int
point Point
Результат int

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

Gets the visual column from a document offset relative to the first line start.
public GetVisualColumn ( int relativeTextOffset ) : int
relativeTextOffset int
Результат int

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

Gets the visual position from the specified visualColumn.
public GetVisualPosition ( int visualColumn, VisualYPosition yPositionMode ) : Point
visualColumn int
yPositionMode VisualYPosition
Результат Point