In This Article

IOutliningManager Interface

Provides the base requirements for a manager that tracks outlining nodes associated with an IEditorDocument.

public interface IOutliningManager : ITagger<ICollapsedRegionTag>, ITagger<IIntraTextSpacerTag>, ITaggerBase, IOrderable, IKeyedObject, ITextViewTaggerProvider

Properties

ActiveMode

Gets or sets the active outlining mode.

OutliningMode ActiveMode { get; set; }

Property Value

OutliningMode:

An OutliningMode value indicating the active mode.

Remarks

This property value can be altered by the end user via standard outlining-related menu commands. For more permanent control over which outlining modes are allowed, set the IEditorDocument.OutliningMode property instead.

Document

Gets the document to which this manager is attached.

IEditorDocument Document { get; }

Property Value

IEditorDocument:

The document to which this manager is attached.

RootNode

Gets an IOutliningNode that represents the root outlining node.

IOutliningNode RootNode { get; }

Property Value

IOutliningNode:

An IOutliningNode that represents the root outlining node.

Methods

AddManualNode(TextSnapshotRange, IOutliningNodeDefinition)

Manually adds a new outlining node, generally defined by the end user.

void AddManualNode(TextSnapshotRange snapshotRange, IOutliningNodeDefinition definition)
Parameter Type Description
snapshotRange TextSnapshotRange

The TextSnapshotRange to collapse.

definition IOutliningNodeDefinition

The IOutliningNodeDefinition to use for the node that is created. This parameter may be null if a default definition should be created.

Remarks

This method only works if manual outlining is active.

ApplyDefaultOutliningExpansion()

Applies the default outlining expansion, such that only outlining nodes with an IsDefaultCollapsed value of true are collapsed.

void ApplyDefaultOutliningExpansion()

CollapseToDefinitions()

Collapses all outlining nodes that have an IsImplementation value of true.

void CollapseToDefinitions()

EnsureExpanded(TextSnapshotOffset)

Expands all collapsed outlining nodes that contain the specified offset.

void EnsureExpanded(TextSnapshotOffset snapshotOffset)
Parameter Type Description
snapshotOffset TextSnapshotOffset

The TextSnapshotOffset to ensure is completely within expanded nodes.

ExpandAllOutlining()

Recursively expands all outlining nodes.

void ExpandAllOutlining()

GetOutliningState(TextSnapshotRange)

Returns the OutliningState for a given text range.

OutliningState GetOutliningState(TextSnapshotRange snapshotRange)
Parameter Type Description
snapshotRange TextSnapshotRange

The TextSnapshotRange to examine.

Returns

OutliningState:

The OutliningState for a given text range.

GetStartingNodes(TextSnapshotRange)

Returns a collection of nodes that start in the specified text range.

IEnumerable<IOutliningNode> GetStartingNodes(TextSnapshotRange snapshotRange)
Parameter Type Description
snapshotRange TextSnapshotRange

The TextSnapshotRange to examine.

Returns

IEnumerable<IOutliningNode>:

A collection of nodes that start in the specified text range.

RemoveAllManualNodes()

Removes all user-defined nodes created with previous AddManualNode(TextSnapshotRange, IOutliningNodeDefinition) calls.

void RemoveAllManualNodes()

Remarks

This method only works if manual outlining is active.

RemoveManualNode(TextSnapshotOffset)

Removes the user-defined node created with a previous AddManualNode(TextSnapshotRange, IOutliningNodeDefinition) call that directly contains the specified offset.

void RemoveManualNode(TextSnapshotOffset snapshotOffset)
Parameter Type Description
snapshotOffset TextSnapshotOffset

The TextSnapshotOffset that is contained by the user-defined node.

Remarks

This method only works if manual outlining is active.

ToggleAllOutliningExpansion()

Toggles the collapsed state of all outlining nodes.

void ToggleAllOutliningExpansion()

Remarks

If at least one outlining node is collapsed, all collapsed nodes are expanded. Otherwise, all top-level outlining nodes are expanded.

ToggleOutliningExpansion(TextSnapshotOffset)

Toggles the collapsed state of the outlining node that contains the specified offset.

void ToggleOutliningExpansion(TextSnapshotOffset snapshotOffset)
Parameter Type Description
snapshotOffset TextSnapshotOffset

The TextSnapshotOffset at which to toggle a containing outlining node.

ToggleOutliningExpansion(ITextViewLine)

Toggles the collapsed state of the outlining nodes that intersect with the specified ITextViewLine.

void ToggleOutliningExpansion(ITextViewLine viewLine)
Parameter Type Description
viewLine ITextViewLine

The ITextViewLine to examine.

Inherited Members