Partager via


IVsColorizer.GetStateAtEndOfLine(Int32, Int32, IntPtr, Int32) Method

Definition

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

public:
 int GetStateAtEndOfLine(int iLine, int iLength, IntPtr pText, int iState);
public int GetStateAtEndOfLine (int iLine, int iLength, IntPtr pText, int iState);
abstract member GetStateAtEndOfLine : int * int * nativeint * int -> int
Public Function GetStateAtEndOfLine (iLine As Integer, iLength As Integer, pText As IntPtr, iState As Integer) As Integer

Parameters

iLine
Int32

[in] Line whose state is to be queried.

iLength
Int32

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

pText
IntPtr

nativeint

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

iState
Int32

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

Returns

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.

Applies to