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

 

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)

int GetStateAtEndOfLine(
	int iLine,
	int iLength,
	IntPtr pText,
	int iState
)

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.

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.

Return to top
Show: