ClipboardCommandSet Class

Definition

Important

This API is not CLS-compliant.

ClipboardCommandSet to support cut/copy/paste operation.

public ref class ClipboardCommandSet abstract : Microsoft::VisualStudio::Modeling::Shell::CommandSetLibrary
[System.CLSCompliant(false)]
public abstract class ClipboardCommandSet : Microsoft.VisualStudio.Modeling.Shell.CommandSetLibrary
public abstract class ClipboardCommandSet : Microsoft.VisualStudio.Modeling.Shell.CommandSetLibrary
[<System.CLSCompliant(false)>]
type ClipboardCommandSet = class
    inherit CommandSetLibrary
type ClipboardCommandSet = class
    inherit CommandSetLibrary
Public MustInherit Class ClipboardCommandSet
Inherits CommandSetLibrary
Inheritance
Attributes

Constructors

ClipboardCommandSet(IServiceProvider)

Creates a new CommandSet

Properties

CreateBitmapPreference

Returns desired preference (FavorClarityOverSmallSize/FavorSmallSizeOverClarity) for bitmap creation. Default is FavorSmallSizeOverClarity

CurrentDocData

Currently focused document

(Inherited from CommandSetLibrary)
CurrentDocumentSelection

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

(Inherited from CommandSetLibrary)
CurrentModelingDocView

Currently focused document view

(Inherited from CommandSetLibrary)
CurrentSelection

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

(Inherited from CommandSetLibrary)
ElementOperations

Returns ElementOperations associated with this ClipboardCommandSet. If

MenuService

Menu command service used to manage command handlers.

(Inherited from CommandSetLibrary)
MonitorSelection

Service used to track selection in the Visual Studio shell.

(Inherited from CommandSetLibrary)
SelectedElements

Returns the current selected set of model elements (not shapes)

ServiceProvider

Service provider used to retrieve Visual Studio services.

(Inherited from CommandSetLibrary)
SingleDocumentSelection

Returns the primary selected object in the active document window.

(Inherited from CommandSetLibrary)
SingleSelection

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

(Inherited from CommandSetLibrary)
TargetElement

Returns the first element of the selection.

Methods

CanDeleteSelectedItems()

Determine whether selected item can be deleted or not

(Inherited from CommandSetLibrary)
CopyModelElementsIntoElementGroupPrototype(IDataObject, IList<ModelElement>)

Copies the collection of ModelElements to the specified IDataObject

CreateBitmapForClipboard(IEnumerable<ShapeElement>)

Returns bitmap for staged into the clipboard.

CreateMetafileForClipboard(IEnumerable<ShapeElement>)

For the given shapes, this method to create enhanced meta file for the Clipboard. If you do not want enhanced meta file to be in the clipboard, override this method and return null.

DeleteSelectedItems(String)

Protected method to delete selected items

(Inherited from CommandSetLibrary)
GetMenuCommands()

Provide the menu commands that this commandset implements

(Inherited from CommandSetLibrary)
Initialize()

Initialize the command set

(Inherited from CommandSetLibrary)
InitializeAsync(CancellationToken) (Inherited from CommandSetLibrary)
IsAnyDocumentSelectionCompartment()

Returns whether any of the items in the selection list is a compartment.

(Inherited from CommandSetLibrary)
IsAnyDocumentSelectionMoveableHostShape()

Returns whether any of the items in the selection list is a moveable host shape, which cannot be deleted.

(Inherited from CommandSetLibrary)
IsAnyDocumentSelectionUndeletable()

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

(Inherited from CommandSetLibrary)
IsCurrentDiagramEmpty()

Returns true if diagram has no children.

(Inherited from CommandSetLibrary)
IsDiagramSelected() (Inherited from CommandSetLibrary)
IsSingleDocumentSelection()

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

(Inherited from CommandSetLibrary)
IsSingleSelection()

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

(Inherited from CommandSetLibrary)
ProcessOnMenuCopyCommand()

Implementation of the Copy command

ProcessOnMenuCutCommand()

Implementation of the Cut command

ProcessOnMenuPasteCommand()

Implementation of the Paste command

ProcessOnStatusCopyCommand(MenuCommand)

Virtual method to process the menu Copy operation

ProcessOnStatusCutCommand(MenuCommand)

Virtual method to process the menu Cut operation

ProcessOnStatusPasteCommand(MenuCommand)

Virtual method to process the menu Paste operation

ResolveExportedShapesForClipboardImages(IDataObject, IEnumerable<ModelElement>)

Method to resolve shapes used for export as Bitmap/Emf file into Clipboard. Using the DataObject enables to bring a coherence between what was copied as model-elements, and what is copied as images (otherwise it might be that you select two shapes, but not the connector between them, and this one is copied as elements, but not as an image)

Applies to