Share via


IVsOutliningSession.AddOutlineRegions Method

Definition

Creates an outlining region over the specified span of text.

public:
 int AddOutlineRegions(System::UInt32 dwOutliningFlags, int cRegions, cli::array <Microsoft::VisualStudio::TextManager::Interop::NewOutlineRegion> ^ rgOutlnReg);
int AddOutlineRegions(unsigned int dwOutliningFlags, int cRegions, std::Array <Microsoft::VisualStudio::TextManager::Interop::NewOutlineRegion> const & rgOutlnReg);
public int AddOutlineRegions (uint dwOutliningFlags, int cRegions, Microsoft.VisualStudio.TextManager.Interop.NewOutlineRegion[] rgOutlnReg);
abstract member AddOutlineRegions : uint32 * int * Microsoft.VisualStudio.TextManager.Interop.NewOutlineRegion[] -> int
Public Function AddOutlineRegions (dwOutliningFlags As UInteger, cRegions As Integer, rgOutlnReg As NewOutlineRegion()) As Integer

Parameters

dwOutliningFlags
UInt32

[in] Outlining flags controlling whether existing outlining regions are removed or preserved. For more information, see ADD_OUTLINE_REGION_FLAGS.

cRegions
Int32

[in] Number of outlining regions to add.

rgOutlnReg
NewOutlineRegion[]

[in, size_is(cRegions)] Caller-allocated array of outlining regions to add. For more information, see NewOutlineRegion.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsOutliningSession::AddOutlineRegions(  
   [in] DWORD dwOutliningFlags,   
   [in] long cRegions,   
   [in, size_is(cRegions)] NewOutlineRegion *rgOutlnReg  
);  

If you have a several regions that you want to outline in the text buffer, then create an array of outline regions and then call AddOutlineRegions once.

Applies to