Compartir a través de


IVsLanguageLineIndent.GetIndentPosition Method

Determines how many "spaces" to add at the start of a line.

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

Syntax

'Declaration
Function GetIndentPosition ( _
    pBaseLayer As IVsTextLayer, _
    BaseBufferLineIndex As Integer, _
    <OutAttribute> ByRef pIndentPosition As Integer _
) As Integer
int GetIndentPosition(
    IVsTextLayer pBaseLayer,
    int BaseBufferLineIndex,
    out int pIndentPosition
)
int GetIndentPosition(
    [InAttribute] IVsTextLayer^ pBaseLayer, 
    [InAttribute] int BaseBufferLineIndex, 
    [OutAttribute] int% pIndentPosition
)
abstract GetIndentPosition : 
        pBaseLayer:IVsTextLayer * 
        BaseBufferLineIndex:int * 
        pIndentPosition:int byref -> int
function GetIndentPosition(
    pBaseLayer : IVsTextLayer, 
    BaseBufferLineIndex : int, 
    pIndentPosition : int
) : int

Parameters

  • BaseBufferLineIndex
    Type: System.Int32

    [in] The index of the line that needs to be indented.

  • pIndentPosition
    Type: System.Int32%

    [out] Returns the number of spaces to add to the beginning of the line.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr2.idl:

HRESULT IVsLanguageLineIndent::GetIndentPosition(
   [in] IVsTextLayer *pBaseLayer,
   [in]long BaseBufferLineIndex,
   [out] long *pIndentPosition
);

The indent position returned must be in view coordinates, that is, the number of columns from the left edge of the view.

.NET Framework Security

See Also

Reference

IVsLanguageLineIndent Interface

Microsoft.VisualStudio.TextManager.Interop Namespace