Partager via


IVsLanguageLineIndent.GetIndentPosition(IVsTextLayer, Int32, Int32) Method

Definition

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

public:
 int GetIndentPosition(Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer ^ pBaseLayer, int BaseBufferLineIndex, [Runtime::InteropServices::Out] int % pIndentPosition);
int GetIndentPosition(Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer const & pBaseLayer, int BaseBufferLineIndex, [Runtime::InteropServices::Out] int & pIndentPosition);
public int GetIndentPosition (Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer pBaseLayer, int BaseBufferLineIndex, out int pIndentPosition);
abstract member GetIndentPosition : Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer * int * int -> int
Public Function GetIndentPosition (pBaseLayer As IVsTextLayer, BaseBufferLineIndex As Integer, ByRef pIndentPosition As Integer) As Integer

Parameters

pBaseLayer
IVsTextLayer

[in] An IVsTextLayer object.

BaseBufferLineIndex
Int32

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

pIndentPosition
Int32

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

Returns

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.

Applies to