Compartir a través de


IVsColorizer.GetStateAtEndOfLine Method

Determines the end-of-line state for a given line.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Declaration
Function GetStateAtEndOfLine ( _
    iLine As Integer, _
    iLength As Integer, _
    pText As IntPtr, _
    iState As Integer _
) As Integer
int GetStateAtEndOfLine(
    int iLine,
    int iLength,
    IntPtr pText,
    int iState
)
int GetStateAtEndOfLine(
    [InAttribute] int iLine, 
    [InAttribute] int iLength, 
    [InAttribute] IntPtr pText, 
    [InAttribute] int iState
)
abstract GetStateAtEndOfLine : 
        iLine:int * 
        iLength:int * 
        pText:IntPtr * 
        iState:int -> int
function GetStateAtEndOfLine(
    iLine : int, 
    iLength : int, 
    pText : IntPtr, 
    iState : int
) : int

Parameters

  • iLine
    Type: System.Int32

    [in] Line whose state is to be queried.

  • iLength
    Type: System.Int32

    [in] Length of the line minus the end-of-line marker (CR, LF, CRLF pair, or 0 (EOF)).

  • pText
    Type: System.IntPtr

    [in] The line's text (examine only up to iLength characters).

  • iState
    Type: System.Int32

    [in] The colorizer's state at the beginning of the line.

Return Value

Type: System.Int32
Returns the state at the end of the line.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsColorizer::GetStateAtEndOfLine(
   [in] long iLine,
   [in] long iLength,
   [in] const WCHAR *pText,
   [in] long iState
);

The environment calls this method when it needs to determine the start state for a particular line, but the lines above that line are not displayed. For example, this method is called when a user scrolls up in the editor.

This method is essentially the same as the ColorizeLine method, except that the editor does not require the line color data. If the colorizer does not require state maintenance (that is, the GetStateMaintenanceFlag method returns false), then this method is not called. Implementations should be as fast as possible to maintain peak editor performance.

.NET Framework Security

See Also

Reference

IVsColorizer Interface

Microsoft.VisualStudio.TextManager.Interop Namespace