DXCore Services – Clipboard
May 21st, 2011
The Clipboard DXCore service provides access to the Windows clipboard. Contains methods for checking, retrieving, copying, cutting and pasting clipboard contents into the code editor.
Here are the methods of this service:
Name | Description |
Copy | Copies the current selection to the clipboard. |
Cut | Cuts the current selection to the clipboard. |
Cycle | Cycles the clipboard ring and places the next available text on the clipboard. |
FindData(string[]) | Returns an object supporting the clipboard format specified by formats. |
FindData(Type[]) | Returns an object supporting the clipboard format specified by formats |
GetData(String) | Returns an object supporting the clipboard format specified by format |
GetData(Type) | Returns an object supporting the clipboard format specified by format |
GetText | Returns the text on the clipboard. GetText tries to obtain the “UnicodeText” format first, and checks for the “Text” format if “UnicodeText” is not available. |
HasDataFormat(String) | Returns true if the clipboard holds data that can be represented by the format specified. |
HasDataFormat(Type) | Returns true if the clipboard holds data that can be represented by the format specified. |
HasType(String) | Returns true if the clipboard has an identifier of the same type as that specified by type name. |
Paste | Pastes the current contents of the clipboard. |
Properties:
Name | Description |
AsComponent | Returns the data on the clipboard as a deserialized Component. |
AsHTML | Returns the data on the clipboard as HTML. |
AsImage | Returns the data on the clipboard as an Image. |
AsObject | Returns the data on the clipboard as a deserialized object. |
AsRTF | Returns the data on the clipboard as RTF. |
AsString | Returns the data on the clipboard as string. |
AsText | Returns the data on the clipboard as text. |
AsUnicodeText | Returns the data on the clipboard as Unicode text. |
DataIsFresh | Returns true if the data in the clipboard originates from the current cursor position in the editor. |
HasComponent | Returns true if the clipboard holds a Component. |
HasHTML | Returns true if the clipboard holds data that can be represented as HTML. |
HasImage | Returns true if the clipboard holds data that can be represented as an Image. |
HasObject | Returns true if the clipboard holds a .NET object. |
HasRTF | Returns true if the clipboard holds data that can be represented in RTF (Rich Text Format). |
HasText | Returns true if the clipboard holds data that can be represented as text. |
HasUnicodeText | Returns true if the clipboard holds data that can be represented in Unicode text. |
LastEntry | Returns a ClipboardEntry instance of the last entry cut or copied to the clipboard. |
LastOperation | Returns the last clipboard operation performed in the IDE. The operation shall be – ClipboardOperation.Cut, ClipboardOperation.Copy, or ClipboardOperation.Unknown. |
LastType | Gets the TypeDeclaration instance for the identifier on the clipboard, if determinable at the time of the cut or copy operation. |
MonitoringEnabled | Gets or sets the value which specifies whether DXCore should monitor clipboard operations. Note that it is hidden from Intellisense. |