IVsLanguageLineIndent.GetIndentPosition(IVsTextLayer, Int32, Int32) 方法

定义

确定要在行的开头添加多少 "空格"。

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

参数

pBaseLayer
IVsTextLayer

中一个 IVsTextLayer 对象。

BaseBufferLineIndex
Int32

中需要缩进的行的索引。

pIndentPosition
Int32

弄返回要添加到行开头的空格数。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 textmgr2:

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

返回的缩进位置必须位于视图坐标中,即,视图左边缘的列数。

适用于