ClipboardCommandSet Class
Represents a subset of the commands that are available in menus in a domain-specific language. Override methods in YourLanguageClipboardCommandSet to modify how these commands are processed.
This API is not CLS-compliant.
Inheritance Hierarchy
System.Object
System.MarshalByRefObject
Microsoft.VisualStudio.Modeling.Shell.CommandSetLibrary
Microsoft.VisualStudio.Modeling.Shell.ClipboardCommandSet
Namespace: Microsoft.VisualStudio.Modeling.Shell
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0.dll)
Syntax
'Declaração
<CLSCompliantAttribute(False)> _
Public MustInherit Class ClipboardCommandSet _
Inherits CommandSetLibrary
[CLSCompliantAttribute(false)]
public abstract class ClipboardCommandSet : CommandSetLibrary
[CLSCompliantAttribute(false)]
public ref class ClipboardCommandSet abstract : public CommandSetLibrary
[<AbstractClass>]
[<CLSCompliantAttribute(false)>]
type ClipboardCommandSet =
class
inherit CommandSetLibrary
end
public abstract class ClipboardCommandSet extends CommandSetLibrary
The ClipboardCommandSet type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ClipboardCommandSet | Creates a new CommandSet |
Top
Properties
Name | Description | |
---|---|---|
CreateBitmapPreference | ||
CurrentDocData | (Inherited from CommandSetLibrary.) | |
CurrentDocumentSelection | (Inherited from CommandSetLibrary.) | |
CurrentModelingDocView | (Inherited from CommandSetLibrary.) | |
CurrentSelection | (Inherited from CommandSetLibrary.) | |
ElementOperations | ||
MenuService | (Inherited from CommandSetLibrary.) | |
MonitorSelection | (Inherited from CommandSetLibrary.) | |
SelectedElements | ||
ServiceProvider | (Inherited from CommandSetLibrary.) | |
SingleDocumentSelection | (Inherited from CommandSetLibrary.) | |
SingleSelection | (Inherited from CommandSetLibrary.) | |
TargetElement |
Top
Methods
Name | Description | |
---|---|---|
CanDeleteSelectedItems | Returns true if the selected items can be deleted. (Inherited from CommandSetLibrary.) | |
CopyModelElementsIntoElementGroupPrototype | Copies the collection of ModelElements to the specified IDataObject | |
CreateBitmapForClipboard | Called on copy or cut to generate a bitmap that can be placed on the clipboard, given a set of shapes, or null to place no bitmap on the clipboard. | |
CreateMetafileForClipboard | Called on copy or cut to generate a meta file for the Clipboard. The default implementation generates an enhanced metafile. | |
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
DeleteSelectedItems | Delete the selected items. (Inherited from CommandSetLibrary.) | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
GetMenuCommands | Defines the list of menu commands that this CommandSet implements. (Inherited from CommandSetLibrary.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Initialize | Initialize the command set. Calls GetMenuCommands and caches the result. (Inherited from CommandSetLibrary.) | |
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
IsAnyDocumentSelectionCompartment | True if any of the items in the selection list is a compartment. (Inherited from CommandSetLibrary.) | |
IsAnyDocumentSelectionMoveableHostShape | True if any of the items in the selection list is a moveable host shape, which cannot be deleted. (Inherited from CommandSetLibrary.) | |
IsAnyDocumentSelectionUndeletable | True if any of the shape items in the selection list cannot be deleted. (Inherited from CommandSetLibrary.) | |
IsCurrentDiagramEmpty | True if the diagram has no children. (Inherited from CommandSetLibrary.) | |
IsDiagramSelected | True if the diagram is selected. (Inherited from CommandSetLibrary.) | |
IsSingleDocumentSelection | True if there is only one selected item on the active document. (Inherited from CommandSetLibrary.) | |
IsSingleSelection | True if there is only one selected item on the active document window or tool window. (Inherited from CommandSetLibrary.) | |
MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
ProcessOnMenuCopyCommand | Copies the selection to the clipboard. Override this method to change the behavior. | |
ProcessOnMenuCutCommand | Copies the selection to the clipboard and deletes the elements from the model. Override this method to change the behavior. | |
ProcessOnMenuPasteCommand | Inserts the clipboard content into the model. Override this method to change the behavior. | |
ProcessOnStatusCopyCommand | Called to determine whether the Copy command should be enabled and visible on a menu. If you override this method, set cmd.Enabled and cmd.Visible. | |
ProcessOnStatusCutCommand | Called to determine whether the Cut command should be enabled and visible on a menu. If you override this method, set cmd.Enabled and cmd.Visible. | |
ProcessOnStatusPasteCommand | Called to determine whether the Paste command should be enabled and visible on a menu. If you override this method, set cmd.Enabled and cmd.Visible. | |
ResolveExportedShapesForClipboardImages | Get the complete set of shapes and links that should be exported to the clipboard, given a set of model elements. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
When a set of model elements is to be copied to the clipboard, an IDataObject is prepared that contains: an ElementGroupPrototype containing the model elements; a bitmap of the shapes that present the model elements; and an Extended MetaFile of the shapes. The EGP can be used to paste into another DSL, UML diagram, or another application that understands the DSL. The bitmap and EMF versions can be used to paste images of the shapes into other applications such as PowerPoint.
For more information, see How to: Modify a Standard Menu Command in a Domain-Specific Language and How to: Add a Command to the Shortcut Menu.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.