Udostępnij za pośrednictwem


IVsSelectionEvents Interface

Definition

Notifies registered VSPackages of changes to the current selection, element value, or command UI context.

public interface class IVsSelectionEvents
public interface class IVsSelectionEvents
__interface IVsSelectionEvents
[System.Runtime.InteropServices.Guid("82871589-D680-4D86-B969-9D1102B00F6F")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsSelectionEvents
[System.Runtime.InteropServices.Guid("82871589-D680-4D86-B969-9D1102B00F6F")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsSelectionEvents
[<System.Runtime.InteropServices.Guid("82871589-D680-4D86-B969-9D1102B00F6F")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsSelectionEvents = interface
[<System.Runtime.InteropServices.Guid("82871589-D680-4D86-B969-9D1102B00F6F")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsSelectionEvents = interface
Public Interface IVsSelectionEvents
Attributes

Remarks

To receive notifications, you must first register with the SVsShellMonitorSelection service by calling AdviseSelectionEvents. The pSink parameter to this method holds a pointer to your IVsSelectionEvents interface.

Each method in IVsSelectionEvents reports a different type of change. For example, when the current selection changes, your OnSelectionChanged method is called.

Notes to Implementers

VSPackages implement IVsSelectionEvents to be able to track selection changes in the environment.

Methods

OnCmdUIContextChanged(UInt32, Int32)

Reports that the command UI context has changed.

OnElementValueChanged(UInt32, Object, Object)

Reports that an element value has changed.

OnSelectionChanged(IVsHierarchy, UInt32, IVsMultiItemSelect, ISelectionContainer, IVsHierarchy, UInt32, IVsMultiItemSelect, ISelectionContainer)

Reports that the project hierarchy, item and/or selection container has changed.

Applies to