Share via


IVsSelectionContext Interface

Definition

public interface class IVsSelectionContext
public interface IVsSelectionContext
type IVsSelectionContext = interface
Public Interface IVsSelectionContext

Properties

CurrentContextMenuHost

Get the current context menu host

CurrentDocumentSelection

Returns the collection of selected elements in the active document window.

CurrentSelection

Returns the collection of selected elements in the active window. This could be a document window or tool window.

CurrentStore

Store associated to the current DocData normally. But other can override it in case of special needs ($$$common Store for instance)

DiagramClientView

Gets the currently focused DiagramClientView

SingleDocumentSelection

Returns the primary selected object in the active document window.

SingleSelection

Returns the primary selected object in active window. This could be a document window or tool window.

Methods

CanDeleteSelectedItems()

Determine whether selected item can be deleted or not

DeleteSelectedItems(String)

Protected method to delete selected items

IsDiagramSelected()

Determines if the current selection is a diagram

Extension Methods

AtLeastOneSelected<T>(IVsSelectionContext)

Helper returning true if the selection contains at least an element of type T

AtLeastOneSelected<T1,T2>(IVsSelectionContext)

Helper returning true if the selection contains at least an element of type T1 or T2.

GetCurrentDocumentSelection<T>(IVsSelectionContext)

Get the subset of the current document selection which is of type T

GetCurrentSelection<T>(IVsSelectionContext)

Get the subset of the current selection which is of type T

IsAnyDocumentSelectionUndeletable(IVsSelectionContext)

Returns whether any of the shape items in the selection list cannot be deleted. This implementation checks for Compartment and MoveableHostShape shapes.

IsSingleDocumentSelection(IVsSelectionContext)

Returns whether or not there is only one selected item on the active document.

IsSingleSelection(IVsSelectionContext)

Returns whether or not there is only one selected item on the active window. This could be a document or tool window.

Applies to