다음을 통해 공유


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

‘선언
Function GetStateAtEndOfLine ( _
    iLine As Integer, _
    iLength As Integer, _
    pText As IntPtr, _
    iState As Integer _
) As Integer
‘사용 방법
Dim instance As IVsColorizer
Dim iLine As Integer
Dim iLength As Integer
Dim pText As IntPtr
Dim iState As Integer
Dim returnValue As Integer

returnValue = instance.GetStateAtEndOfLine(iLine, _
    iLength, pText, iState)
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

IVsColorizer Members

Microsoft.VisualStudio.TextManager.Interop Namespace