IVsLanguageLineIndent::GetIndentPosition Method (IVsTextLayer^, Int32, Int32)

 

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)

int GetIndentPosition(
	IVsTextLayer^ pBaseLayer,
	int BaseBufferLineIndex,
	[OutAttribute] int% pIndentPosition
)

Parameters

pBaseLayer
Type: Microsoft.VisualStudio.TextManager.Interop::IVsTextLayer^

[in] An IVsTextLayer object.

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.

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.

Return to top
Show: