Freigeben über


IMonitorSelectionService Interface

Definition

Important

This API is not CLS-compliant.

Monitors current selection state in the shell.

public interface class IMonitorSelectionService
[System.CLSCompliant(false)]
public interface IMonitorSelectionService
public interface IMonitorSelectionService
[<System.CLSCompliant(false)>]
type IMonitorSelectionService = interface
type IMonitorSelectionService = interface
Public Interface IMonitorSelectionService
Attributes

Remarks

Typically, this service is provided locally by DSL Tools' DocDatas and ToolWindows

Properties

CurrentDocument

Retrieves the DocData object corresponding to the active document. Usually, this object will implement at least the IVsPersistDocData2 interface.

CurrentDocumentView

Retrieves the currently active DocView. Note that this can be different from the CurrentWindow, as the CurrentWindow property also tracks tool windows

CurrentSelectionContainer

Retrieves the currently active selection container. Note that this may be different from the currently active window, since not all windows are selection containers. Command handlers which are driven off of the current selection should use this property, rather than the current window. This is because the selection container may not be the focused window. The distinction is particularly important in the case of the Command Window.

CurrentUndoManager

Retrieves the undo manager associated with the currently focused window.

CurrentWindow

Retrieves the window pane object associated with the currently focused window. This could be a document or a tool window. Usually, this object will implement at least the IVsWindowPane interface.

CurrentWindowFrame

Retrieves the window frame associated with the currently focussed window. This will always be an IVsWindowFrame (or null).

Methods

GetCommandContextCookie(Guid)

Returns the cookie for the given context guid.

IsCommandContextActive(Guid)

Returns true if the given command context is currently active

IsCommandContextActive(UInt32)

Returns true if the command context corresponding to the given cookie is currently active

Events

CommandContextChanged

Called when a command UI context is activated/deactivated.

DocumentChanged

Called when the document changes

DocumentWindowChanged

Called when the document window changes

SelectionChanged

Called when selection changes

UndoManagerChanged

Called when the current undo manager changes

WindowChanged

Called when the window frame changes

Applies to