C# Class 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.
Afficher le fichier Open project: kjk/kjkpub Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

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

Method Details

GetNextCaretPosition() public méthode

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

GetRelativeOffset() public méthode

Gets the document offset (relative to the first line start) from a visual column.
public GetRelativeOffset ( int visualColumn ) : int
visualColumn int
Résultat int

GetTextLine() public méthode

Gets the text line containing the specified visual column.
public GetTextLine ( int visualColumn ) : System.Windows.Media.TextFormatting.TextLine
visualColumn int
Résultat System.Windows.Media.TextFormatting.TextLine

GetTextLineByVisualYPosition() public méthode

Gets a TextLine by the visual position.
public GetTextLineByVisualYPosition ( double visualTop ) : System.Windows.Media.TextFormatting.TextLine
visualTop double
Résultat System.Windows.Media.TextFormatting.TextLine

GetTextLineVisualStartColumn() public méthode

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

GetTextLineVisualYPosition() public méthode

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

GetVisualColumn() public méthode

Gets the visual column from a document position (relative to top left of the document).
public GetVisualColumn ( Point point ) : int
point Point
Résultat int

GetVisualColumn() public méthode

Gets the visual column from a document offset relative to the first line start.
public GetVisualColumn ( int relativeTextOffset ) : int
relativeTextOffset int
Résultat int

GetVisualPosition() public méthode

Gets the visual position from the specified visualColumn.
public GetVisualPosition ( int visualColumn, VisualYPosition yPositionMode ) : Point
visualColumn int
yPositionMode VisualYPosition
Résultat Point