示例#1
0
 /// <summary>
 /// Gets the first logical line for a given physical (visible) line.
 /// </summary>
 /// <param name="physicalLine">The physical line number.</param>
 /// <returns>The logical line number.</returns>
 /// <remarks>
 ///     <para>
 /// A logical line is a line in the document, whereas a physical line is line that
 /// is rendered in the text editor. A physical line can contain multiple logical lines,
 /// for example when they are collapsed (see "folding").
 /// </para>
 ///     <para>
 /// The logical line numbers correspond with the line numbers drawn in the line-number margin.
 /// (Except that logical lines are 0-based and line-numbers drawn are 1-based.)
 /// </para>
 ///     <para>
 /// Example: <c>lineNumber == 100</c>, foldings are in the <see cref="FoldingManager"/>
 /// between 0..1 (2 folded, invisible lines). This method returns 102 as
 /// the 'logical' line number.
 /// </para>
 ///     <para>
 /// A visible line can contain several logical lines when it contains a (folded)
 /// folding. This method returns the <b>first</b> logical line that belongs to the
 /// visible line.
 /// </para>
 /// </remarks>
 public int GetFirstLogicalLine(int physicalLine)
 {
     return(_lineTrackingStrategy.GetFirstLogicalLine(physicalLine));
 }
 /// <summary>
 /// Gets the first logical line for a given visible line.
 /// </summary>
 /// <param name="visibleLineNumber">The line number (visible lines).</param>
 /// <returns>The logical line number.</returns>
 /// <remarks>
 /// <para>
 /// Example: <c>lineNumber == 100</c>, foldings are in the <see cref="LineManager"/>
 /// between 0..1 (2 folded, invisible lines). This method returns 102 as
 /// the 'logical' line number.
 /// </para>
 /// <para>
 /// A visible line can contain several logical lines when it contains a (folded)
 /// folding. This method returns the <b>first</b> logical line that belongs to the
 /// visible line.
 /// </para>
 /// </remarks>
 public int GetFirstLogicalLine(int visibleLineNumber)
 {
     return(lineTrackingStrategy.GetFirstLogicalLine(visibleLineNumber));
 }