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.
Show file Open project: kjk/kjkpub Class Usage Examples

Public Methods

Method 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

Method 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 method

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
return int

GetRelativeOffset() public method

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

GetTextLine() public method

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

GetTextLineByVisualYPosition() public method

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

GetTextLineVisualStartColumn() public method

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
return int

GetTextLineVisualYPosition() public method

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
return double

GetVisualColumn() public method

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

GetVisualColumn() public method

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

GetVisualPosition() public method

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