Freigeben über


IVsContainedLanguageColorizer.ColorizeLineFragment Method

Colorizes the specified line fragment or text.

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

Syntax

'Declaration
Function ColorizeLineFragment ( _
    iLine As Integer, _
    iIndex As Integer, _
    iLength As Integer, _
    pszText As String, _
    iState As Integer, _
    <OutAttribute> ByRef pAttributes As UInteger, _
    <OutAttribute> ByRef piNewState As Integer _
) As Integer
int ColorizeLineFragment(
    int iLine,
    int iIndex,
    int iLength,
    string pszText,
    int iState,
    out uint pAttributes,
    out int piNewState
)
int ColorizeLineFragment(
    [InAttribute] int iLine, 
    [InAttribute] int iIndex, 
    [InAttribute] int iLength, 
    [InAttribute] String^ pszText, 
    [InAttribute] int iState, 
    [OutAttribute] unsigned int% pAttributes, 
    [OutAttribute] int% piNewState
)
abstract ColorizeLineFragment : 
        iLine:int * 
        iIndex:int * 
        iLength:int * 
        pszText:string * 
        iState:int * 
        pAttributes:uint32 byref * 
        piNewState:int byref -> int 
function ColorizeLineFragment(
    iLine : int, 
    iIndex : int, 
    iLength : int, 
    pszText : String, 
    iState : int, 
    pAttributes : uint, 
    piNewState : int
) : int

Parameters

  • iLine
    Type: System.Int32
    [in] Number of the line to be colorized.
  • iIndex
    Type: System.Int32
    [in] Starting character index for the line fragment.
  • iLength
    Type: System.Int32
    [in] Number of characters to colorize.
  • pszText
    Type: System.String
    [in] The actual text to colorize. The iLength parameter specifies the number of characters from this string to colorize.
  • iState
    Type: System.Int32
    [in] A state value used by the colorizer representing the state of parsing at the beginning of the line. The parsing state is custom to each colorizer.
  • pAttributes
    Type: System.UInt32%
    [out] Color attributes of the text.
  • piNewState
    Type: System.Int32%
    [out] The parsing state at the end of the specified text.

Return Value

Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.

Remarks

COM Signature

From singlefileeditor.idl:

long IVsContainedLanguageColorizer::ColorizeLineFragment(
   [in]  long         iLine,
   [in]  long         iIndex,
   [in]  long         iLength,
   [in]  const WCHAR *pszText,
   [in]  long         iState,
   [out] ULONG *      pAttributes
);

.NET Framework Security

See Also

Reference

IVsContainedLanguageColorizer Interface

Microsoft.VisualStudio.TextManager.Interop Namespace